ncdengine/provider/client/inc/ncdpurchaseoperationproxy.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCDPURCHASEOPERATIONPROXY_H
       
    20 #define C_NCDPURCHASEOPERATIONPROXY_H
       
    21 
       
    22 #include "ncdoperationimpl.h"
       
    23 #include "ncdbaseoperationproxy.h"
       
    24 #include "ncdpurchaseoperation.h"
       
    25 
       
    26 class CNcdPurchaseOptionProxy;
       
    27 class CNcdSubscriptionManagerProxy;
       
    28 
       
    29 /**
       
    30  *  Purchase operation proxy.
       
    31  *
       
    32  *  Client side implementation for purchase operation.
       
    33  *
       
    34  *  @lib ?library
       
    35  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    36  */
       
    37 class CNcdPurchaseOperationProxy : 
       
    38     public CNcdOperation< MNcdPurchaseOperation >
       
    39     {
       
    40     
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Constructor
       
    45      *
       
    46      * @param aSession Session that is used between the proxy and the server.
       
    47      * @param aHandle Handle that identifies the serverside object that this 
       
    48      *                proxy uses.
       
    49      * @param aRemoveHandler An observer that is called during destruction.
       
    50      * @param aNode The node this operation was started from.
       
    51      * @param aObserver.
       
    52      * @param aLocalizer The client localizer.
       
    53      */    
       
    54     static CNcdPurchaseOperationProxy* NewL( 
       
    55         MCatalogsClientServer& aSession,
       
    56         TInt aHandle,
       
    57         MNcdOperationProxyRemoveHandler* aRemoveHandler,
       
    58         CNcdNodeProxy* aNode,
       
    59         CNcdPurchaseOptionProxy* aSelectedPurchaseOption,
       
    60         MNcdPurchaseOperationObserver* aObserver,
       
    61         CNcdSubscriptionManagerProxy* aSubscriptionManager,
       
    62         CNcdNodeManagerProxy* aNodeManager,
       
    63         MNcdClientLocalizer* aLocalizer );
       
    64     /**
       
    65      * Constructor
       
    66      *
       
    67      * @param aSession Session that is used between the proxy and the server.
       
    68      * @param aHandle Handle that identifies the serverside object that this 
       
    69      *                proxy uses.
       
    70      * @param aRemoveHandler An observer that is called during destruction.
       
    71      * @param aNode The node this operation was started from.
       
    72      * @param aObserver 
       
    73      * @param aLocalizer The client localizer.
       
    74      */    
       
    75     static CNcdPurchaseOperationProxy* NewLC(
       
    76         MCatalogsClientServer& aSession,
       
    77         TInt aHandle,
       
    78         MNcdOperationProxyRemoveHandler* aRemoveHandler,
       
    79         CNcdNodeProxy* aNode,
       
    80         CNcdPurchaseOptionProxy* aSelectedPurchaseOption,
       
    81         MNcdPurchaseOperationObserver* aObserver,
       
    82         CNcdSubscriptionManagerProxy* aSubscriptionManager,
       
    83         CNcdNodeManagerProxy* aNodeManager,
       
    84         MNcdClientLocalizer* aLocalizer );
       
    85 
       
    86 
       
    87 
       
    88 
       
    89 public: // From MNcdPurchaseOperation
       
    90 
       
    91     /**
       
    92      * @see MNcdPurchaseOperation::PurchaseOption
       
    93      */
       
    94     virtual const MNcdPurchaseOption& PurchaseOption();
       
    95 	
       
    96 
       
    97 
       
    98 
       
    99 public: // From MNcdOperation
       
   100 
       
   101     /**
       
   102      * @see MNcdOperation::OperationType()
       
   103      */
       
   104     TNcdInterfaceId OperationType() const;
       
   105 
       
   106 
       
   107 
       
   108 
       
   109 protected:
       
   110     
       
   111     /**
       
   112      * Constructor
       
   113      *
       
   114      * @param aSession is the session that is used between
       
   115      *                 the proxy and the server.
       
   116      * @param aHandle is the handle that identifies the serverside
       
   117      *                object that this proxy uses.
       
   118      * @param aRemoveHandler An observer that is called during destruction.
       
   119      * @param aNode The node this operation was started from.
       
   120      */
       
   121     CNcdPurchaseOperationProxy( MNcdClientLocalizer* aLocalizer );
       
   122     
       
   123     virtual ~CNcdPurchaseOperationProxy();
       
   124     
       
   125     void ConstructL( MCatalogsClientServer& aSession,
       
   126                      TInt aHandle,
       
   127                      MNcdOperationProxyRemoveHandler* aRemoveHandler,
       
   128                      CNcdNodeProxy* aNode,
       
   129                      CNcdPurchaseOptionProxy* aSelectedPurchaseOption,
       
   130                      MNcdPurchaseOperationObserver* aObserver,
       
   131                      CNcdSubscriptionManagerProxy* aSubscriptionManager,
       
   132                      CNcdNodeManagerProxy* aNodeManager );
       
   133     
       
   134 
       
   135 
       
   136 
       
   137 
       
   138 protected: // From CNcdBaseOperationProxy
       
   139 
       
   140     /**
       
   141      * @see CNcdBaseOperationProxy::HandleCompletedMessage()
       
   142      */
       
   143     void HandleCompletedMessage( TNcdOperationMessageCompletionId aCompletionId,
       
   144         RReadStream& aReadStream, TInt aDataLength );
       
   145 
       
   146     /**
       
   147      * @see CNcdBaseOperationProxy::ProgressCallback()
       
   148      */
       
   149     void ProgressCallback();
       
   150     
       
   151     
       
   152     /**
       
   153      * @see CNcdBaseOperationProxy::QueryReceivedCallback()
       
   154      */
       
   155     void QueryReceivedCallback( CNcdQuery* aQuery );
       
   156     
       
   157     
       
   158     /**
       
   159      * @see CNcdBaseOperationProxy::CompleteCallback()
       
   160      */
       
   161     void CompleteCallback( TInt aError );
       
   162 
       
   163 
       
   164     /**
       
   165      * @see CNcdBaseOperationProxy::DoCompleteQueryL()
       
   166      */    
       
   167     void DoCompleteQueryL( MNcdQuery& aQuery );
       
   168 
       
   169 
       
   170 private: // Data
       
   171 
       
   172     /**
       
   173      * Operation observer, for callbacks.
       
   174      * Observer not own.
       
   175      */    
       
   176     MNcdPurchaseOperationObserver* iObserver;
       
   177 
       
   178 
       
   179     /**
       
   180      * Subscription manager proxy.
       
   181      * Not own.
       
   182      */
       
   183     CNcdSubscriptionManagerProxy* iSubscriptionManager;
       
   184 
       
   185     /**
       
   186      * Pointer to used purchase option.
       
   187      * Not own.
       
   188      */
       
   189     CNcdPurchaseOptionProxy* iPurchaseOption;
       
   190 	
       
   191     };
       
   192 
       
   193 #endif // C_NCDPURCHASEOPERATIONPROXY_H