1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/smldmadapter.inl Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,155 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Definition of dm constants/exported methods
1.18 +* This is part of remotemgmt_plat.
1.19 +*/
1.20 +// SmlDmAdapter.inl
1.21 +//
1.22 +
1.23 +
1.24 +inline /*static*/ CSmlDmAdapter* CSmlDmAdapter::NewL(const TUid& aImplementationUid, MSmlDmCallback& aDmCallback)
1.25 + /**
1.26 + The construction for CSmlDmAdapter class.
1.27 + @param aDmCallback An address of the callback interface class.
1.28 + @publishedPartner
1.29 + @prototype
1.30 + */
1.31 + {
1.32 + TAny* arg = reinterpret_cast<TAny*>(&aDmCallback);
1.33 + TAny* ptr = REComSession::CreateImplementationL(aImplementationUid,
1.34 + _FOFF(CSmlDmAdapter, iDtor_ID_Key),
1.35 + arg);
1.36 + return static_cast<CSmlDmAdapter*>(ptr);
1.37 + }
1.38 +
1.39 +inline /*virtual*/ CSmlDmAdapter::~CSmlDmAdapter()
1.40 + /**
1.41 + C++ default destructor.
1.42 + @publishedPartner
1.43 + @prototype
1.44 + */
1.45 + {
1.46 + REComSession::DestroyedImplementation(iDtor_ID_Key);
1.47 + }
1.48 +
1.49 +inline CSmlDmAdapter::CSmlDmAdapter(TAny* aEcomArguments)
1.50 + : iCallback(*(reinterpret_cast<MSmlDmCallback*>(aEcomArguments)))
1.51 + /**
1.52 + Constructor.
1.53 + @publishedPartner
1.54 + @prototype
1.55 + */
1.56 + {
1.57 + }
1.58 +
1.59 +inline MSmlDmCallback& CSmlDmAdapter::Callback()
1.60 + /**
1.61 + Accessor for the callback supplied to this adapter on construction.
1.62 + @publishedPartner
1.63 + @prototype
1.64 + */
1.65 + {
1.66 + return iCallback;
1.67 + }
1.68 +
1.69 +inline TSmlDmAccessTypes::TSmlDmAccessTypes()
1.70 + /**
1.71 + Class constructor
1.72 + @publishedPartner
1.73 + @prototype
1.74 + */
1.75 + {
1.76 + iACL = 0;
1.77 + }
1.78 +
1.79 +inline void TSmlDmAccessTypes::SetAdd()
1.80 + /**
1.81 + The function sets Add access type property.
1.82 + @publishedPartner
1.83 + @prototype
1.84 + */
1.85 + {
1.86 + iACL |= EAccessType_Add;
1.87 + }
1.88 +
1.89 +inline void TSmlDmAccessTypes::SetCopy()
1.90 + /**
1.91 + The function sets Copy access type property.
1.92 + @publishedPartner
1.93 + @prototype
1.94 + */
1.95 + {
1.96 + iACL |= EAccessType_Copy;
1.97 + }
1.98 +
1.99 +inline void TSmlDmAccessTypes::SetDelete()
1.100 + /**
1.101 + The function sets Delete access type property.
1.102 + @publishedPartner
1.103 + @prototype
1.104 + */
1.105 + {
1.106 + iACL |= EAccessType_Delete;
1.107 + }
1.108 +
1.109 +inline void TSmlDmAccessTypes::SetExec()
1.110 + /**
1.111 + The function sets Execute access type property.
1.112 + @publishedPartner
1.113 + @prototype
1.114 + */
1.115 + {
1.116 + iACL |= EAccessType_Exec;
1.117 + }
1.118 +
1.119 +inline void TSmlDmAccessTypes::SetGet()
1.120 + /**
1.121 + The function sets Get access type property.
1.122 + @publishedPartner
1.123 + @prototype
1.124 + */
1.125 + {
1.126 + iACL |= EAccessType_Get;
1.127 + }
1.128 +
1.129 +inline void TSmlDmAccessTypes::SetReplace()
1.130 + /**
1.131 + The function sets Replace access type property.
1.132 + @publishedPartner
1.133 + @prototype
1.134 + */
1.135 + {
1.136 + iACL |= EAccessType_Replace;
1.137 + }
1.138 +
1.139 +inline TUint8 TSmlDmAccessTypes::GetACL()
1.140 + /**
1.141 + The function obtains the bitfield composed from each access type that has
1.142 + been set
1.143 + @publishedPartner
1.144 + @prototype
1.145 + */
1.146 + {
1.147 + return iACL;
1.148 + }
1.149 +
1.150 +inline void TSmlDmAccessTypes::Reset()
1.151 + /**
1.152 + The function resets all access types previously defined in this object.
1.153 + @publishedPartner
1.154 + @prototype
1.155 + */
1.156 + {
1.157 + iACL = 0;
1.158 + }