ncdengine/provider/deviceinteraction/inc/ncddeviceservice.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Declaration of MNcdDeviceService
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCD_DEVICE_SERVICE_H
       
    20 #define M_NCD_DEVICE_SERVICE_H
       
    21 
       
    22 #include <etel3rdparty.h>
       
    23 #include <etelmm.h>
       
    24 
       
    25 class CNcdTestConfig;
       
    26 class RFs;
       
    27 
       
    28 /**
       
    29  *
       
    30  */
       
    31 class MNcdDeviceService
       
    32     {
       
    33 public:
       
    34     
       
    35     /**
       
    36      * MCC string length
       
    37      */
       
    38     //static const TInt KMccLength = CTelephony::KNetworkCountryCodeSize;
       
    39     static const TInt KMccLength = 3;
       
    40     
       
    41     /**
       
    42      * MNC string length
       
    43      */
       
    44     //static const TInt KMncLength = CTelephony::KNetworkIdentitySize;
       
    45     static const TInt KMncLength = 3;
       
    46     
       
    47     /**
       
    48      * Maximum length of the service provider name
       
    49      */
       
    50     static const TInt KServiceProviderMaxLength = RMobilePhone::KMaxSPNameSize;
       
    51     
       
    52     /**
       
    53      * Maximum length of firmware details
       
    54      */
       
    55     static const TInt KFirmwareDetailMaxLength = 256;
       
    56     
       
    57     
       
    58 public: // Destruction
       
    59 
       
    60     /**
       
    61      * Destructor
       
    62      */
       
    63     virtual ~MNcdDeviceService() {}
       
    64     
       
    65 public: // New functions
       
    66 
       
    67     /**
       
    68      * Set sound file as ringing tone to the currently active profile.
       
    69      * @param aFileName Full path and name of the sound file.
       
    70      */
       
    71     virtual void SetAsRingingToneL( const TDesC& aFileName ) = 0;
       
    72 
       
    73     /**
       
    74      * Set graphics file as wallpaper.
       
    75      * @param aFileName Full path and name of the graphics file.
       
    76      */
       
    77     virtual void SetAsWallpaperL( const TDesC& aFileName ) = 0;
       
    78 
       
    79     /**
       
    80      * Set theme by using its name.
       
    81      * @param aThemeName Name of the theme.
       
    82      */
       
    83     virtual void SetAsThemeL( const TDesC& aThemeName ) = 0;
       
    84     
       
    85     /**
       
    86      * Get name of the currently active theme.
       
    87      *
       
    88      * @return Name of the theme.
       
    89      */
       
    90     virtual const TDesC& CurrentThemeNameL() = 0;
       
    91 
       
    92     /**
       
    93      * Retrieves home network information.
       
    94      * @param aMCC On return contains MCC. Length must
       
    95      * @param aMNC On return contains MNC.
       
    96      */
       
    97     virtual void HomeNetworkInfoL( TDes& aMCC, TDes& aMNC ) = 0;
       
    98 
       
    99 
       
   100     /**
       
   101      * Returns current MCC
       
   102      * @return MCC
       
   103      */
       
   104     virtual const TDesC& CurrentMccL() = 0;
       
   105     
       
   106     /**
       
   107      * Returns current MNC
       
   108      * @return MNC
       
   109      */
       
   110     virtual const TDesC& CurrentMncL() = 0;
       
   111             
       
   112     
       
   113     /**
       
   114      * Retrieves service provider information.
       
   115      * @param aServiceProvider On return contains service provider info.
       
   116      */
       
   117     virtual void ServiceProviderL( TDes& aServiceProvider ) = 0;
       
   118     
       
   119 
       
   120     /**
       
   121      * IMSI getter
       
   122      *
       
   123      * @return IMSI in a descriptor
       
   124      */
       
   125     virtual const TDesC& ImsiL() = 0;
       
   126     
       
   127     
       
   128     /**
       
   129      * IMEI getter
       
   130      *
       
   131      * @return IMEI in a descriptor
       
   132      */
       
   133     virtual const TDesC& ImeiL() = 0;
       
   134 
       
   135 
       
   136     /**
       
   137      * Returns device identification (e.g. "Nokia6620")
       
   138      * 
       
   139      * @return HBufC* Dynamically allocated descriptor containing the device id.
       
   140      */
       
   141     virtual HBufC* DeviceIdentificationLC() = 0;
       
   142 
       
   143 
       
   144     /**
       
   145      * Returns device manufacturer (e.g. "Nokia" )
       
   146      *
       
   147      * @return Device manufacturer
       
   148      */
       
   149     virtual const TDesC& DeviceManufacturerL() = 0;
       
   150 
       
   151 
       
   152     /**
       
   153      * Returns device model (e.g. "N70" )
       
   154      *
       
   155      * @return Device model
       
   156      */
       
   157     virtual const TDesC& DeviceModelL() = 0;
       
   158 
       
   159 
       
   160     /**
       
   161      * Returns device language (e.g. "en-EN")
       
   162      * 
       
   163      * @return HBufC* Dynamically allocated descriptor containing the device 
       
   164      *                language string.
       
   165      */
       
   166     virtual HBufC* DeviceLanguageLC() = 0;
       
   167 
       
   168 
       
   169     /** 
       
   170      * Returs the firmware version
       
   171      * 
       
   172      * @return Firmware version.
       
   173      */    
       
   174     virtual const TDesC& FirmwareL() = 0;
       
   175 
       
   176 
       
   177     virtual void ConnectL() = 0;
       
   178     
       
   179     virtual TInt Close() = 0;
       
   180 
       
   181     /**
       
   182      * Appends variant information to the string returned by 
       
   183      * FirmwareL().
       
   184      *
       
   185      * @param aFs File server session. Not used in 3.2 and newer platforms so an uninitialized handle can be given. 
       
   186      */     
       
   187     virtual void AppendVariantToFirmwareL( RFs& aFs ) = 0;
       
   188     
       
   189     /**
       
   190      * Gets flash player UID.
       
   191      *
       
   192      * @return ETrue On return, contains the UID of flash player installed
       
   193      *               on the device. If flash player was not found, returns NULL Uid
       
   194      */
       
   195     virtual TUid FlashPlayerUidL() = 0;
       
   196     
       
   197     
       
   198     /**
       
   199      * Gets device product code
       
   200      * 
       
   201      * @note Returns 0000000 in emulator builds. 
       
   202      * @note If platform does not provide support for the product code, 
       
   203      * NULL is returned.
       
   204      * @return Product code
       
   205      */
       
   206     virtual HBufC* ProductCodeLC() = 0;
       
   207     
       
   208 
       
   209     /**
       
   210      * Gets device product type, eg. "RM-1"
       
   211      * 
       
   212      * @param aType Target descriptor, should be KFirmwareDetailMaxLength long 
       
   213      * @param aFs File server session
       
   214      */
       
   215     virtual TInt GetProductType( TDes& aType, RFs& aFs ) = 0;
       
   216 
       
   217     /**
       
   218      * Gets device firmware ID
       
   219      * 
       
   220      * @param aId Target descriptor, should be KFirmwareDetailMaxLength long 
       
   221      * @param aFs File server session
       
   222      */    
       
   223     virtual TInt GetFirmwareId( TDes& aId, RFs& aFs ) = 0;
       
   224     
       
   225     
       
   226     virtual void GetFirmwareVersion1( TDes& aTarget ) = 0;
       
   227     virtual void GetFirmwareVersion2( TDes& aTarget ) = 0;
       
   228     virtual void GetFirmwareVersion3( TDes& aTarget, RFs& aFs ) = 0;
       
   229     
       
   230     
       
   231 #ifdef CATALOGS_BUILD_CONFIG_DEBUG
       
   232 
       
   233     virtual void SetTestConfig( CNcdTestConfig* aTestConfig ) = 0;
       
   234     
       
   235 #endif        
       
   236 
       
   237     };
       
   238 
       
   239 #endif // M_NCD_DEVICE_SERVICE_H