ncdengine/provider/server/inc/ncdserverreportmanagerimpl.h
changeset 4 32704c33136d
equal deleted inserted replaced
-1:000000000000 4:32704c33136d
       
     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:   Contains CNcdServerReportManager class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_SERVER_REPORT_IMPL_H
       
    20 #define NCD_SERVER_REPORT_IMPL_H
       
    21 
       
    22 
       
    23 #include "catalogscommunicable.h"
       
    24 #include "ncdproviderimpl.h"
       
    25 
       
    26 class CNcdNode;
       
    27 class CNcdNodeMetaData;
       
    28 class CNcdReportManager;
       
    29 class MCatalogsHttpSession;
       
    30 
       
    31 
       
    32 /**
       
    33  *  This class object provides node specific functions.
       
    34  *  Node contains additional classes that will contain more node
       
    35  *  or metadata specific information.
       
    36  *
       
    37  *  @lib ?library
       
    38  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    39  */
       
    40 class CNcdServerReportManager : public CCatalogsCommunicable
       
    41     {
       
    42     
       
    43 public:
       
    44 
       
    45     /**
       
    46      * NewL
       
    47      *
       
    48      * @param aProvider
       
    49      * @return CNcdServerReportManager* Pointer to the created object 
       
    50      * of this class.
       
    51      */
       
    52     static CNcdServerReportManager* NewL( CNcdProvider& aProvider );
       
    53     
       
    54     /**
       
    55      * @see CNcdServerReportManager::NewL
       
    56      */
       
    57     static CNcdServerReportManager* NewLC( CNcdProvider& aProvider );
       
    58 
       
    59 
       
    60     /**
       
    61      * Destructor
       
    62      */
       
    63     virtual ~CNcdServerReportManager();
       
    64     
       
    65 
       
    66 public: // CCatalogsCommunicable
       
    67 
       
    68     /**
       
    69      * @see CCatalogsCommunicable::ReceiveMessage
       
    70      */
       
    71     virtual void ReceiveMessage( MCatalogsBaseMessage* aMessage,
       
    72                                  TInt aFunctionNumber );
       
    73 
       
    74     /**
       
    75      * @see CCatalogsCommunicable::CounterPartLost
       
    76      */
       
    77     virtual void CounterPartLost( const MCatalogsSession& aSession );
       
    78 
       
    79 
       
    80 protected:
       
    81 
       
    82     /**
       
    83      * Constructor
       
    84      *
       
    85      * @param aProvider
       
    86      */
       
    87     CNcdServerReportManager( CNcdProvider& aProvider );
       
    88     
       
    89     /**
       
    90      * ConstructL
       
    91      */
       
    92     virtual void ConstructL();
       
    93 
       
    94 
       
    95     CNcdProvider& Provider();
       
    96     
       
    97     CNcdReportManager& ReportManagerL( MCatalogsBaseMessage& aMessage );
       
    98             
       
    99 
       
   100     // Here are all the functions that are used when ReceiveMessageL is called and
       
   101     // the functionality is delegated according to the given function number.
       
   102     
       
   103     void SetReportingMethodRequestL( MCatalogsBaseMessage& aMessage );
       
   104     void ReportingMethodRequestL( MCatalogsBaseMessage& aMessage );
       
   105     void SetReportingStyleRequestL( MCatalogsBaseMessage& aMessage );
       
   106     void ReportingStyleRequestL( MCatalogsBaseMessage& aMessage );
       
   107     void NodeSetAsInstalledRequestL( MCatalogsBaseMessage& aMessage );
       
   108     void ReleaseRequest( MCatalogsBaseMessage& aMessage ) const;
       
   109 
       
   110     void UpdateInstallReportAccessPointL( const TUid& aClientUid,
       
   111                                           TInt aReportId,
       
   112                                           CNcdNode& aNode,
       
   113                                           CNcdNodeMetaData& aMetaData,
       
   114                                           CNcdReportManager& aReportManager,
       
   115                                           MCatalogsHttpSession& aHttpSession );    
       
   116 
       
   117     MCatalogsHttpSession& HttpSessionL( MCatalogsContext& aContext );
       
   118 
       
   119     
       
   120 private:
       
   121     
       
   122     // Prevent if not implemented
       
   123     CNcdServerReportManager( const CNcdServerReportManager& aObject );
       
   124     CNcdServerReportManager& operator =( const CNcdServerReportManager& aObject );
       
   125 
       
   126 
       
   127 private: // data
       
   128 
       
   129     // The message is set when ReceiveMessage is called. The message
       
   130     // is used in the CounterPartLost-function that informs the message
       
   131     // if the session has been lost.
       
   132     MCatalogsBaseMessage* iMessage;
       
   133     
       
   134     CNcdProvider& iProvider;
       
   135     };
       
   136 
       
   137 
       
   138 #endif // NCD_SERVER_REPORT_IMPL_H