remotemgmt_plat/dcmo_adapter_api/inc/DCMOInterface.h
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2009 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:  DCMO Interface definition
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef _MDCMOINTERFACE_H__
       
    19 #define _MDCMOINTERFACE_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <ecom/ecom.h>
       
    23 #include "dcmoconst.h"
       
    24 
       
    25 // UID of this interface
       
    26 const TUid KDCMOInterfaceUid = {0x2001FD40};
       
    27 
       
    28 /**
       
    29 	An DCMO abstract class being representative of the
       
    30 	concrete class which the client wishes to use.
       
    31 
       
    32 	It acts as a base, for a real class to provide all the 
       
    33 	functionality that a client requires.  
       
    34 	It supplies instantiation & destruction by using
       
    35 	the ECom framework, and functional services
       
    36 	by using the methods of the actual class.
       
    37  */
       
    38 
       
    39 
       
    40 class MDCMOInterface
       
    41 	{
       
    42 public:
       
    43 	// The interface for passing initialisation parameters
       
    44 	// to the derived class constructor.
       
    45 	struct TDCMOInterfaceInitParams
       
    46 		{
       
    47 		TUid  uid;
       
    48 		const TDesC* descriptor;
       
    49 		};
       
    50 
       
    51 	// Pure interface methods
       
    52 	// Representative of a method provided on the interface by 
       
    53 	// the interface definer.
       
    54 	
       
    55 	/**
       
    56    * Gets Integer type Attribute value from the plug-in Adapter.
       
    57    * @param aId TDCMONode type.
       
    58    * @param aValue the integer value.
       
    59    * @return A TDCMOStatus value from the plug-in adapter.
       
    60  	 */	
       
    61 	virtual TDCMOStatus  GetDCMOPluginIntAttributeValueL( TDCMONode aId, TInt& aValue) = 0;	
       
    62 	/**
       
    63    * Gets String type Attribute value from the plug-in Adapter.
       
    64    * @param aId TDCMONode type.
       
    65    * @param aStrValue the string.
       
    66    * @return A TDCMOStatus value from the plug-in adapter.
       
    67  	 */	
       
    68 	virtual TDCMOStatus  GetDCMOPluginStrAttributeValueL( TDCMONode aId, TDes& aStrValue) = 0;
       
    69 	/**
       
    70    * Sets Integer type Attribute value to the plug-in Adapter.
       
    71    * @param aId TDCMONode type.
       
    72    * @param aValue the integer value.
       
    73    * @return A TDCMOStatus value from the plug-in adapter.
       
    74  	 */	
       
    75 	virtual TDCMOStatus  SetDCMOPluginIntAttributeValueL( TDCMONode aId, TInt aValue) = 0;
       
    76 	/**
       
    77    * Sets String type Attribute value from the plug-in Adapter.
       
    78    * @param aId TDCMONode type.
       
    79    * @param aStrValue the string.
       
    80    * @return A TDCMOStatus value from the plug-in adapter.
       
    81  	 */	
       
    82 	virtual TDCMOStatus  SetDCMOPluginStrAttributeValueL( TDCMONode aId, const TDes& aStrValue) = 0;
       
    83 	/**
       
    84    * Gets the localized name from plug-in Adapter.
       
    85    * @param aLocName HBufC type.
       
    86 	 * @prototype
       
    87  	 */	
       
    88 	virtual void GetLocalizedNameL (HBufC*& aLocName) = 0;
       
    89 	
       
    90 	};
       
    91  
       
    92 class CDCMOInterface : public CBase, public MDCMOInterface
       
    93 	{
       
    94 public:
       
    95 	// Instantiates an object of this type	
       
    96 	/**
       
    97    * Create instance of CDCMOInterface
       
    98    * @param aUid , implementation Uid
       
    99    * @return Instance of CDCMOInterface
       
   100    */
       
   101 	static CDCMOInterface* NewL(TUid aUid);
       
   102 	/**
       
   103    * Create instance of CDCMOInterface
       
   104    * @param aInitParms of TDCMOInterfaceInitParams type.
       
   105    * @return Instance of CDCMOInterface
       
   106    */
       
   107 	static CDCMOInterface* NewL(TDCMOInterfaceInitParams aInitParms);
       
   108 	/**
       
   109    * C++ Destructor
       
   110    */
       
   111 	virtual ~CDCMOInterface();
       
   112 	
       
   113 private:
       
   114 	// Unique instance identifier key
       
   115 	TUid iDtor_ID_Key;
       
   116 
       
   117 	};
       
   118 
       
   119 #include "dcmointerface.inl"
       
   120 
       
   121 #endif  // _MDCMOINTERFACE_H__
       
   122