videofeeds/clientapi/inc/CIptvServiceManagementClient.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2005-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 the License "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:    Header file for CIptvServiceManagementClient class*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CIPTVSERVICEMANAGEMENTCLIENT_H__
       
    22 #define __CIPTVSERVICEMANAGEMENTCLIENT_H__
       
    23 
       
    24 // INCLUDE FILES
       
    25 #include <e32base.h>
       
    26 #include "CIptvIapList.h"
       
    27 #include "CIptvTimer.h"
       
    28 #include "MIptvTimerObserver.h"
       
    29 
       
    30 #include "CIptvClientBase.h"
       
    31 #include "RIptvClientSession.h"
       
    32 #include "IptvClientServerCommon.h"
       
    33 #include "CIptvNetworkSelection.h"
       
    34 #include "CIptvSmEvent.h"
       
    35 #include "CIptvServices.h"
       
    36 #include "MIptvServiceManagementClientObserver.h"
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CIptvSmClientSynchronizer;
       
    40 class CIptvService;
       
    41 class CIptvServices;
       
    42 class MIptvServiceManagementClient;
       
    43 class MIptvEvent;
       
    44 class CIptvEventListener;
       
    45 
       
    46 // CLASS DECLARATION
       
    47 /**
       
    48 *  CIptvServiceManagementClient is the API object for IPTV Service database and Network Selection.\n
       
    49 *  Application must implement virtual callback functions from MIptvServiceManagementClientObserver class.\n
       
    50 *
       
    51 *  Instantiating of CIptvServiceManagementClient will start IPTV engine server if it is not running\n
       
    52 *  already.
       
    53 *
       
    54 *  Only one request pending per CIptvServiceManagementClient object is allowed simultaneously.\n
       
    55 *  There is no protocol involved in calling functions. Any request may be called anytime assuming\n
       
    56 *  that there is no other request pending already.\n
       
    57 *  After service shutdown, client may not call any API functions anymore for that\n
       
    58 *  CIptvServiceManagementClient object.\n
       
    59 *
       
    60 *  Example:\n
       
    61 *
       
    62 *   void CIptvClient::SomeFunc()\n
       
    63 *       {\n
       
    64 *       iIptvServiceManagementClient = CIptvServiceManagementClient::NewL(*this);\n							
       
    65 *       iIptvServiceManagementClient->GetAllServicesReq();\n
       
    66 *       }\n
       
    67 *                  
       
    68 *   void CIptvClient::GetAllServicesResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus,\n
       
    69 *                                                  CDesC16ArraySeg* aServicesArray)\n
       
    70 *   {\n
       
    71 *    
       
    72 *   TInt i;\n
       
    73 *
       
    74 *   CIptvService* iptvService;\n
       
    75 *   iptvService = CIptvService::NewL();\n				
       
    76 *   CleanupStack::PushL(iptvService);\n
       
    77 *			
       
    78 *   for(i = 0; i < aServicesArray->MdcaCount(); i++)\n
       
    79 *      {\n
       
    80 *      iptvService->Set(aServicesArray->MdcaPoint(i));\n
       
    81 *      RDebug::Print(_L("Service: %S"), &(iptvService->GetName()));\n
       
    82 *      }\n
       
    83 *
       
    84 *   CleanupStack::PopAndDestroy(iptvService);\n
       
    85 *   delete aServicesArray;\n
       
    86 *
       
    87 *   delete iIptvServiceManagementClient;\n
       
    88 *   iIptvServiceManagementClient = NULL;\n
       
    89 *   }\n
       
    90 */
       
    91 class CIptvServiceManagementClient : public CIptvClientBase
       
    92     {
       
    93     public:
       
    94     
       
    95         /**
       
    96         * Flags used for limiting search from the database.
       
    97         */
       
    98         enum TSearchLimitFlag
       
    99             {
       
   100             ESelectedServices = ( 1 << 0 ),  // 1
       
   101             EMainServices     = ( 1 << 1 ),  // 2
       
   102             ESubServices      = ( 1 << 2 ),  // 4
       
   103             EVod              = ( 1 << 3 ),  // 8
       
   104             ELiveTv           = ( 1 << 4 ),  // 16
       
   105             EVodCast          = ( 1 << 5 ),  // 32
       
   106             EBrowser          = ( 1 << 6 ),  // 64
       
   107             EVideoRemote      = ( 1 << 7 ),  // 128
       
   108             EApplication      = ( 1 << 8 ),  // 256
       
   109             EMobileTv         = ( 1 << 9 ),  // 512
       
   110             EVodServices      = ( 1 << 10 ), // 1024
       
   111             EServiceGroup     = ( 1 << 11 ), // 2048
       
   112             EGroupedServices  = ( 1 << 12 ), // 4096
       
   113             EOther            = ( 1 << 13 )  // 8192
       
   114             };
       
   115         
       
   116         /**
       
   117         * Defines the sorting order of the search.
       
   118         */    
       
   119         enum TOrder
       
   120             {
       
   121             /**
       
   122             * Sort by creation date, ascending
       
   123             */
       
   124             EDateAscending = 0,
       
   125             
       
   126             /**
       
   127             * Sort by creation date, descending
       
   128             */
       
   129             EDateDescending,
       
   130             
       
   131             /**
       
   132             * Sort by display order, ascending
       
   133             */
       
   134             EDisplayOrderAscending,
       
   135 
       
   136             /**
       
   137             * Sort by display order, descending
       
   138             */
       
   139             EDisplayOrderDescending
       
   140             };
       
   141 
       
   142     private:
       
   143     
       
   144         /**
       
   145         * We have to know which service entity has the message pending
       
   146         * in order to send correct cancel message.
       
   147         */
       
   148         enum TRequestPendingFor
       
   149             {
       
   150             ENoRequestPending = 0,
       
   151             EServerRequestPending,
       
   152             EServiceManagerRequestPending,
       
   153             ENetworkSelectionRequestPending
       
   154             };
       
   155                                  		    		       
       
   156     public: // Constructors and destructors
       
   157         /**
       
   158         * Two-phased constructor.
       
   159         * Creates a CIptvServiceManagementClient object using two phase construction,
       
   160         * and return a pointer to the created object.
       
   161         * @param aClient A reference to client.
       
   162         * @return        A pointer to the created instance of CIptvServiceManagementClient.
       
   163         */
       
   164         IMPORT_C static CIptvServiceManagementClient* NewL(MIptvServiceManagementClientObserver& aClient);
       
   165 		
       
   166         /**
       
   167         * Destructor.
       
   168         * Destroys the object and releases all memory objects.
       
   169         */
       
   170         IMPORT_C virtual ~CIptvServiceManagementClient();
       
   171 
       
   172     public: // New functions
       
   173 
       
   174         /**
       
   175          * Adds a new entry to Services database asynchronously.
       
   176          * AddServiceResp is the callback function.
       
   177          *
       
   178          * @param aService Service data which is added to database.
       
   179          * @return         KErrNone if request was sent to server successfully,
       
   180          *                 system-wide error code otherwise.
       
   181          */
       
   182         IMPORT_C TInt AddServiceReqL(CIptvService& aService);
       
   183 
       
   184         /**
       
   185          * Adds a new entry to Services database synchronously.
       
   186          *
       
   187          * @param aService    Service data which is added to database.
       
   188          * @param aRespStatus Status of the operation.
       
   189          * @return            Returns KErrNone if request was sent to server successfully,
       
   190          *                    system-wide error code otherwise. If != KErrNone, aRespStatus
       
   191          *                    doesn't contain valid data.
       
   192          */
       
   193         IMPORT_C TInt AddServiceL(CIptvService& aService,
       
   194 		                              MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   195 
       
   196         /**
       
   197          * Updates existing entry in Services database asynchronously.
       
   198          * Every item in CIptvService class is compared with database values,
       
   199          * if they differ the database value is changed.
       
   200          * If entry does not exist, EServiceNotFound error is given in UpdateServiceResp
       
   201          * callback function argument.
       
   202          * @param aService New service data
       
   203          * @return         Returns KErrNone if request was sent to server successfully,
       
   204          *                 system-wide error code otherwise.
       
   205          */
       
   206         IMPORT_C TInt UpdateServiceReqL(CIptvService& aService);
       
   207 
       
   208         /**
       
   209          * Updates existing entry in Services database synchronously.
       
   210          * If entry does not exist, EServiceNotFound error is given in aRespStatus.
       
   211          * @param aService    New service data
       
   212          * @param aRespStatus Status of the operation.
       
   213          * @return            Returns KErrNone if request was sent to server successfully,
       
   214          *                    System-wide error code otherwise. If != KErrNone, aRespStatus
       
   215          *                    doesn't contain valid data.
       
   216          */
       
   217         IMPORT_C TInt UpdateServiceL(CIptvService& aService,
       
   218                                      MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   219 
       
   220         /**
       
   221          * Gets services from the database asynchronously.
       
   222          * GetServicesResp is the callback function.
       
   223          * @param aSearchLimitFlags Indicates how the search is limited. Flags can be
       
   224          *                          combined with "or" -operation. 0 returns all services.
       
   225          * @param aOrder            Order in which the services are returned.
       
   226          * @return                  Returns KErrNone if request was sent to server successfully,
       
   227          *                          system-wide error code otherwise.
       
   228          */
       
   229         IMPORT_C TInt GetServicesReqL(TUint32 aSearchLimitFlags, TOrder aOrder);
       
   230 
       
   231         /**
       
   232          * Gets services from database synchronously.
       
   233          * @param aSearchLimitFlags Indicates how the search is limited, ie only services which have the feature
       
   234          *                          flag set are included in the search. See TSearchLimitFlag
       
   235          *                          for bit values, flags can be combined with "or" -operation.
       
   236          *                          0 returns all services.
       
   237          * @param aOrder            Order in which the services are returned.
       
   238          * @param aServicesArray    Contains array of pointers to descriptors.
       
   239          *                          aServicesArray ownership is transferred to caller, ie client
       
   240          *                          is responsible for freeing the array.
       
   241          *                          Array elements are binary descriptors built with CIptvService::GetL() method.
       
   242          *                          CIptvService::SetL() method can be used to init CIptvService class with
       
   243          *                          array element data. Client should ensure that aServicesArray pointer
       
   244          *                          does not point to reserved memory when calling this method, since the pointer
       
   245          *                          will be overwritten.
       
   246          *                          In case of error, aServicesArray is set to NULL.
       
   247          * @param aRespStatus       ESucceeded is returned even if no matching
       
   248          *                          services were found. In that case the aServicesArray contains
       
   249          *                          empty array. If aRespStatus != ESucceeded, aServicesArray
       
   250          *                          pointer is NULL.
       
   251          * @return                  Returns KErrNone if request was sent to server successfully,
       
   252          *                          system-wide error code otherwise. If != KErrNone, aServicesArray
       
   253          *                          and aRespStatus do not contain valid data.
       
   254          */
       
   255         IMPORT_C TInt GetServicesL(TUint32 aSearchLimitFlags,
       
   256                                    TOrder aOrder,
       
   257                                    CDesC8ArraySeg*& aServicesArray,
       
   258                                    MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   259 
       
   260         /**
       
   261          * Gets service entries from Services database asynchronously.
       
   262          * Services whos ID are between aStartId and aEndId are returned.
       
   263          * This method is not meant for searching the database, one should know
       
   264          * service ids already when issuing the call.
       
   265          * GetServicesResp is the callback function.
       
   266 		     * @param aStartId Unique ID of the first service to be fetched.
       
   267 		     * @param aEndId   Unique ID of the last service to be fetched.
       
   268          * @return         Returns KErrNone if request was sent to server successfully,
       
   269          *                 system-wide error code otherwise.
       
   270          */
       
   271         IMPORT_C TInt GetServicesReqL(TUint32 aStartId, TUint32 aEndId);
       
   272 
       
   273         /**
       
   274          * Gets service entries from Services database synchronously.
       
   275          * Services whos ID are between aStartId and aEndId are returned.
       
   276          * This method is not meant for searching the database, one should know
       
   277          * service ids already when issuing the call.
       
   278          * @param aStartId       Unique ID of the first service to be fetched.
       
   279          * @param aEndId         Unique ID of the last service to be fetched.
       
   280          * @param aServicesArray Contains array of pointers to descriptors.
       
   281          *                       aServicesArray ownership is transferred to caller, ie application
       
   282          *                       is responsible for freeing the array.
       
   283          *                       Array elements are binary descriptors built with CIptvService::GetL() method.
       
   284          *                       CIptvService::SetL() method can be used to init CIptvService class with
       
   285          *                       array element data. Client should ensure that aServicesArray pointer
       
   286          *                       does not point to reserved memory when calling this method, since the pointer
       
   287          *                       will be overwritten.
       
   288          *                       In case of error, aServicesArray is set to NULL.
       
   289          * @param aRespStatus    ESucceeded is returned even if no matching
       
   290          *                       services were found. In that case the aServicesArray contains
       
   291          *                       empty array. If aRespStatus != ESucceeded, the aServicesArray
       
   292          *                       pointer is NULL.
       
   293          * @return Returns       KErrNone if request was sent to server successfully,
       
   294          *                       system-wide error code otherwise. If != KErrNone, aServicesArray and
       
   295          *                       aRespStatus do not contain valid data.
       
   296          */
       
   297         IMPORT_C TInt GetServicesL(TUint32 aStartId,
       
   298                                    TUint32 aEndId,
       
   299                                    CDesC8ArraySeg*& aServicesArray,
       
   300                                    MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   301 
       
   302         
       
   303         /**
       
   304          * Deletes entry from Service database asynchronously.
       
   305          * If entry is not found, ESucceeded is still returned
       
   306          * in aRespStatus.
       
   307          * DeleteServiceResp is the callback function.
       
   308          *
       
   309          * @param aId Unique ID of the service to delete.
       
   310          * @return    Returns KErrNone if request was sent to server successfully,
       
   311          *            System-wide error code otherwise.
       
   312          */
       
   313         IMPORT_C TInt DeleteServiceReqL(TUint32 aId);
       
   314 
       
   315         /**
       
   316          * Deletes entry from Service database synchronously.
       
   317          * If entry is not found, ESucceeded is still returned
       
   318          * in aRespStatus.
       
   319          *
       
   320          * @param aId         Unique ID of the service to delete.
       
   321          * @param aRespStatus Status of the operation.
       
   322          * @return            Returns KErrNone if request was sent to server successfully,
       
   323          *                    System-wide error code otherwise. If != KErrNone, aRespStatus
       
   324          *                    doesn't contain valid data.
       
   325          */
       
   326         IMPORT_C TInt DeleteServiceL(TUint32 aId,
       
   327                                      MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   328 
       
   329         /**
       
   330          * Gets services by provider ID synchronously.
       
   331          *
       
   332          * @param aProviderId Provider ID in Services database.  
       
   333          * @param aServices   All services which provider ID match, will be written here.
       
   334          * @return            Returns KErrNone if operation was successful,
       
   335          *                    system-wide error code otherwise. If != KErrNone, aServices
       
   336          *                    does not contain valid data.
       
   337          */
       
   338         IMPORT_C TInt GetServicesL(const TDesC& aProviderId,
       
   339                                    CIptvServices& aServices);
       
   340 
       
   341         /**
       
   342          * Sets IAP list to every service asynchronously.
       
   343          * SetAllIapsResp is the callback function.
       
   344          * Not supported currently.
       
   345          *
       
   346          * @param aIapList            IAP list to be written to all service records.
       
   347          * @param aIgnoreReadOnlyFlag If ETrue the read only flag has no effect on Service DB,
       
   348          *                            ie. all services are changed.
       
   349          */
       
   350         IMPORT_C void SetAllIapsReqL(CIptvIapList& aIapList, TBool aIgnoreReadOnlyFlag);
       
   351 
       
   352         /**
       
   353          * Sets IAP list to every service synchronously.
       
   354          * Not supported.
       
   355          *
       
   356          * @param aIapList            IAP list to be written to all service records.
       
   357          * @param aIgnoreReadOnlyFlag If ETrue the read only flag has no effect on Service DB,
       
   358          *                            ie. all services are changed.
       
   359          */
       
   360         IMPORT_C void SetAllIapsL(CIptvIapList& aIapList,
       
   361                                   TBool aIgnoreReadOnlyFlag,
       
   362                                   MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   363         
       
   364         /* Network selection API */
       
   365 
       
   366         /**
       
   367          * Sets IAP aIapId to be used for all services.
       
   368          * This setting is valid for the server lifetime.
       
   369          * This function is synchronous.
       
   370          *
       
   371          * @param aIapId                  IAP ID to be used.
       
   372          * @param aServiceId.             Service ID in Services database.
       
   373          * @param aSetToDefaultForService If ETrue, then the IAP is written to Service database
       
   374          *                                (only to aServiceId) and it lasts over reboots.
       
   375          * @param aRespStatus             Status of the operation.
       
   376          */
       
   377         IMPORT_C void SetUsedIapL(TUint32 aIapId,
       
   378                                   TUint32 aServiceId,
       
   379                                   TBool aSetToDefaultForService,
       
   380                                   CIptvNetworkSelection::TRespStatus& aRespStatus);
       
   381 
       
   382         /**
       
   383          * Clears used IAP from Network Selection, set previosly with SetUsedIapL
       
   384          * method.
       
   385          * Function is synchronous.
       
   386          *
       
   387          * @return System-wide error code.
       
   388          */        
       
   389         IMPORT_C TInt ClearUsedIap();
       
   390 
       
   391         /**
       
   392          * Gets IAP ID which is used when connecting to aServiceId.
       
   393          * Function is asynchronous, GetUsedIapResp is the callback function.
       
   394          *
       
   395          * @param aServiceId
       
   396          */        
       
   397         IMPORT_C void GetUsedIapReqL(TUint32 aServiceId);
       
   398 
       
   399         /**
       
   400          * Gets IAP ID which is used when connecting to aServiceId.
       
   401          * Warning, this might block a few seconds since it involves WLAN scan,
       
   402          * use GetUsedIapReqL if this is a problem.
       
   403          * Function is synchronous.
       
   404          *
       
   405          * @param aServiceId            Service ID in Services database.
       
   406          * @param aIapId                IAP ID in CommsDb.
       
   407          * @param aIapName              IAP name is written here, KIptvNsIapNameMaxLength is the max length.
       
   408          * @param aConnectionPermission This is valid only if aIapId is valid.
       
   409          * @param aRespStatus           If != ESucceeded, aIapId, aIapName and aConnectionPermission
       
   410          *                              do not contain valid data.
       
   411          */        
       
   412         IMPORT_C void GetUsedIapL( TUint32 aServiceId,
       
   413                                    TUint32& aIapId,
       
   414                                    TDes& aIapName,
       
   415                                    CIptvNetworkSelection::TConnectionPermission& aConnectionPermission,
       
   416                                    CIptvNetworkSelection::TRespStatus& aRespStatus );
       
   417 
       
   418         /**
       
   419          * Gets connection permission status for aIapId.
       
   420          * Function is synchronous.
       
   421          *
       
   422          * @param aIapId                IAP ID in CommsDb.
       
   423          * @param aConnectionPermission Connection permission status is written here.
       
   424          * @param aRespStatus           Status of the operation.
       
   425          */
       
   426         IMPORT_C void IsConnectionAllowedL(TUint32 aIapId,
       
   427                                            CIptvNetworkSelection::TConnectionPermission& aConnectionPermission,
       
   428                                            CIptvNetworkSelection::TRespStatus& aRespStatus);
       
   429         /**
       
   430          * Sets connection permission status for the connection type used
       
   431          * by aIapId.
       
   432          * Function is synchronous.
       
   433          *
       
   434          * @param aConnectionAllowed If ETrue, then connection will be allowed, not allowed otherwise.
       
   435          * @param aIapId             IAP ID in CommsDb, used for getting the connection type: WLAN, GPRS/CSD.
       
   436          * @param aRespStatus        Status of the operation.
       
   437          */
       
   438         IMPORT_C void SetConnectionAllowedL(TBool aConnectionAllowed,
       
   439                                             TUint32 aIapId,
       
   440                                             CIptvNetworkSelection::TRespStatus& aRespStatus);
       
   441       
       
   442        /* Server Control API */
       
   443        
       
   444         /**
       
   445          * This function is not supported. It does not close the server.
       
   446          * ServerShutdownResp is the callback function.
       
   447          *
       
   448          * @return System-wide error code.
       
   449          */
       
   450         IMPORT_C TInt ServerShutdownReq();
       
   451 
       
   452         /**
       
   453          * This function is not supported. It does not close the server.
       
   454          *
       
   455          * @param aRespStatus Status of the operation.
       
   456          * @return            System-wide error code. If != KErrNone, aRespStatus
       
   457          *                    doesn't contain valid data.
       
   458          */
       
   459         IMPORT_C TInt ServerShutdown(MIptvServiceManagementClientObserver::TRespStatus& aRespStatus);
       
   460 		
       
   461         /**
       
   462          * Cancels the pending asynchronous request synchronously.
       
   463          * This method always succees. If there was asynchronous request pending, after
       
   464          * this call it is gone and a new asynchronous
       
   465          * request may be sent immedetially.
       
   466          */
       
   467         IMPORT_C void CancelRequest() ;
       
   468         
       
   469         /**
       
   470         * From MIptvEventListenerObserver. MIptvEvent is converted to CIptvSmEvent
       
   471         * and sent to iClient.HandleSmEvent(). 
       
   472         * @param aEvent Event.
       
   473         */        
       
   474         void HandleEvent(MIptvEvent& aEvent);
       
   475 
       
   476     protected: // Functions from base classes
       
   477 
       
   478         /**
       
   479          * From CActive, RunL.
       
   480          * Callback function.
       
   481          * Invoked to handle responses from the server.
       
   482          */
       
   483         void RunL();
       
   484 
       
   485         /**
       
   486          * From CActive, DoCancel.
       
   487          * Cancels any outstanding operation.
       
   488          */
       
   489         void DoCancel();
       
   490 		 
       
   491     private:
       
   492 
       
   493         /**
       
   494         * Default C++ constructor.
       
   495         * @param aClient pointer to client, no ownership is transferred.
       
   496         */
       
   497         IMPORT_C CIptvServiceManagementClient(MIptvServiceManagementClientObserver& aClient);
       
   498 
       
   499         /**
       
   500         * Performs the second phase construction of a
       
   501         * CIptvRequestHandler object.
       
   502         */
       
   503         void ConstructL();
       
   504 
       
   505         /**
       
   506         * Handles EIptvEngineSmGetServicesSizeResp,\n
       
   507         * and EIptvEngineSmGetServicesUsingIdSizeResp messages.\n
       
   508         * @param aMsgId identifies which message completed.
       
   509         */
       
   510         void HandleGetServicesSizeRespL(TUint8 aMsgId);
       
   511 
       
   512         /**
       
   513         * Handles EIptvEngineSmGetServicesDataResp,\n
       
   514         * and EIptvEngineSmGetServicesUsingIdDataResp messages.\n
       
   515         * @param aMsgId identifies which of the three message completed.
       
   516         */
       
   517         void HandleGetServicesDataRespL(TUint8 aMsgId);
       
   518                 
       
   519         /**
       
   520         * Gets resp status from ipc message buffer.
       
   521         */
       
   522         MIptvServiceManagementClientObserver::TRespStatus GetRespStatusL();
       
   523 
       
   524         /**
       
   525         * Builds IPC msg which is sent to server in service adding.
       
   526         */
       
   527         void BuildAddServiceReqL(CIptvService& aService);
       
   528 
       
   529         /**
       
   530         * Builds IPC msg which is sent to server in service updating.
       
   531         */
       
   532         void BuildUpdateServiceReqL(CIptvService& aService);
       
   533 
       
   534         /**
       
   535         * Builds GetServicesSizeReq IPC msg.
       
   536         */
       
   537         void BuildGetServicesSizeReqL(TUint32 aSearchLimitFlags,
       
   538                                       TOrder aOrder);
       
   539         
       
   540         /**
       
   541          * Internalizes GetServicesDataResp IPC message and builds CDesC8ArraySeg* of it.
       
   542          */
       
   543         CDesC8ArraySeg* InternalizeGetServicesDataRespL();
       
   544 
       
   545         /**
       
   546         * Builds DeleteServiceReq IPC msg.
       
   547         */
       
   548         void BuildDeleteServiceReqL(TUint32 aId);
       
   549 
       
   550         /**
       
   551         * Builds GetServicesUsingIndexSizeReq IPC msg.
       
   552         */
       
   553         void BuildGetServicesUsingIndexSizeReqL(TUint32 aStartId, TUint32 aEndId);
       
   554 
       
   555         /**
       
   556         * Builds GetUsedIapReq IPC msg.
       
   557         *
       
   558         * @param aServiceId Service id which is wished to connect.
       
   559         */        
       
   560         void BuildGetUsedIapReqL( TUint32 aServiceId );
       
   561 
       
   562         /**
       
   563         * Handles GetUsedIapResp from the server, fills all parameters.
       
   564         */
       
   565         void HandleGetUsedIapRespL( TUint32& aIapId,
       
   566                                     TDes& aIapName,
       
   567                                     CIptvNetworkSelection::TConnectionPermission& aConnectionPermission,
       
   568                                     TUint8& aWlanGprs,
       
   569                                     CIptvNetworkSelection::TRespStatus& aRespStatus );
       
   570         
       
   571     private: // Data
       
   572 
       
   573         /**
       
   574         * A client which is making the requests.
       
   575         */        
       
   576         MIptvServiceManagementClientObserver& iClient;
       
   577 
       
   578         /**
       
   579         * iMsg Heap object to restore memory for IPC messaging.
       
   580         */
       
   581         HBufC8* iMsg;
       
   582         
       
   583         /**
       
   584         * Passed to RIptvClientSession object to store the sent and received data.
       
   585         * Points to iMsg heap object.
       
   586         */
       
   587         TPtr8                      iMsgPtr;
       
   588                 
       
   589         /**
       
   590         * Used to store information or which entity has the message pending.
       
   591         * This information is needed when doing cancel.
       
   592         */
       
   593         TRequestPendingFor         iRequestPendingFor;
       
   594 
       
   595         /**
       
   596         * Used to store the resp op-code, so we know in RunL which request
       
   597         * completed.
       
   598         */
       
   599         TInt                       iResponseMsgId;
       
   600         
       
   601         /**
       
   602         * Listens events from the server side (CIptvEventGenerator sends them).
       
   603         */
       
   604         CIptvEventListener*        iEventListener;
       
   605 				        
       
   606     };
       
   607 
       
   608 
       
   609 #endif //__CIPTVSERVICEMANAGEMENTCLIENT_H__
       
   610 
       
   611 // End of File