inc/PEngWVServices2.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Wireless Village CSP features.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __PENGWVSERVICES2_H
       
    19 #define __PENGWVSERVICES2_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Std.h>
       
    23 
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 /**
       
    28  * NWSessionSlot option name.
       
    29  * Option level: KPEngNWSessionSlotTransportQuery.
       
    30  *
       
    31  * Used to query TPEngWVCSPServicesTree2 from NWSessionSlot.
       
    32  * Supported services can be asked only after succesful login,
       
    33  * when the NWSessionSlot is connected to network. If the slot
       
    34  * isn't connected to network, CPEngNWSessionSlot2::GetOption()
       
    35  * returns KErrNotFound.
       
    36  *
       
    37  * Usage:
       
    38  *      CPEngNWSessionSlot2* nwSlot = ... //Open NWSession
       
    39  *
       
    40  *      TPEngWVCspServicesTree2 cspTree;
       
    41  *      TPckg<TPEngWVCspServicesTree2> cspTreePtr( cspTree );
       
    42  *      User::LeaveIfError( nwSlot->GetOption( KPEngWVCspServicesTree2,
       
    43  *                                             KPEngNWSessionSlotTransportQuery,
       
    44  *                                             cspTreePtr ) );
       
    45  *
       
    46  *      if( !cspTree.iPresenceFeat.FeatureSupported() )
       
    47  *          {
       
    48  *          }
       
    49  *
       
    50  * @since 3.0
       
    51  */
       
    52 const TUint KPEngWVCspServicesTree2 = 0x50001;
       
    53 
       
    54 
       
    55 
       
    56 
       
    57 
       
    58 // CLASS DECLARATION
       
    59 
       
    60 
       
    61 /**
       
    62  * WV CSP Feature subtree.
       
    63  * Function and SubFunction constants
       
    64  * are in the end of this file.
       
    65  *
       
    66  * @since 3.0
       
    67  */
       
    68 class TPEngWVCspFeature2
       
    69     {
       
    70     public:  // Constructor
       
    71 
       
    72         /**
       
    73          * C++ default constructor
       
    74          */
       
    75         inline TPEngWVCspFeature2();
       
    76 
       
    77 
       
    78     public: // Accessor helpers
       
    79 
       
    80         /**
       
    81          * Checks is the feature supported or not.
       
    82          *
       
    83          * @return ETrue if network server supports all those functions
       
    84          *         that were requested in capability negotiation.
       
    85          *         Else EFalse.
       
    86          */
       
    87         inline TBool FeatureSupported() const;
       
    88 
       
    89 
       
    90         /**
       
    91          * Function accessor.
       
    92          * Checks is the given function supported or not.
       
    93          *
       
    94          * @param aFunction Function to check. See function constants
       
    95          *        KPEngFFServiceFunction, KPEngFFSearchFunction etc below.
       
    96          * @return ETrue if network server supports all those
       
    97          *         sub-functions that were requested in capability
       
    98          *         negotiation. Else EFalse.
       
    99          */
       
   100         inline TBool FunctionSupported( TInt aFunction ) const;
       
   101 
       
   102 
       
   103         /**
       
   104          * Sub-function accessor.
       
   105          * Checks is the given sub-function supported or not.
       
   106          *
       
   107          * @param aSubFunction Sub-function to check. See sub-function constants
       
   108          *        KPEngFFSubFuncSRCH, KPEngWVSubFuncSTSRC etc below.
       
   109          * @return ETrue if network server supports given sub-function.
       
   110          *         Else EFalse.
       
   111          */
       
   112         inline TBool SubFunctionSupported( TInt aSubFunction ) const;
       
   113 
       
   114 
       
   115 
       
   116     public:    // Data
       
   117 
       
   118         //OWN: Is feature supported?
       
   119         TBool           iSupported;
       
   120 
       
   121         //OWN: Supported WV functions
       
   122         TInt32          iFunctions;
       
   123 
       
   124         //OWN: Supported WV SubFunctions
       
   125         TInt32          iSubFunctions;
       
   126 
       
   127 
       
   128     private:    // Reserved extensions space
       
   129 
       
   130         //OWN: Reserved extensions space
       
   131         TUint8       iReserved[ 8 ];
       
   132     };
       
   133 
       
   134 
       
   135 
       
   136 
       
   137 /**
       
   138  * WV CSP Services Tree.
       
   139  *
       
   140  * Holds information about currently supported
       
   141  * Wireless Village CSP services.
       
   142  *
       
   143  * @since 3.0
       
   144  */
       
   145 class TPEngWVCspServicesTree2
       
   146     {
       
   147     public:  // Constructors
       
   148 
       
   149         /**
       
   150          * C++ default constructor.
       
   151          */
       
   152         inline TPEngWVCspServicesTree2();
       
   153 
       
   154 
       
   155 
       
   156     public:    // Data
       
   157 
       
   158         //OWN:  Wireless Village Fundamental Features
       
   159         TPEngWVCspFeature2            iFundamentalFeat;
       
   160 
       
   161         //OWN:  Wireless Village Presence Features
       
   162         TPEngWVCspFeature2            iPresenceFeat;
       
   163 
       
   164         //OWN:  Wireless Village IM Features
       
   165         TPEngWVCspFeature2            iIMFeat;
       
   166 
       
   167         //OWN:  Wireless Village Group Features
       
   168         TPEngWVCspFeature2            iGroupFeat;
       
   169 
       
   170 
       
   171     private:    // Reserved extensions space
       
   172 
       
   173         //OWN: Reserved extensions space
       
   174         TUint8  iReserved[4 * sizeof( TPEngWVCspFeature2 ) + 8];
       
   175     };
       
   176 
       
   177 
       
   178 
       
   179 
       
   180 // CONSTANTS
       
   181 
       
   182 /**
       
   183  * Fundamental Functions subtree.
       
   184  * @since 3.0
       
   185  */
       
   186 const TInt KPEngFFServiceFunction       = 0x0001;
       
   187 const TInt KPEngFFSearchFunction        = 0x0002;
       
   188 // Old name
       
   189 const TInt KPEngWVSearchFunction    = 0x0002;
       
   190 const TInt KPEngFFInviteFunction        = 0x0004;
       
   191 
       
   192 
       
   193 // SERVICE FUNCTIONS
       
   194 // GETSPI: Support for Get Service Provider Info transaction
       
   195 const TInt KPEngFFSubFuncGETSPI         = 0x0001;
       
   196 
       
   197 // SEARCHE FUNCTIONS
       
   198 
       
   199 // SRCH: Support for searching based on various group/user properties
       
   200 const TInt KPEngFFSubFuncSRCH           = 0x0010;
       
   201 
       
   202 // STSRC: Support for stop search transaction
       
   203 const TInt KPEngFFSubFuncSTSRC          = 0x0020;
       
   204 // Old names
       
   205 const TInt KPEngWVSubFuncSRCH   = 0x0010;
       
   206 const TInt KPEngWVSubFuncSTSRC  = 0x0020;
       
   207 
       
   208 
       
   209 // INVITE FUNCTIONS
       
   210 
       
   211 // INVIT: Support for invitation transaction
       
   212 const TInt KPEngFFSubFuncINVIT          = 0x0100;
       
   213 // CAINV: Support for cancel invitation transaction
       
   214 const TInt KPEngFFSubFuncCAINV          = 0x0200;
       
   215 
       
   216 
       
   217 
       
   218 /**
       
   219  * Presence Functions subtree.
       
   220  * @since 3.0
       
   221  */
       
   222 const TInt KPEngWVContListFunction      = 0x0001;
       
   223 const TInt KPEngWVPresAuthFunction      = 0x0002;
       
   224 const TInt KPEngWVPresDelivFunction     = 0x0004;
       
   225 const TInt KPEngWVAttrListFunction      = 0x0008;
       
   226 
       
   227 
       
   228 //CONTLIST FUNCTIONS
       
   229 
       
   230 // GCLI: Support for get list of contact lists (IDs) transaction
       
   231 const TInt KPEngWVSubFuncGCLI           = 0x0001;
       
   232 // CCLI: Support for create contact list transaction
       
   233 const TInt KPEngWVSubFuncCCLI           = 0x0002;
       
   234 // DCLI: Support for delete contact list transaction
       
   235 const TInt KPEngWVSubFuncDCLI           = 0x0004;
       
   236 // MCLS: Support for manage contact list transaction
       
   237 const TInt KPEngWVSubFuncMCLS           = 0x0008;
       
   238 
       
   239 
       
   240 //PRESAUTH FUNCTIONS
       
   241 
       
   242 // GETWL: Support for get watcher list transaction
       
   243 const TInt KPEngWVSubFuncGETWL          = 0x0010;
       
   244 // REACT: Support for reactive presence authorization request
       
   245 const TInt KPEngWVSubFuncREACT          = 0x0020;
       
   246 // CAAUT: Support for cancel presence authorization transaction
       
   247 const TInt KPEngWVSubFuncCAAUT          = 0x0040;
       
   248 // GETAUT: Support for get reactive authorization status transaction
       
   249 const TInt KPEngWVSubFuncGETAUT         = 0x0080;
       
   250 
       
   251 
       
   252 //PRESDELIV FUNCTIONS
       
   253 
       
   254 // GETPR: Support for get presence transaction
       
   255 const TInt KPEngWVSubFuncGETPR          = 0x0100;
       
   256 // UPDPR: Support for update presence transaction
       
   257 const TInt KPEngWVSubFuncUPDPR          = 0x0200;
       
   258 
       
   259 
       
   260 //ATTRLIST FUNCTIONS
       
   261 
       
   262 // CALI: Support for create attribute list transaction
       
   263 const TInt KPEngWVSubFuncCALI           = 0x1000;
       
   264 // DALI: Support for delete attribute list transaction
       
   265 const TInt KPEngWVSubFuncDALI           = 0x2000;
       
   266 // GALS: Support for get attribute list transaction
       
   267 const TInt KPEngWVSubFuncGALS           = 0x4000;
       
   268 
       
   269 
       
   270 
       
   271 
       
   272 /**
       
   273  * IM Functions subtree.
       
   274  * @since 3.0
       
   275  */
       
   276 const TInt KPEngIMSendFunctions         = 0x0001;
       
   277 const TInt KPEngIMReceiveFunctions      = 0x0002;
       
   278 const TInt KPEngIMAuthorFunctions       = 0x0004;
       
   279 
       
   280 //IM SEND FUNCTIONS
       
   281 
       
   282 // MDELIV: Support for delivery status report transaction
       
   283 const TInt KPEngIMSubFuncMDELIV         = 0x0001;
       
   284 // FWMSG: Support for forward message transaction
       
   285 const TInt KPEngIMSubFuncFWMSG          = 0x0002;
       
   286 
       
   287 
       
   288 //IM RECEIVE FUNCTIONS
       
   289 
       
   290 // SETD: Support for setting delivery method
       
   291 const TInt KPEngIMSubFuncSETD           = 0x0010;
       
   292 // GETLM: Support for get list of messages transaction
       
   293 const TInt KPEngIMSubFuncGETLM          = 0x0020;
       
   294 // GETM: Support for get message transaction
       
   295 const TInt KPEngIMSubFuncGETM           = 0x0040;
       
   296 // REJCM: Support for reject message transaction
       
   297 const TInt KPEngIMSubFuncREJCM          = 0x0080;
       
   298 // NOTIF: Support for message notification transaction
       
   299 const TInt KPEngIMSubFuncNOTIF          = 0x0100;
       
   300 // NEWM: Support for new message transaction
       
   301 const TInt KPEngIMSubFuncNEWM           = 0x0200;
       
   302 
       
   303 //IM AUTHORIZATION FUNCTIONS
       
   304 
       
   305 // GLBLU: Support for get list of blocked entities transaction
       
   306 const TInt KPEngIMSubFuncGLBLU          = 0x1000;
       
   307 // BLENT: Support for block entity transaction
       
   308 const TInt KPEngIMSubFuncBLENT          = 0x2000;
       
   309 
       
   310 
       
   311 
       
   312 /**
       
   313  * Group Functions subtree.
       
   314  * @since 3.0
       
   315  */
       
   316 const TInt KPEngGRManageFunctions       = 0x0001;
       
   317 const TInt KPEngGRUseFunctions          = 0x0002;
       
   318 const TInt KPEngGRAuthorFunctions       = 0x0004;
       
   319 
       
   320 //GROUP MANAGE FUNCTIONS
       
   321 
       
   322 // CREAG: Support for group creation transaction
       
   323 const TInt KPEngGRSubFuncCREAG          = 0x0001;
       
   324 // DELGR: Support for group deletion transaction
       
   325 const TInt KPEngGRSubFuncDELGR          = 0x0002;
       
   326 // GETGP: Support for get group properties transaction
       
   327 const TInt KPEngGRSubFuncGETGP          = 0x0004;
       
   328 // SETGP: Support for set group properties transaction
       
   329 const TInt KPEngGRSubFuncSETGP          = 0x0008;
       
   330 
       
   331 //GROUP USE FUNCTIONS
       
   332 
       
   333 // SUBGCN: Support for subscribe group notice transaction
       
   334 const TInt KPEngGRSubFuncSUBGCN         = 0x0010;
       
   335 // GRCHN: Support for group change notification transaction
       
   336 const TInt KPEngGRSubFuncGRCHN          = 0x0020;
       
   337 
       
   338 //GROUP AUTHORIZATION FUNCTIONS
       
   339 
       
   340 // GETGM: Support for get group members transaction
       
   341 const TInt KPEngGRSubFuncGETGM          = 0x0100;
       
   342 // ADDGM: Support for add group members transaction
       
   343 const TInt KPEngGRSubFuncADDGM          = 0x0200;
       
   344 // RMVGM: Support for remove group members transaction
       
   345 const TInt KPEngGRSubFuncRMVGM          = 0x0400;
       
   346 // MBRAC: Support for member access rights transaction
       
   347 const TInt KPEngGRSubFuncMBRAC          = 0x0800;
       
   348 // REJEC: Support for reject user(s) from group transaction
       
   349 const TInt KPEngGRSubFuncREJEC          = 0x1000;
       
   350 
       
   351 
       
   352 // Inline methods
       
   353 // =================== TPEngWVCSPFeature2 MEMBER FUNCTIONS ===================
       
   354 
       
   355 // C++ default constructor can NOT contain any code, that
       
   356 // might leave.
       
   357 //
       
   358 inline TPEngWVCspFeature2::TPEngWVCspFeature2()
       
   359     {
       
   360     Mem::FillZ( this, sizeof( TPEngWVCspFeature2 ) );
       
   361     }
       
   362 
       
   363 
       
   364 // -----------------------------------------------------------------------------
       
   365 // TPEngWVCspFeature2::FeatureSupported()
       
   366 // -----------------------------------------------------------------------------
       
   367 //
       
   368 inline TBool TPEngWVCspFeature2::FeatureSupported() const
       
   369     {
       
   370     return iSupported;
       
   371     }
       
   372 
       
   373 // -----------------------------------------------------------------------------
       
   374 // TPEngWVCspFeature2::FunctionSupported()
       
   375 // -----------------------------------------------------------------------------
       
   376 //
       
   377 inline TBool TPEngWVCspFeature2::FunctionSupported( TInt aFunction ) const
       
   378     {
       
   379     return ( iFunctions & aFunction ? ETrue : EFalse );
       
   380     }
       
   381 
       
   382 // -----------------------------------------------------------------------------
       
   383 // TPEngWVCspFeature2::SubFunctionSupported()
       
   384 // -----------------------------------------------------------------------------
       
   385 //
       
   386 inline TBool TPEngWVCspFeature2::SubFunctionSupported( TInt aSubFunction ) const
       
   387     {
       
   388     return ( iSubFunctions & aSubFunction ? ETrue : EFalse );
       
   389     }
       
   390 
       
   391 
       
   392 
       
   393 // ================= TPEngWVCspServicesTree2 MEMBER FUNCTIONS =================
       
   394 
       
   395 // C++ default constructor can NOT contain any code, that
       
   396 // might leave.
       
   397 //
       
   398 inline TPEngWVCspServicesTree2::TPEngWVCspServicesTree2()
       
   399     {
       
   400     Mem::FillZ( this, sizeof( TPEngWVCspServicesTree2 ) );
       
   401     }
       
   402 
       
   403 
       
   404 #endif //__PENGWVSERVICES2_H
       
   405 
       
   406 //End of file
       
   407 
       
   408 
       
   409