presencefwsimpleadpt/inc/simplepluginxdmutils.h
branchRCL_3
changeset 18 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
17:2669f8761a99 18:fbd2e7cec7ef
       
     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:    Simple Protocol implementation for Presence Framework
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CSIMPLEPLUGINXDMUTILS_H
       
    22 #define CSIMPLEPLUGINXDMUTILS_H
       
    23 
       
    24 #include <e32std.h>
       
    25 
       
    26 #include <badesca.h>
       
    27 
       
    28 #include <mrlspresxdmasynchandler.h>
       
    29 
       
    30 #include "simpleplugincommon.h"
       
    31 
       
    32 // Test suite
       
    33 class MSimplePluginTestObs;
       
    34 
       
    35 class MSimplePluginSettings;
       
    36 
       
    37 class CPresenceXDM;
       
    38 class CRLSXDM;
       
    39 class CXdmEngine;
       
    40 class CXdmDocument;
       
    41 class CXdmDocumentNode;
       
    42 
       
    43 class TPresenceActionXDM;
       
    44 class TPresenceTransformXDM;
       
    45 class TPresCondMisc;
       
    46 
       
    47 
       
    48 // notice: class CPtrCArray;  after PrFw headers fixed.
       
    49 
       
    50 class TRequestStatus;
       
    51 
       
    52 
       
    53 /**
       
    54  * CSimplePluginXdmUtils
       
    55  *
       
    56  * Simple Engine Connection
       
    57  *
       
    58  * @lib ?library
       
    59  * @since s60 v5.0
       
    60  */
       
    61 NONSHARABLE_CLASS( CSimplePluginXdmUtils ) : public CActive,
       
    62     public MRLSPresXDMAsyncHandler
       
    63     {
       
    64 public:
       
    65 
       
    66 
       
    67     /**
       
    68      * Active object asynch states
       
    69      */
       
    70     enum TPluginXdmState
       
    71         {
       
    72         EStateIdle,
       
    73         /** Get OMA XDM lists */
       
    74         EGetXdmOMALists,
       
    75         /** Create OMA XDM lists */
       
    76         ECreateXdmOMALists,
       
    77         /** Get OMA XDM lists only, no rules later */
       
    78         EGetXdmOMAListsOnly,
       
    79         /** Create OMA XDM lists only, no rules later */
       
    80         ECreateXdmOMAListsOnly,
       
    81         /** Get RLS service */
       
    82         EGetRlsServices,
       
    83         /** Update RLS service */
       
    84         EUpdateRlsServices,
       
    85         /** Get rules from server for GrantPresenceForPresentity */
       
    86         EGetXdmRules,
       
    87         /** Update rules to server for GrantPresenceForPresentity */
       
    88         EUpdateXdmRules,
       
    89         /** Update XDM OMA List */
       
    90         EUpdateXdmOMAList,
       
    91         /** Cancel XDM document operation */
       
    92         ECancelDocument,
       
    93         /** Re-Update RLS service - 409 HTTP error handling*/
       
    94         EReUpdateRlsServices        
       
    95         };
       
    96 
       
    97     /**
       
    98      * Current operation
       
    99      */
       
   100     enum TPluginXdmOperation
       
   101         {
       
   102         ENoOperation,
       
   103         EXdmInit,
       
   104         EXdmInitXdmsOnly,
       
   105         EXdmDeleteAll,
       
   106         EXdmCancel,
       
   107         EXdmAddUserToGroup,
       
   108         EXdmAddGroupToGroup,
       
   109         EXdmRemoveUserFromGroup,
       
   110         EXdmRemoveGroupFromGroup,
       
   111         EXdmGrantForAll,
       
   112         EXdmWithdrawFromAll,
       
   113         EXdmGetBlockedList,
       
   114         EXdmCreateGroup,
       
   115         EXdmDeleteGroup,
       
   116         EXdmRlsFetch,
       
   117         EXdmRlsAdd,
       
   118         EXdmRlsRemove,
       
   119         EXdmGrantGroup,
       
   120         EXdmWithdrawGroup,
       
   121         EXdmSetReactiveAuth,
       
   122         EXdmSetProactiveAuth
       
   123         };
       
   124                
       
   125 
       
   126     /**
       
   127      * Constructor.
       
   128      * @param aConnSets connection settings
       
   129      * @param aXdmId XDm settings id
       
   130      */
       
   131     static CSimplePluginXdmUtils* NewL(
       
   132         MSimplePluginSettings& aConnSets,
       
   133         TInt aXdmId);
       
   134 
       
   135     virtual ~CSimplePluginXdmUtils();
       
   136     
       
   137     /**
       
   138      * Cancel non active wrappers
       
   139      */
       
   140     void CancelWrappers();
       
   141      
       
   142     /**
       
   143      * Initialize XDMS and Presence XDM structures in network.
       
   144      * @param aStatus Request status of the caller
       
   145      */
       
   146     void InitializeXdmL( TRequestStatus& aStatus );
       
   147 
       
   148     /**
       
   149      * Initialize XDMS in network
       
   150      * @param aStatus Request status of the caller
       
   151      */
       
   152     void InitializeXdmsOnlyL( TRequestStatus& aStatus );
       
   153 
       
   154     /**
       
   155      * Add resource-list into RLS document, overwrite old document
       
   156      * @param aStatus Request status of the caller
       
   157      */
       
   158     void FetchRlsL( TRequestStatus& aStatus );
       
   159 
       
   160     /**
       
   161      * Add resource-list into RLS document.
       
   162      * FetchRlsL must be called before this method.
       
   163      * @param aName list name
       
   164      */
       
   165     void AddRlsGroupL(
       
   166         const TDesC& aName );
       
   167 
       
   168     /**
       
   169      * Remove resource-list in RLS document
       
   170      * FetchRlsL must be called before this method.
       
   171      * Use RemoveRlsServiceByResourceListL instead when possible.      
       
   172      * @param aName list name
       
   173      */
       
   174     void RemoveRlsGroupL( const TDesC& aName );
       
   175     
       
   176     /**
       
   177      * Remove service URI in RLS document by corresponding shared XDM document entry.
       
   178      * The document in the server is updated when needed.
       
   179      * FetchRlsL must be called before this method.
       
   180      * This completes without error if the service was not found. 
       
   181      * @param aGroup user's group name, that's converted to resource-list value and used
       
   182      * to match the service resource-list in the rls-services document.
       
   183      * @param aStatus Request status of the caller.     
       
   184      */
       
   185     void RemoveRlsServiceByResourceListL( const TDesC& aGroup, TRequestStatus& aStatus  );    
       
   186     
       
   187     
       
   188     /**
       
   189      * Access service URI in RLS document by corresponding shared XDM document entry.
       
   190      * FetchRlsL must be called before this method.
       
   191      * Leaves with KErrNotFound if RLS service is not found.
       
   192      * @param aGroup user's group name, that's converted to resource-list value and used
       
   193      * to match the service resource-list in the rls-services document.
       
   194      * @return Access service URI in RLS document, ownership is transferred. May be NULL.
       
   195      */
       
   196     HBufC* RlsServiceByResourceListLC( const TDesC& aGroup );     
       
   197 
       
   198     /**
       
   199      * Add entity to granted list.
       
   200      * InitializeXdmL must be called before this method.
       
   201      * @param aUri entity URI to be granted
       
   202      * @param aStatus Request status of the caller
       
   203      */
       
   204     void AddEntityToGrantedL( const TDesC& aUri, TRequestStatus& aStatus );
       
   205 
       
   206     /**
       
   207      * Remove entity from granted list.
       
   208      * InitializeXdmL must be called before this method.
       
   209      * @param aUri entity URI to be removed
       
   210      * @param aStatus Request status of the caller
       
   211      */
       
   212     void RemoveEntityFromGrantedL(
       
   213         const TDesC&  aUri, TRequestStatus& aStatus );
       
   214 
       
   215     /**
       
   216      * Add entity to blocked list.
       
   217      * InitializeXdmL must be called before this method.
       
   218      * @param aUri entity URI to be blocked
       
   219      * @param aStatus Request status of the caller
       
   220      */
       
   221     void AddEntityToBlockedL( const TDesC& aUri, TRequestStatus& aStatus );
       
   222 
       
   223     /**
       
   224      * Remove entity from blocked list.
       
   225      * InitializeXdmL must be called before this method.
       
   226      * @param aUri entity URI to be removed
       
   227      * @param aStatus Request status of the caller
       
   228      */
       
   229     void RemoveEntityFromBlockedL(
       
   230         const TDesC&  aUri, TRequestStatus& aStatus );
       
   231 
       
   232     /**
       
   233      * Add group to granted.
       
   234      * InitializeXdmL must be called before this method.
       
   235      * @param aName a group to be granted
       
   236      * @param aStatus Request status of the caller
       
   237      */
       
   238     void AddGroupToGrantedL( const TDesC& aName, TRequestStatus& aStatus );
       
   239 
       
   240     /**
       
   241      * Remove group from granted list.
       
   242      * InitializeXdmL must be called before this method.
       
   243      * @param aName a group to be removed from granted list
       
   244      * @param aStatus Request status of the caller
       
   245      */
       
   246     void RemoveGroupFromGrantedL(
       
   247         const TDesC&  aName, TRequestStatus& aStatus );
       
   248 
       
   249     /**
       
   250      * Grant right for everyone, proactive authorization is set on.
       
   251      * InitializeXdmL must be called before this method.
       
   252      * @param aStatus Request status of the caller
       
   253      */
       
   254     void GrantForEveryoneL( TRequestStatus& aStatus );
       
   255 
       
   256     /**
       
   257      * Withdraw right from eveyone, reactive authorization is set on.
       
   258      * InitializeXdmL must be called before this method.
       
   259      * @param aStatus Request status of the caller
       
   260      */
       
   261     void WithdrawFromEveryoneL( TRequestStatus& aStatus );
       
   262     
       
   263     /**
       
   264      * Set reactive authorization policy.
       
   265      * Default rule is set to CONFIRM.
       
   266      */
       
   267     void SetReactiveAuthL( TRequestStatus& aStatus ); 
       
   268     
       
   269     /**
       
   270      * Set proactive authorization policy.
       
   271      * Default rule is set to ALLOW if it was CONFIRM.
       
   272      */
       
   273     void SetProactiveAuthL( TRequestStatus& aStatus );      
       
   274 
       
   275     /**
       
   276      * Get (subscribe) Block List.
       
   277      * InitializeXdmL must be called before this method.
       
   278      * @param aMembers blocked users [OUT].
       
   279      */
       
   280     void SubscribeBlockListL( CPtrCArray& aMembers );
       
   281 
       
   282     /**
       
   283      * Unsubscribe Block List.
       
   284      * @param aStatus Request status of the caller
       
   285      */
       
   286     void UnsubscribeBlockListL( TRequestStatus& aStatus );
       
   287 
       
   288     /**
       
   289      * Create entity's own group
       
   290      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   291      * @param aName group name
       
   292      * @param aDisplayName group's display name
       
   293      */
       
   294     void CreateEntityGroupL(
       
   295         const TDesC&  aName,
       
   296         const TDesC&  aDisplayName );
       
   297 
       
   298     /**
       
   299      * Delete entity's own group
       
   300      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   301      */
       
   302     void DeleteEntityGroupL( const TDesC&  aName );
       
   303 
       
   304     /**
       
   305      * Add group member
       
   306      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   307      * @param aGroup group name
       
   308      * @param aUser member
       
   309      * @param aDispName display name
       
   310      * @param aStatus Request status of the caller
       
   311      */
       
   312     void AddPresentityGroupMemberL(
       
   313         const TDesC&  aGroup,
       
   314         const TDesC&  aUser,
       
   315         const TDesC&  aDispName,
       
   316         TRequestStatus& aStatus );
       
   317 
       
   318     /**
       
   319      * Remove group member
       
   320      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   321      * @param aGroup group name
       
   322      * @param aUser member
       
   323      * @param aStatus Request status of the caller
       
   324      */
       
   325     void RemovePresentityGroupMemberL(
       
   326         const TDesC&  aGroup,
       
   327         const TDesC&  aUser,
       
   328         TRequestStatus& aStatus );
       
   329 
       
   330     /**
       
   331      * GetUserListsL
       
   332      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   333      * The size of the parameter arrays are same.
       
   334      * @param aIds sip id array [OUT]
       
   335      * @param aDispNames display name array [OUT]
       
   336      */
       
   337     void GetUserListsL( CDesCArrayFlat& aIds, CDesCArrayFlat& aDispNames );
       
   338 
       
   339     /**
       
   340      * GetEntitiesInListL
       
   341      * InitializeXdmL or InitilaizeXdmsOnlyL must be called before this method.
       
   342      * The size of the parameter arrays are same.
       
   343      * @param aList naem of the user's list [IN]
       
   344      * @param aIds sip id array [OUT]
       
   345      * @param aDispNames display name array [OUT]
       
   346      */
       
   347     void GetEntitiesInListL(
       
   348         const TDesC&  aList, CPtrCArray& aIds, CPtrCArray& aDispNames);
       
   349 
       
   350     /**
       
   351      * Updates XDM reource lists into server
       
   352      * @param aStatus Request status of the caller
       
   353      */
       
   354     void CommitXdmL( TRequestStatus& aStatus );
       
   355 
       
   356     /**
       
   357      * Updates RLS reource lists into server
       
   358      * @param aStatus Request status of the caller
       
   359      */
       
   360     void CommitRlsL( TRequestStatus& aStatus );
       
   361 
       
   362     /**
       
   363      * Test Suite setter
       
   364      * @param aObs test observer, may be NULL
       
   365      */
       
   366     void SetTestObserver( MSimplePluginTestObs* aObs );
       
   367 
       
   368     /**
       
   369      * Generate RLS document URI based on URI template located in CentRep variation definition.
       
   370      * @param aGroup grouup name
       
   371      * @param aPresentityUri presntity's URI, may be SIP or TEL URI. Domain part is stripped from SIP URI.
       
   372      * @param aDomain domain part of the URI,  
       
   373                       Leading '@' is stripped off and it must be hard coded in a template when needed.
       
   374      * @return RLS document URI     
       
   375      */
       
   376     HBufC16* CreateRlsDocumentUri16LC(
       
   377         const TDesC16& aGroup,
       
   378         const TDesC16& aPresentityUri,
       
   379         const TDesC16& aDomain );                
       
   380 
       
   381 private:
       
   382 
       
   383     CSimplePluginXdmUtils(
       
   384         MSimplePluginSettings& aObs, TInt aXdmId );
       
   385 
       
   386     void ConstructL( );
       
   387 
       
   388   TBool DoesUserListExistsL( const TDesC& aName );
       
   389 
       
   390 
       
   391 public:
       
   392 
       
   393 // from base class MRLSPresXDMAsyncHandler
       
   394 
       
   395     /**
       
   396      * Defined in a base class
       
   397      */
       
   398     void HandleRLSUpdateDocumentL(TInt aErrorCode);
       
   399 
       
   400     /**
       
   401      * Defined in a base class
       
   402      */
       
   403     void HandleRLSUpdateCancelL(TInt aErrorCode);
       
   404 
       
   405     /**
       
   406      * Defined in a base class
       
   407      */
       
   408     void HandleRLSDeleteAllEmptyListsL(TInt aErrorCode);
       
   409 
       
   410     /**
       
   411      * Defined in a base class
       
   412      */
       
   413     void HandlePresUpdateDocumentL(TInt aErrorCode);
       
   414 
       
   415     /**
       
   416      * Defined in a base class
       
   417      */
       
   418     void HandlePresUpdateCancelL(TInt aErrorCode);
       
   419 
       
   420 
       
   421 
       
   422 protected:
       
   423 
       
   424 // from base class CActive
       
   425 
       
   426     /**
       
   427      * Defined in a base class
       
   428      */
       
   429     void RunL();
       
   430 
       
   431     /**
       
   432      * Defined in a base class
       
   433      */
       
   434     TInt RunError( TInt aError );
       
   435 
       
   436     /**
       
   437      * Defined in a base class
       
   438      */
       
   439     void DoCancel();
       
   440 
       
   441 private:
       
   442 
       
   443     /**
       
   444      * Complete client request
       
   445      * @param aStatus return code
       
   446      */
       
   447     void CompleteClientReq( TInt aStatus );
       
   448 
       
   449     /**
       
   450      * Get XDm OMA lists from a server
       
   451      */
       
   452     void GetXdmOMAListsL();
       
   453 
       
   454     /**
       
   455      * Create OMA Shared Xdm Lists when needed.
       
   456      * @return true if a list is created.
       
   457      */
       
   458     TBool CreateXdmOMAListsIfNeededL( );
       
   459 
       
   460     /**
       
   461      * Create a specified OMA Shared Xdm List when needed.
       
   462      *
       
   463      * @param aRoot parent for the new list
       
   464      * @param aName name for the new list
       
   465      * Leave with KErrAlreadyExists if all the lists already exist.
       
   466      * @return true is list was added into root node.
       
   467      */
       
   468     TBool CreateXdmOMAListIfNeededL( CXdmDocumentNode* aRoot, const TDesC& aName );
       
   469 
       
   470     /**
       
   471      * Create Resource List in shared xdm document
       
   472      * @param aParent parent for the new list
       
   473      * @param aName name for the new list
       
   474      */
       
   475     void CreateResourceListL(
       
   476         CXdmDocumentNode* aParent, const TDesC& aName );
       
   477 
       
   478     /**
       
   479      * Search List under a parent list, one level only
       
   480      * @param aParent parent list node
       
   481      * @param aName list to be searched for
       
   482      * @return child node found or NULL if not found.
       
   483      */
       
   484     CXdmDocumentNode* SearchListUnderParentL(
       
   485         CXdmDocumentNode* aParent, const TDesC& aName );
       
   486 
       
   487     void GetXdmRulesL();
       
   488 
       
   489     /**
       
   490      * Make Rls list URI
       
   491      * @param aXCapUri XCAP URI
       
   492      * @param aListName a list to be referred
       
   493      * @return URI, ownerhisp is transferred
       
   494      */
       
   495     HBufC* MakeRlsUriL(
       
   496         const TDesC& aXcapUri, const TDesC& aListName );
       
   497 
       
   498     /**
       
   499      * Make Rls list URI
       
   500      * @param aXCapUri XCAP URI
       
   501      * @param aListName a list to be referred
       
   502      * @return URI, ownerhisp is transferred
       
   503      */
       
   504     HBufC* MakeRlsBuddyUriL(
       
   505         const TDesC& aXcapUri, const TDesC& aListName );
       
   506 
       
   507     void MakeInitialXdmsDocumentL();
       
   508 
       
   509     /**
       
   510      * Updates XDM rules into server
       
   511      */
       
   512     void UpdateXdmRulesL();
       
   513 
       
   514     /**
       
   515      * Updates XDMS reource lists into server
       
   516      */
       
   517     void UpdateXdmsL();
       
   518 
       
   519     /**
       
   520      * Updates RLS document into server
       
   521      */
       
   522     void UpdateRlsL();
       
   523 
       
   524     /**
       
   525      * Handles pres auth rules document callback method
       
   526      * @param aErrorCode returned error code
       
   527      */
       
   528     void DoHandlePresUpdateDocumentL( TInt aErrorCode );
       
   529     
       
   530     /**
       
   531      * Handles RLS document callback method
       
   532      * @param aErrorCode returned error code
       
   533      */
       
   534     void DoHandleRLSUpdateDocumentL(TInt aErrorCode);    
       
   535 
       
   536     void DoAddUserToListL(
       
   537         const TDesC& aList, const TDesC&  aName );
       
   538 
       
   539     void DoAddUserToUserListL(
       
   540         const TDesC& aList, const TDesC&  aUser, const TDesC&  aDispName );
       
   541 
       
   542     void DoAddListIntoGrantRuleL( const TDesC& aListUri );
       
   543 
       
   544     void DoRemoveListFromGrantRuleL( const TDesC& aListUri );
       
   545 
       
   546     void DoRemoveUserFromListL(
       
   547         const TDesC& aList, const TDesC&  aName );
       
   548 
       
   549     void DoRemoveUserFromUserListL( const TDesC& aList, const TDesC&  aUser );
       
   550 
       
   551     void DoGrantForAllL();
       
   552 
       
   553     void DoWithdrawFromAllL();
       
   554     
       
   555     void DoSetReactiveAuthL(); 
       
   556     
       
   557     /**
       
   558      * Set Proactive authorization
       
   559      */
       
   560     void DoSetProactiveAuthL();        
       
   561 
       
   562     void DoGetListMembersL(
       
   563         const TDesC& aList, CPtrCArray& aMembers  );
       
   564 
       
   565     void DoCreateEntityGroupL( const TDesC& aList, const TDesC& aDisName  );
       
   566 
       
   567     void DoDeleteEntityGroupL( const TDesC& aList );
       
   568 
       
   569     /**
       
   570      * Search OMA Buddy List
       
   571      * Leaves with KErrNotFound if not found
       
   572      * @return list node
       
   573      */
       
   574     CXdmDocumentNode* DoGetBuddyListL();
       
   575 
       
   576     /**
       
   577      * Search a specific user XDM list
       
   578      * Leaves with KErrNotFound if not found
       
   579      * @param aList list name
       
   580      * @param aBuddyList parent buddy list
       
   581      * @return list node
       
   582      */
       
   583     CXdmDocumentNode* DoGetUserListL(
       
   584         const TDesC& aList, CXdmDocumentNode* aBuddyList );
       
   585         
       
   586     /**
       
   587      * Remove service URI in RLS document by corresponding shared XDM document entry.
       
   588      * FetchRlsL must be called before this method.
       
   589      * @param aResourceList resource-list entry value, a reference to Shared XDM document.
       
   590      * @return ETrue if service is found and removed.
       
   591      */
       
   592     TBool DoRemoveRlsServiceByResourceListL( const TDesC& aResourceList ); 
       
   593     
       
   594     /**
       
   595      * Access service URI in RLS document by corresponding shared XDM document entry.
       
   596      * FetchRlsL must be called before this method.
       
   597      * @param aResourceList resource-list entry value, a reference to Shared XDM document.
       
   598      * @return service URI, ownership is transferred.
       
   599      */
       
   600     HBufC* DoGetRlsServiceByResourceListL( const TDesC& aResourceList );  
       
   601     
       
   602     /**
       
   603      * Accesor for iAuxBuffer that contains last negotiated RLS service URI
       
   604      * @return buffer content
       
   605      */    
       
   606     TPtrC AuxBuffer(); 
       
   607     
       
   608     /**
       
   609      * Run next XDM routines
       
   610      * @param aOrigState original XDM state
       
   611      * @param aStatus error status
       
   612      */
       
   613     void DoXdmRunL( TPluginXdmState aOrigState, TInt aStatus ); 
       
   614     
       
   615     /**
       
   616      * Handle RLS service URI negatioation
       
   617      */
       
   618     void RlsServiceUriNegotiationL();
       
   619     
       
   620     /**
       
   621      * Make default auth rule
       
   622      * @param aRuleId Rule id
       
   623      * @param aAction action class initialized
       
   624      * @param aTransform transform class initialized
       
   625      */
       
   626     void MakeDefaultRuleL( 
       
   627         TDes& aRuleId, 
       
   628         TPresenceActionXDM& aAction, 
       
   629         TPresenceTransformXDM& aTransform,
       
   630         TPresCondMisc& aMisc );
       
   631       
       
   632     /**
       
   633      * Replace Group tag in URI
       
   634      * @param aBuf URI buffer [IN,OUT]
       
   635      * @param aGroup Group name
       
   636      */         
       
   637     static void ReplaceGroupTag( HBufC16* aBuf, const TDesC16& aGroup );
       
   638         
       
   639     /**
       
   640      * Replace Domain tag in URI
       
   641      * @param aBuf URI buffer [IN,OUT]
       
   642      * @param aDomain Domain value
       
   643      */          
       
   644     static void ReplaceDomainTag( HBufC16* aBuf, const TDesC16& aDomain );
       
   645         
       
   646     /**
       
   647      * Replace User tag in URI
       
   648      * @param aBuf URI buffer [IN,OUT]
       
   649      * @param aPresentityUri User URI value
       
   650      */    
       
   651     static void ReplaceUserTag( 
       
   652         HBufC16* aBuf, const TDesC16& aPresentityUri );
       
   653 
       
   654 
       
   655 private: // Data
       
   656 
       
   657     /**
       
   658      * PrFw Plugin connection observer
       
   659      */
       
   660     MSimplePluginSettings& iConnSets;
       
   661 
       
   662     /**
       
   663      * XDM Settings id
       
   664      */
       
   665     TInt iSettingsId;
       
   666 
       
   667     /**
       
   668      * Simple Engine request id
       
   669      */
       
   670     TInt iSimpleId;
       
   671 
       
   672     /**
       
   673      * Subscribed items. Bitmask.
       
   674      */
       
   675     TUint iSubscribed;
       
   676 
       
   677     /**
       
   678      * Presence XDM Client
       
   679      * Own.
       
   680      */
       
   681     CPresenceXDM* iPresenceXdm;
       
   682 
       
   683     /**
       
   684      * RlsXDM Client
       
   685      * Own.
       
   686      */
       
   687     CRLSXDM* iRlsXdm;
       
   688 
       
   689     /**
       
   690      * XDM Engine
       
   691      * Own.
       
   692      */
       
   693     CXdmEngine* iXdmEngine;
       
   694 
       
   695     /**
       
   696      * XDM document for resource-lists
       
   697      * Own.
       
   698      */
       
   699     CXdmDocument* iXdmDoc;
       
   700 
       
   701     /**
       
   702      * Current state
       
   703      */
       
   704     TPluginXdmState iXdmState;
       
   705 
       
   706     /**
       
   707      * Current operation
       
   708      */
       
   709     TPluginXdmOperation iOperation;
       
   710 
       
   711     /**
       
   712      * Whether Presence XDM is up-to-date
       
   713      */
       
   714     TBool iPresXdmOk;
       
   715 
       
   716     /**
       
   717      * Whether XDM is up-to-date
       
   718      */
       
   719     TBool iXdmOk;
       
   720 
       
   721     /**
       
   722      * client statutus.
       
   723      * Not own.
       
   724      */
       
   725     TRequestStatus* iClientStatus;
       
   726 
       
   727     /**
       
   728      * Test suite observer
       
   729      * Not own.
       
   730      */
       
   731     MSimplePluginTestObs* iTestObs;
       
   732     
       
   733     /**
       
   734      * Auxiliary buffer for for Negotiated RLS service URI
       
   735      */
       
   736     HBufC* iAuxBuffer;
       
   737     
       
   738     /**
       
   739      * Auxiliary buffer for for Negotiated RLS service URI
       
   740      */
       
   741     HBufC* iAuxBuffer2;    
       
   742          
       
   743     };
       
   744 
       
   745 
       
   746 
       
   747 #endif // CSimplePluginXdmUtils_H