author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 3 | e1b950c65cb4 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// Definition of the data provider observer abstract class |
williamr@2 | 15 |
// It is anticipated that this class will be used as a mixin for |
williamr@2 | 16 |
// those objects which wish to provide services for an MDataProvider |
williamr@2 | 17 |
// plugin. |
williamr@2 | 18 |
// |
williamr@2 | 19 |
// |
williamr@2 | 20 |
|
williamr@2 | 21 |
|
williamr@2 | 22 |
#ifndef __MDATAPROVIDEROBSERVER_H__ |
williamr@2 | 23 |
#define __MDATAPROVIDEROBSERVER_H__ |
williamr@2 | 24 |
|
williamr@2 | 25 |
// System includes |
williamr@2 | 26 |
// |
williamr@2 | 27 |
#include <e32std.h> |
williamr@2 | 28 |
|
williamr@2 | 29 |
//##ModelId=3B712B2B01C2 |
williamr@2 | 30 |
class MDataProviderObserver |
williamr@2 | 31 |
/** |
williamr@2 | 32 |
MDataProviderObserver provides a virtual interface for any class to observe |
williamr@2 | 33 |
any MDataProvider, and provide data receiving services. |
williamr@2 | 34 |
@publishedAll |
williamr@2 | 35 |
@deprecated |
williamr@2 | 36 |
*/ |
williamr@2 | 37 |
{ |
williamr@2 | 38 |
public: // Methods |
williamr@2 | 39 |
|
williamr@2 | 40 |
/** |
williamr@2 | 41 |
Intended Usage : Called by the data provider to request processing of |
williamr@2 | 42 |
the data within the buffer. |
williamr@2 | 43 |
@since 6.0 |
williamr@2 | 44 |
@param aBuffer A reference to the buffer with the data to process |
williamr@2 | 45 |
*/ |
williamr@2 | 46 |
//##ModelId=3B712B2B0209 |
williamr@2 | 47 |
virtual void ProcessDataL(HBufC8& aBuffer) = 0; |
williamr@2 | 48 |
|
williamr@2 | 49 |
/** |
williamr@2 | 50 |
Intended Usage : Called by the data provider to report its status to |
williamr@2 | 51 |
its observer. A status code which is either a standard error condition, |
williamr@2 | 52 |
(i.e. < 0), a percentage complete value, ( 0 > aStatus < 100), OR a |
williamr@2 | 53 |
TPluginStatus value. |
williamr@2 | 54 |
@since 6.0 |
williamr@2 | 55 |
@param aStatusCode The status of the data provider |
williamr@2 | 56 |
*/ |
williamr@2 | 57 |
//##ModelId=3B712B2B0203 |
williamr@2 | 58 |
virtual void SetStatus(TInt aStatusCode = KErrNone) = 0; |
williamr@2 | 59 |
|
williamr@2 | 60 |
/** |
williamr@2 | 61 |
Intended Usage : The request to construct a CDataHandler to process data |
williamr@2 | 62 |
of aDataType, where aDataType is a string to match against some plugins |
williamr@2 | 63 |
declared data handling ability. |
williamr@2 | 64 |
@since 6.0 |
williamr@2 | 65 |
@param aDataType A reference to a descriptor with the data type |
williamr@2 | 66 |
*/ |
williamr@2 | 67 |
//##ModelId=3B712B2B01FE |
williamr@2 | 68 |
virtual void SetDocumentTypeL(const TDesC& aDataType) = 0; |
williamr@2 | 69 |
|
williamr@2 | 70 |
/** |
williamr@2 | 71 |
Intended Usage : The request to construct a CDataHandler for aDataType with |
williamr@2 | 72 |
non default document encoding where aDataType is a string to match against |
williamr@2 | 73 |
some plugins declared data handling ability. |
williamr@2 | 74 |
@since 6.0 |
williamr@2 | 75 |
@param aDataType A reference to a descriptor with the data type |
williamr@2 | 76 |
@param aContentType A reference to a descriptor with the content type |
williamr@2 | 77 |
*/ |
williamr@2 | 78 |
//##ModelId=3B712B2B0200 |
williamr@2 | 79 |
virtual void SetDocumentTypeL(const TDesC& aDataType, const TDesC& aContentType) = 0; |
williamr@2 | 80 |
|
williamr@2 | 81 |
/** |
williamr@2 | 82 |
Intended Usage : The report of how many bytes of data is expected to be |
williamr@2 | 83 |
passed to ProcessDataL, enabling %age reporting capabilities. |
williamr@2 | 84 |
@since 6.0 |
williamr@2 | 85 |
@param aAmountExpected An integer value of the expected amount |
williamr@2 | 86 |
*/ |
williamr@2 | 87 |
//##ModelId=3B712B2B01EC |
williamr@2 | 88 |
virtual void SetDataExpected(TInt aAmountExpected) = 0; |
williamr@2 | 89 |
|
williamr@2 | 90 |
/** |
williamr@2 | 91 |
Intended Usage : Set the URI that the DataProvider considers the base |
williamr@2 | 92 |
URI for the current data. |
williamr@2 | 93 |
@since 6.0 |
williamr@2 | 94 |
@param aBaseUri A const pointer to the uri |
williamr@2 | 95 |
*/ |
williamr@2 | 96 |
//##ModelId=3B712B2B01EA |
williamr@2 | 97 |
virtual void SetBaseUriL(const TDesC* aBaseUri) = 0; |
williamr@2 | 98 |
|
williamr@2 | 99 |
private: |
williamr@2 | 100 |
|
williamr@2 | 101 |
/** |
williamr@2 | 102 |
Intended Usage : Reserved for future expansion. |
williamr@2 | 103 |
@since 6.0 |
williamr@2 | 104 |
*/ |
williamr@2 | 105 |
//##ModelId=3B712B2B01E1 |
williamr@2 | 106 |
virtual void MDataProviderObserverReserved1() =0; |
williamr@2 | 107 |
|
williamr@2 | 108 |
/** |
williamr@2 | 109 |
Intended Usage : Reserved for future expansion. |
williamr@2 | 110 |
@since 6.0 |
williamr@2 | 111 |
*/ |
williamr@2 | 112 |
//##ModelId=3B712B2B01E0 |
williamr@2 | 113 |
virtual void MDataProviderObserverReserved2() =0; |
williamr@2 | 114 |
|
williamr@2 | 115 |
}; // MDataProviderObserver |
williamr@2 | 116 |
|
williamr@2 | 117 |
#endif // __MDATAPROVIDEROBSERVER_H__ |