homescreensrv_plat/sapi_contentpublishing/inc/cpclientsession.h
branchRCL_3
changeset 114 a5a39a295112
equal deleted inserted replaced
113:0efa10d348c0 114:a5a39a295112
       
     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:  Content Publisher server client
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPCLIENTSESSION_H
       
    20 #define CPCLIENTSESSION_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CLiwGenericParamList;
       
    28 class CCPActive;
       
    29 class CCPLiwMap;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * Client-side interface to CPS Server
       
    34  *
       
    35  * This class provides the client-side interface to the active data server session,
       
    36  * it just passes requests to the server.
       
    37  *
       
    38  */
       
    39 class RCPServerClient : public RSessionBase
       
    40     {
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Construct the object.
       
    45      */
       
    46     RCPServerClient();
       
    47 
       
    48     /**
       
    49      * Connects to the server and create a session.
       
    50      * When the server is not running, the function starts the server.
       
    51      * @return error code
       
    52      */
       
    53     TInt Connect();
       
    54 
       
    55     /**
       
    56      * Pass Add request to the server
       
    57      *
       
    58      * @since S60 v 5.0
       
    59      * @param aInParamList const reference to the input list
       
    60      * @param aOutParamList reference to the output list
       
    61      */
       
    62     void AddL( const CCPLiwMap& aMap,
       
    63                CLiwGenericParamList& aOutParamList,
       
    64                TUint aCmdOptions );
       
    65 
       
    66     /**
       
    67      * Pass GetList request to the server
       
    68      *
       
    69      * @since S60 v 5.0
       
    70      * @param aInParamList const reference to the input list
       
    71      * @param aOutParamList reference to the output list
       
    72      */
       
    73     void GetListL( const CCPLiwMap& aMap,
       
    74         CLiwGenericParamList& aOutParamList );
       
    75 
       
    76     /**
       
    77      * Pass Delete request to the server
       
    78      *
       
    79      * @since S60 v 5.0
       
    80      * @param aInParamList const reference to the input list
       
    81      */
       
    82     void DeleteL( const CCPLiwMap& aMapt );
       
    83 
       
    84     /**
       
    85      * Pass RegisterObserver request to the server
       
    86      *
       
    87      * @since S60 v 5.0
       
    88      * @param aStatus  ?
       
    89      * @param aBuf ?
       
    90      * @param aSize ?
       
    91      * @return error code
       
    92      */
       
    93     void RegisterObserverL( TRequestStatus& aStatus, TIpcArgs& aArgs );
       
    94     
       
    95     /**
       
    96      * Pass AddObserver request to the server
       
    97      *
       
    98      * @since S60 v 5.0
       
    99      * @return error code
       
   100      */
       
   101     void AddObserver( TIpcArgs& aArgs );
       
   102 
       
   103     /**
       
   104      * Pass RemoveObserver request to the server
       
   105      *
       
   106      * @since S60 v 5.0
       
   107      * @return error code
       
   108      */
       
   109     void RemoveObserver( TIpcArgs& aArgs );
       
   110     
       
   111     /**
       
   112      * Pass ExecuteAction request to the server
       
   113      *
       
   114      * @since S60 v 5.0
       
   115      * @param aInParamList const reference to the input list
       
   116      * @param aOptions Command options.
       
   117      */
       
   118     void ExecuteActionL( const CCPLiwMap& aMap, TUint aOptions = 0 );
       
   119 
       
   120     /**
       
   121      * Pass ExecuteMultipleActionsL request to the server
       
   122      *
       
   123      * @since S60 v 5.0
       
   124      * @param aList const reference to the input list
       
   125      * @param aOptions Command options.
       
   126      */
       
   127     void ExecuteMultipleActionsL( const CLiwGenericParamList& aList,
       
   128             TUint aOptions = 0 );
       
   129     
       
   130     /**
       
   131      * Pass GetChangeInfoData request to server
       
   132      * @param aBuf reference to the input list
       
   133      * @return error code
       
   134      */
       
   135     TInt GetChangeInfoData( TDes8& aBuf );
       
   136     /**
       
   137      * Pass Activate request to the server
       
   138      *
       
   139      * @since S60 v 5.0
       
   140      * @param aInParamList const reference to the input list
       
   141      */
       
   142     void ActivateL( const CCPLiwMap& aMap, TUint aOptions = 0 );
       
   143 
       
   144     /**
       
   145      * Pass UnregisterObserver request to the server
       
   146      *
       
   147      * @since S60 v 5.0
       
   148      * @return error code
       
   149      */
       
   150     void UnregisterObserver();
       
   151 
       
   152     /**
       
   153      * Closes session
       
   154      *
       
   155      * @since S60 v 5.0
       
   156      */
       
   157     void Close();
       
   158 
       
   159     /**
       
   160      * Return version information
       
   161      */
       
   162     TVersion Version() const;
       
   163 
       
   164 private:
       
   165     //private methods
       
   166 
       
   167     };
       
   168 
       
   169 #endif // CPCLIENTSESSION_H
       
   170 
       
   171 // End of File