PECengine/PresenceServer2/ClientInc/RPEngTransferClient.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2002 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:   Sub-session of the Presence Server
       
    15 *  It is used to update date of the PEC engine to network
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __RPENGTRANSFERCLIENT_H__
       
    21 #define __RPENGTRANSFERCLIENT_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include	<e32base.h>
       
    25 #include	"PEngPresenceEngineConsts2.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class RPEngManagerClient;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  *  Sub-session of the Presence Server
       
    33  *  It is used to update data of the Presence engine to network
       
    34  *
       
    35  *  @lib PEngClient2
       
    36  *  @since 3.0
       
    37  */
       
    38 class RPEngTransferClient : public RSubSessionBase
       
    39     {
       
    40 
       
    41     public:		// Constructors and destructors
       
    42 
       
    43         /**
       
    44          * Destructor.
       
    45          */
       
    46         IMPORT_C  ~RPEngTransferClient();
       
    47 
       
    48         /**
       
    49          * C++ default constructor.
       
    50          */
       
    51         IMPORT_C	RPEngTransferClient();
       
    52 
       
    53     public:		// New methods
       
    54 
       
    55         /**
       
    56          *	Connect this sub-session to the Presence Server
       
    57          *
       
    58          *	Client is connected to the server with defined session Id
       
    59          *	and application Id
       
    60          *
       
    61          *  @since 3.0
       
    62          *  @param aSessionId packed session slot Id
       
    63          *	@param aAppId application Id
       
    64          *	@param aManagerClient main session client
       
    65          *  @return KErrNone if connected or system wide error code
       
    66          */
       
    67         IMPORT_C TInt Connect(	const TDesC8& aSessSlotId,
       
    68                                const TDesC& aAppId,
       
    69                                RPEngManagerClient& aManagerClient );
       
    70 
       
    71         /**
       
    72          *	Closes sub session to the Presence server
       
    73          *
       
    74          *  Also all asynchronous requests are canceled on the server side
       
    75          *  when this sub-session is cleaned
       
    76          *
       
    77          *  @since 3.0
       
    78          */
       
    79         IMPORT_C void Close();
       
    80 
       
    81     public:		// New operation of the client
       
    82 
       
    83 
       
    84         /**
       
    85          *	Update data to the presence Network
       
    86          *
       
    87          *  Passed TRequestStatus can be completed with following codes:
       
    88          *     Positive complete code:
       
    89          *	     	 Update operation went fine and there is result buffer
       
    90          *           on the server side waiting to be fetched, while
       
    91          *           completed number is size of the buffer need on
       
    92          *           the client side.
       
    93          *     Zero:
       
    94          * 			 Update operation went fine, but there is no detailed
       
    95          *		     result buffer waiting to be fetched on the server side
       
    96          *     Negative complete code:
       
    97          *           During update operation occured system wide error
       
    98          *           which same as complete code. Update operation was not
       
    99          *           completed successfuly.
       
   100          *
       
   101          *  @since 3.0
       
   102          *  @param aOperation, TPEngTransactionOperation enumeration
       
   103          *  @param aData detailed data if required by the update operation
       
   104          *  @return KErrNone if message went to the server
       
   105          *			KErrDisconnected if client is not connected
       
   106          */
       
   107         IMPORT_C TInt UpdateData(	TInt aOperation,
       
   108                                   const TDesC& aData,
       
   109                                   TRequestStatus& aStatus );
       
   110 
       
   111         /**
       
   112          *	Fetch result for last Update data call
       
   113          *
       
   114          *  @since 3.0
       
   115          *  @param aRequestResult descriptor buffer on the client side, when
       
   116          *         will be put detailed result buffer of the last request
       
   117          *  @return KErrNone if request was canceled
       
   118          *			KErrDisconnected if client is not connected
       
   119          *			or system wide error code if something went wrong
       
   120          */
       
   121         IMPORT_C TInt FetchLastRequestResult( TDes8& aRequestResult );
       
   122 
       
   123         /**
       
   124          *	Cancel last Asynchronous request update data
       
   125          *
       
   126          *  @since 3.0
       
   127          */
       
   128         IMPORT_C void CancelUpdateData();
       
   129 
       
   130     private:	// Data
       
   131 
       
   132         // Flag is client is connected or not
       
   133         TBool					iConnected;
       
   134     };
       
   135 
       
   136 #endif      //  __RPENGTRANSFERCLIENT_H__
       
   137 
       
   138 
       
   139 
       
   140 
       
   141 
       
   142 
       
   143 
       
   144 
       
   145 
       
   146 
       
   147 
       
   148 
       
   149 
       
   150 
       
   151 
       
   152 
       
   153 
       
   154 
       
   155 
       
   156 
       
   157