epoc32/include/cs_subconevents.inl
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 cs_subconevents.inl
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // 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
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedAll
       
    21 */
       
    22 
       
    23 #ifndef __CS_SUBCONEVENTS_INL__
       
    24 #define __CS_SUBCONEVENTS_INL__
       
    25 
       
    26 
       
    27 CSubConGenEventParamsGranted* CSubConGenEventParamsGranted::NewL()
       
    28 /** Creates a granted parameter event sub-connection.
       
    29 
       
    30 @return a CSubConGenEventParamsGranted object pointer if successful,
       
    31  otherwise leaves with system error code.
       
    32 */
       
    33 	{
       
    34 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventParamsGranted);
       
    35 	return static_cast<CSubConGenEventParamsGranted*>(CSubConNotificationEvent::NewL(typeId));
       
    36 	}
       
    37 
       
    38 CSubConGenEventParamsGranted::CSubConGenEventParamsGranted()
       
    39 	: CSubConNotificationEvent(), iFamily(KSubConGlobalFamily), iGenericSet(NULL)
       
    40 /** Empty CSubConGenEventParamsGranted constructor
       
    41 */
       
    42 	{
       
    43 	}
       
    44 
       
    45 const CSubConGenericParameterSet* const CSubConGenEventParamsGranted::GetGenericSet() const
       
    46 /** Gets Generic Parameter set.
       
    47 
       
    48 @return pointer to CSubConGenericParameterSet. */
       
    49 	{
       
    50 	return iGenericSet;
       
    51 	}
       
    52 
       
    53 void CSubConGenEventParamsGranted::SetGenericSet(CSubConGenericParameterSet* aGenericSet)
       
    54 /** Sets Generic Parameter set.
       
    55 
       
    56 @param aGenericSet pointer to Generic Parameter set. */
       
    57 	{
       
    58 	if (iGenericSet != NULL)
       
    59 		{
       
    60 		delete iGenericSet;
       
    61 		}
       
    62 	iGenericSet = aGenericSet;
       
    63 	}
       
    64 
       
    65 const CSubConExtensionParameterSet* const CSubConGenEventParamsGranted::GetExtensionSet(TUint aIndex) const
       
    66 /** Gets Extension Parameter set.
       
    67 
       
    68 @param aIndex the index number of the extension parameter to be returned (index number must not be greater
       
    69 			than the value returned by CSubConGenEventParamsGranted::GetNumExtensionSets())
       
    70 
       
    71 @return pointer to selected CSubConExtensionParameterSet. */
       
    72 	{
       
    73 	return static_cast<CSubConExtensionParameterSet*>(iExtensionSets[aIndex]);
       
    74 	}
       
    75 
       
    76 void CSubConGenEventParamsGranted::AddExtensionSetL(CSubConExtensionParameterSet* aExtensionSet)
       
    77 /** Adds Extension Parameter set.
       
    78 
       
    79 @param aExtensionSet extension parameter set to be added in the list. */
       
    80 	{
       
    81 	iExtensionSets.AppendL(aExtensionSet);
       
    82 	}
       
    83 
       
    84 TInt CSubConGenEventParamsGranted::GetNumExtensionSets()
       
    85 /** Gets the number of Extension Parameter set.
       
    86 
       
    87 @return number of Extension Parameter set. */
       
    88 	{
       
    89 	return iExtensionSets.Count();
       
    90 	}
       
    91 
       
    92 TUint32 CSubConGenEventParamsGranted::GetFamily() const
       
    93 /** Gets parameter family type.
       
    94 
       
    95 @return parameter family type. */
       
    96 	{
       
    97 	return iFamily;
       
    98 	}
       
    99 
       
   100 void CSubConGenEventParamsGranted::SetFamily(TUint32 aFamily)
       
   101 /** Sets parameter family type.
       
   102 
       
   103 @param aFamily parameter family type. */
       
   104 	{
       
   105 	iFamily = aFamily;
       
   106 	}
       
   107 
       
   108 //====================================
       
   109 
       
   110 CSubConGenEventParamsChanged* CSubConGenEventParamsChanged::NewL()
       
   111 /** Creates a changed parameter event sub-connection.
       
   112 
       
   113 @return CSubConGenEventParamsChanged pointer if successful,
       
   114  otherwise leaves with system error code.
       
   115 */
       
   116 	{
       
   117 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventParamsChanged);
       
   118 	return static_cast<CSubConGenEventParamsChanged*>(CSubConNotificationEvent::NewL(typeId));
       
   119 	}
       
   120 
       
   121 CSubConGenEventParamsChanged::CSubConGenEventParamsChanged()
       
   122 	: CSubConGenEventParamsGranted()
       
   123 /** Empty CSubConGenEventParamsChanged constructor
       
   124 */
       
   125 	{
       
   126 	}
       
   127 
       
   128 TInt CSubConGenEventParamsChanged::Error() const
       
   129 /** Gets Error value.
       
   130 
       
   131 @return error value. */
       
   132 	{
       
   133 	return iError;
       
   134 	}
       
   135 
       
   136 void CSubConGenEventParamsChanged::SetError(TInt aError)
       
   137 /** Sets Error value.
       
   138 
       
   139 @param aError error value. */
       
   140 	{
       
   141 	iError = aError;
       
   142 	}
       
   143 
       
   144 //====================================
       
   145 
       
   146 CSubConGenEventParamsRejected* CSubConGenEventParamsRejected::NewL()
       
   147 /** Creates a rejected parameter event sub-connection. 
       
   148 
       
   149 @return CSubConGenEventParamsRejected pointer if successful,
       
   150  otherwise leaves with system error code.
       
   151 */
       
   152 	{
       
   153 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventParamsRejected);
       
   154 	return static_cast<CSubConGenEventParamsRejected*>(CSubConNotificationEvent::NewL(typeId));
       
   155 	}
       
   156 
       
   157 CSubConGenEventParamsRejected::CSubConGenEventParamsRejected()
       
   158 	: CSubConNotificationEvent()
       
   159 /** Empty CSubConGenEventParamsRejected constructor
       
   160 */
       
   161 	{
       
   162 	}
       
   163 
       
   164 TInt CSubConGenEventParamsRejected::Error() const
       
   165 /** Gets Error value.
       
   166 
       
   167 @return error value. */
       
   168 	{
       
   169 	return iError;
       
   170 	}
       
   171 
       
   172 void CSubConGenEventParamsRejected::SetError(TInt aError)
       
   173 /** Sets Error value.
       
   174 
       
   175 @param aError error value. */
       
   176 	{
       
   177 	iError = aError;
       
   178 	}
       
   179 
       
   180 TInt CSubConGenEventParamsRejected::FamilyId() const
       
   181 /** Gets parameter family type.
       
   182 
       
   183 @return parameter family type. */
       
   184 	{
       
   185 	return iFamilyId;
       
   186 	}
       
   187 
       
   188 void CSubConGenEventParamsRejected::SetFamilyId(TInt aFamilyId)
       
   189 /** Sets parameter family type.
       
   190 
       
   191 @param aFamilyId parameter family type. */
       
   192 	{
       
   193 	iFamilyId = aFamilyId;
       
   194 	}	
       
   195 	
       
   196 //====================================
       
   197 CSubConGenEventDataClientBase::CSubConGenEventDataClientBase()
       
   198 	: CSubConNotificationEvent()
       
   199 /** Empty CSubConGenEventDataClientBase constructor
       
   200 */
       
   201 	{
       
   202 	}
       
   203 
       
   204 TUint CSubConGenEventDataClientBase::GetIap() const
       
   205 /** Gets sub-connection's Internet Access Point.
       
   206 
       
   207 @return Internet Access Point. */
       
   208 	{
       
   209 	return iIap;
       
   210 	}
       
   211 
       
   212 void CSubConGenEventDataClientBase::SetIap(TUint aIap)
       
   213 /** Sets sub-connection's Internet Access Point.
       
   214 
       
   215 @param aIap Internet Access Point. */
       
   216 	{
       
   217 	iIap = aIap;
       
   218 	}
       
   219 
       
   220 const TSockAddr& CSubConGenEventDataClientBase::GetSourceAdress() const
       
   221 /** Gets sub-connection's source socket address.
       
   222 
       
   223 @return Internet Access Point. */
       
   224 	{
       
   225 	return iSourceAddress;
       
   226 	}
       
   227 
       
   228 void CSubConGenEventDataClientBase::SetSourceAddress(const TSockAddr& aSourceAddress)
       
   229 /** Sets sub-connection's source socket address.
       
   230 
       
   231 @param aIap Internet Access Point. */
       
   232 	{
       
   233 	iSourceAddress = aSourceAddress;
       
   234 	}
       
   235 
       
   236 const TSockAddr& CSubConGenEventDataClientBase::GetDestAdress() const
       
   237 /** Gets sub-connection's destination socket address.
       
   238 
       
   239 @return Internet Access Point. */
       
   240 	{
       
   241 	return iDestAddress;
       
   242 	}
       
   243 
       
   244 void CSubConGenEventDataClientBase::SetDestAddress(const TSockAddr& aDestAddress)
       
   245 /** Sets sub-connection's destination socket address.
       
   246 
       
   247 @param aIap Internet Access Point. */
       
   248 	{
       
   249 	iDestAddress = aDestAddress;
       
   250 	}
       
   251 
       
   252 //====================================
       
   253 CSubConGenEventDataClientJoined* CSubConGenEventDataClientJoined::NewL()
       
   254 /** Creates a data client joined event sub-connection. 
       
   255 
       
   256 @return CSubConGenEventDataClientJoined pointer if successful,
       
   257  otherwise leaves with system error code.
       
   258 */
       
   259 	{
       
   260 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventDataClientJoined);
       
   261 	return static_cast<CSubConGenEventDataClientJoined*>(CSubConNotificationEvent::NewL(typeId));
       
   262 	}
       
   263 
       
   264 CSubConGenEventDataClientJoined::CSubConGenEventDataClientJoined()
       
   265 	: CSubConGenEventDataClientBase()
       
   266 /** Empty CSubConGenEventDataClientJoined constructor
       
   267 */
       
   268 	{
       
   269 	}
       
   270 
       
   271 //=====================================
       
   272 CSubConGenEventDataClientLeft* CSubConGenEventDataClientLeft::NewL()
       
   273 /** Creates a data client left event sub-connection. 
       
   274 
       
   275 @return CSubConGenEventDataClientLeft pointer if successful,
       
   276  otherwise leaves with system error code.
       
   277 */
       
   278 	{
       
   279 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventDataClientLeft);
       
   280 	return static_cast<CSubConGenEventDataClientLeft*>(CSubConNotificationEvent::NewL(typeId));
       
   281 	}
       
   282 
       
   283 CSubConGenEventDataClientLeft::CSubConGenEventDataClientLeft()
       
   284 	: CSubConGenEventDataClientBase()
       
   285 /** Empty CSubConGenEventDataClientLeft constructor
       
   286 */
       
   287 	{
       
   288 	}
       
   289 
       
   290 //====================================
       
   291 CSubConGenEventSubConDown* CSubConGenEventSubConDown::NewL()
       
   292 /** Creates a sub-connection down event. 
       
   293 
       
   294 @return a CSubConGenEventSubConDown pointer if successful,
       
   295  otherwise leaves with system error code.
       
   296 */
       
   297 	{
       
   298 	STypeId typeId(KSubConnGenericEventsImplUid, KSubConGenericEventSubConDown);
       
   299 	return static_cast<CSubConGenEventSubConDown*>(CSubConNotificationEvent::NewL(typeId));
       
   300 	}
       
   301 
       
   302 CSubConGenEventSubConDown::CSubConGenEventSubConDown()
       
   303 	: CSubConNotificationEvent()
       
   304 /** Empty CSubConGenEventSubConDown constructor
       
   305 */
       
   306 	{
       
   307 	}
       
   308 
       
   309 TInt CSubConGenEventSubConDown::Error() const
       
   310 /** Gets Error value.
       
   311 
       
   312 @return error value. */
       
   313 	{
       
   314 	return iError;
       
   315 	}
       
   316 
       
   317 void CSubConGenEventSubConDown::SetError(TInt aError)
       
   318 /** Sets Error value.
       
   319 
       
   320 @param aError error value. */
       
   321 	{
       
   322 	iError = aError;
       
   323 	}
       
   324 
       
   325 #endif	// __CS_SUBCONEVENTS_INL__