videofeeds/clientapi/inc/CIptvMyVideosContentUpdateObserver.h
branchRCL_3
changeset 23 befca0ec475f
parent 0 96612d01cf9f
equal deleted inserted replaced
22:839377eedc2b 23:befca0ec475f
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:    Observer for content updates from server.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CIPTVMYVIDEOSCONTENTUPDATEOBSERVER_H
       
    21 #define CIPTVMYVIDEOSCONTENTUPDATEOBSERVER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class MIptvMyVideosClientObserver;
       
    26 class RIptvClientSession;
       
    27 
       
    28 /**
       
    29  * Observer for content updates from server.
       
    30  *
       
    31  * @lib IptvClientApi.dll
       
    32  */
       
    33 class CIptvMyVideosContentUpdateObserver : public CActive
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      *
       
    41      * @param aClientObserver Observer.
       
    42      * @param aSession        Server client session.
       
    43      */
       
    44     static CIptvMyVideosContentUpdateObserver* NewL(
       
    45         MIptvMyVideosClientObserver& aClientObserver,
       
    46         RIptvClientSession& aSession );
       
    47 
       
    48     /**
       
    49      * Destructor.
       
    50      */
       
    51     ~CIptvMyVideosContentUpdateObserver();
       
    52 
       
    53 // From CActive
       
    54 
       
    55     /**
       
    56      * Called when request completes.
       
    57      */
       
    58     void RunL();
       
    59 
       
    60     /**
       
    61      * Called when request needs to be cancelled.
       
    62      */
       
    63     void DoCancel();
       
    64 
       
    65 protected:
       
    66 
       
    67     /**
       
    68      * Constructor.
       
    69      *
       
    70      * @param aClientObserver Observer.
       
    71      * @param aSession        Server client session.
       
    72      */
       
    73     CIptvMyVideosContentUpdateObserver(
       
    74         MIptvMyVideosClientObserver& aClientObserver,
       
    75         RIptvClientSession& aSession );
       
    76 
       
    77     /**
       
    78      * EPOC constructor.
       
    79      */
       
    80     void ConstructL();
       
    81 
       
    82 private:
       
    83 
       
    84     /**
       
    85      * Send observer request to server.
       
    86      */
       
    87     void SendObserverRequestL();
       
    88 
       
    89 protected: // Data
       
    90 
       
    91     /**
       
    92      * Reference to MIptvVodContentClientObserver.
       
    93      */
       
    94     MIptvMyVideosClientObserver& iClientObserver;
       
    95 
       
    96     /**
       
    97      * Reference to RIptvClientSession.
       
    98      */
       
    99     RIptvClientSession& iSession;
       
   100 
       
   101     /**
       
   102      * Heap object to restore memory for IPC messaging.
       
   103      * Own.
       
   104      */
       
   105     HBufC8* iObserverMsg;
       
   106 
       
   107     /**
       
   108      * Passed to RIptvClientSession object to store the sent and received
       
   109      * data. Points to iData heap object.
       
   110      */
       
   111     TPtr8 iObserverMsgPtr;
       
   112     };
       
   113 
       
   114 #endif // CIPTVMYVIDEOSCONTENTUPDATEOBSERVER_H