2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: The channel basic information
19 #ifndef SENSRVCHANNELINFO_H
20 #define SENSRVCHANNELINFO_H
23 #include <sensrvtypes.h>
25 * The TSensrvChannelInfo class is a data class that holds information about a sensor channel.
27 * It also provides simple helper methods that allow users to determine if the class is complete
28 * and if one instance of this class matches another.
33 NONSHARABLE_CLASS( TSensrvChannelInfo )
42 IMPORT_C TSensrvChannelInfo();
47 * This constructor is for use with CSensrvChannelFinder::FindChannelsL(). It sets the ChannelId
48 * and DataItemSize to zero.
51 * @param aContextType Channel context type. Set to a value from TSensrvContextType.
52 * @param aQuantity Channel quantity. Set to a value from TSensrvQuantity.
53 * @param aChannelType Channel type id. This is a uid.
54 * @param aLocation Channel physical location.
55 * @param aVendorId Channel vendor name.
56 * @param aChannelDataTypeId Channel data type Id. This is a uid.
57 * @see TSensrvContextType
58 * @see TSensrvQuantity
60 IMPORT_C TSensrvChannelInfo( TInt aContextType,
62 TSensrvChannelTypeId aChannelType,
63 const TDesC8& aLocation,
64 const TDesC8& aVendorId,
65 TSensrvChannelDataTypeId aChannelDataTypeId );
71 * @param aChannelId Channel identifier
72 * @param aContextType Channel context type. Set to a value from TSensrvContextType.
73 * @param aQuantity Channel quantity. Set to a value from TSensrvQuantity.
74 * @param aChannelType Channel type id. This is a uid.
75 * @param aLocation Channel physical location.
76 * @param aVendorId Channel vendor name.
77 * @param aDataItemSize Data item size for channel specific data
78 * @param aChannelDataTypeId Channel data type Id. This is a uid.
79 * @see TSensrvContextType
80 * @see TSensrvQuantity
82 IMPORT_C TSensrvChannelInfo( TSensrvChannelId aChannelId,
85 TSensrvChannelTypeId aChannelType,
86 const TDesC8& aLocation,
87 const TDesC8& aVendorId,
89 TSensrvChannelDataTypeId aChannelDataTypeId );
95 * @param aChannelInfo Instance to be copied
97 IMPORT_C TSensrvChannelInfo( const TSensrvChannelInfo& aChannelInfo );
102 * Checks if this instance matches supplied instance. Fields that are zero or empty are ignored.
103 * Channel Id, Data Item Size and Reserved fields are ignored.
106 * @param aInfo Instance to be matched against this instance.
107 * @return ETrue if there is a match, otherwise EFalse
109 IMPORT_C TBool IsMatch( const TSensrvChannelInfo &aInfo ) const;
112 * Checks that channel information in this object is complete. Complete means no zero or empty fields.
113 * Channel Id, Data Item Size and the Reserved fields are ignored.
116 * @return ETrue if channel information is complete.
118 IMPORT_C TBool IsComplete() const;
124 TSensrvChannelId iChannelId;
128 * @see TSensrvContextType
134 * @see TSensrvQuantity
139 * Channel type identifier
141 * Identifies the channel type and therefore the content of the channel. This value is a uid and is
142 * unique among all channels. See sensor channel specific header files.
144 TSensrvChannelTypeId iChannelType;
147 * Location of the of the channel. This is a free format string
149 TBuf8<KSensrvLocationLength> iLocation;
152 * Vendor name of the channel provider. This is a free format string and is not to be confused with
153 * Vendor Id unique Uid's.
155 TBuf8<KSensrvVendorIdLength> iVendorId;
158 * Size of the data item delivered by the channel
167 * Identifies the channel data type. This value is a uid and is unique among all channels. See sensor
168 * channel specific header files.
170 TSensrvChannelDataTypeId iChannelDataTypeId;
179 #endif // SENSRVCHANNELINFO_H