homescreensrv_plat/sapi_contentpublishing/inc/cpclientsession.h
changeset 93 82b66994846c
parent 92 782e3408c2ab
child 94 dbb8300717f7
equal deleted inserted replaced
92:782e3408c2ab 93:82b66994846c
     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, CLiwGenericParamList& aOutParamList );
       
    63 
       
    64     /**
       
    65      * Pass GetList request to the server
       
    66      *
       
    67      * @since S60 v 5.0
       
    68      * @param aInParamList const reference to the input list
       
    69      * @param aOutParamList reference to the output list
       
    70      */
       
    71     void GetListL( const CCPLiwMap& aMap,
       
    72         CLiwGenericParamList& aOutParamList );
       
    73 
       
    74     /**
       
    75      * Pass Delete request to the server
       
    76      *
       
    77      * @since S60 v 5.0
       
    78      * @param aInParamList const reference to the input list
       
    79      */
       
    80     void DeleteL( const CCPLiwMap& aMapt );
       
    81 
       
    82     /**
       
    83      * Pass RegisterObserver request to the server
       
    84      *
       
    85      * @since S60 v 5.0
       
    86      * @param aStatus  ?
       
    87      * @param aBuf ?
       
    88      * @param aSize ?
       
    89      * @return error code
       
    90      */
       
    91     void RegisterObserverL( TRequestStatus& aStatus, TIpcArgs& aArgs );
       
    92     
       
    93     /**
       
    94      * Pass AddObserver request to the server
       
    95      *
       
    96      * @since S60 v 5.0
       
    97      * @return error code
       
    98      */
       
    99     void AddObserver( TIpcArgs& aArgs );
       
   100 
       
   101     /**
       
   102      * Pass RemoveObserver request to the server
       
   103      *
       
   104      * @since S60 v 5.0
       
   105      * @return error code
       
   106      */
       
   107     void RemoveObserver( TIpcArgs& aArgs );
       
   108     
       
   109     /**
       
   110      * Pass ExecuteAction request to the server
       
   111      *
       
   112      * @since S60 v 5.0
       
   113      * @param aInParamList const reference to the input list
       
   114      */
       
   115     void ExecuteActionL( const CCPLiwMap& aMap );
       
   116 
       
   117     /**
       
   118      * Pass GetChangeInfoData request to server
       
   119      * @param aBuf reference to the input list
       
   120      * @return error code
       
   121      */
       
   122     TInt GetChangeInfoData( TDes8& aBuf );
       
   123     /**
       
   124      * Pass Activate request to the server
       
   125      *
       
   126      * @since S60 v 5.0
       
   127      * @param aInParamList const reference to the input list
       
   128      */
       
   129     void ActivateL( const CCPLiwMap& aMap, TUint aOptions = 0 );
       
   130 
       
   131     /**
       
   132      * Pass UnregisterObserver request to the server
       
   133      *
       
   134      * @since S60 v 5.0
       
   135      * @return error code
       
   136      */
       
   137     void UnregisterObserver();
       
   138 
       
   139     /**
       
   140      * Closes session
       
   141      *
       
   142      * @since S60 v 5.0
       
   143      */
       
   144     void Close();
       
   145 
       
   146     /**
       
   147      * Return version information
       
   148      */
       
   149     TVersion Version() const;
       
   150 
       
   151 private:
       
   152     //private methods
       
   153 
       
   154     };
       
   155 
       
   156 #endif // CPCLIENTSESSION_H
       
   157 
       
   158 // End of File