epoc32/include/sensrvproperty.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 sensrvproperty.h
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * 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
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Sensor and channel property container
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SENSRVPROPERTY_H
       
    20 #define SENSRVPROPERTY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <babitflags.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 /**
       
    29 * Maximum size of the buffer when the property type is ESensrvBufferProperty
       
    30 * @see TSensrvProperty
       
    31 */
       
    32 const TInt KSensrvPropertyTextBufferSize = 20;
       
    33 
       
    34 
       
    35 // DATA TYPES
       
    36 
       
    37 /**
       
    38 * Property types
       
    39 * @see TSensrvProperty
       
    40 */
       
    41 enum TSensrvPropertyType
       
    42     {
       
    43     /** Default property type */
       
    44     ESensrvUninitializedProperty = 0,
       
    45     /** Integer property type. TInt is used to store property value */
       
    46     ESensrvIntProperty,
       
    47     /** Real property type. TReal is used to store property value */
       
    48     ESensrvRealProperty,
       
    49     /**
       
    50     Descriptor property type. TBuf<KSensrvPropertyTextBufferSize> is used to store
       
    51     property value
       
    52     */
       
    53     ESensrvBufferProperty
       
    54     };
       
    55 
       
    56 /**
       
    57 * Special index types for iArrayIndex.  Any other value indicates that this property is a member of
       
    58 * an array of properties
       
    59 * @see TSensrvProperty
       
    60 */
       
    61 enum TSensrvArrayIndex
       
    62     {
       
    63     /** This property is a single property and is not a member of an array of properties */
       
    64     ESensrvSingleProperty    = -1,
       
    65     /**
       
    66     This property is the information item for an array of properties. iIntValueMin and iIntValueMax
       
    67     values in a property of this type defines the range of the property array
       
    68     */
       
    69     ESensrvArrayPropertyInfo = -2
       
    70     };
       
    71 
       
    72 /**
       
    73 * Identifies the range of values that must be used for TSensrvPropertyId. These ranges are defined so that
       
    74 * any customers wishing to add additional properties not yet supported by Symbian can do so without
       
    75 * causing clashes with Symbian defined properties. 
       
    76 * 1-4095      General channel properties owned and defined by Symbian
       
    77 * 4096-8191   Specific Channel properties owned and defined by Symbian
       
    78 * 8192-12287  A range for customers to define their own properties. Usage defined by customer
       
    79 * @see TSensrvPropertyId
       
    80 * @see TSensrvProperty
       
    81 */
       
    82 enum TSensrvPropertyRangeUsage
       
    83     {
       
    84     // General properties
       
    85     ESensrvPropertyRangeNotDefined = 0, // 0x0000
       
    86     ESensrvGeneralPropertyRangeBase = 1, // 0x0001
       
    87     ESensrvGeneralPropertyRangeEnd = 4095, // 0x0FFF
       
    88 
       
    89     // Channel properties
       
    90     ESensrvChannelPropertyRangeBase = 4096, // 0x1000
       
    91     ESensrvChannelPropertyRangeEnd = 8191, // 0x1FFF
       
    92 
       
    93     // A range for licensees to define their own properties. Usage is defined by the licensee. 
       
    94     ESensrvLicenseePropertyRangeBase = 8192, // 0x2000
       
    95     ESensrvLicenseePropertyRangeEnd = 12287 // 0x2FFF
       
    96     };
       
    97 
       
    98 /**
       
    99 * Type definition for property identifier.
       
   100 * @see TSensrvProperty
       
   101 */
       
   102 typedef TUint32 TSensrvPropertyId;
       
   103 
       
   104 // CLASS DECLARATION
       
   105 
       
   106 /**
       
   107 * TSensrvProperty is a simple data class that contains sensor channel property information. The class has
       
   108 * little behaviour and only does sanity checks where it is possible. It is therefore assumed that users of
       
   109 * this class are aware of and conform to a properties definition for a given property identifier.
       
   110 * 
       
   111 * There are 2 groups of properties, General Channel Properties and Specific Channel Properties.
       
   112 * 
       
   113 * General Channel Properties are properties that are supported by all channels. These are defined in 
       
   114 * sensrvgeneralproperties.h. Specific Channel Properties are properties that are supported by specific 
       
   115 * channel types as required. These are defined in the relevant headers files.
       
   116 * 
       
   117 * The property identifier uniquely identifies the property within a channel. These property ids must fall
       
   118 * into the relevant range specified by TSensrvPropertyRangeUsage. Each property will have a constant 
       
   119 * defined for its identifier. e.g. KSensrvPropIdDataRate.
       
   120 * 
       
   121 * @see TSensrvProperty::SetPropertyId()
       
   122 * @see TSensrvProperty::GetPropertyId()
       
   123 * @see TSensrvPropertyRangeUsage
       
   124 * @see KSensrvPropIdDataRate
       
   125 * 
       
   126 * The property type is used to determine whether the property is TInt, TReal or Buffer. The property type
       
   127 * is automatically set when the value of the object is set. 
       
   128 * 
       
   129 * @see TSensrvPropertyType
       
   130 * @see TSensrvProperty::PropertyType()
       
   131 * 
       
   132 * The value fields are used to indicate the value of a property when the property contains a single int,
       
   133 * real or buffer value. The min and max value fields are used when a property has a range of int or real
       
   134 * values. A property cannot have a range of buffer values. The value and min/max values of a property
       
   135 * will never be set at the same time.
       
   136 * 
       
   137 * @see TSensrvProperty::GetValue()
       
   138 * @see TSensrvProperty::SetValue()
       
   139 * @see TSensrvProperty::GetValueRef()
       
   140 * @see TSensrvProperty::GetMinValue()
       
   141 * @see TSensrvProperty::SetMinValue()
       
   142 * @see TSensrvProperty::GetMaxValue()
       
   143 * @see TSensrvProperty::SetMaxValue()
       
   144 * 
       
   145 * Properties can be read only which means it cannot be set by CSensrvChannel::SetPropertyL().
       
   146 * 
       
   147 * @see TSensrvProperty::ReadOnly()
       
   148 * @see TSensrvProperty::SetReadOnly()
       
   149 * @see CSensrvChannel
       
   150 * 
       
   151 * Properties can either be single properties, or can be a member of an array of properties. The array
       
   152 * index field is set to ESensrvSingleProperty(-1) if the property is single. If a property is part of an
       
   153 * array then the array index field will be set to ESensrvArrayPropertyInfo(-2) or the index for the array.
       
   154 * When the array index is ESensrvArrayPropertyInfo the property uses the iIntValueMin and iIntValueMax fields
       
   155 * to indicate the range of the array. When the array index is an actual index (neither ESensrvArrayPropertyInfo
       
   156 * nor ESensrvArrayPropertyInfo) the property contains data.
       
   157 * 
       
   158 * Example:
       
   159 * 
       
   160 * A Sensor channel which supports data rates within a given range can use one Data Rate
       
   161 * property. The range is defined using the property's maximum and minimum value. E.g. A
       
   162 * sensor channel supports a data range from 10Hz to 100Hz and all values within this range
       
   163 * are feasible. To implement this use one Data Rate property with a minimum value 10 and a
       
   164 * maximum value of 100.
       
   165 * 
       
   166 * A Sensor channel which supports discrete data rates can use the Data Rate property as
       
   167 * an array. E.g. A sensor channel supports the following data rates 10Hz, 40Hz and 50Hz.
       
   168 * To implement this four different Data Rate properties are needed. The following table
       
   169 * shows the content of the four properties, only mandatory attributes are shown.
       
   170 *  
       
   171 * @code
       
   172 * property ID     Array index     Value           Min Value       Max Value       Read only
       
   173 * -----------     -----------     -----           ---------       ---------       ---------
       
   174 * 0x00000002      -2              1               0               2               EFalse
       
   175 * 0x00000002      0               10              n/a             n/a             ETrue
       
   176 * 0x00000002      1               40              n/a             n/a             ETrue
       
   177 * 0x00000002      2               50              n/a             n/a             ETrue
       
   178 * @endcode
       
   179 * 
       
   180 * The first property (first row in table above) is the header for the property array. It
       
   181 * defines that this property is an array property. The attributes of this property are:
       
   182 * 
       
   183 * Array index:
       
   184 * -2 means that the property is an array property
       
   185 * Value:
       
   186 * 1 means that current value of the property is defined by the property with an array index of 
       
   187 * 1. The value is 40Hz in this example.
       
   188 * Min value 
       
   189 * 0 is the start index of the property array 
       
   190 * Max value:
       
   191 * 2 is the last index of the property array
       
   192 * Read only:
       
   193 * EFalse means that the properties current value can be changed,
       
   194 * 
       
   195 * In this example the possible values of the property are 0, 1, and 2 which corresponds to data
       
   196 * rates of 10Hz, 40Hz and 50Hz.
       
   197 * 
       
   198 * @see TSensrvArrayIndex
       
   199 * @see TSensrvProperty::SetArrayIndex()
       
   200 * @see TSensrvProperty::GetArraIndex()
       
   201 * 
       
   202 * The property item index is used to identify a specific item in the channel data structure that the property
       
   203 * refers to. For example the Accelerometer XYZ-axis data structure defines data for the x, y and Z axis.
       
   204 * Individual properties could have been defined for each of these axis. Instead a single property is defined
       
   205 * and the Item Index is used to identify the relevant axis in the channel data structure that the property
       
   206 * applies to. The indexes for these specific items and the channel data structures themselves are defined in
       
   207 * the sensor specific headers files found in epoc32\include\sensors\channels.
       
   208 * 
       
   209 * Example:
       
   210 * 
       
   211 * Accelerometer data definition. TSensrvAccelerometerAxisDataIndexes is used to provide an index that
       
   212 * relates to each of the class fields.
       
   213 * 
       
   214 * @code
       
   215 * // ACCELEROMETER RELATED DATATYPES
       
   216 * 
       
   217 * // Accelerometer axis data type
       
   218 * 
       
   219 * class TSensrvAccelerometerAxisData 
       
   220 *     {
       
   221 * public:
       
   222 *     //
       
   223 *     // Channel data type Id number
       
   224 *     //      
       
   225 *     static const TSensrvChannelDataTypeId KDataTypeId = 0x1020507E;
       
   226 * 
       
   227 *     //
       
   228 *     // Channel data type index numbers
       
   229 *     //
       
   230 * 	enum TSensrvAccelerometerAxisDataIndexes
       
   231 *           {
       
   232 *            ETimeStamp = 0,
       
   233 *            EAxisX,
       
   234 *            EAxisY,
       
   235 *            EAxisZ
       
   236 *           }; 
       
   237 * public:
       
   238 *     //
       
   239 *     // - Item name:   Sampling time.
       
   240 *     // - Item Index:  0
       
   241 *     // - Conditions:  None
       
   242 *     // - Description: Timestamp for a sample.
       
   243 *     //   
       
   244 *     TTime iTimeStamp;    
       
   245 * 
       
   246 *     //
       
   247 *     // - Item name:   Accelerometer x-axis 
       
   248 *     // - Item Index:  1
       
   249 *     // - Conditions:  Single limit and range 
       
   250 *     // - Description: Accelerometer values from x-axis 
       
   251 *     //
       
   252 *     TInt iAxisX;  
       
   253 * 
       
   254 *     //
       
   255 *     // - Item name:   Accelerometer y-axis 
       
   256 *     // - Item Index:  2
       
   257 *     // - Conditions:  Single limit and range 
       
   258 *     // - Description: Accelerometer values from y-axis 
       
   259 *     // 
       
   260 *     TInt iAxisY;  
       
   261 * 
       
   262 *     //
       
   263 *     // - Item name:   Accelerometer z-axis 
       
   264 *     // - Item Index:  3
       
   265 *     // - Conditions:  Single limit and range 
       
   266 *     // - Description: Accelerometer values from z-axis 
       
   267 *     //
       
   268 *     TInt iAxisZ;  
       
   269 *     };
       
   270 * @endcode
       
   271 * 
       
   272 * @see TSensrvProperty::SetItemIndex()
       
   273 * @see TSensrvProperty::PropertyItemIndex()
       
   274 * @lib sensrvutil.lib
       
   275 * @since S60 5.0
       
   276 */
       
   277 NONSHARABLE_CLASS( TSensrvProperty )
       
   278     {
       
   279 public:
       
   280 
       
   281     /**
       
   282     Default Constructor
       
   283     */
       
   284     IMPORT_C TSensrvProperty();
       
   285 
       
   286     /**
       
   287     * Constructor to create complete integer type property.
       
   288     * 
       
   289     * @since S60 5.0
       
   290     * @param  aPropertyId Id of the property
       
   291     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   292     * @param  aValue Value of the property.
       
   293     * @param  aMaxValue Maximum value of the property
       
   294     * @param  aMinValue Minimum value of the property
       
   295     * @param  aReadOnly Readonly-flag of the property
       
   296     * @param  aPropertyType Type of the property
       
   297     */
       
   298     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   299                               const TInt aItemIndex,
       
   300                               const TInt aValue,
       
   301                               const TInt aMaxValue,
       
   302                               const TInt aMinValue,
       
   303                               const TBool aReadOnly,
       
   304                               const TSensrvPropertyType aPropertyType );
       
   305 
       
   306     /**
       
   307     * Constructor to create property object for setting integer property value.
       
   308     * 
       
   309     * @since S60 5.0
       
   310     * @param  aPropertyId Id of the property
       
   311     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   312     * @param  aValue Value of the property.
       
   313     */
       
   314     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   315                               const TInt aItemIndex,
       
   316                               const TInt aValue );
       
   317 
       
   318     /**
       
   319     * Constructor to create complete TReal type of property.
       
   320     *
       
   321     * @since S60 5.0
       
   322     * @param  aPropertyId Id of the property
       
   323     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   324     * @param  aValue Value of the property.
       
   325     * @param  aMaxValue Maximum value of the property
       
   326     * @param  aMinValue Minimum value of the property
       
   327     * @param  aReadOnly Readonly-flag of the property
       
   328     * @param  aPropertyType Type of the property
       
   329     */
       
   330     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   331                               const TInt aItemIndex,
       
   332                               const TReal aValue,
       
   333                               const TReal aMaxValue,
       
   334                               const TReal aMinValue,
       
   335                               const TBool aReadOnly,
       
   336                               const TSensrvPropertyType aPropertyType );
       
   337 
       
   338     /**
       
   339     * Constructor to create property object for setting real property value.
       
   340     * 
       
   341     * @since S60 5.0
       
   342     * @param  aPropertyId Id of the property
       
   343     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   344     * @param  aValue Value of the property.
       
   345     */
       
   346     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   347                               const TInt aItemIndex,
       
   348                               const TReal aValue );
       
   349 
       
   350     /**
       
   351     * Constructor to create complete buffer property.
       
   352     * 
       
   353     * @since S60 5.0
       
   354     * @param  aPropertyId Id of the property
       
   355     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   356     * @param  aValue Value of the property. Max length is defined in KSensrvPropertyTextBufferSize.
       
   357     * @param  aReadOnly Readonly-flag of the property
       
   358     * @param  aPropertyType Type of the property
       
   359     */
       
   360     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   361                               const TInt aItemIndex,
       
   362                               const TDesC8& aValue,
       
   363                               const TBool aReadOnly,
       
   364                               const TSensrvPropertyType aPropertyType );
       
   365 
       
   366    /**
       
   367     * Constructor to create property object for setting buffer property value.
       
   368     * 
       
   369     * @since S60 5.0
       
   370     * @param  aPropertyId Id of the property
       
   371     * @param  aItemIndex Item index of the property. Mapped to a specific item in channel data structure.
       
   372     * @param  aValue Value of the property. Max length is defined in KSensrvPropertyTextBufferSize.
       
   373     */
       
   374     IMPORT_C TSensrvProperty( const TSensrvPropertyId aPropertyId,
       
   375                               const TInt aItemIndex,
       
   376                               const TDesC8& aValue );
       
   377 
       
   378     /**
       
   379     * Set the property Id for the property.
       
   380     * 
       
   381     * @since S60 5.0
       
   382     * @param  aPropertyId Property Id to be set.
       
   383     */
       
   384     IMPORT_C void SetPropertyId( TSensrvPropertyId aPropertyId );
       
   385 
       
   386     /**
       
   387     * Return Property Id
       
   388     * 
       
   389     * @since S60 5.0
       
   390     * @return Property Id
       
   391     */
       
   392     IMPORT_C TSensrvPropertyId GetPropertyId() const;
       
   393 
       
   394     /**
       
   395     * Set the property item index for the property.
       
   396     * 
       
   397     * @since S60 5.0
       
   398     * @param  aItemIndex property item index to be set.
       
   399     */
       
   400     IMPORT_C void SetItemIndex( TInt aItemIndex );
       
   401 
       
   402     /**
       
   403     * Get the property item index number
       
   404     * 
       
   405     * @since S60 5.0
       
   406     * @return Item index number.
       
   407     */
       
   408     IMPORT_C TInt PropertyItemIndex() const;
       
   409 
       
   410     /**
       
   411     * Return property type
       
   412     * 
       
   413     * @since S60 5.0
       
   414     * @return Property type's Id
       
   415     */
       
   416     IMPORT_C TSensrvPropertyType PropertyType() const;
       
   417 
       
   418     /**
       
   419     * Checks if the property is readonly
       
   420     *
       
   421     * @since S60 5.0
       
   422     * @return ETrue value indicates that property is a read only property.
       
   423     */
       
   424     IMPORT_C TBool ReadOnly() const;
       
   425 
       
   426     /**
       
   427     * Set the readonly information for the property.
       
   428     * 
       
   429     * @since S60 5.0
       
   430     * @param  aReadOnly readonly information to be set. EFalse means that the property is not readonly.
       
   431     */
       
   432     IMPORT_C void SetReadOnly( TBool aReadOnly );
       
   433 
       
   434     /**
       
   435     * Set integer property value
       
   436     * 
       
   437     * @since S60 5.0
       
   438     * @param  aValue Value to be set.
       
   439     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   440     * a correct type
       
   441     */
       
   442     IMPORT_C void SetValue( const TInt aValue );
       
   443 
       
   444     /**
       
   445     * Set real property value
       
   446     * 
       
   447     * @since S60 5.0
       
   448     * @param  aValue Value to be set.
       
   449     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   450     * a correct type
       
   451     */
       
   452     IMPORT_C void SetValue( const TReal aValue );
       
   453 
       
   454     /**
       
   455     * Set buffer property value
       
   456     * 
       
   457     * @since S60 5.0
       
   458     * @param  aValue Value to be set.
       
   459     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   460     * a correct type
       
   461     */
       
   462     IMPORT_C void SetValue( const TDesC8& aValue );
       
   463 
       
   464     /**
       
   465     * Get integer property value
       
   466     * 
       
   467     * @since S60 5.0
       
   468     * @param  aValue Value to get
       
   469     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   470     * a correct type
       
   471     */
       
   472     IMPORT_C void GetValue( TInt& aValue ) const;
       
   473 
       
   474     /**
       
   475     * Get real property value
       
   476     * 
       
   477     * @since S60 5.0
       
   478     * @param  aValue Value to get
       
   479     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   480     * a correct type
       
   481     */
       
   482     IMPORT_C void GetValue( TReal& aValue ) const;
       
   483 
       
   484     /**
       
   485     * Get buffer property value
       
   486     * 
       
   487     * @since S60 5.0
       
   488     * @param  aValue Destination where a property value is to be copied
       
   489     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   490     * a correct type
       
   491     */
       
   492     IMPORT_C void GetValue( TDes8& aValue ) const;
       
   493 
       
   494     /**
       
   495     * Get reference to buffer property value
       
   496     * 
       
   497     * @since S60 5.0
       
   498     * @return Reference to a property value
       
   499     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   500     * a correct type
       
   501     */
       
   502     IMPORT_C TDes8& GetValueRef();
       
   503 
       
   504     /**
       
   505     * Get property maximum value of integer property
       
   506     * 
       
   507     * @since S60 5.0
       
   508     * @param  aMaxValue Maximum value to get
       
   509     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   510     * a correct type
       
   511     */
       
   512     IMPORT_C void GetMaxValue( TInt& aMaxValue ) const;
       
   513 
       
   514     /**
       
   515     * Get property minimum value of integer property
       
   516     * 
       
   517     * @since S60 5.0
       
   518     * @param  aMinValue Minimum value to get
       
   519     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   520     * a correct type
       
   521     */
       
   522     IMPORT_C void GetMinValue( TInt& aMinValue ) const;
       
   523 
       
   524     /**
       
   525     * Set property maximum value of integer property
       
   526     * 
       
   527     * @since S60 5.0
       
   528     * @param  aMaxValue Maximum value to be set
       
   529     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   530     * a correct type
       
   531     */
       
   532     IMPORT_C void SetMaxValue( TInt aMaxValue );
       
   533 
       
   534     /**
       
   535     * Set property minimum value of integer property
       
   536     * 
       
   537     * @since S60 5.0
       
   538     * @param  aMinValue Minimum value to be set
       
   539     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   540     * a correct type
       
   541     */
       
   542     IMPORT_C void SetMinValue( TInt aMinValue );
       
   543 
       
   544     /**
       
   545     * Get property maximum value of real property
       
   546     * 
       
   547     * @since S60 5.0
       
   548     * @param  aMaxValue Maximum value to get
       
   549     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   550     * a correct type
       
   551     */
       
   552     IMPORT_C void GetMaxValue( TReal& aMaxValue ) const;
       
   553 
       
   554     /**
       
   555     * Get property minimum value of real property
       
   556     * 
       
   557     * @since S60 5.0
       
   558     * @param aMinValue Minimum value to get
       
   559     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   560     * a correct type
       
   561     */
       
   562     IMPORT_C void GetMinValue( TReal& aMinValue ) const;
       
   563 
       
   564     /**
       
   565     * Set property maximum value of real property
       
   566     * 
       
   567     * @since S60 5.0
       
   568     * @param  aMaxValue Maximum value to be set.
       
   569     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   570     * a correct type
       
   571     */
       
   572     IMPORT_C void SetMaxValue( const TReal& aMaxValue );
       
   573 
       
   574     /**
       
   575     * Set property minimum value of real property
       
   576     * 
       
   577     * @since S60 5.0
       
   578     * @param  aMinValue Minimum value to be set.
       
   579     * @panic  KSensrvPanicCategory ESensrvPanicInvalidPropertyType Panic if the property object is not
       
   580     * a correct type
       
   581     */
       
   582     IMPORT_C void SetMinValue( const TReal& aMinValue );
       
   583 
       
   584     /**
       
   585     * Set security info of the property. This should be set to the Security info for the client process
       
   586     * 
       
   587     * @since S60 5.0
       
   588     * @param aSecurityInfo Security info to be set
       
   589     */
       
   590     IMPORT_C void SetSecurityInfo( const TSecurityInfo& aSecurityInfo );
       
   591 
       
   592     /**
       
   593     * Get security info of the property
       
   594     * 
       
   595     * @since S60 5.0
       
   596     * @return Security info of the property
       
   597     */
       
   598     IMPORT_C TSecurityInfo GetSecurityInfo() const;
       
   599 
       
   600     /**
       
   601     * Set array index of the property.
       
   602     * 
       
   603     * @since S60 5.0
       
   604     * @param aArrayIndex Array index to be set
       
   605     * @see TSensrvArrayIndex
       
   606     * @see KSensrvPropIdDataRate for an example
       
   607     */
       
   608     IMPORT_C void SetArrayIndex( const TInt aArrayIndex );
       
   609 
       
   610     /**
       
   611     * Get array index of the property
       
   612     * 
       
   613     * @since S60 5.0
       
   614     * @return Array index of the property.
       
   615     * @see TSensrvArrayIndex
       
   616     * @see KSensrvPropIdDataRate for an example
       
   617     */
       
   618     IMPORT_C TInt GetArrayIndex() const;
       
   619 
       
   620 private:
       
   621     // property identifier
       
   622     TSensrvPropertyId iPropertyId;
       
   623 
       
   624     // property item index
       
   625     TInt iItemIndex;
       
   626 
       
   627     //Array index
       
   628     TInt16 iArrayIndex;
       
   629 
       
   630 
       
   631     // property value
       
   632     union
       
   633         {
       
   634         TInt iIntValue;
       
   635         TReal iRealValue;
       
   636         };
       
   637     TBuf8<KSensrvPropertyTextBufferSize> iBufValue;
       
   638 
       
   639     // read only flag
       
   640     TBitFlags32 iFlags;
       
   641 
       
   642     // maximum value
       
   643     union
       
   644         {
       
   645         TInt iIntValueMax;
       
   646         TReal iRealValueMax;
       
   647         };
       
   648 
       
   649     // minimum value
       
   650     union
       
   651         {
       
   652         TInt iIntValueMin;
       
   653         TReal iRealValueMin;
       
   654         };
       
   655 
       
   656     // property type
       
   657     TSensrvPropertyType iPropertyType;
       
   658 
       
   659     // property security infomation
       
   660     TSecurityInfo iSecurityInfo;
       
   661 
       
   662     // not used
       
   663     TInt iReserved;
       
   664     };
       
   665 
       
   666 #endif //SENSRVPROPERTY_H
       
   667 
       
   668 // End of File
       
   669 
       
   670