ncdengine/provider/client/inc/ncdnodeuricontentproxy.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:   Contains CNcdNodeuriContentProxy class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCDNODEURICONTENTPROXY_H
       
    20 #define C_NCDNODEURICONTENTPROXY_H
       
    21 
       
    22 
       
    23 // For the streams
       
    24 #include <s32mem.h>
       
    25 
       
    26 #include "ncdinterfacebaseproxy.h"
       
    27 #include "ncdnodeuricontent.h"
       
    28 
       
    29 class CNcdNodeMetadataProxy;
       
    30 
       
    31 
       
    32 /**
       
    33  *  This class implements the functionality for the
       
    34  *  MNcdNodeUriContent interfaces. The interface is provided for
       
    35  *  API users.
       
    36  *
       
    37  *  @since S60 v3.2
       
    38  */
       
    39 class CNcdNodeUriContentProxy : public CNcdInterfaceBaseProxy, 
       
    40                                 public MNcdNodeUriContent
       
    41     {
       
    42 
       
    43 public:
       
    44 
       
    45     /**
       
    46      * @param aSession The session between the client proxy and the
       
    47      * corresponding server object.
       
    48      * @param aHandle The handle which identifies the server object
       
    49      * that this proxy uses.
       
    50      * @param aMetadata Owns and uses the information of this proxy.
       
    51      * The metadata also keeps track of the refence counts of its objects. 
       
    52      * And handles the deletion of these objects when the total reference 
       
    53      * count reaches zero.
       
    54      * @return CNcdNodeUriContentProxy* Pointer to the created object 
       
    55      * of this class.
       
    56      */
       
    57     static CNcdNodeUriContentProxy* NewL(
       
    58         MCatalogsClientServer& aSession,
       
    59         TInt aHandle,
       
    60         CNcdNodeMetadataProxy& aMetadata );
       
    61 
       
    62     /**
       
    63      * @param aSession The session between the client proxy and the
       
    64      * corresponding server object.
       
    65      * @param aHandle The handle which identifies the server object
       
    66      * that this proxy uses.
       
    67      * @param aMetadata Owns and uses the information of this proxy.
       
    68      * The metadata also keeps track of the refence counts of its objects. 
       
    69      * And handles the deletion of these objects when the total reference 
       
    70      * count reaches zero.
       
    71      * @return CNcdNodeUriContentProxy* Pointer to the created object 
       
    72      * of this class.
       
    73      */
       
    74     static CNcdNodeUriContentProxy* NewLC(
       
    75         MCatalogsClientServer& aSession, 
       
    76         TInt aHandle,
       
    77         CNcdNodeMetadataProxy& aMetadata );
       
    78 
       
    79 
       
    80     /**
       
    81      * Destructor.
       
    82      * The destructor is set public. So, the node that owns this object may
       
    83      * delete it directly when the reference count of the node reaches zero
       
    84      * and the destructor of the node is called.
       
    85      */
       
    86     virtual ~CNcdNodeUriContentProxy();
       
    87 
       
    88 
       
    89     /**
       
    90      * Gets the data for descriptors from the server side. This function is
       
    91      * called to update proxy data. The function uses the protected virtual
       
    92      * internalize functions. So, the child classes may provide their own
       
    93      * implementations for internalizations of certain metadata.
       
    94      */
       
    95     void InternalizeL();
       
    96     
       
    97 
       
    98 public: // MNcdNodeUriContent
       
    99 
       
   100     /**
       
   101      * @see MNcdNodeUriContent::ContentUri
       
   102      */ 
       
   103     const TDesC& ContentUri() const;
       
   104 
       
   105     /**
       
   106      * @see MNcdNodeUriContent::ContentValidityDelta
       
   107      */
       
   108     TInt ContentValidityDelta() const;
       
   109 
       
   110 protected:
       
   111 
       
   112     /**
       
   113      * Constructor
       
   114      *
       
   115      * @param aSession The session between the client proxy and the
       
   116      * corresponding server object.
       
   117      * @param aHandle The handle which identifies the server object
       
   118      * that this proxy uses.
       
   119      * @param aMetadata Owns and uses the information of this proxy.
       
   120      * The metadata also keeps track of the refence counts of its objects. 
       
   121      * And handles the deletion of these objects when the total reference 
       
   122      * count reaches zero.
       
   123      * @return CNcdNodeUriContentProxy* Pointer to the created object 
       
   124      * of this class.
       
   125      */
       
   126     CNcdNodeUriContentProxy(
       
   127         MCatalogsClientServer& aSession,
       
   128         TInt aHandle,
       
   129         CNcdNodeMetadataProxy& aMetadata );
       
   130 
       
   131     /**
       
   132      * ConstructL
       
   133      */
       
   134     virtual void ConstructL();
       
   135     
       
   136 
       
   137     // These functions are used to update the data of this class object
       
   138     virtual void InternalizeDataL( RReadStream& aStream );
       
   139 
       
   140 
       
   141 private:
       
   142 
       
   143     // Prevent if not implemented
       
   144     CNcdNodeUriContentProxy( const CNcdNodeUriContentProxy& aObject );
       
   145     CNcdNodeUriContentProxy& operator =( const CNcdNodeUriContentProxy& aObject );
       
   146     
       
   147     
       
   148 private: // data
       
   149 
       
   150     HBufC* iContentUri;
       
   151     TInt iValidityDelta;
       
   152     
       
   153     };
       
   154 
       
   155 
       
   156 #endif // C_NCDNODEURICONTENTPROXY_H