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