epoc32/include/smldmadapter.inl
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     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: Definition of dm constants/exported methods
       
    15 * 	This is part of remotemgmt_plat. 
       
    16 */
       
    17 // SmlDmAdapter.inl
       
    18 //
       
    19 
       
    20 
       
    21 inline /*static*/ CSmlDmAdapter* CSmlDmAdapter::NewL(const TUid& aImplementationUid, MSmlDmCallback& aDmCallback)
       
    22 	/**
       
    23 	The construction for CSmlDmAdapter class.
       
    24     @param aDmCallback An address of the callback interface class.
       
    25 	@publishedPartner
       
    26 	@prototype
       
    27 	*/
       
    28 	{
       
    29 	TAny* arg = reinterpret_cast<TAny*>(&aDmCallback);
       
    30 	TAny* ptr = REComSession::CreateImplementationL(aImplementationUid,
       
    31 													_FOFF(CSmlDmAdapter, iDtor_ID_Key),
       
    32 													arg);
       
    33 	return static_cast<CSmlDmAdapter*>(ptr);
       
    34 	}
       
    35 
       
    36 inline /*virtual*/ CSmlDmAdapter::~CSmlDmAdapter()
       
    37 	/**
       
    38 	C++ default destructor.
       
    39 	@publishedPartner
       
    40 	@prototype
       
    41 	*/
       
    42 	{
       
    43 	REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    44 	}
       
    45 
       
    46 inline CSmlDmAdapter::CSmlDmAdapter(TAny* aEcomArguments)
       
    47 	: iCallback(*(reinterpret_cast<MSmlDmCallback*>(aEcomArguments)))
       
    48 	/**
       
    49 	Constructor.
       
    50 	@publishedPartner
       
    51 	@prototype
       
    52 	*/
       
    53 	{
       
    54 	}
       
    55 	
       
    56 inline MSmlDmCallback& CSmlDmAdapter::Callback()
       
    57 	/**
       
    58 	Accessor for the callback supplied to this adapter on construction.
       
    59 	@publishedPartner
       
    60 	@prototype
       
    61 	*/
       
    62 	{
       
    63 	return iCallback;
       
    64 	}
       
    65 
       
    66 inline TSmlDmAccessTypes::TSmlDmAccessTypes()
       
    67 	/**
       
    68 	Class constructor 
       
    69 	@publishedPartner
       
    70 	@prototype
       
    71 	*/
       
    72 	{
       
    73 	iACL = 0;
       
    74 	}	
       
    75 
       
    76 inline void TSmlDmAccessTypes::SetAdd()
       
    77 	/**
       
    78 	The function sets Add access type property. 
       
    79 	@publishedPartner
       
    80 	@prototype
       
    81 	*/
       
    82 	{
       
    83 	iACL |= EAccessType_Add;
       
    84 	}	
       
    85 
       
    86 inline void TSmlDmAccessTypes::SetCopy()
       
    87 	/**
       
    88 	The function sets Copy access type property.
       
    89 	@publishedPartner
       
    90 	@prototype
       
    91 	*/
       
    92 	{
       
    93 	iACL |= EAccessType_Copy;
       
    94 	}	
       
    95 
       
    96 inline void TSmlDmAccessTypes::SetDelete()
       
    97 	/**
       
    98 	The function sets Delete access type property. 
       
    99 	@publishedPartner
       
   100 	@prototype
       
   101 	*/
       
   102 	{
       
   103 	iACL |= EAccessType_Delete;
       
   104 	}	
       
   105 
       
   106 inline void TSmlDmAccessTypes::SetExec()
       
   107 	/**
       
   108 	The function sets Execute access type property.
       
   109 	@publishedPartner
       
   110 	@prototype
       
   111 	*/
       
   112 	{
       
   113 	iACL |= EAccessType_Exec;
       
   114 	}	
       
   115 
       
   116 inline void TSmlDmAccessTypes::SetGet()
       
   117 	/**
       
   118 	The function sets Get access type property. 
       
   119 	@publishedPartner
       
   120 	@prototype
       
   121 	*/
       
   122 	{
       
   123 	iACL |= EAccessType_Get;
       
   124 	}	
       
   125 
       
   126 inline void TSmlDmAccessTypes::SetReplace()
       
   127 	/**
       
   128 	The function sets Replace access type property. 
       
   129 	@publishedPartner
       
   130 	@prototype
       
   131 	*/
       
   132 	{
       
   133 	iACL |= EAccessType_Replace;
       
   134 	}	
       
   135 
       
   136 inline TUint8 TSmlDmAccessTypes::GetACL()
       
   137 	/**
       
   138 	The function obtains the bitfield composed from each access type that has
       
   139 	been set 
       
   140 	@publishedPartner
       
   141 	@prototype
       
   142 	*/
       
   143 	{
       
   144 	return iACL;
       
   145 	}
       
   146 
       
   147 inline void TSmlDmAccessTypes::Reset()
       
   148 	/**
       
   149 	The function resets all access types previously defined in this object.
       
   150 	@publishedPartner
       
   151 	@prototype
       
   152 	*/
       
   153 	{
       
   154 	iACL = 0;
       
   155 	}