telephonyutils/dial/src/DIALLOC.CPP
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-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 #include <dial.h>
       
    17 
       
    18 /** 
       
    19 @file
       
    20 @publishedAll
       
    21 @deprecated 9.1
       
    22 */
       
    23 
       
    24 /**
       
    25 Creates an empty TDialLocation.
       
    26 @deprecated 9.1
       
    27 */
       
    28 EXPORT_C TDialLocation::TDialLocation()
       
    29 	:
       
    30 	iFlags(0),
       
    31 	iPauseAfterDialout(1)
       
    32 	{}
       
    33 
       
    34 /**
       
    35 Creates a TDialLocation containing the parameters.
       
    36 
       
    37 @param aIntlPrefCode International Prefix Code. E.g. for the UK this is 00
       
    38 @param aNatPrefCode National Prefix Code.  E.g. for the UK this is 44
       
    39 @param aNatCode National Code. E.g. within the UK this is 0
       
    40 @param aAreaCode Area Code. E.g. for London this is 20
       
    41 @param aDialOutLocalCode Local Dial Out Code.  
       
    42        Sometimes, the dial out codes differ depending upon 
       
    43        whether dialling a local call or a long distance call.
       
    44        Typically ‘8’ or ‘9’ is used.
       
    45 @param aDialOutLongDistanceCode Long Distance Dial-Out Code.
       
    46 @param aDisableCallWaitingCode This is the code to disable Call Waiting
       
    47 @param aFlags Flags to set various options.  It should contain the following flags: 
       
    48        KPhoneNumberMobile, 
       
    49        KPhoneNumberUsePulseDial, 
       
    50        KPhoneNumberPbxUsePulseDial, 
       
    51        KPhoneNumberWaitForDialingTone, 
       
    52        KPhoneNumberWaitForProceedTone, 
       
    53        KReturnPhoneNumberWithPlusFormat
       
    54 @param aPauseAfterDialout Specified the delay after dial out. 
       
    55        In the dial string the delay is represented as a 
       
    56        comma character. This parameter indicates the 
       
    57        length of the comma character.
       
    58 
       
    59 @deprecated 9.1
       
    60 */
       
    61 EXPORT_C TDialLocation::TDialLocation(
       
    62 	const TIntlPrefCode& aIntlPrefCode,
       
    63 	const TNatPrefCode& aNatPrefCode,
       
    64 	const TNatCode& aNatCode,
       
    65 	const TAreaCode& aAreaCode,
       
    66 	const TDialOutLocalCode& aDialOutLocalCode,
       
    67 	const TDialOutLongDistanceCode& aDialOutLongDistanceCode,
       
    68 	const TDisableCallWaitingCode& aDisableCallWaitingCode,
       
    69 	TUint aFlags,
       
    70 	TUint aPauseAfterDialout )
       
    71 	:
       
    72 	iIntlPrefCode(aIntlPrefCode),
       
    73 	iNatPrefCode(aNatPrefCode),
       
    74 	iNatCode(aNatCode),
       
    75 	iAreaCode(aAreaCode),
       
    76 	iDialOutLocalCode(aDialOutLocalCode),
       
    77 	iDialOutLongDistanceCode(aDialOutLongDistanceCode),
       
    78 	iDisableCallWaitingCode(aDisableCallWaitingCode),
       
    79 	iFlags(aFlags),
       
    80 	iPauseAfterDialout(aPauseAfterDialout)
       
    81 	{}
       
    82 
       
    83 /**
       
    84 Set the International Prefix Code. E.g. for the UK this is 00
       
    85 @deprecated 9.1
       
    86 */
       
    87 EXPORT_C void TDialLocation::SetIntlPrefCode(const TDesC& aIntlPrefCode){iIntlPrefCode.Copy(aIntlPrefCode);}
       
    88 /**
       
    89 Set the National Prefix Code.  E.g. for the UK this is 44
       
    90 @deprecated 9.1
       
    91 */
       
    92 EXPORT_C void TDialLocation::SetNatPrefCode(const TDesC& aNatPrefCode){iNatPrefCode.Copy(aNatPrefCode);}
       
    93 /**
       
    94 Set the National Code. E.g. within the UK this is 0
       
    95 @deprecated 9.1
       
    96 */
       
    97 EXPORT_C void TDialLocation::SetNatCode(const TDesC& aNatCode){iNatCode.Copy(aNatCode);}
       
    98 /**
       
    99 Set the Area Code. E.g. for London this is 20
       
   100 @deprecated 9.1
       
   101 */
       
   102 EXPORT_C void TDialLocation::SetAreaCode(const TDesC& aAreaCode){iAreaCode.Copy(aAreaCode);}
       
   103 /**
       
   104 Set the Local Dial Out Code.  Sometimes, the dial out codes differ depending upon whether dialling a local call or a long distance call. Typically ‘8’ or ‘9’ is used.
       
   105 @deprecated 9.1
       
   106 */
       
   107 EXPORT_C void TDialLocation::SetDialOutLocalCode(const TDesC& aDialOutLocalCode){iDialOutLocalCode.Copy(aDialOutLocalCode);}
       
   108 /**
       
   109 Set the Long Distance Code.
       
   110 @deprecated 9.1
       
   111 */
       
   112 EXPORT_C void TDialLocation::SetDialOutLongDistanceCode(const TDesC& aDialOutLongDistanceCode){iDialOutLongDistanceCode.Copy(aDialOutLongDistanceCode);}
       
   113 /**
       
   114 Set the code to disable Call Waiting
       
   115 @deprecated 9.1
       
   116 */
       
   117 EXPORT_C void TDialLocation::SetDisableCallWaitingCode(const TDesC& aDisableCallWaitingCode){iDisableCallWaitingCode.Copy(aDisableCallWaitingCode);}
       
   118 /**
       
   119 Set the location flags.  Any of the following flags can be set:
       
   120 
       
   121 KPhoneNumberMobile
       
   122 
       
   123 KPhoneNumberUsePulseDial
       
   124 
       
   125 KPhoneNumberPbxUsePulseDial
       
   126 
       
   127 KPhoneNumberWaitForDialingTone
       
   128 
       
   129 KPhoneNumberWaitForProceedTone
       
   130 
       
   131 KReturnPhoneNumberWithPlusFormat
       
   132 
       
   133 @deprecated 9.1
       
   134 */
       
   135 EXPORT_C void TDialLocation::SetDialLocationFlags (TUint aFlags) { iFlags |= aFlags;}
       
   136 /**
       
   137 Set the delay after dial out. In the dial string the delay is represented as a comma character. This parameter indicates the length of the comma character.
       
   138 @deprecated 9.1
       
   139 */
       
   140 EXPORT_C void TDialLocation::SetPauseAfterDialout ( TUint aPauseAfterDialout) { iPauseAfterDialout=aPauseAfterDialout;}
       
   141 
       
   142 /**
       
   143 Returns the International Prefix Code. E.g. for the UK this is 00
       
   144 @deprecated 9.1
       
   145 */
       
   146 EXPORT_C TPtrC TDialLocation::IntlPrefCode() const {return TPtrC(iIntlPrefCode);}
       
   147 /**
       
   148 Returns the National Prefix Code.  E.g. for the UK this is 44
       
   149 @deprecated 9.1
       
   150 */
       
   151 EXPORT_C TPtrC TDialLocation::NatPrefCode() const {return TPtrC(iNatPrefCode);}
       
   152 /**
       
   153 Returns the National Code. E.g. within the UK this is 0
       
   154 @deprecated 9.1
       
   155 */
       
   156 EXPORT_C TPtrC TDialLocation::NatCode() const{return TPtrC(iNatCode);}
       
   157 /**
       
   158 Returns the Area Code. E.g. for London this is 20
       
   159 @deprecated 9.1
       
   160 */
       
   161 EXPORT_C TPtrC TDialLocation::AreaCode() const{return TPtrC(iAreaCode);}
       
   162 /**
       
   163 Returns the Local Dial-Out Code.  Sometimes, the dial out codes differ depending upon whether dialling a local call or a long distance call. Typically ‘8’ or ‘9’ is used.
       
   164 @deprecated 9.1
       
   165 */
       
   166 EXPORT_C TPtrC TDialLocation::DialOutLocalCode() const{return TPtrC(iDialOutLocalCode);}
       
   167 /**
       
   168 Returns the Long Distance Dial-Out Code.
       
   169 @deprecated 9.1
       
   170 */
       
   171 EXPORT_C TPtrC TDialLocation::DialOutLongDistanceCode() const{return TPtrC(iDialOutLongDistanceCode);}
       
   172 /**
       
   173 Returns the code to disable Call Waiting
       
   174 @deprecated 9.1
       
   175 */
       
   176 EXPORT_C TPtrC TDialLocation::DisableCallWaitingCode() const{return TPtrC(iDisableCallWaitingCode);}
       
   177 /**
       
   178 Returns the delay after dial out. In the dial string the delay is represented as a comma character. This parameter indicates the length of the comma character.
       
   179 @deprecated 9.1
       
   180 */
       
   181 EXPORT_C TInt  TDialLocation::PauseAfterDialout () const{return iPauseAfterDialout ;}
       
   182 /**
       
   183 True if the KPhoneNumberMobile flag is set
       
   184 @deprecated 9.1
       
   185 */
       
   186 EXPORT_C TBool TDialLocation::IsMobile () const {return(iFlags & KPhoneNumberMobile);}
       
   187 /**
       
   188 True if the KPhoneNumberUsePulseDial flag is set
       
   189 @deprecated 9.1
       
   190 */
       
   191 EXPORT_C TBool TDialLocation::IsUsePulseDial () const{return(iFlags & KPhoneNumberUsePulseDial);}
       
   192 /**
       
   193 True if the KPhoneNumberPbxUsePulseDial flag is set
       
   194 @deprecated 9.1
       
   195 */
       
   196 EXPORT_C TBool TDialLocation::IsPbxUsePulseDial () const {return(iFlags & KPhoneNumberPbxUsePulseDial);}
       
   197 /**
       
   198 True if the KPhoneNumberWaitForDialingTone flag is set
       
   199 @deprecated 9.1
       
   200 */
       
   201 EXPORT_C TBool TDialLocation::IsWaitForDialingTone () const {return(iFlags & KPhoneNumberWaitForDialingTone);}
       
   202 /**
       
   203 True if the KPhoneNumberWaitForProceedTone flag is set
       
   204 @deprecated 9.1
       
   205 */
       
   206 EXPORT_C TBool TDialLocation::IsWaitForProceedTone () const{return(iFlags & KPhoneNumberWaitForProceedTone);}
       
   207 /**
       
   208 True if call waiting is disabled.  If no code was supplied to disable call waiting then false is returned.
       
   209 @deprecated 9.1
       
   210 */
       
   211 EXPORT_C TBool TDialLocation::IsDisableCallWaitingCode() const 
       
   212 	{
       
   213 	return (iDisableCallWaitingCode.Length()) ;
       
   214 	}
       
   215 /**
       
   216 True if a code is needed to dial out either local or long distance calls.
       
   217 @deprecated 9.1
       
   218 */
       
   219 EXPORT_C TBool TDialLocation::IsDialOutRequired() const 
       
   220 	{
       
   221 	return ( iDialOutLocalCode.Length() ||
       
   222 		 iDialOutLongDistanceCode.Length() ) ;
       
   223 	}