00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SENSRVCHANNEL_H
00021 #define SENSRVCHANNEL_H
00022
00023 #include <e32base.h>
00024 #include <sensrvtypes.h>
00025 #include <sensrvchannelconditionset.h>
00026 #include <sensrvchannelinfo.h>
00027
00028
00029 class MSensrvPropertyListener;
00030 class MSensrvDataListener;
00031 class MSensrvChannelConditionListener;
00032 class CSensrvChannelCondition;
00033 class CSensrvChannelListener;
00034
00035
00102 NONSHARABLE_CLASS( CSensrvChannel ): public CBase
00103 {
00104 public:
00118 IMPORT_C static CSensrvChannel* NewL
00119 ( const TSensrvChannelInfo& aChannelInfo );
00120
00134 IMPORT_C static CSensrvChannel* NewLC
00135 ( const TSensrvChannelInfo& aChannelInfo );
00136
00137 public:
00146 virtual void OpenChannelL() = 0;
00147
00157 virtual TInt CloseChannel() = 0;
00158
00165 virtual const TSensrvChannelInfo& GetChannelInfo() const = 0;
00166
00216 virtual void StartDataListeningL( MSensrvDataListener* aDataListener,
00217 const TInt aDesiredCount,
00218 const TInt aMaximumCount,
00219 const TInt aBufferingPeriod ) = 0;
00220
00227 virtual TInt StopDataListening() = 0;
00228
00257 virtual TInt GetData( TDes8& aData ) = 0;
00258
00275 virtual TInt SetProperty( const TSensrvProperty& aProperty ) = 0;
00276
00290 virtual void GetPropertyL( const TSensrvPropertyId aPropertyId,
00291 const TInt aItemIndex,
00292 TSensrvProperty& aProperty ) = 0;
00293
00309 virtual void GetPropertyL( const TSensrvPropertyId aPropertyId,
00310 const TInt aItemIndex,
00311 const TInt aArrayIndex,
00312 TSensrvProperty& aProperty ) = 0;
00313
00323 virtual void GetAllPropertiesL
00324 ( RSensrvPropertyList& aChannelPropertyList ) = 0;
00325
00338 virtual void GetAllPropertiesL
00339 ( const TSensrvPropertyId aPropertyId,
00340 RSensrvPropertyList& aChannelPropertyList ) = 0;
00341
00367 virtual void SetPropertyListenerL
00368 ( MSensrvPropertyListener* aChannelPropertyListener ) = 0;
00369
00394 virtual void AddConditionL( CSensrvChannelConditionSet& aChannelConditionSet ) = 0;
00395
00412 virtual void RemoveConditionL
00413 ( CSensrvChannelConditionSet& aChannelConditionSet ) = 0;
00414
00445 virtual void StartConditionListeningL
00446 ( MSensrvChannelConditionListener* aChannelConditionListener,
00447 const TInt aObjectCount,
00448 const TInt aBufferingPeriod ) = 0;
00449
00461 virtual TInt StopConditionListening() = 0;
00462
00463 public:
00467 CSensrvChannel();
00468 };
00469
00470
00471 #endif //SENSRVCHANNEL_H
00472
00473