AccMonitorInfo.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : AccMonitorInfo.h
00004 *  Part of     : Accessory Services / AccessoryMonitor
00005 *  Description : Accessory information is encapsulated to this class.
00006 *  Version     : %version: 2 %
00007 *
00008 *  Copyright © 2006 Nokia.  All rights reserved.
00009 *  This material, including documentation and any related computer
00010 *  programs, is protected by copyright controlled by Nokia.  All
00011 *  rights are reserved.  Copying, including reproducing, storing,
00012 *  adapting or translating, any or all of this material requires the
00013 *  prior written consent of Nokia.  This material also contains
00014 *  confidential information which may not be disclosed to others
00015 *  without the prior written consent of Nokia.
00016 * ============================================================================
00017 * Template version: 4.1
00018 */
00019 
00020 
00021 #ifndef ACCMONITORINFO_H
00022 #define ACCMONITORINFO_H
00023 
00024 // INCLUDES
00025 #include <e32base.h>
00026 #include <AccMonitorCapabilities.h>
00027 
00028 // FORWARD DECLARATIONS
00029 class CAccMonitorInfo;
00030 
00031 // EXTERNAL DATA TYPES
00036 typedef RPointerArray<CAccMonitorInfo>  RConnectedAccessories;
00037 
00042 typedef RArray<TAccMonCapability>   RAccMonCapabilityArray;
00043 
00044 // CLASSES
00056 class CAccMonitorInfo : public CBase
00057     {
00058     
00059 public:
00060     
00064     static IMPORT_C CAccMonitorInfo* NewL();
00065     
00069     static IMPORT_C CAccMonitorInfo* NewLC();
00070     
00074     static IMPORT_C CAccMonitorInfo* NewL( const CAccMonitorInfo* aAccMonInfo );
00075     
00079     static IMPORT_C CAccMonitorInfo* NewLC( const CAccMonitorInfo* aAccMonInfo );
00080     
00084     inline void Reset();
00085     
00091     inline TAccMonCapability AccDeviceType() const;
00092     
00099     inline TAccMonCapability AccPhysicalConnection() const;
00100     
00107     inline TUint64 AccDeviceAddress() const;
00108     
00117     inline TAccMonCapability AccCapabilityAtIndex( TInt aIndex ) const;
00118     
00124     inline TInt Count() const;
00125     
00133     inline TBool Exists( TAccMonCapability aCapability ) const;
00134     
00143     IMPORT_C TBool Exists( RAccMonCapabilityArray& aCapabilityArray ) const;
00144     
00151     IMPORT_C void CopyL( const CAccMonitorInfo* aAccMonInfo );
00152     
00159     IMPORT_C TBool CompareL( const CAccMonitorInfo* aAccMonInfo ) const;
00160     
00164     virtual ~CAccMonitorInfo();
00165       
00166 private:  
00167     
00168     friend class CAccMonitorContainer;
00169     
00173     CAccMonitorInfo();
00174     
00178     void ConstructL();
00179     
00183     void ConstructL( const CAccMonitorInfo* aAccMonInfo );
00184     
00189     void operator=( CAccMonitorInfo aAccInfo );
00190     
00191 private:
00192     
00193     // An array to hold the capabilities for this instance
00194     RAccMonCapabilityArray iAccCapabilityArray;
00195     
00196     // Defines device type for this accessory
00197     TAccMonCapability iAccessoryDeviceType;
00198     
00199     // Defines physical connection for this accessory
00200     TAccMonCapability iAccessoryPhysicalConnection;
00201     
00202     // Defines device address for this accessory, not defined allways
00203     TUint64 iDeviceAddress;
00204     
00205     // A numerical definition to point the correct accessory
00206     TInt iAccessoryID;
00207     
00208     // A reserved member variable for future use.
00209     TInt iReserved1;
00210     
00211     // A reserved member variable for future use.
00212     TInt iReserved2;
00213     };
00214     
00215 #include <AccMonitorInfo.inl>    
00216 
00217 #endif // ACCMONITORINFO_H
00218 
00219 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top