smsprotocols/smsstack/gsmu/inc/gsmupdu.h
author ivan.fildichev@opencode.com
Thu, 04 Nov 2010 20:30:45 +0200
branchopencode
changeset 85 96b4f933d69a
parent 24 6638e7f4bd8f
permissions -rw-r--r--
Bugfixes and added new tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     1
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     2
// All rights reserved.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     3
// This component and the accompanying materials are made available
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     5
// which accompanies this distribution, and is available
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     7
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     8
// Initial Contributors:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
     9
// Nokia Corporation - initial contribution.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    10
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    11
// Contributors:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    12
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    13
// Description:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    14
// Contains a class representing the generic interface to a GSM SMS PDU (CSmsPDU) as well as six concrete implementations representing the six types of CSmsPDU, namely CSmsDeliver, CSmsSubmit, CSmsDeliverReport, CSmsSubmitReport, CSmsStatusReport and CSmsCommand
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    15
// 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    16
//
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    17
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    18
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    19
 @file
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    20
*/
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    21
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    22
#ifndef __GSMUPDU_H__
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    23
#define __GSMUPDU_H__
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    24
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    25
#include <gsmuelem.h>
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    26
// forwarded class declarations
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    27
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    28
class TGsmSms;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    29
class CSmsAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    30
struct TEncodeParams;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    31
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    32
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    33
 *  A generic interface to a GSM SMS PDU.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    34
 *  
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    35
 *  The class can be used on its own to encode GSM SMS PDUs. It is also the base
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    36
 *  class for the six real implementations of GSM SMS PDUs. The derived classes
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    37
 *  are built up from the elements defined in gsmuelem.h according to the ETSI
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    38
 *  GSM 03.40. All the SMS elements have generic encode and decode functions so
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    39
 *  that each PDU type knows how to encode and decode itself into a TGsmSms.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    40
 *  
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    41
 *  CSmsPDU and derived classes provide a human readable interface to a GSM SMS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    42
 *  PDU, for example setting the destination address on a SUBMIT (CSmsSubmit).
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    43
 *  All the factory functions for CSmsPDUs are provided in the base class.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    44
 *  
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    45
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    46
 *  @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    47
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    48
class CSmsPDU : public CBase
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    49
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    50
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    51
//note the enum values must be kept to ensure future binary compatibility with the TSAREntry store.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    52
/** Flags for the 6 basic PDU types in GSM SMS messaging. */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    53
	enum TSmsPDUType
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    54
		{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    55
		ESmsDeliver       = 0, //< SMS-DELIVER, sent from SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    56
		ESmsDeliverReport = 1, //< SMS-DELIVER-REPORT, sent from MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    57
		ESmsSubmit        = 2, //< SMS-SUBMIT, sent from MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    58
		ESmsSubmitReport  = 3, //< SMS-SUBMIT-REPORT, sent from SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    59
		ESmsStatusReport  = 4, //< SMS-STATUS-REQUEST, sent from SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    60
		ESmsCommand       = 5  //< SMS-COMMAND, sent from MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    61
		};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    62
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    63
	IMPORT_C static CSmsPDU* NewL(RReadStream &aStream,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    64
	IMPORT_C static CSmsPDU* NewL(const TGsmSms& aGsmSms,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError=EFalse,TBool aIsMobileTerminated=ETrue);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    65
	IMPORT_C static CSmsPDU* NewL(TSmsPDUType aType,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError=EFalse);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    66
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    67
	inline TSmsPDUType Type() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    68
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    69
	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    70
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    71
	IMPORT_C void EncodeMessagePDUL(TGsmSms& aGsmSms) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    72
	void EncodeMessagePDUL(TGsmSms& aGsmSms, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    73
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    74
	IMPORT_C TPtrC ServiceCenterAddress() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    75
	IMPORT_C void SetServiceCenterAddressL(const TDesC& aAddress);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    76
	IMPORT_C void ParsedServiceCenterAddress(TGsmSmsTelNumber& aParsedAddress) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    77
	IMPORT_C void SetParsedServiceCenterAddressL(const TGsmSmsTelNumber& aParsedAddress);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    78
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    79
	IMPORT_C TPtrC ToFromAddress() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    80
	IMPORT_C void SetToFromAddressL(const TDesC& aAddress);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    81
	IMPORT_C void ParsedToFromAddress(TGsmSmsTelNumber& aParsedAddress) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    82
	IMPORT_C void SetParsedToFromAddressL(const TGsmSmsTelNumber& aParsedAddress);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    83
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    84
//  Functions on data coding scheme
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    85
//  The functions available are dependant on bits 7 to 4 in the data coding scheme.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    86
//  Functions panic when they are not available.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    87
//  This requires the caller to have some knowledge of ETSI GSM 03.38 in order to keep the data coding scheme in a consistent state.
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    88
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    89
	IMPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4 Bits7To4() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    90
	IMPORT_C void SetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4 aBits7To4);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    91
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    92
	IMPORT_C TSmsDataCodingScheme::TSmsAlphabet Alphabet() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    93
	IMPORT_C void SetAlphabet(TSmsDataCodingScheme::TSmsAlphabet aAlphabet);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    94
	IMPORT_C TBool Class(TSmsDataCodingScheme::TSmsClass& aClass) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    95
	IMPORT_C void SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    96
	IMPORT_C TBool TextCompressed() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    97
	IMPORT_C void SetTextCompressed(TBool aCompressed);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    98
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
    99
	IMPORT_C TSmsDataCodingScheme::TSmsIndicationState IndicationState() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   100
	IMPORT_C void SetIndicationState(TSmsDataCodingScheme::TSmsIndicationState aState);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   101
	IMPORT_C TSmsDataCodingScheme::TSmsIndicationType IndicationType() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   102
	IMPORT_C void SetIndicationType(TSmsDataCodingScheme::TSmsIndicationType aType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   103
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   104
//  Functions on concatenation user data information element
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   105
	IMPORT_C TBool TextConcatenated(TBool* aIs16Bit=NULL) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   106
	IMPORT_C void SetTextConcatenatedL(TBool aConcatenated,TBool aIs16Bit=EFalse);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   107
	IMPORT_C TInt ConcatenatedMessageReference() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   108
	IMPORT_C void SetConcatenatedMessageReference(TInt aReference);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   109
	IMPORT_C TInt NumConcatenatedMessagePDUs() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   110
	IMPORT_C void SetNumConcatenatedMessagePDUs(TInt aNum);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   111
	IMPORT_C TInt ConcatenatedMessagePDUIndex() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   112
	IMPORT_C void SetConcatenatedMessagePDUIndex(TInt aIndex);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   113
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   114
//  Functions for application port addressing
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   115
	IMPORT_C TBool ApplicationPortAddressing(TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit=NULL) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   116
	IMPORT_C void SetApplicationPortAddressingL(TBool aAddressing,TInt aDestination,TInt aOriginator,TBool aIs16Bit=EFalse);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   117
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   118
//  Functions on protocol identifier
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   119
	IMPORT_C TSmsProtocolIdentifier::TSmsPIDType PIDType() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   120
	IMPORT_C void SetPIDType(TSmsProtocolIdentifier::TSmsPIDType aSmsPIDType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   121
	IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator TelematicDeviceIndicator() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   122
	IMPORT_C void SetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator aIndicator);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   123
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   124
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   125
	//-- concern 'ShortMessageType'
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   126
	IMPORT_C TSmsProtocolIdentifier::TSmsShortMessageType ShortMessageType() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   127
	IMPORT_C void SetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType aShortMessageType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   128
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   129
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   130
	IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceType TelematicDeviceType() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   131
	IMPORT_C void SetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType aDeviceType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   132
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   133
//  Functions on parameter indicator
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   134
	IMPORT_C TBool UserDataPresent() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   135
	IMPORT_C void SetUserDataPresent(TBool aPresent);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   136
	IMPORT_C TBool DataCodingSchemePresent() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   137
	IMPORT_C void SetDataCodingSchemePresent(TBool aPresent);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   138
	IMPORT_C TBool ProtocolIdentifierPresent() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   139
	IMPORT_C void SetProtocolIdentifierPresent(TBool aPresent);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   140
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   141
	IMPORT_C CSmsUserData& UserData();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   142
	IMPORT_C const CSmsUserData& UserData() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   143
	virtual void DecodeL(TGsmuLex8& aPdu)=0;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   144
	void UpdateConcatenationDataL(TInt aRef, TInt aPduIndex, TInt aMaxPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   145
	void UpdateEmailHeaderDataL(TInt& aEmailOverallHeaderLength);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   146
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   147
	//	SMSC Control Parameters
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   148
	TBool UpdateSMSCCtrlParameterL(const TUint8 aOctet);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   149
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   150
	//	TPSRR Scheme
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   151
	TBool UpdateTPSRRL(TSmsFirstOctet aSmsReportRequest);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   152
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   153
	//  National Language Encoding
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   154
	IMPORT_C TSmsEncoding NationalLanguageEncoding() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   155
	IMPORT_C void SetNationalLanguageEncodingL(TSmsEncoding aEncoding);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   156
		
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   157
	IMPORT_C CSmsPDU* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   158
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   159
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   160
	CSmsPDU(TSmsPDUType aSmsPDUType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   161
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   162
	virtual const TSmsDataCodingScheme* DataCodingScheme() const;  // Functions made const to avoid too many definitions
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   163
	virtual const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   164
	virtual const TSmsParameterIndicator* ParameterIndicator() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   165
	virtual const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   166
	virtual const CSmsAddress* ToFromAddressPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   167
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   168
	virtual void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs)=0;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   169
	virtual TUint8* EncodeL(TUint8* aPtr) const=0;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   170
	virtual TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const=0;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   171
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   172
	virtual void InternalizeMessagePDUL(RReadStream& aStream)=0;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   173
	virtual void ExternalizeMessagePDUL(RWriteStream& aStream) const=0;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   174
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   175
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   176
	TBool DoTextConcatenated(TInt& aIndex,TBool* aIs16Bit) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   177
	void DoSetTextConcatenatedL(TBool aIs16Bit);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   178
	TBool DoApplicationPortAddressing(TInt& aIndex,TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   179
	void DoSetApplicationPortAddressingL(TInt aDestination,TInt aOriginator,TBool aIs16Bit);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   180
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   181
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   182
	const TSmsPDUType iSmsPDUType;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   183
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   184
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   185
	CSmsAddress* iServiceCenterAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   186
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   187
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   188
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   189
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   190
 *  SMS-DELIVER PDU - SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   191
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   192
 *  @released
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   193
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   194
class CSmsDeliver : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   195
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   196
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   197
	 CSmsDeliver();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   198
	~CSmsDeliver();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   199
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   200
	IMPORT_C TBool MoreMessagesToSend() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   201
	IMPORT_C void SetMoreMessagesToSend(TBool aMore);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   202
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   203
	IMPORT_C TBool ReplyPath() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   204
	IMPORT_C void SetReplyPath(TBool aReplyPath);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   205
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   206
	IMPORT_C TBool StatusReportIndication() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   207
	IMPORT_C void SetStatusReportIndication(TBool aIndication);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   208
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   209
	IMPORT_C void ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   210
	IMPORT_C void SetServiceCenterTimeStamp(const TTime& aTime,TInt aNumQuarterHours=0);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   211
	IMPORT_C const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   212
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   213
	IMPORT_C CSmsDeliver* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   214
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   215
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   216
	const TSmsDataCodingScheme* DataCodingScheme() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   217
	const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   218
	const CSmsAddress* ToFromAddressPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   219
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   220
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   221
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   222
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   223
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   224
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   225
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   226
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   227
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   228
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   229
	CSmsAddress* iOriginalAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   230
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   231
	TSmsDataCodingScheme iDataCodingScheme;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   232
	TSmsServiceCenterTimeStamp iServiceCenterTimeStamp;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   233
	CSmsUserData* iUserData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   234
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   235
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   236
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   237
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   238
 *  SMS-SUBMIT PDU - MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   239
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   240
 *  @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   241
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   242
class CSmsSubmit : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   243
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   244
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   245
	CSmsSubmit();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   246
	~CSmsSubmit();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   247
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   248
	IMPORT_C TBool RejectDuplicates() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   249
	IMPORT_C void SetRejectDuplicates(TBool aRejectDuplicates);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   250
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   251
	IMPORT_C TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   252
	IMPORT_C void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   253
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   254
	IMPORT_C TBool ReplyPath() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   255
	IMPORT_C void SetReplyPath(TBool aReplyPath);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   256
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   257
	IMPORT_C TBool StatusReportRequest() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   258
	IMPORT_C void SetStatusReportRequest(TBool aRequest);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   259
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   260
	IMPORT_C TInt MessageReference() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   261
	IMPORT_C void SetMessageReference(TInt aMessageReference);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   262
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   263
	IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   264
	IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aTimeIntervalMinutes);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   265
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   266
	IMPORT_C CSmsSubmit* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   267
	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   268
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   269
	const TSmsDataCodingScheme* DataCodingScheme() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   270
	const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   271
	const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   272
	const CSmsAddress* ToFromAddressPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   273
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   274
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   275
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   276
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   277
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   278
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   279
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   280
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   281
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   282
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   283
	TSmsOctet iMessageReference;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   284
	CSmsAddress* iDestinationAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   285
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   286
	TSmsDataCodingScheme iDataCodingScheme;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   287
	TSmsValidityPeriod iValidityPeriod;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   288
	CSmsUserData* iUserData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   289
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   290
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   291
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   292
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   293
 *  SMS-DELIVER-REPORT PDU - MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   294
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   295
 *  @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   296
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   297
class CSmsDeliverReport : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   298
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   299
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   300
	CSmsDeliverReport(TBool aIsRPError=EFalse);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   301
	~CSmsDeliverReport();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   302
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   303
	inline TBool IsRPError() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   304
	inline void SetIsRPError(TBool aIsRPError);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   305
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   306
	IMPORT_C TInt FailureCause() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   307
	IMPORT_C void SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   308
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   309
	IMPORT_C CSmsDeliverReport* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   310
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   311
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   312
	const TSmsDataCodingScheme* DataCodingScheme() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   313
	const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   314
	const TSmsParameterIndicator* ParameterIndicator() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   315
	const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   316
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   317
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   318
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   319
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   320
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   321
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   322
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   323
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   324
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   325
	TUint8 iIsRPError;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   326
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   327
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   328
	TSmsFailureCause iFailureCause;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   329
	TSmsParameterIndicator iParameterIndicator;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   330
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   331
	TSmsDataCodingScheme iDataCodingScheme;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   332
	CSmsUserData* iUserData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   333
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   334
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   335
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   336
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   337
 *  SMS-SUBMIT-REPORT PDU - SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   338
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   339
 *   @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   340
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   341
class CSmsSubmitReport : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   342
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   343
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   344
	CSmsSubmitReport(TBool aIsRPError=EFalse);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   345
	~CSmsSubmitReport();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   346
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   347
	inline TBool IsRPError() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   348
	inline void SetIsRPError(TBool aIsRPError);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   349
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   350
	IMPORT_C TInt FailureCause() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   351
	IMPORT_C void SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   352
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   353
	IMPORT_C CSmsSubmitReport* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   354
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   355
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   356
	const TSmsDataCodingScheme* DataCodingScheme() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   357
	const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   358
	const TSmsParameterIndicator* ParameterIndicator() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   359
	const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   360
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   361
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   362
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   363
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   364
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   365
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   366
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   367
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   368
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   369
	TUint8 iIsRPError;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   370
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   371
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   372
	TSmsFailureCause iFailureCause;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   373
	TSmsParameterIndicator iParameterIndicator;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   374
	TSmsServiceCenterTimeStamp iServiceCenterTimeStamp;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   375
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   376
	TSmsDataCodingScheme iDataCodingScheme;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   377
	CSmsUserData* iUserData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   378
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   379
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   380
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   381
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   382
 *  SMS-STATUS-REPORT PDU - SC to MS
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   383
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   384
 *  @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   385
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   386
class CSmsStatusReport : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   387
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   388
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   389
	CSmsStatusReport();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   390
	~CSmsStatusReport();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   391
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   392
	inline TBool ParameterIndicatorPresent() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   393
	inline void SetParameterIndicatorPresent(TBool aPresent);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   394
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   395
	IMPORT_C TBool MoreMessagesToSend() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   396
	IMPORT_C void SetMoreMessagesToSend(TBool aMore);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   397
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   398
	IMPORT_C TSmsFirstOctet::TSmsStatusReportQualifier StatusReportQualifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   399
	IMPORT_C void SetStatusReportQualifier(TSmsFirstOctet::TSmsStatusReportQualifier aQualifier);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   400
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   401
	IMPORT_C TInt MessageReference() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   402
	IMPORT_C void SetMessageReference(TInt aMessageReference);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   403
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   404
	IMPORT_C void ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   405
	IMPORT_C void SetServiceCenterTimeStamp(const TTime& aTime,TInt& aNumQuarterHours);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   406
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   407
	IMPORT_C void DischargeTime(TTime& aTime,TInt& aNumQuarterHours);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   408
	IMPORT_C void SetDischargeTime(const TTime& aTime,TInt& aNumQuarterHours);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   409
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   410
	IMPORT_C TSmsStatus::TSmsStatusValue Status() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   411
	IMPORT_C void SetStatus(TSmsStatus::TSmsStatusValue aValue);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   412
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   413
	IMPORT_C CSmsStatusReport* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   414
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   415
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   416
	const TSmsDataCodingScheme* DataCodingScheme() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   417
	const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   418
	const TSmsParameterIndicator* ParameterIndicator() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   419
	const CSmsUserData* UserDataPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   420
	const CSmsAddress* ToFromAddressPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   421
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   422
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   423
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   424
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   425
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   426
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   427
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   428
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   429
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   430
	TUint8 iParameterIndicatorPresent;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   431
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   432
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   433
	TSmsOctet iMessageReference;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   434
	CSmsAddress* iRecipientAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   435
	TSmsServiceCenterTimeStamp iServiceCenterTimeStamp;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   436
	TSmsServiceCenterTimeStamp iDischargeTime;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   437
	TSmsStatus iStatus;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   438
	TSmsParameterIndicator iParameterIndicator;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   439
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   440
	TSmsDataCodingScheme iDataCodingScheme;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   441
	CSmsUserData* iUserData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   442
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   443
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   444
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   445
/**
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   446
 *  SMS-COMMAND PDU - MS to SC
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   447
 *  @publishedAll
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   448
 *  @released 
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   449
 */
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   450
class CSmsCommand : public CSmsPDU
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   451
	{
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   452
public:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   453
	CSmsCommand();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   454
	~CSmsCommand();
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   455
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   456
	IMPORT_C TBool StatusReportRequest() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   457
	IMPORT_C void SetStatusReportRequest(TBool aRequest);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   458
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   459
	IMPORT_C TInt MessageReference() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   460
	IMPORT_C void SetMessageReference(TInt aMessageReference);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   461
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   462
	IMPORT_C TInt CommandType() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   463
	IMPORT_C void SetCommandType(TSmsCommandType::TSmsCommandTypeValue aCommandType);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   464
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   465
	IMPORT_C TInt MessageNumber() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   466
	IMPORT_C void SetMessageNumber(TInt aMessageNumber);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   467
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   468
	IMPORT_C TInt NumInformationElements() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   469
	IMPORT_C CSmsInformationElement& InformationElement(TInt aIndex) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   470
	         CSmsInformationElement*& InformationElementPtr(TInt aIndex) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   471
	IMPORT_C TBool InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   472
		TInt& aIndex) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   473
	IMPORT_C void AddInformationElementL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, TDesC8& aData);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   474
	IMPORT_C void RemoveInformationElement(TInt aIndex);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   475
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   476
	IMPORT_C TInt MaxCommandDataLength() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   477
	IMPORT_C TPtrC8 CommandData() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   478
	IMPORT_C void SetCommandDataL(const TDesC8& aData);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   479
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   480
	IMPORT_C CSmsCommand* DuplicateL() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   481
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   482
protected:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   483
	const TSmsProtocolIdentifier* ProtocolIdentifier() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   484
	const CSmsAddress* ToFromAddressPtr() const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   485
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   486
	void ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   487
	TUint8* EncodeL(TUint8* aPtr) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   488
	TUint8* EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const;	
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   489
	void DecodeL(TGsmuLex8& aPdu);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   490
	void InternalizeMessagePDUL(RReadStream& aStream);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   491
	void ExternalizeMessagePDUL(RWriteStream& aStream) const;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   492
	void DoSetStatusReportRequest(TBool aRequest);
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   493
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   494
private:
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   495
	TSmsFirstOctet iFirstOctet;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   496
	TSmsOctet iMessageReference;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   497
	TSmsProtocolIdentifier iProtocolIdentifier;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   498
	TSmsCommandType	iCommandType;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   499
	TSmsOctet iMessageNumber;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   500
	CSmsAddress* iDestinationAddress;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   501
	CSmsCommandData* iCommandData;
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   502
	};
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   503
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   504
#include "gsmupdu.inl"
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   505
6638e7f4bd8f opencode
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents: 20
diff changeset
   506
#endif // !defined __GSMUPDU_H__