linklayercontrol/mbmsparameters/inc/mbmsparams.inl
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2008-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  @publishedPartner
       
    19  @released since 9.5
       
    20 */
       
    21 
       
    22 #ifndef __MBMSPARAMS_INL__
       
    23 #define __MBMSPARAMS_INL__
       
    24 
       
    25 #include <e32debug.h>
       
    26 
       
    27 // implementation, to be copied to .inl file
       
    28 
       
    29 namespace ConnectionServ
       
    30 {  
       
    31 TMBMSInfo* TMBMSChannelInfoV1::AddrPtr() 
       
    32 /** 
       
    33     Gets a pointer to the buffer TChannel.
       
    34 	
       
    35 	@return TMBMSInfo*
       
    36 */
       
    37     {
       
    38     return reinterpret_cast<TMBMSInfo*>(UserPtr());
       
    39     } 
       
    40 
       
    41 TMBMSChannelInfoV1::TMBMSChannelInfoV1()
       
    42 /**
       
    43    Standard constructor.
       
    44 */
       
    45 	{
       
    46 	SetUserLength(sizeof(TMBMSInfo));
       
    47 	}
       
    48 	
       
    49 void TMBMSChannelInfoV1::SetTmgi(const TTmgi& aTmgi)
       
    50 /** 
       
    51     Setter method to set TTmgi
       
    52 	
       
    53 	@param aTmgi a reference to the existing TTmgi. 
       
    54 */
       
    55 	{
       
    56 	AddrPtr()->iTmgi = aTmgi;
       
    57 	}
       
    58 
       
    59 const TTmgi& TMBMSChannelInfoV1::GetTmgi() 
       
    60 /** 
       
    61     Getter method to get TTmgi.
       
    62 	
       
    63 	@return TTmgi&.
       
    64 */
       
    65 	{
       
    66 	return AddrPtr()->iTmgi;
       
    67 	}
       
    68 	
       
    69 void TMBMSChannelInfoV1::SetScope(const TMbmsScope aMbmsScope)
       
    70 /** 
       
    71     Setter method to set MbmsScope
       
    72 	
       
    73 	@param aTmgiScope a reference to the existing TTmgiScope. 
       
    74 */
       
    75 	{
       
    76 	AddrPtr()->iMbmsScope = aMbmsScope;
       
    77 	}
       
    78 const TMbmsScope TMBMSChannelInfoV1::GetScope() 
       
    79 /** 
       
    80     Getter method to get TTmgiScope.
       
    81 	
       
    82 	@return TMbmsScope&.
       
    83 */
       
    84 	{
       
    85 	return AddrPtr()->iMbmsScope;
       
    86 	}		
       
    87 const TInetAddr& TMBMSChannelInfoV1::GetInetAddress() 
       
    88 /** 
       
    89     Getter method to retrieve IP address.This function is implemented for later use to
       
    90 	set multicast address.
       
    91 	
       
    92 	@return TInetAddr&.
       
    93 */
       
    94 	{
       
    95 	return AddrPtr()->iInetAddr;
       
    96 	}
       
    97 	
       
    98 void TMBMSChannelInfoV1::SetInetAddress(const TInetAddr& aInetAddr)
       
    99 /** 
       
   100     Setter method to set IP address.This function is implemented for later use.
       
   101 	
       
   102 	@param aInetAddr a reference to the existing TInetAddr. 
       
   103 */
       
   104 	{
       
   105 	AddrPtr()->iInetAddr = aInetAddr;
       
   106 	}
       
   107 	
       
   108 TMbmsServicePriority TMBMSChannelInfoV1::GetServicePriority() 
       
   109 /** 
       
   110     Getter method to retrieve service priority.
       
   111 	
       
   112 	@return TMbmsServicePriority 
       
   113 */
       
   114  	{
       
   115  	return AddrPtr()->iServicePriority;
       
   116  	}
       
   117  	
       
   118 void TMBMSChannelInfoV1::SetServicePriority(const TMbmsServicePriority aServicePriority)
       
   119 /** 
       
   120     Setter method to set service priority.
       
   121 	
       
   122 	@param aServicePriority of type TMbmsServicePriority
       
   123 */
       
   124 	{
       
   125 	AddrPtr()->iServicePriority = aServicePriority;
       
   126 	}
       
   127 
       
   128 
       
   129 XMBMSServiceParameterSet::XMBMSServiceParameterSet()
       
   130 /**
       
   131    Standard constructor.
       
   132  */
       
   133 	{
       
   134 	}
       
   135 TMbmsServiceMode XMBMSServiceParameterSet::GetServiceMode() const
       
   136 /** 
       
   137     Getter method to get MBMS service mode.
       
   138 	
       
   139 	@return TMbmsServiceMode 
       
   140 */
       
   141     {
       
   142     return iServiceMode;
       
   143     }
       
   144 void XMBMSServiceParameterSet::SetServiceMode(const TMbmsServiceMode  aServiceMode)
       
   145 /** 
       
   146     Setter method to set MBMS service mode.
       
   147 	
       
   148 	@param aServiceMode of type TMbmsServiceMode
       
   149 */
       
   150 	{
       
   151 	iServiceMode = aServiceMode;
       
   152 	}
       
   153 TMbmsAvailabilityStatus XMBMSServiceParameterSet::GetMBMSServiceAvailability() const
       
   154 /** 
       
   155     Getter method to get MBMS service availability
       
   156 		
       
   157 	@return TMbmsAvailabilityStatus. 
       
   158 */
       
   159 	{
       
   160     return iAvailabilityStatus;
       
   161 	}
       
   162 void XMBMSServiceParameterSet::SetMBMSServiceAvailability(const TMbmsAvailabilityStatus aAvailabilityStatus)
       
   163 /** 
       
   164     Setter method to set MBMS service availability
       
   165 	
       
   166 	@param aAvailabilityStatus of type TMbmsAvailabilityStatus.
       
   167 */	
       
   168 	{
       
   169 	iAvailabilityStatus = aAvailabilityStatus;
       
   170 	}
       
   171  TMBMSChannelInfoV1* XMBMSServiceParameterSet::GetChannelInfo() 
       
   172 /** 
       
   173     Getter method to get MBMS service information.
       
   174 		
       
   175 	@return TMBMSChannelInfoV1& 
       
   176 */
       
   177 	{
       
   178 	return &iServiceInfo;
       
   179 	}
       
   180 
       
   181 void XMBMSServiceQuerySet::SetQueryType(const TQueryType aQueryType)
       
   182 /** 
       
   183     Setter method to set MBMS query type.
       
   184 	
       
   185 	@param aQueryType of type TQueryType.
       
   186 */
       
   187 	{
       
   188 	iQueryType = aQueryType;
       
   189 	}
       
   190 XMBMSServiceQuerySet::TQueryType XMBMSServiceQuerySet::GetQueryType() const
       
   191 /** 
       
   192     Getter method to get MBMS query type.
       
   193 	
       
   194 	@return TQueryType 
       
   195 */
       
   196 	{
       
   197 	return iQueryType;
       
   198 	}
       
   199 
       
   200 //Checks for MBMS Bearer Availability
       
   201 TMbmsNetworkServiceStatus XMBMSServiceQuerySet::GetMBMSBearerAvailability() const
       
   202 /** 
       
   203     Getter method to get MBMS bearer availability.
       
   204 	
       
   205 	@return TMbmsNetworkServiceStatus.
       
   206 */
       
   207 	{
       
   208 	return iBearerAvailability;
       
   209 	}
       
   210 	
       
   211 void XMBMSServiceQuerySet::SetMBMSBearerAvailability(const TMbmsNetworkServiceStatus aBearerAvailability)
       
   212 /** 
       
   213     Setter method to set MBMS bearer availability.
       
   214 	
       
   215 	@param aBearerAvailability of type TMbmsNetworkServiceStatus.
       
   216 */
       
   217 	{
       
   218 	iBearerAvailability = aBearerAvailability;
       
   219 	}
       
   220 	
       
   221 TUint XMBMSServiceQuerySet::GetListCount() const
       
   222 /** 
       
   223     Getter method to get number of entries from the service or monitor list.
       
   224 	
       
   225 	@return TUint.
       
   226 */
       
   227 	{
       
   228 	return iCurrentCount;
       
   229 	}
       
   230 void XMBMSServiceQuerySet::SetListCount(const TUint aCurrentCount)
       
   231 /** 
       
   232     Setter method to set number of entries in service or monitor list.
       
   233 	
       
   234 	@param aCurrentCount of type TUint. 
       
   235 */
       
   236 	{
       
   237 	iCurrentCount = aCurrentCount;
       
   238 	}
       
   239 TUint XMBMSServiceQuerySet::GetListMaxCount() const
       
   240 /** 
       
   241     Getter method to get the maximum entries that a service or monitor list contain.
       
   242 	
       
   243 	@return TUint.
       
   244 */
       
   245 	{
       
   246 	return iMaxCount;
       
   247 	}
       
   248 
       
   249 void XMBMSServiceQuerySet::SetListMaxCount(const TUint aMaxCount)
       
   250 /** 
       
   251     Setter method to set the maximum entries that a service or monitor list contain.
       
   252 	
       
   253 	@param aMaxCount of type TUint.
       
   254 */
       
   255 	{
       
   256 	iMaxCount = aMaxCount;
       
   257 	}
       
   258 
       
   259 CSubConChannelParamSet *CSubConChannelParamSet ::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
       
   260 /**
       
   261 @param      aFamily the sub-connection parameter family to set.
       
   262 @param      aType The type of the set from TParameterSetType (ERequested)
       
   263 @return     pointer to the created object
       
   264 */
       
   265     {
       
   266     CSubConChannelParamSet * obj = NewL();
       
   267     CleanupStack::PushL(obj);
       
   268     aFamily.SetGenericSetL(*obj, aType);
       
   269     CleanupStack::Pop(obj);
       
   270     return obj;
       
   271     }
       
   272 
       
   273 CSubConChannelParamSet *CSubConChannelParamSet ::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
       
   274 /**
       
   275 @param      aFamily the sub-connection parameter family to set.
       
   276 @param      aType The type of the set from TParameterSetType (ERequested)
       
   277 @return     pointer to the created object
       
   278 */
       
   279     {
       
   280     CSubConChannelParamSet * obj = NewL();
       
   281     CleanupStack::PushL(obj);
       
   282     aFamily.AddParameterSetL(obj, aType);
       
   283     CleanupStack::Pop(obj);
       
   284     return obj;
       
   285     }
       
   286 
       
   287 CSubConChannelParamSet* CSubConChannelParamSet::NewL()
       
   288 /**
       
   289 @return     pointer to the created object
       
   290 */
       
   291     {
       
   292     STypeId typeId = STypeId::CreateSTypeId(KSubConChannelParamsImplUid, KSubConChannelParamsType );
       
   293     return static_cast<CSubConChannelParamSet*>(CSubConParameterSet::NewL(typeId));
       
   294     }
       
   295 
       
   296 
       
   297 CSubConChannelParamSet::CSubConChannelParamSet()
       
   298     {
       
   299     }
       
   300  
       
   301 
       
   302 
       
   303 TAny* CSubConChannelParamSet::GetChannelInfo() 
       
   304 /** Gets the Channel information
       
   305 @return aServiceInfo value of the channel
       
   306 */
       
   307     {
       
   308     return iServiceInfo.UserPtr();
       
   309     }
       
   310 
       
   311 
       
   312 
       
   313 //Mbms Session Extension Parameters Functions
       
   314 
       
   315 CSubConMBMSExtensionParamSet * CSubConMBMSExtensionParamSet ::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
       
   316 /**
       
   317 @param      aFamily the sub-connection parameter family to set.
       
   318 @param      aType The type of the set from TParameterSetType (ERequested)
       
   319 @return     pointer to the created object
       
   320 */
       
   321     {
       
   322     CSubConMBMSExtensionParamSet * obj = NewL();
       
   323     CleanupStack::PushL(obj);
       
   324     aFamily.AddExtensionSetL(*obj, aType);
       
   325     CleanupStack::Pop(obj);
       
   326     return obj;
       
   327     }
       
   328 
       
   329 CSubConMBMSExtensionParamSet * CSubConMBMSExtensionParamSet ::NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType)
       
   330 /**
       
   331 @param      aFamily the sub-connection parameter family to set.
       
   332 @param      aType The type of the set from TParameterSetType (ERequested)
       
   333 @return     pointer to the created object
       
   334 */
       
   335     {
       
   336     CSubConMBMSExtensionParamSet * obj = NewL();
       
   337     CleanupStack::PushL(obj);
       
   338     aFamily.AddParameterSetL(obj, aType);
       
   339     CleanupStack::Pop(obj);
       
   340     return obj;
       
   341     }
       
   342 
       
   343 
       
   344 CSubConMBMSExtensionParamSet* CSubConMBMSExtensionParamSet::NewL()
       
   345 /**
       
   346 @return     pointer to the created object
       
   347 */
       
   348     {
       
   349     STypeId typeId = STypeId::CreateSTypeId(KSubConMBMSExtParamsImplUid, KSubConMBMSSessionExtParamsType );
       
   350     return static_cast<CSubConMBMSExtensionParamSet*>(CSubConParameterSet::NewL(typeId));
       
   351     }
       
   352 
       
   353 //===========================
       
   354 // Implementation Extension class
       
   355 CSubConMBMSExtensionParamSet::CSubConMBMSExtensionParamSet()
       
   356 	: CSubConExtensionParameterSet()
       
   357     {
       
   358     }
       
   359 
       
   360 
       
   361 
       
   362 void CSubConMBMSExtensionParamSet::SetSessionId(const TUint aSessionId)
       
   363 /**         adds a Session Id to the MBMS Service
       
   364 @param      aFlowId the flow indentifier to be added.
       
   365 */
       
   366 	{
       
   367 	this->iSessionIds.Append(aSessionId);
       
   368 	}
       
   369 
       
   370 
       
   371 TInt CSubConMBMSExtensionParamSet::GetSessionId(const TUint aIndex)
       
   372 /**
       
   373 @param      aIndex the index of the flow identifier that will be returned.
       
   374 @return     the Mbms Session Id at the index given by aIndex.
       
   375 */
       
   376 	{
       
   377 	return this->iSessionIds[aIndex];
       
   378 	}
       
   379 
       
   380 
       
   381 TInt CSubConMBMSExtensionParamSet::GetSessionCount() const
       
   382 /**
       
   383 
       
   384 @return the number of SessionIds in the MBMS service
       
   385 */
       
   386 	{
       
   387 	return this->iSessionIds.Count();
       
   388 	}
       
   389 
       
   390 
       
   391 void CSubConMBMSExtensionParamSet::SetServiceMode(const TMbmsServiceMode aServiceMode)
       
   392 /** Sets the MBMS Service Mode
       
   393 
       
   394 @param aServiceMode value of the service
       
   395 */
       
   396 	{
       
   397 	iServiceMode=aServiceMode;
       
   398 	}
       
   399 
       
   400 TMbmsServiceMode CSubConMBMSExtensionParamSet::GetServiceMode() const
       
   401 /**
       
   402 @return the MBMS service mode.
       
   403 */
       
   404 	{
       
   405 	return iServiceMode;
       
   406 	}
       
   407 
       
   408 
       
   409 CSubConMBMSExtensionParamSet::TOperationType CSubConMBMSExtensionParamSet::GetOperationType () const
       
   410 /**
       
   411 @return the MBMS Extension Set class operation type
       
   412 */
       
   413 	{
       
   414 	return iOperationType;
       
   415 	}
       
   416 
       
   417 void CSubConMBMSExtensionParamSet::SetOperationType(CSubConMBMSExtensionParamSet::TOperationType aOperationType)
       
   418 /** Sets the MBMS Extension Set Operation Type
       
   419 @param aOperationType value 
       
   420 */
       
   421 	{
       
   422 	iOperationType = aOperationType;
       
   423 	}
       
   424 
       
   425 } // namespace ConnectionServ
       
   426 
       
   427 #endif	// __MBMSPARAMS_INL__