AccMonitor.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name         : AccMonitor.h
00004 *  Part of      : Accessory Services / AccessoryMonitor
00005 *  Interface    : SDK, Accessory Monitoring API
00006 *  Description  : This API is used for getting 
00007 *                 information about connected accessories. The accessory 
00008 *                 connections and disconnections can also be listened through
00009 *                 this API.
00010 *  Version      : %version: 1 %
00011 *
00012 *  Copyright © 2006 Nokia.  All rights reserved.
00013 *  This material, including documentation and any related computer
00014 *  programs, is protected by copyright controlled by Nokia.  All
00015 *  rights are reserved.  Copying, including reproducing, storing,
00016 *  adapting or translating, any or all of this material requires the
00017 *  prior written consent of Nokia.  This material also contains
00018 *  confidential information which may not be disclosed to others
00019 *  without the prior written consent of Nokia.
00020 * ============================================================================
00021 * Template version: 4.1
00022 */
00023 
00024 #ifndef ACCMONITOR_H
00025 #define ACCMONITOR_H
00026 
00027 // INCLUDES
00028 #include <e32base.h>
00029 #include <AccMonitorInfo.h>
00030 
00031 // FORWARD DECLARATIONS
00032 class MAccMonitorObserver;
00033 
00034 // CLASS DECLARATION
00125 NONSHARABLE_CLASS( CAccMonitor ) : public CBase 
00126   {
00127 public:
00128 
00132     IMPORT_C static CAccMonitor* NewL();
00133     
00137     IMPORT_C static CAccMonitor* NewLC();
00138 
00139 public: 
00140 
00152     virtual TInt GetConnectedAccessoriesL(
00153       RConnectedAccessories& aAccessoriesArray ) const = 0;
00154     
00163     virtual void StartObservingL( 
00164       MAccMonitorObserver* aObserver ) = 0;
00165                    
00180     virtual void StartObservingL( 
00181       MAccMonitorObserver* aObserver,
00182       const CAccMonitorInfo* aInfo ) = 0;
00183     
00200     virtual void StartObservingL( 
00201       MAccMonitorObserver* aObserver,
00202       const RAccMonCapabilityArray& aCapabilityArray ) = 0;
00203     
00209     virtual void StopObserving() = 0;
00210     
00216     virtual TBool IsObserving() const = 0;
00217     
00231     virtual void GetCapabilityValueL( 
00232       const CAccMonitorInfo* aInfo,
00233       const TUint32 aCapability,
00234       TInt& aValue ) const = 0;
00235     
00236 protected:
00237 
00241     CAccMonitor();
00242     
00246     virtual void ConstructL() = 0;
00247         
00248     };
00249 
00250 
00256 class MAccMonitorObserver
00257     {
00258 public:
00259     
00268         virtual void ConnectedL(
00269           CAccMonitorInfo* aAccessoryInfo ) = 0;
00270                 
00279         virtual void DisconnectedL(
00280           CAccMonitorInfo* aAccessoryInfo ) = 0;
00281      
00287         virtual void AccMonitorObserverError( TInt aError ) = 0;
00288 
00289     };
00290         
00291     
00292 
00293 #endif // ACCMONITOR_H
00294 
00295 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top