ncdengine/provider/client/inc/ncdinterfacebaseproxy.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 CNcdInterfaceBaseProxy class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_INTERFACE_BASE_PROXY_H
       
    20 #define NCD_INTERFACE_BASE_PROXY_H
       
    21 
       
    22 
       
    23 #include "catalogsinterfacebase.h"
       
    24 
       
    25 
       
    26 class MCatalogsClientServer;
       
    27 
       
    28 
       
    29 /**
       
    30  * Base class for the proxies.
       
    31  * Provides basic methods for client server session function calls.
       
    32  *
       
    33  *  @lib ?library
       
    34  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    35  */
       
    36 class CNcdInterfaceBaseProxy: public CCatalogsInterfaceBase                     
       
    37     {
       
    38 
       
    39 protected:
       
    40 
       
    41     /**
       
    42      * Constructor
       
    43      *
       
    44      * @param aSession The session between the client proxy and the
       
    45      * corresponding server object.
       
    46      * @param aHandle The handle which identifies the server object
       
    47      * that this proxy uses.
       
    48      */
       
    49     CNcdInterfaceBaseProxy( MCatalogsClientServer& aSession, 
       
    50                             TInt aHandle,
       
    51                             CCatalogsInterfaceBase* aParent );
       
    52 
       
    53     /**
       
    54      * Destructor
       
    55      */
       
    56     virtual ~CNcdInterfaceBaseProxy();
       
    57 
       
    58 
       
    59 public:
       
    60 
       
    61     /**
       
    62      * ClientServerSession
       
    63      *
       
    64      * @return MCatalogsClientServer& an object that contains
       
    65      * the client server session information
       
    66      */
       
    67     MCatalogsClientServer& ClientServerSession() const;
       
    68 
       
    69 
       
    70     /**
       
    71      * Handle
       
    72      *
       
    73      * @return TInt a handle that identifies the server side object
       
    74      * that this proxy uses.
       
    75      */
       
    76     TInt Handle() const;
       
    77         
       
    78     
       
    79 protected:
       
    80 
       
    81     /** 
       
    82      * Sets the id used for the release message
       
    83      */
       
    84     void SetReleaseId( TInt aId );
       
    85             
       
    86 private:
       
    87     // Prevent if not implemented
       
    88     CNcdInterfaceBaseProxy( const CNcdInterfaceBaseProxy& aObject );
       
    89     CNcdInterfaceBaseProxy& operator =( const CNcdInterfaceBaseProxy& aObject );
       
    90 
       
    91     
       
    92 private: // data
       
    93 
       
    94     /**
       
    95      * Interface for communicating to the server-side.
       
    96      */    
       
    97     MCatalogsClientServer& iSession;
       
    98 
       
    99     /**
       
   100      * Handle to identify the server-side counterpart for object of this
       
   101      * class.
       
   102      */
       
   103     TInt iHandle;
       
   104     
       
   105     TInt iReleaseId;
       
   106     };
       
   107 
       
   108 
       
   109 #endif // NCD_INTERFACE_BASE_PROXY_H