devicesrv_plat/sae_api/inc/PSVariables.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Event enumerations and UIDs of Publish And Subscribe. PubSub
       
    15 *                clients can include this file and listen to these events. 
       
    16 *                These events will be routed through Publish And Subscribe.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __PSVARIABLES_H__
       
    22 #define __PSVARIABLES_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32cmn.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 /**
       
    30  * First value of each enumeration
       
    31  */
       
    32 const TInt KEnumerationFirstValue           = 0;
       
    33 
       
    34 /**
       
    35  * GPRS availability. Indicates wheter GPRS is available or not
       
    36  *
       
    37  * Possible values:
       
    38  * - EPSGprsAvailable            GPRS network is available
       
    39  * - EPSGprsNotAvailable         GPRS netwotk is not available
       
    40  * - EPSGprsAvailabilityUnknown  GPRS network availability is not known
       
    41  *
       
    42  * Usage for requesting event notifications:
       
    43  * @code
       
    44  * void MyClass::RequestNotifications()
       
    45  *     {
       
    46  *     RProperty::Attach( KUidSystemCategory, KPSUidGprsAvailabilityValue );
       
    47  *     RProperty::Subscribe( iStatus ); // From CActive
       
    48  *     SetActive();
       
    49  *     }
       
    50  *
       
    51  * void MyClass::RunL()
       
    52  *     {
       
    53  *     TInt gprsAvailability( EPSGprsAvailabilityUninitialized );
       
    54  *     RProperty::Get( KUidSystemCategory, 
       
    55  *                     KPSUidGprsAvailabilityValue, 
       
    56  *                     gprsAvailability );
       
    57  *     //gprsAvailability contains current value of GPRS network availability
       
    58  *     }
       
    59  * @endcode
       
    60  */
       
    61 const TInt KPSUidGprsAvailabilityValue      = 0x100052DA;
       
    62 const TUid KPSUidGprsAvailability           = {KPSUidGprsAvailabilityValue};
       
    63 
       
    64 enum EPSGprsAvailability
       
    65     {
       
    66     EPSGprsAvailabilityUninitialized        = KEnumerationFirstValue,
       
    67     EPSGprsAvailable,
       
    68     EPSGprsNotAvailable,
       
    69     EPSGprsAvailabilityUnknown
       
    70     };
       
    71 
       
    72 /**
       
    73  * Current GPRS connection status. Indicates current status of GPRS network
       
    74  * 
       
    75  * Possible values:
       
    76  * - EPSGprsUnattached             Not attached to GPRS network
       
    77  * - EPSGprsAttach                 Attached to GPRS network
       
    78  * - EPSGprsContextActive          One context active on GPRS network
       
    79  * - EPSGprsSuspend                GPRS network suspended but not closed
       
    80  * - EPSGprsContextActivating      GPRS context activating but not yet active
       
    81  * - EPSGprsMultibleContextActive  Multiple active contexts on GPRS network
       
    82  *
       
    83  * Usage for requesting event notifications:
       
    84  * @code
       
    85  * void MyClass::RequestNotifications()
       
    86  *     {
       
    87  *     RProperty::Attach( KUidSystemCategory, KPSUidGprsStatusValue );
       
    88  *     RProperty::Subscribe( iStatus ); // From CActive
       
    89  *     SetActive();
       
    90  *     }
       
    91  *
       
    92  * void MyClass::RunL()
       
    93  *     {
       
    94  *     TInt gprsStatus( EPSGprsStatusUninitialized );
       
    95  *     RProperty::Get( KUidSystemCategory, 
       
    96  *                     KPSUidGprsStatusValue, 
       
    97  *                     gprsStatus );
       
    98  *     //gprsStatus contains current value of GPRS network status
       
    99  *     }
       
   100  * @endcode
       
   101  */
       
   102 const TInt KPSUidGprsStatusValue            = 0x100052DB;
       
   103 const TUid KPSUidGprsStatus                 = {KPSUidGprsStatusValue};
       
   104 enum EPSGprsStatus
       
   105     {
       
   106     EPSGprsStatusUninitialized              = KEnumerationFirstValue,
       
   107     EPSGprsUnattached,
       
   108     EPSGprsAttach,
       
   109     EPSGprsContextActive,
       
   110     EPSGprsSuspend,
       
   111     EPSGprsContextActivating,
       
   112     EPSGprsMultibleContextActive
       
   113     };
       
   114 
       
   115 /**
       
   116  * Current WCDMA connection status. Indicates current status of WCDMA network
       
   117  * 
       
   118  * Possible values:
       
   119  * - EPSWcdmaUnattached             Not attached to WCDMA network
       
   120  * - EPSWcdmaAttach                 Attached to WCDMA network
       
   121  * - EPSWcdmaContextActive          One context active on WCDMA network
       
   122  * - EPSWcdmaSuspend                WCDMA network suspended but not closed
       
   123  * - EPSWcdmaContextActivating      WCDMA context activating but not active
       
   124  * - EPSWcdmaMultibleContextActive  Multiple active contexts on WCDMA network
       
   125  *
       
   126  * Usage for requesting event notifications:
       
   127  * @code
       
   128  * void MyClass::RequestNotifications()
       
   129  *     {
       
   130  *     RProperty::Attach( KUidSystemCategory, KPSUidWcdmaStatusValue );
       
   131  *     RProperty::Subscribe( iStatus ); // From CActive
       
   132  *     SetActive();
       
   133  *     }
       
   134  *
       
   135  * void MyClass::RunL()
       
   136  *     {
       
   137  *     TInt wcdmaStatus( EPSWcdmaStatusUninitialized );
       
   138  *     RProperty::Get( KUidSystemCategory, 
       
   139  *                     KPSUidWcdmaStatusValue, 
       
   140  *                     wcdmaStatus );
       
   141  *     //wcdmaStatus contains current value of WCDMA network status
       
   142  *     }
       
   143  * @endcode
       
   144  */
       
   145 const TInt KPSUidWcdmaStatusValue           = 0x100052FF;
       
   146 const TUid KPSUidWcdmaStatus                = {KPSUidWcdmaStatusValue};
       
   147 enum EPSWcdmaStatus
       
   148     {
       
   149     EPSWcdmaStatusUninitialized             = KEnumerationFirstValue,
       
   150     EPSWcdmaUnattached,
       
   151     EPSWcdmaAttach,
       
   152     EPSWcdmaContextActive,
       
   153     EPSWcdmaSuspend,
       
   154     EPSWcdmaContextActivating,
       
   155     EPSWcdmaMultipleContextActive
       
   156     };
       
   157 
       
   158 #endif // __PSVARIABLES_H__