bearermanagement/mpm/inc/rmpm.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
    60 // produces pclint warnings
    60 // produces pclint warnings
    61 _LIT_SECURITY_POLICY_C1( KMPMSortSnapReadPolicy, ECapability_None );
    61 _LIT_SECURITY_POLICY_C1( KMPMSortSnapReadPolicy, ECapability_None );
    62 
    62 
    63 // Write policy
    63 // Write policy
    64 _LIT_SECURITY_POLICY_C1( KMPMSortSnapWritePolicy, ECapabilityNetworkControl );
    64 _LIT_SECURITY_POLICY_C1( KMPMSortSnapWritePolicy, ECapabilityNetworkControl );
       
    65 
       
    66 // Definitions for Reading/Writing user connection data
       
    67 // to publish and subscribe API
       
    68 //
       
    69 // UID of the category (note that uid is the same as sort snap category)
       
    70 const TUid KMPMUserConnectionCategory = { 0x101f6d3a };
       
    71 
       
    72 // Keys for this category
       
    73 const TUint KMPMPSKeyUserConnectionSnap = 10001;
       
    74 const TUint KMPMPSKeyUserConnectionIap = 10002;
       
    75 
       
    76 // Property types
       
    77 const TInt KMPMUserConnectionSnapType = RProperty::EInt;
       
    78 const TInt KMPMUserConnectionIapType = RProperty::EInt;
       
    79 
       
    80 // Read policy, no capabilities required
       
    81 // This format is used instead of _LIT_SECURITY_POLICY_PASS, which 
       
    82 // produces pclint warnings
       
    83 _LIT_SECURITY_POLICY_C1( KMPMUserConnectionReadPolicy, ECapability_None );
       
    84 
       
    85 // Write policy
       
    86 _LIT_SECURITY_POLICY_C1( KMPMUserConnectionWritePolicy, ECapabilityNetworkControl );
       
    87 
       
    88 // Definitions for Reading/Writing active connection data 
       
    89 // to publish and subscribe API
       
    90 //
       
    91 // UID of the category
       
    92 const TUid KMPMActiveConnectionCategory = { 0x101f6d3a };
       
    93 
       
    94 // Property types
       
    95 const TInt KMPMActiveConnectionIapType = RProperty::EInt;
       
    96 const TInt KMPMActiveConnectionSnapType = RProperty::EInt;
       
    97 const TInt KMPMActiveConnectionBearerType = RProperty::EInt;
       
    98 
       
    99 // Keys for active connection category
       
   100 
       
   101 /**
       
   102  * Iap Id of the active connection.
       
   103  * If set to zero then no active connection
       
   104  */
       
   105 const TUint KMPMPSKeyActiveConnectionIap = 10003;
       
   106 
       
   107 /**
       
   108  * Snap Id of the active connection.
       
   109  * If set to zero then possible iap connection
       
   110  */
       
   111 const TUint KMPMPSKeyActiveConnectionSnap = 10004;
       
   112 
       
   113 /**
       
   114  * Possible values:
       
   115  * 0,
       
   116  * KCommDbBearerVirtual,
       
   117  * KCommDbBearerWLAN,
       
   118  * KCommDbBearerWcdma,
       
   119  * KCommDbBearerUnknown,
       
   120  */
       
   121 const TUint KMPMPSKeyActiveConnectionBearer = 10005;
       
   122 
       
   123 // Read policy, no capabilities required
       
   124 // This format is used instead of _LIT_SECURITY_POLICY_PASS, which 
       
   125 // produces pclint warnings
       
   126 _LIT_SECURITY_POLICY_C1( KMPMActiveConnectionReadPolicy, ECapability_None );
       
   127 
       
   128 // Write policy
       
   129 _LIT_SECURITY_POLICY_C1( KMPMActiveConnectionWritePolicy, ECapabilityNetworkControl );
    65 
   130 
    66 // MACROS
   131 // MACROS
    67 _LIT( KPanicCategory, "MPM Client" );
   132 _LIT( KPanicCategory, "MPM Client" );
    68 
   133 
    69 // DATA TYPES
   134 // DATA TYPES
   115 NONSHARABLE_CLASS( TMpmSnapBuffer )
   180 NONSHARABLE_CLASS( TMpmSnapBuffer )
   116     {
   181     {
   117     public:
   182     public:
   118         // Zero values 
   183         // Zero values 
   119         inline void Reset();    
   184         inline void Reset();    
   120         inline TInt Count() const;
   185         inline const TInt Count() const;
   121 
   186 
   122     public:
   187     public:
   123         TUint   iCount;
   188         TUint   iCount;
   124         TUint32 iIapId[KMpmMaxIAPCount];
   189         TUint32 iIapId[KMpmMaxIAPCount];
   125     };
   190     };
   273     return reinterpret_cast<SPolicyConnPref*>(UserPtr());
   338     return reinterpret_cast<SPolicyConnPref*>(UserPtr());
   274     }
   339     }
   275     
   340     
   276 public:
   341 public:
   277     enum { EConnS60PolicyPref = 0x0f }; // TConnPref has defined up to 0x07.
   342     enum { EConnS60PolicyPref = 0x0f }; // TConnPref has defined up to 0x07.
   278     inline TPolicyConnPref()
   343     inline TPolicyConnPref::TPolicyConnPref()
   279     : TConnPref( TPolicyConnPref::EConnS60PolicyPref )
   344     : TConnPref( TPolicyConnPref::EConnS60PolicyPref )
   280         {
   345         {
   281         SetIapId( 0 );
   346         SetIapId( 0 );
   282         SetNetId( 0 );
   347         SetNetId( 0 );
   283         SetSnapAPId( 0 );
   348         SetSnapAPId( 0 );
   389          * preferences.
   454          * preferences.
   390          */
   455          */
   391         EConnTypeExplicit
   456         EConnTypeExplicit
   392     };
   457     };
   393     
   458     
   394     inline TMpmConnPref()
   459     inline TMpmConnPref::TMpmConnPref()
   395     : TConnPref( TMpmConnPref::EConnPrefMpm )
   460     : TConnPref( TMpmConnPref::EConnPrefMpm )
   396         {
   461         {
   397         SetSnapPurpose( CMManager::ESnapPurposeUnknown );
   462         SetSnapPurpose( CMManager::ESnapPurposeUnknown );
   398         SetSnapId( 0 );
   463         SetSnapId( 0 );
   399         SetIapId( 0 );
   464         SetIapId( 0 );