1.1 --- a/epoc32/include/accmonitorinfo.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/accmonitorinfo.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,218 @@
1.4 -accmonitorinfo.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Accessory information is encapsulated to this class.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef ACCMONITORINFO_H
1.25 +#define ACCMONITORINFO_H
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32base.h>
1.29 +#include <AccMonitorCapabilities.h>
1.30 +
1.31 +// FORWARD DECLARATIONS
1.32 +class CAccMonitorInfo;
1.33 +
1.34 +// EXTERNAL DATA TYPES
1.35 +/**
1.36 +* Type definition RConnectedAccessories consist of connected accessories
1.37 +* definitions which are defined in CAccMonitorInfo class.
1.38 +*/
1.39 +typedef RPointerArray<CAccMonitorInfo> RConnectedAccessories;
1.40 +
1.41 +/**
1.42 +* Type definition RAccMonCapabilityArray consist of an array of accessory
1.43 +* capabilities.
1.44 +*/
1.45 +typedef RArray<TAccMonCapability> RAccMonCapabilityArray;
1.46 +
1.47 +// CLASSES
1.48 +/**
1.49 +* CAccMonitorInfo is a container for single accessory information.
1.50 +*
1.51 +* CAccMonitorInfo holds accessory capabilities and other accessory related
1.52 +* information. The data members of this class can be accessed with methods in
1.53 +* in this class.
1.54 +*
1.55 +* @see CAccMonitor for examples.
1.56 +* @lib AccMonitor
1.57 +* @since S60 5.0
1.58 +*/
1.59 +class CAccMonitorInfo : public CBase
1.60 + {
1.61 +
1.62 +public:
1.63 +
1.64 + /**
1.65 + * Symbian two phased constructor.
1.66 + */
1.67 + static IMPORT_C CAccMonitorInfo* NewL();
1.68 +
1.69 + /**
1.70 + * Symbian two phased constructor.
1.71 + */
1.72 + static IMPORT_C CAccMonitorInfo* NewLC();
1.73 +
1.74 + /**
1.75 + * Symbian two phased constructor.
1.76 + */
1.77 + static IMPORT_C CAccMonitorInfo* NewL( const CAccMonitorInfo* aAccMonInfo );
1.78 +
1.79 + /**
1.80 + * Symbian two phased constructor.
1.81 + */
1.82 + static IMPORT_C CAccMonitorInfo* NewLC( const CAccMonitorInfo* aAccMonInfo );
1.83 +
1.84 + /**
1.85 + * Reset the instance values.
1.86 + */
1.87 + inline void Reset();
1.88 +
1.89 + /**
1.90 + * Gets the accessory device type defined for this connected accessory.
1.91 + *
1.92 + * @return The accessory device type.
1.93 + */
1.94 + inline TAccMonCapability AccDeviceType() const;
1.95 +
1.96 + /**
1.97 + * Gets the accessory physical connection defined for this connected
1.98 + * accessory.
1.99 + *
1.100 + * @return The accessory physical connection.
1.101 + */
1.102 + inline TAccMonCapability AccPhysicalConnection() const;
1.103 +
1.104 + /**
1.105 + * Gets the accessory device address defined for this connected
1.106 + * accessory.
1.107 + *
1.108 + * @return This accessory's device address.
1.109 + */
1.110 + inline TUint64 AccDeviceAddress() const;
1.111 +
1.112 + /**
1.113 + * Gets a capability that is defined in the array for this connected
1.114 + * accessory. If the array of this class is empty and this function is
1.115 + * used this function will panic.
1.116 + *
1.117 + * @param aIndex is the index where some capability needs to be getted.
1.118 + * @return TAccMonCapability the capability in that index.
1.119 + */
1.120 + inline TAccMonCapability AccCapabilityAtIndex( TInt aIndex ) const;
1.121 +
1.122 + /**
1.123 + * Gets the count of objects in the array.
1.124 + *
1.125 + * @return TInt the size of array.
1.126 + */
1.127 + inline TInt Count() const;
1.128 +
1.129 + /**
1.130 + * Checks if some capability is defined in this connected accessory.
1.131 + *
1.132 + * @param aCapability is the capability definition that needs to be
1.133 + * checked if it is defined for this accessory.
1.134 + * @return ETrue if this capability is defined.
1.135 + */
1.136 + inline TBool Exists( TAccMonCapability aCapability ) const;
1.137 +
1.138 + /**
1.139 + * Checks if a group of capabilities are defined for this accessory.
1.140 + * aCapabilityArray is the array of capabilities that need to be checked.
1.141 + *
1.142 + * @param aCapabilityArray is the array of capability definitionion that need to be
1.143 + * checked if they are defined for this accessory.
1.144 + * @return ETrue if these capabilities is defined.
1.145 + */
1.146 + IMPORT_C TBool Exists( RAccMonCapabilityArray& aCapabilityArray ) const;
1.147 +
1.148 + /**
1.149 + * Copy function for this class.
1.150 + *
1.151 + * @param aAccMonInfo is the instance from what the copy needs to be made of.
1.152 + * @return CAccMonitorInfo the copy of this class.
1.153 + */
1.154 + IMPORT_C void CopyL( const CAccMonitorInfo* aAccMonInfo );
1.155 +
1.156 + /**
1.157 + * Comparison function for this class.
1.158 + *
1.159 + * @param aAccMonInfo is the instance what needs to be compared.
1.160 + * @return ETrue if comparison matches.
1.161 + */
1.162 + IMPORT_C TBool CompareL( const CAccMonitorInfo* aAccMonInfo ) const;
1.163 +
1.164 + /**
1.165 + * Destructor
1.166 + */
1.167 + virtual ~CAccMonitorInfo();
1.168 +
1.169 +private:
1.170 +
1.171 + friend class CAccMonitorContainer;
1.172 +
1.173 + /**
1.174 + * Default Constructor
1.175 + */
1.176 + CAccMonitorInfo();
1.177 +
1.178 + /**
1.179 + * Symbian OS 2nd phase constructor
1.180 + */
1.181 + void ConstructL();
1.182 +
1.183 + /**
1.184 + * Symbian OS 2nd phase constructor
1.185 + */
1.186 + void ConstructL( const CAccMonitorInfo* aAccMonInfo );
1.187 +
1.188 + /**
1.189 + * Assignment operator is hidden so that clients cannot use the
1.190 + * assignement to this class. Instead the CopyL method should be used.
1.191 + */
1.192 + void operator=( CAccMonitorInfo aAccInfo );
1.193 +
1.194 +private:
1.195 +
1.196 + // An array to hold the capabilities for this instance
1.197 + RAccMonCapabilityArray iAccCapabilityArray;
1.198 +
1.199 + // Defines device type for this accessory
1.200 + TAccMonCapability iAccessoryDeviceType;
1.201 +
1.202 + // Defines physical connection for this accessory
1.203 + TAccMonCapability iAccessoryPhysicalConnection;
1.204 +
1.205 + // Defines device address for this accessory, not defined allways
1.206 + TUint64 iDeviceAddress;
1.207 +
1.208 + // A numerical definition to point the correct accessory
1.209 + TInt iAccessoryID;
1.210 +
1.211 + // A reserved member variable for future use.
1.212 + TInt iReserved1;
1.213 +
1.214 + // A reserved member variable for future use.
1.215 + TInt iReserved2;
1.216 + };
1.217 +
1.218 +#include <AccMonitorInfo.inl>
1.219 +
1.220 +#endif // ACCMONITORINFO_H
1.221 +
1.222 +// End of File