Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 1999-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Inline methods for operations on PDU elements
29 * Leaves with KErrGsmuDecoding.
31 inline void TGsmuLex8::LeaveL() const
33 User::Leave(KErrGsmuDecoding);
38 * Constructor, initialising the octet value with a TInt8.
40 * @param aValue Octet value
42 inline TSmsOctet::TSmsOctet(TUint8 aValue)
50 * Constructor, initialising the octet value with a TInt.
52 * @param aValue Octet value
54 inline TSmsOctet::TSmsOctet(TInt aValue)
55 :iValue(STATIC_CAST(TUint8, aValue))
61 * Sets the octet value to the next byte in TGsmuLex8 PDU.
63 * @param aPdu PDU to read value from
65 inline void TSmsOctet::DecodeL(TGsmuLex8& aPdu)
72 * @return The octet value
74 inline TSmsOctet::operator TInt() const
81 * Converts an integer to semi-octet format and set the object's data to this
84 * @param aNum Value to convert to semi-octet
86 inline void TSmsOctet::FillSemiOctets(TInt aNum)
88 *this=(aNum/10)|((aNum%10)<<4);
93 * Converts a semi-octet value to an integer.
95 * @return Object's data as an integer
97 inline TInt TSmsOctet::SemiOctetsToNum() const
99 return ((iValue&0x0F)*10) + ((iValue&0xF0)>>4);
104 * Internalises the object.
106 * @param aStream Stream to read from
108 inline void TSmsOctet::InternalizeL(RReadStream& aStream)
115 * Externalises the object.
117 * @param aStream Stream to write to
119 inline void TSmsOctet::ExternalizeL(RWriteStream& aStream) const
126 * Gets the error code.
130 inline TInt TSmsFailureCause::Error() const
137 * Sets the error code.
139 * @param aError Error code
141 inline void TSmsFailureCause::SetError(TSmsFailureCauseError aError)
143 iValue=(TUint8) aError;
150 * @return Status value
152 TSmsStatus::TSmsStatusValue TSmsStatus::Status() const
154 return (TSmsStatusValue) iValue;
161 * @param aValue Status value
163 inline void TSmsStatus::SetStatus(TSmsStatusValue aValue)
165 iValue=(TUint8) aValue;
172 * @return Command type
174 inline TInt TSmsCommandType::CommandType() const
183 * @param aType Command type
185 inline void TSmsCommandType::SetCommandType(TSmsCommandTypeValue aType)
187 iValue=(TUint8) aType;
192 * Tests if the extension flag is set.
194 * @return True if data contains a PID extension
196 inline TBool TSmsParameterIndicator::Extension() const
198 return iValue&ESmsPIDExtension;
203 * Sets extension flag.
205 * @param aExtension Extension flag
207 inline void TSmsParameterIndicator::SetExtension(TBool aExtension)
209 iValue=(TUint8) (aExtension? iValue|ESmsPIDExtension: (iValue&(~ESmsPIDExtension)));
214 * Tests user data present flag.
216 * @return True if User Data is indicated
218 inline TBool TSmsParameterIndicator::UserDataPresent() const
220 return iValue&ESmsPIDUserDataPresent;
225 * Sets user data present flag.
227 * @param aPresent Set to True/False to indicate/clear User Data
229 inline void TSmsParameterIndicator::SetUserDataPresent(TBool aPresent)
231 iValue=(TUint8) (aPresent? iValue|ESmsPIDUserDataPresent: iValue&(~ESmsPIDUserDataPresent));
236 * Tests data coding scheme present flag.
238 * @return True to indicate Data Coding Scheme present
240 inline TBool TSmsParameterIndicator::DataCodingSchemePresent() const
242 return iValue&ESmsPIDDataCodingSchemePresent;
247 * Sets data coding scheme present flag.
249 * @param aPresent Set to True/False to indicate/clear Data Coding Scheme present
251 inline void TSmsParameterIndicator::SetDataCodingSchemePresent(TBool aPresent)
253 iValue=(TUint8) (aPresent? iValue|ESmsPIDDataCodingSchemePresent: iValue&(~ESmsPIDDataCodingSchemePresent));
258 * Tests protocol identifier present flag.
260 * @return True to indicate Protocol ID present
262 inline TBool TSmsParameterIndicator::ProtocolIdentifierPresent() const
264 return iValue&ESmsPIDProtocolIdentifierPresent;
269 * Sets protocol identifier present flag.
271 * @param aPresent PSet to True/False to indicate/clear Protocol ID present
273 inline void TSmsParameterIndicator::SetProtocolIdentifierPresent(TBool aPresent)
275 iValue=(TUint8) (aPresent? iValue|ESmsPIDProtocolIdentifierPresent: iValue&(~ESmsPIDProtocolIdentifierPresent));
280 * Gets the Protocol ID type.
282 * @return Protocol ID type
284 inline TSmsProtocolIdentifier::TSmsPIDType TSmsProtocolIdentifier::PIDType() const
286 return (TSmsPIDType) (iValue&ESmsPIDTypeMask);
291 * Sets the Protocol ID type.
293 * @param aSmsPIDType Protocol ID type
295 inline void TSmsProtocolIdentifier::SetPIDType(TSmsPIDType aSmsPIDType)
297 iValue=(TUint8) aSmsPIDType;
302 * Gets bits 7 - 4 of the Data Coding Scheme.
304 * @return Bits 7 - 4 of the Data Coding Scheme
306 inline TSmsDataCodingScheme::TSmsDCSBits7To4 TSmsDataCodingScheme::Bits7To4() const
308 return (TSmsDCSBits7To4) (iValue&ESmsDCSBits7To4Mask);
313 * Sets bits 7 - 4 of the Data Coding Scheme.
315 * @param aBits7To4 Bits 7 - 4 of the Data Coding Scheme
317 inline void TSmsDataCodingScheme::SetBits7To4(TSmsDCSBits7To4 aBits7To4)
319 iValue=(TUint8) (aBits7To4);
324 * Constructor, specifying an octet value.
326 * @param aValue Octet value
328 inline TGsmSmsTypeOfAddress::TGsmSmsTypeOfAddress(TInt aValue)
335 * Constructor, specifying type of numbering and numbering plan identification.
337 * @param aTon Type of numbering
338 * @param aNPI Numbering plan identification
340 inline TGsmSmsTypeOfAddress::TGsmSmsTypeOfAddress(TGsmSmsTypeOfNumber aTon, TGsmSmsNumberingPlanIdentification aNPI)
341 : TSmsOctet(EGsmSmsFirstBitMask)
349 * Gets the type of numbering.
351 * @return Type of numbering
353 inline TGsmSmsTypeOfNumber TGsmSmsTypeOfAddress::TON() const
355 return (TGsmSmsTypeOfNumber) (iValue & EGsmSmsTONMask);
360 * Sets the type of numbering.
362 * @param aTON Type of numbering
364 inline void TGsmSmsTypeOfAddress::SetTON(TGsmSmsTypeOfNumber aTON)
366 iValue = (TUint8) ((iValue & (~EGsmSmsTONMask)) | aTON);
371 * Gets the numbering plan identification.
373 * @return Numbering plan identification
375 inline TGsmSmsNumberingPlanIdentification TGsmSmsTypeOfAddress::NPI() const
377 return (TGsmSmsNumberingPlanIdentification) (iValue & EGsmSmsNPIMask);
382 * Set the Numbering Plan Identification
384 inline void TGsmSmsTypeOfAddress::SetNPI(TGsmSmsNumberingPlanIdentification aNumberingPlanIdentification)
386 iValue = (TUint8) ((iValue &(~EGsmSmsNPIMask)) | aNumberingPlanIdentification);
393 inline TGsmSmsTelNumber::TGsmSmsTelNumber()
399 * Gets the time zone offset from GMT in +/- quarter hours.
400 * The allowed range is +/-79 per 23.040 V4.4.0 9.2.3.11.
402 * @return Time zone offset
404 inline TInt TSmsServiceCenterTimeStamp::TimeOffset() const
406 return iTimeZoneNumQuarterHours;
411 * Gets the Service Center Time in Universal Time.
413 * @return The Service Center Time
415 inline const TTime& TSmsServiceCenterTimeStamp::Time() const
422 * Sets the Service Center Time Stamp in Universal Time.
424 * @param aTime The Service Center Time
426 inline void TSmsServiceCenterTimeStamp::SetTime(const TTime& aTime)
433 * Gets the message Validity Period Format.
435 * @return The message Validity Period Format
437 inline TSmsFirstOctet::TSmsValidityPeriodFormat TSmsValidityPeriod::ValidityPeriodFormat() const
439 return (TSmsFirstOctet::TSmsValidityPeriodFormat) (iFirstOctet&TSmsFirstOctet::ESmsVPFMask);
444 * Sets the message Validity Period Format.
446 * @param aValidityPeriodFormat The message Validity Period Format
448 inline void TSmsValidityPeriod::SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat)
450 iFirstOctet=(iFirstOctet&(~TSmsFirstOctet::ESmsVPFMask)|aValidityPeriodFormat);
455 * Gets the message Validity Period in minutes.
457 * @return The message Validity Period in minutes
459 inline const TTimeIntervalMinutes& TSmsValidityPeriod::TimeIntervalMinutes() const
461 return iTimeIntervalMinutes;
466 * Sets the message Validity Period in minutes.
468 * @param aTimeIntervalMinutes The message Validity Period in minutes
470 inline void TSmsValidityPeriod::SetTimeIntervalMinutes(const TTimeIntervalMinutes& aTimeIntervalMinutes)
472 iTimeIntervalMinutes=aTimeIntervalMinutes;
477 * Resets the unconverted native character buffer.
479 inline void CSmsAlphabetConverter::ResetUnconvertedNativeCharacters()
481 iUnconvertedNativeCharactersPtr.Zero();
486 * Resets the unconverted user data elements buffer.
488 inline void CSmsAlphabetConverter::ResetUnconvertedUDElements()
490 iUnconvertedUDElementsPtr.Zero();
495 * Gets the unconverted native characters.
497 * @return Unconverted native characters
499 inline TPtrC CSmsAlphabetConverter::UnconvertedNativeCharacters()
501 return iUnconvertedNativeCharactersPtr;
506 * Gets the unconverted user data elements.
508 * @return Unconverted user data elements
510 inline TPtrC8 CSmsAlphabetConverter::UnconvertedUDElements()
512 return iUnconvertedUDElementsPtr;
517 * Gets the coding scheme alphabet.
519 * @return Coding scheme alphabet
521 inline TSmsDataCodingScheme::TSmsAlphabet CSmsAlphabetConverter::Alphabet() const
531 inline CSmsInformationElement::CSmsInformationElement(TSmsInformationElementIdentifier aInformationElementIdentifier):iIdentifier(aInformationElementIdentifier)
537 * Gets the number of information elements.
539 * @return Number of information elements
541 inline TInt CSmsUserData::NumInformationElements() const
543 return iInformationElementArray.Count();
548 * @return The number of Command Information Elements
552 inline TInt CSmsCommandData::NumInformationElements() const
554 return iInformationElementArray.Count();
559 * @return The amount of space in the Command buffer
563 inline TInt CSmsCommandData::MaxDataLength() const
565 return KSmsMaxDataSize-iBuffer->Des().Length();