1.1 --- a/epoc32/include/mw/cmconnectionmethod.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/cmconnectionmethod.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,217 @@
1.4 -cmconnectionmethod.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Connection Method interface class.
1.19 +*
1.20 +*/
1.21 +
1.22 +#ifndef CMCONNECTIONMETHOD_H
1.23 +#define CMCONNECTIONMETHOD_H
1.24 +
1.25 +// INCLUDES
1.26 +#include <e32base.h>
1.27 +#include <cmconnectionmethoddef.h>
1.28 +
1.29 +// CLASS DECLARATION
1.30 +class CCmPluginBaseEng;
1.31 +class RCmDestination;
1.32 +
1.33 +/**
1.34 + * RCmConnectionMethod is for getting/setting values of a connection method.
1.35 + * @lib cmmanager.lib
1.36 + * @since S60 v3.2
1.37 + */
1.38 +NONSHARABLE_CLASS( RCmConnectionMethod )
1.39 + {
1.40 + //=====================================================================
1.41 + // Constructors/Destructors
1.42 + //
1.43 + public:
1.44 +
1.45 + /**
1.46 + * Default constructor.
1.47 + */
1.48 + IMPORT_C RCmConnectionMethod();
1.49 +
1.50 +
1.51 + /**
1.52 + * Copy constructor.
1.53 + */
1.54 + IMPORT_C RCmConnectionMethod(const RCmConnectionMethod& aItem);
1.55 +
1.56 +
1.57 + /**
1.58 + * Destructor.
1.59 + */
1.60 + IMPORT_C ~RCmConnectionMethod();
1.61 +
1.62 + //=====================================================================
1.63 + // API functions
1.64 + public:
1.65 +
1.66 + /**
1.67 + * Close the session
1.68 + *
1.69 + * @since S60 3.2
1.70 + */
1.71 + IMPORT_C void Close();
1.72 +
1.73 + /**
1.74 + * Gets the value for a TInt attribute.
1.75 + *
1.76 + * @since S60 3.2
1.77 + * @param aAttribute Identifies the attribute to be retrieved.
1.78 + * @return contains the requested TInt attribute.
1.79 + */
1.80 + IMPORT_C TUint32 GetIntAttributeL( TUint32 aAttribute ) const;
1.81 +
1.82 + /**
1.83 + * Gets the value for a TBool attribute.
1.84 + *
1.85 + * @since S60 3.2
1.86 + * @param aAttribute Identifies the attribute to be retrieved.
1.87 + * @return contains the requested TBool attribute.
1.88 + */
1.89 + IMPORT_C TBool GetBoolAttributeL( TUint32 aAttribute ) const;
1.90 +
1.91 + /**
1.92 + * Gets the value for a String16 attribute.
1.93 + * HBuf ownership is passed to the caller
1.94 + *
1.95 + * @since S60 3.2
1.96 + * @param aAttribute Identifies the attribute to be retrieved.
1.97 + * @return copy of the requested attribute. Ownership is passed.
1.98 + */
1.99 + IMPORT_C HBufC* GetStringAttributeL( TUint32 aAttribute ) const;
1.100 +
1.101 + /**
1.102 + * Gets the value for a String8 attribute.
1.103 + * HBuf ownership is passed to the caller
1.104 + *
1.105 + * @since S60 3.2
1.106 + * @param aAttribute Identifies the attribute to be retrieved.
1.107 + * @return copy of the requested attribute. Ownership is passed.
1.108 + */
1.109 + IMPORT_C HBufC8* GetString8AttributeL(
1.110 + const TUint32 aAttribute ) const;
1.111 +
1.112 + /**
1.113 + * Call this function only if this CM is an embedded destination!
1.114 + *
1.115 + * @since S60 3.2
1.116 + * @return embedded destination
1.117 + */
1.118 + IMPORT_C RCmDestination DestinationL() const;
1.119 +
1.120 +
1.121 + /**
1.122 + * checks if connection methods are the same
1.123 + *
1.124 + * @since S60 3.2
1.125 + * @param aConnMethod the connection method being compared
1.126 + * @return ETrue if the destinations are the same
1.127 + */
1.128 + IMPORT_C TBool operator==( RCmConnectionMethod& aConnMethod ) const;
1.129 +
1.130 + /**
1.131 + * checks if connection methods are not the same
1.132 + *
1.133 + * @since S60 3.2
1.134 + * @param aConnMethod the connection method being compared
1.135 + * @return ETrue if the destinations are different
1.136 + */
1.137 + IMPORT_C TBool operator!=( RCmConnectionMethod& aConnMethod ) const;
1.138 +
1.139 +
1.140 + /**
1.141 + * assignment operator
1.142 + *
1.143 + * @since S60 3.2
1.144 + * @return RCmConnectionMethod
1.145 + */
1.146 + IMPORT_C RCmConnectionMethod& operator=(const RCmConnectionMethod&
1.147 + aConnMethod);
1.148 +
1.149 + /**
1.150 + * Creates a copy of this connection method. UpdateL() has to be called
1.151 + * to store new connection method in database. Ownership is passed.
1.152 + */
1.153 + IMPORT_C RCmConnectionMethod CreateCopyL();
1.154 +
1.155 + /**
1.156 + * Sets the value for a TInt attribute.
1.157 + * @param aAttribute Identifies the attribute to be set.
1.158 + * @param aValue The value to be set.
1.159 + * @return None.
1.160 + */
1.161 + IMPORT_C void SetIntAttributeL( TUint32 aAttribute, TUint32 aValue );
1.162 +
1.163 + /**
1.164 + * Sets the value for a TBool attribute.
1.165 + * @param aAttribute Identifies the attribute to be set.
1.166 + * @param aValue The value to be set.
1.167 + * @return None.
1.168 + */
1.169 + IMPORT_C void SetBoolAttributeL( TUint32 aAttribute, TBool aValue );
1.170 +
1.171 + /**
1.172 + * Sets the value for a String16 attribute.
1.173 + * @param aAttribute Identifies the attribute to be set.
1.174 + * @param aValue The value to be set.
1.175 + * @return None.
1.176 + */
1.177 + IMPORT_C void SetStringAttributeL( TUint32 aAttribute,
1.178 + const TDesC16& aValue );
1.179 +
1.180 + /**
1.181 + * Sets the value for a String8 attribute.
1.182 + * @param aAttribute Identifies the attribute to be set.
1.183 + * @param aValue The value to be set.
1.184 + * @return None.
1.185 + */
1.186 + IMPORT_C void SetString8AttributeL( TUint32 aAttribute,
1.187 + const TDesC8& aValue );
1.188 +
1.189 + /**
1.190 + * Try to delete the connection method. If it is referenced from
1.191 + * any destination, then the references are removed and the
1.192 + * connection method is deleted.
1.193 + * Do NOT call this function if you got this
1.194 + * connection method from a destination. Call destination's
1.195 + * DeleteConnectionMethodL() function instead.
1.196 + * @return ETrue if connection method deleted.
1.197 + */
1.198 + IMPORT_C TBool DeleteL();
1.199 +
1.200 + /**
1.201 + * Update in the database.
1.202 + * @return None.
1.203 + */
1.204 + IMPORT_C void UpdateL();
1.205 +
1.206 + private:
1.207 +
1.208 + friend class RCmDestination;
1.209 + friend class RCmManager;
1.210 +
1.211 + private:
1.212 +
1.213 + /**
1.214 + * the implementation class
1.215 + */
1.216 + CCmPluginBaseEng* iImplementation;
1.217 + };
1.218 +
1.219 +#include <cmconnectionmethod.inl>
1.220 +
1.221 +#endif // CMCONNECTIONMETHOD_H