cbsref/telephonyrefplugins/atltsy/atcommand/generic/src/ltsycallinformation.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
child 21 4814c5a49428
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 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 // This contains TLtsyCallInformation which store baseband related call information
       
    15 // 
       
    16 
       
    17 //system include
       
    18 
       
    19 //user include
       
    20 #include "ltsycallinformation.h"
       
    21 #include "ltsycommondefine.h"
       
    22 #include "mslogger.h"
       
    23 
       
    24 TLtsyCallInformation::TLtsyCallInformation()
       
    25 	{
       
    26 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::TLtsyCallInformation()"));
       
    27 	
       
    28 	iCallId = KLtsyErrorCallId;
       
    29 	iUsedInfo = ENotUsed;
       
    30 	iDirection = EUnknownDirection;
       
    31 	iCallState = EUnknownState;
       
    32 	iCallMode = EUnKnowCall;
       
    33 	iIsConference = EUnknownIsConference;
       
    34 	iTelNum = KNullDesC8;
       
    35 	iAddressType = -1;
       
    36 	iMobileName = KNullDesC8;
       
    37 	iIsEmergencyCall = EFalse;
       
    38 	}
       
    39 
       
    40 void TLtsyCallInformation::SetCallId(TInt aCallId)
       
    41 	{
       
    42 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetCallId()"));
       
    43 	LOGTEXT2(_L8("[Ltsy CallControl] aCallId = %d"), aCallId);
       
    44 	
       
    45 	ASSERT((aCallId >= KLtsyMinCallId) && (aCallId <= KLtsyMaxCallId));
       
    46 	
       
    47 	iCallId = aCallId;
       
    48 	}
       
    49 
       
    50 TInt TLtsyCallInformation::GetCallId() const
       
    51 	{
       
    52 	return iCallId;
       
    53 	}
       
    54 
       
    55 void TLtsyCallInformation::SetCallIdIsUsedInfo(TCallIdUsedInfo aUsedInfo)
       
    56 	{
       
    57 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetCallId()"));
       
    58 	LOGTEXT2(_L8("[Ltsy CallControl] aUsedInfo = %d"), aUsedInfo);
       
    59 	
       
    60 	iUsedInfo = aUsedInfo;
       
    61 	}
       
    62 
       
    63 TLtsyCallInformation::TCallIdUsedInfo TLtsyCallInformation::GetCallIdIsUsedInfo() const
       
    64 	{
       
    65 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetCallIdIsUsedInfo()"));
       
    66 	
       
    67 	return iUsedInfo;
       
    68 	}
       
    69 
       
    70 void TLtsyCallInformation::SetCallDirection(TDirectionCall aDirection)
       
    71 	{
       
    72 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetCallDirection()"));
       
    73 	LOGTEXT2(_L8("[Ltsy CallControl] aDirection = %d"), aDirection);
       
    74 	
       
    75 	iDirection = aDirection;
       
    76 	}
       
    77 
       
    78 TLtsyCallInformation::TDirectionCall TLtsyCallInformation::GetCallDirection() const
       
    79 	{
       
    80 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetCallDirection()"));
       
    81 	
       
    82 	return iDirection;
       
    83 	}
       
    84 
       
    85 void TLtsyCallInformation::SetCallState(TCallState aCallState)
       
    86 	{
       
    87 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetCallState()"));
       
    88 	LOGTEXT2(_L8("[Ltsy CallControl] aCallState = %d"), aCallState);
       
    89 	
       
    90 	iCallState = aCallState; 
       
    91 	}
       
    92 
       
    93 TLtsyCallInformation::TCallState TLtsyCallInformation::GetCallState() const
       
    94 	{
       
    95 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetCallState()"));
       
    96 	
       
    97 	return iCallState;
       
    98 	}
       
    99 
       
   100 void TLtsyCallInformation::SetCallMode(TCallMode aCallMode)
       
   101 	{
       
   102 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetCallMode()"));
       
   103 	LOGTEXT2(_L8("[Ltsy CallControl] aCallMode = %d"), aCallMode);
       
   104 	
       
   105 	iCallMode = aCallMode;
       
   106 	}
       
   107 
       
   108 TLtsyCallInformation::TCallMode TLtsyCallInformation::GetCallMode() const
       
   109 	{
       
   110 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetCallMode()"));
       
   111 	
       
   112 	return iCallMode;
       
   113 	}
       
   114 
       
   115 void TLtsyCallInformation::SetConferenceCall(TConferenceCall aConferenceCall)
       
   116 	{
       
   117 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetConferenceCall()"));
       
   118 	LOGTEXT2(_L8("[Ltsy CallControl] aConferenceCall = %d"), aConferenceCall);
       
   119 	
       
   120 	iIsConference = aConferenceCall;
       
   121 	}
       
   122 
       
   123 TLtsyCallInformation::TConferenceCall TLtsyCallInformation::GetConferenceCall() const
       
   124 	{
       
   125 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetConferenceCall()"));
       
   126 	
       
   127 	return iIsConference;
       
   128 	}
       
   129 
       
   130 void TLtsyCallInformation::SetMobileTelNum(const TDesC8& aTelNum)
       
   131 	{
       
   132 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetMobileTelNum()"));
       
   133 	
       
   134 	iTelNum.Copy(aTelNum.Left(iTelNum.MaxLength()));
       
   135 	}
       
   136 
       
   137 const TDesC8& TLtsyCallInformation::GetMobileTelNum() const
       
   138 	{
       
   139 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetMobileTelNum()"));
       
   140 	
       
   141 	return iTelNum;
       
   142 	}
       
   143 
       
   144 void TLtsyCallInformation::SetAddressType(TInt aAddressType)
       
   145 	{
       
   146 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetAddressType()"));
       
   147 	
       
   148 	iAddressType = aAddressType;
       
   149 	}
       
   150 
       
   151 TInt TLtsyCallInformation::GetAddressType() const
       
   152 	{
       
   153 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetAddressType()"));
       
   154 	
       
   155 	return iAddressType;
       
   156 	}
       
   157 
       
   158 void TLtsyCallInformation::SetMobileName(const TDesC8& aMobileName)
       
   159 	{
       
   160 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::SetMobileName()"));
       
   161 	
       
   162 	iMobileName.Copy(aMobileName.Left(iMobileName.MaxLength()));
       
   163 	}
       
   164 
       
   165 const TDesC8& TLtsyCallInformation::GetMobileName() const
       
   166 	{
       
   167 	LOGTEXT(_L8("[Ltsy CallControl] Starting TLtsyCallInformation::GetMobileName()"));
       
   168 	
       
   169 	return iMobileName;
       
   170 	}
       
   171 
       
   172 void TLtsyCallInformation::SetEmergencyCallFlag(TBool aIsEmergency)
       
   173 	{
       
   174 	iIsEmergencyCall = aIsEmergency;
       
   175 	}
       
   176 
       
   177 TBool TLtsyCallInformation::GetEmergencyCallFlag() const
       
   178 	{
       
   179 	return iIsEmergencyCall;
       
   180 	}
       
   181 
       
   182 //End of file