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