sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterclient.h
changeset 0 4e1aa6a622a0
child 7 1a73e8f1b64d
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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:
       
    15 * Name        : starterclient.h
       
    16 * Part of     : System Startup / Starter
       
    17 * Interface   : Domain, System State Control API and Extended Startup API
       
    18 * Declaration of RStarterSession interface
       
    19 * Version     : %version: ou1s60rt#8 %
       
    20 * This material, including documentation and any related computer
       
    21 * programs, is protected by copyright controlled by Nokia.  All
       
    22 * rights are reserved.  Copying, including reproducing, storing,
       
    23 * adapting or translating, any or all of this material requires the
       
    24 * prior written consent of Nokia.  This material also contains
       
    25 * confidential information which may not be disclosed to others
       
    26 * without the prior written consent of Nokia.
       
    27 * Template version: 4.0
       
    28 * Nokia Core OS *
       
    29 *
       
    30 */
       
    31 
       
    32 
       
    33 
       
    34 #ifndef STARTERCLIENT_H
       
    35 #define STARTERCLIENT_H
       
    36 
       
    37 #include <e32std.h>
       
    38 #include <ssm/starter.hrh>
       
    39 
       
    40 
       
    41 /*
       
    42  *   @publishedPartner
       
    43  *   @released
       
    44  */
       
    45 
       
    46 /**
       
    47 *  Client API for Starter server.
       
    48 *
       
    49 *  ?more_complete_description
       
    50 *
       
    51 *  lib: StarterClient.lib
       
    52 *  @since S60 1.0
       
    53 */
       
    54 class RStarterSession : public RSessionBase
       
    55     {
       
    56 
       
    57 public:
       
    58 
       
    59     /**
       
    60      * Connect to Starter server
       
    61      * @return EPOC error code
       
    62      */
       
    63     IMPORT_C TInt Connect();
       
    64 
       
    65 public: // System State Control API
       
    66 
       
    67     // Parameters for SetState.
       
    68     enum TGlobalState
       
    69         {
       
    70         ENormal = 100,  // Possible in alarm, charging, BT SAP and
       
    71                         // offline states, but not in simless offline.
       
    72         EAlarm,         // Only possible in charging state.
       
    73         ECharging,      // Only possible in alarm state.
       
    74         EOffline,       // Possible in normal RF on and BT SAP states.
       
    75         EBTSap          // Possible in normal RF on and normal RF off
       
    76                         // states, but not in simless offline.
       
    77         };
       
    78 
       
    79     /**
       
    80     * Change global system state.
       
    81     * @param aState The state to change to.
       
    82     * @return KErrArgument if the state change is illegal (from current state
       
    83     * it is not possible to change to the requested state), KErrNone if the
       
    84     * global state change has been successfully initiated.
       
    85     * If state change from a state to the same state is requested, returns
       
    86     * KErrNone but does nothing.
       
    87     */
       
    88     IMPORT_C TInt SetState( const TGlobalState aState );
       
    89 
       
    90     // Parameters for Reset.
       
    91     enum TResetReason
       
    92         {
       
    93         ELanguageSwitchReset = 100,     // A reset due to display language switch.
       
    94         ENormalRFSReset = 101,          // A reset due to restoring factory
       
    95                                         // settings.
       
    96         EDeepRFSReset = 102,            // A reset due to restoring factory
       
    97                                         // settings (deep).
       
    98         EUnknownReset = 104,            // A reset due to an error.
       
    99         EOperatorSettingReset = 105,    // A reset due to removing operator
       
   100                                         // settings.
       
   101         ENetworkModeChangeReset = 106,  // A reset due to network mode change.
       
   102         ESIMStatusChangeReset = 107,    // A reset due to removing/inserting SIM card.
       
   103         EDRMReset = 108,                // A reset due to a DRM -related problem.
       
   104         EFirmwareUpdate = 109,          // A reset due to firmware update.
       
   105         EDataRestoreReset = 110,        // A reset after restoring backed-up data.
       
   106         EFieldTestReset = 111           // A reset required by Field Test software.
       
   107         };
       
   108 
       
   109     /**
       
   110     * Execute system reset.
       
   111     * @param aReason Indicates the reason for the reset.
       
   112     */
       
   113     IMPORT_C void Reset( const TResetReason aReason );
       
   114 
       
   115     /**
       
   116     * Execute system shutdown.
       
   117     */
       
   118     IMPORT_C void Shutdown();
       
   119 
       
   120     /**
       
   121     * Change state to offline and back to online.
       
   122     *
       
   123     * @return
       
   124     * - KErrServerTerminated if system is shutting down or reseting,
       
   125     * - KErrMemory if the state change could not be completed because of lack of memory,
       
   126     * - KErrArgument if global state is not normal RF on,
       
   127     * - KErrNone if a network reset is already going on.
       
   128     */
       
   129     IMPORT_C TInt ResetNetwork();
       
   130 
       
   131     /**
       
   132     * Check whether RTC time is valid.
       
   133     * This function should not be called before critical startup phase is
       
   134     * over, and if it is, it will return EFalse.
       
   135     * @return ETrue if RTC time is valid, EFalse otherwise.
       
   136     */
       
   137     IMPORT_C TBool IsRTCTimeValid();
       
   138 
       
   139     /**
       
   140     * Activate RF for making an emergency call. May be called in all
       
   141     * global states, but 'normal RF on' state the call has no effect since
       
   142     * RF is already activated.
       
   143     * After the emergency call has finished, DeactivateRfAfterEmergencyCall
       
   144     * should be called.
       
   145     * @return KErrNone on success, one of Symbian error codes otherwise.
       
   146     */
       
   147     IMPORT_C TInt ActivateRfForEmergencyCall();
       
   148 
       
   149     /**
       
   150     * Deactivate RF after making an emergency call. May only be called
       
   151     * after calling ActivateRfForEmergencyCall.
       
   152     * @return KErrNone on success, one of Symbian error codes otherwise.
       
   153     */
       
   154     IMPORT_C TInt DeactivateRfAfterEmergencyCall();
       
   155 
       
   156     /**
       
   157     * If Splash Screen is active, send it a signal to exit.
       
   158     * @return KErrNone on success, one of Symbian error codes otherwise.
       
   159     * Returns an error code only if the client-server call fails.
       
   160     */
       
   161     IMPORT_C TInt EndSplashScreen();
       
   162     };
       
   163 
       
   164 #endif // STARTERCLIENT_H