sensorservices/sensorserver/inc/server/sensrvchanneldatareader.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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 "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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  TSensrvChannelDataReader declaration.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SENSRVCHANNELDATAREADER_H
       
    20 #define SENSRVCHANNELDATAREADER_H
       
    21 
       
    22 #include <sensrvtypes.h>
       
    23 #include "sensrvresourcechannelinfo.h"
       
    24 class CImplementationInformation;
       
    25 
       
    26 /**
       
    27  *  An utility class for parsing channel data from
       
    28  *  SSY plugin ECom registration data.
       
    29  *
       
    30  *  @lib None.
       
    31  *  @since S60 5.0
       
    32  */
       
    33 class TSensrvChannelDataReader
       
    34     {
       
    35 
       
    36 public:
       
    37     /**
       
    38     * Bitmask enumeration for channel flags.
       
    39     */
       
    40     enum TChannelFlags
       
    41         {
       
    42         EChannelFlagDynamic 				= 0x01,
       
    43         EChannelFlagLocationPresent 		= 0x02,
       
    44         EChannelFlagVendorIdPresent 		= 0x04,
       
    45         EChannelFlagSecPolicyPresent 		= 0x08,
       
    46         EChannelFlagChannelGroupReserved 	= 0x30
       
    47         };
       
    48 
       
    49 public:
       
    50 
       
    51     /**
       
    52     * Reads the channel data from SSY plugin registration data.
       
    53     *
       
    54     * @param aSsyInfo            plugin implementation information containing the channel
       
    55     *                            data in the default_data field of the plugin resource file.
       
    56     * @param aChannelList        used for storing the channel information. Contents of the
       
    57     *                            list are cleared by this method.
       
    58     * @param aDynamicChannelList used for storing the dynamic channel information.
       
    59     *                            Contents of the list are cleared by this method.
       
    60     *
       
    61     *
       
    62     * @return KErrNone                   channel data read was successful
       
    63     * @return KErrCorrupt                channel data is invalid
       
    64     * @return a Symbian wide error code  only in case RArray::Append fails
       
    65     */
       
    66     TInt ReadChannels( const CImplementationInformation& aSsyInfo,
       
    67                        RSensrvResourceChannelInfoList& aChannelList,
       
    68                        RSensrvResourceChannelInfoList& aDynamicChannelList );
       
    69 
       
    70     };
       
    71 
       
    72 #endif // SENSRVCHANNELDATAREADER_H