epoc32/include/mdataproviderobserver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/mdataproviderobserver.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mdataproviderobserver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,117 @@
     1.4 -mdataproviderobserver.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// Definition of the data provider observer abstract class
    1.19 +// It is anticipated that this class will be used as a mixin for
    1.20 +// those objects which wish to provide services for an MDataProvider
    1.21 +// plugin.
    1.22 +// 
    1.23 +//
    1.24 +
    1.25 +
    1.26 +#ifndef __MDATAPROVIDEROBSERVER_H__
    1.27 +#define __MDATAPROVIDEROBSERVER_H__
    1.28 +
    1.29 +// System includes
    1.30 +//
    1.31 +#include <e32std.h>
    1.32 +
    1.33 +//##ModelId=3B712B2B01C2
    1.34 +class MDataProviderObserver
    1.35 +/**
    1.36 +MDataProviderObserver provides a virtual interface for any class to observe
    1.37 +any MDataProvider, and provide data receiving services. 
    1.38 +@publishedAll
    1.39 +@deprecated
    1.40 +*/
    1.41 +	{
    1.42 +public:	// Methods
    1.43 +
    1.44 +/**
    1.45 +	Intended Usage	:	Called by the data provider to request processing of 
    1.46 +	the data within the buffer.
    1.47 +	@since			6.0
    1.48 +	@param			aBuffer	A reference to the buffer with the data to process
    1.49 + */
    1.50 +	//##ModelId=3B712B2B0209
    1.51 +	virtual void ProcessDataL(HBufC8& aBuffer) = 0;
    1.52 +
    1.53 +/**
    1.54 +	Intended Usage	:	Called by the data provider to report its status to 
    1.55 +	its observer. A status code which is either a standard error condition, 
    1.56 +	(i.e. < 0), a percentage complete value, ( 0 > aStatus < 100), OR a 
    1.57 +	TPluginStatus value.
    1.58 +	@since			6.0
    1.59 +	@param			aStatusCode	The status of the data provider
    1.60 + */
    1.61 +	//##ModelId=3B712B2B0203
    1.62 +	virtual void SetStatus(TInt aStatusCode = KErrNone) = 0;
    1.63 +
    1.64 +/**
    1.65 +	Intended Usage	:	The request to construct a CDataHandler to process data 
    1.66 +	of aDataType, where aDataType is a string to match against some plugins 
    1.67 +	declared data handling ability.
    1.68 +	@since			6.0
    1.69 +	@param			aDataType A reference to a descriptor with the data type
    1.70 + */
    1.71 +	//##ModelId=3B712B2B01FE
    1.72 +	virtual void SetDocumentTypeL(const TDesC& aDataType) = 0;
    1.73 +
    1.74 +/**
    1.75 +	Intended Usage	:	The request to construct a CDataHandler for aDataType with
    1.76 +	non default document encoding where aDataType is a string to match against 
    1.77 +	some plugins declared data handling ability.
    1.78 +	@since			6.0
    1.79 +	@param			aDataType		A reference to a descriptor with the data type
    1.80 +	@param			aContentType	A reference to a descriptor with the content type
    1.81 + */
    1.82 +	//##ModelId=3B712B2B0200
    1.83 +	virtual void SetDocumentTypeL(const TDesC& aDataType, const TDesC& aContentType) = 0;
    1.84 +
    1.85 +/**
    1.86 +	Intended Usage	:	The report of how many bytes of data is expected to be 
    1.87 +	passed to ProcessDataL, enabling %age reporting capabilities.
    1.88 +	@since			6.0
    1.89 +	@param			aAmountExpected	An integer value of the expected amount
    1.90 + */
    1.91 +	//##ModelId=3B712B2B01EC
    1.92 +	virtual void SetDataExpected(TInt aAmountExpected) = 0;
    1.93 +
    1.94 +/**
    1.95 +	Intended Usage	:	Set the URI that the DataProvider considers the base 
    1.96 +	URI for the current data.
    1.97 +	@since			6.0
    1.98 +	@param			aBaseUri	A const pointer to the uri
    1.99 + */
   1.100 +	//##ModelId=3B712B2B01EA
   1.101 +	virtual void SetBaseUriL(const TDesC* aBaseUri) = 0;
   1.102 +
   1.103 +private:
   1.104 +
   1.105 +/**
   1.106 +	Intended Usage	:	Reserved for future expansion.
   1.107 +	@since			6.0
   1.108 + */
   1.109 +	//##ModelId=3B712B2B01E1
   1.110 +	virtual void MDataProviderObserverReserved1() =0;
   1.111 +
   1.112 +/**
   1.113 +	Intended Usage	:	Reserved for future expansion.
   1.114 +	@since			6.0
   1.115 + */
   1.116 +	//##ModelId=3B712B2B01E0
   1.117 +	virtual void MDataProviderObserverReserved2() =0;
   1.118 +
   1.119 +	};  // MDataProviderObserver
   1.120 +
   1.121 +#endif    // __MDATAPROVIDEROBSERVER_H__