iaupdate/IAD/engine/controller/inc/iaupdatefwpurchaseoperation.h
changeset 0 ba25891c3a9e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/iaupdate/IAD/engine/controller/inc/iaupdatefwpurchaseoperation.h	Thu Dec 17 08:51:10 2009 +0200
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   CIAUpdateFwPurchaseOperation 
+*
+*/
+
+
+
+#ifndef IA_UPDATE_FW_PURCHASE_OPERATION_H
+#define IA_UPDATE_FW_PURCHASE_OPERATION_H
+
+
+#include <ncdpurchaseoperationobserver.h>
+
+#include "iaupdatenormalcontentoperation.h"
+
+class CIAUpdateFwNode;
+
+
+/**
+ * CIAUpdateFwPurchaseOperation can handle purchasing
+ * of firmware nodes.
+ */
+class CIAUpdateFwPurchaseOperation : public CIAUpdateNormalContentOperation,
+                                     public MNcdPurchaseOperationObserver
+    {
+
+public:
+
+    /**
+     * @see CIAUpdateFwPurchaseOperation::CIAUpdateFwPurchaseOperation
+     * @return CIAUpdateFwPurchaseOperation* Created object.
+     * Ownership is transferred.
+     */
+    static CIAUpdateFwPurchaseOperation* NewL(
+        CIAUpdateFwNode& aNode,
+        MIAUpdateContentOperationObserver& aObserver );
+    
+    /**
+     * @see CIAUpdateFwPurchaseOperation::NewL
+     */ 
+    static CIAUpdateFwPurchaseOperation* NewLC(
+        CIAUpdateFwNode& aNode,
+        MIAUpdateContentOperationObserver& aObserver );
+
+    /**
+     * Destructor
+     */
+    virtual ~CIAUpdateFwPurchaseOperation();
+
+
+public: // MNcdPurchaseOperationObserver
+    
+    /**
+     * @see MNcdPurchaseOperationObserver::PurchaseProgress    
+     */
+    virtual void PurchaseProgress( 
+        MNcdPurchaseOperation& aOperation, TNcdProgress aProgress );
+        
+    /**
+     * @see MNcdPurchaseOperationObserver::QueryReceived
+     */
+    virtual void QueryReceived( 
+        MNcdPurchaseOperation& aOperation, MNcdQuery* aQuery );
+
+    /**
+     * @see MNcdPurchaseOperationObserver::OperationComplete
+     */
+    virtual void OperationComplete( 
+        MNcdPurchaseOperation& aOperation, TInt aError );    
+    
+    
+protected: // CIAUpdateNormalContentOperation
+
+    /**
+     * @see CIAUpdateContentOperation::HandleContentL
+     */ 
+    virtual MNcdOperation* HandleContentL();
+
+
+private:
+    
+    // Prevent these if not implemented
+    CIAUpdateFwPurchaseOperation( 
+        const CIAUpdateFwPurchaseOperation& aObject );
+    CIAUpdateFwPurchaseOperation& operator =( 
+        const CIAUpdateFwPurchaseOperation& aObject );
+
+
+    /**
+     * @see CIAUpdateNormalContentOperation::CIAUpdateNormalContentOperation
+     */
+    CIAUpdateFwPurchaseOperation( 
+        CIAUpdateFwNode& aNode,
+        MIAUpdateContentOperationObserver& aObserver );
+
+    /**
+     * ConstructL
+     */
+    virtual void ConstructL();
+
+
+    /** 
+     * Starts the purchase operation for given node.
+     *
+     * @return MNcdOperation* Operation that is started.
+     */
+    MNcdOperation* PurchaseL();
+    
+
+private: // data
+
+    };
+
+#endif // IA_UPDATE_FW_PURCHASE_OPERATION_H
+