1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/gsmunonieoperations.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,150 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This file defines the container class CSmsNonIEOperation and its specialisations.
1.18 +// The classes provide interfaces that allow the client to operate on a number
1.19 +// of features which are not associated with Information Elements.
1.20 +//
1.21 +//
1.22 +
1.23 +
1.24 +
1.25 +/**
1.26 + @file
1.27 +*/
1.28 +
1.29 +#ifndef __GSMUNONIEOPERATIONS_
1.30 +#define __GSMUNONIEOPERATIONS_
1.31 +
1.32 +
1.33 +#include <e32base.h>
1.34 +#include <gsmumsg.h>
1.35 +#include <gsmuelem.h>
1.36 +
1.37 +/**
1.38 + * SMS Stack clients use specialisations of this class to configure a SMS Message with parameters which are not
1.39 + * a type of Information Element.
1.40 + *
1.41 + * Each parameter that uses this interface is supported by a class derived from CSmsNonIEOperation.
1.42 + * The derived class operates on the CSmsMessage, allowing the client to add, remove and access these parameters
1.43 + * inside the CSmsMessage.
1.44 + *
1.45 + * The client gets access to an operations class using the following interface:
1.46 + *
1.47 + * CSmsNonIEOperation& CSmsMessage::GetOperationsForNonIEL(TSmsNonIEIdentifier aId);
1.48 + *
1.49 + * When the CSmsMessage is deleted, all its associated CSmsNonIEOperations classes are also deleted and references to
1.50 + * them become stale. Each instance of the CSmsNonIEOperation Class is an attribute of the CSmsMessage itself.
1.51 + *
1.52 + * @publishedAll
1.53 + */
1.54 +class CSmsNonIEOperation : public CBase
1.55 +{
1.56 +public:
1.57 + static CSmsNonIEOperation* NewL(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
1.58 + IMPORT_C TSmsNonIEIdentifier Id() const;
1.59 + virtual ~CSmsNonIEOperation(){};
1.60 +protected:
1.61 + virtual TBool MessageTypeSupported() const;
1.62 + virtual void ValidateOperationL() const {};
1.63 +private:
1.64 + void ConstructL();
1.65 +private:
1.66 + TSmsNonIEIdentifier iId;
1.67 +protected:
1.68 + CSmsMessage& iMessage;
1.69 + CSmsNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
1.70 + void operator=(const CSmsNonIEOperation&);
1.71 + TBool operator==(const CSmsNonIEOperation&);
1.72 +};
1.73 +
1.74 +class CSmsCtrlNonIEOperation : public CSmsNonIEOperation
1.75 +{
1.76 +protected:
1.77 + CSmsCtrlNonIEOperation(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
1.78 + ~CSmsCtrlNonIEOperation(){};
1.79 + void operator=(const CSmsCtrlNonIEOperation&);
1.80 + TBool operator==(const CSmsCtrlNonIEOperation&);
1.81 +};
1.82 +
1.83 +class CSmsTPSRROperations : public CSmsCtrlNonIEOperation
1.84 + {
1.85 +public:
1.86 + CSmsTPSRROperations(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
1.87 + ~CSmsTPSRROperations() {};
1.88 + IMPORT_C TInt GetStatusReport(TUint aSegmentSequenceNum) const;
1.89 + IMPORT_C void SetLastSegmentStatusReportL(TBool aEnable);
1.90 + IMPORT_C TInt SetSegmentStatusReportL(TUint aSegmentSequenceNum, TBool aEnable);
1.91 + IMPORT_C void SetSchemeL();
1.92 + IMPORT_C TSmsStatusReportScheme GetScheme() const;
1.93 + IMPORT_C void ResetSchemeL();
1.94 + IMPORT_C void SetDefaultL(TBool aEnable);
1.95 +protected:
1.96 + void ValidateOperationL() const;
1.97 + void operator=(const CSmsTPSRROperations&);
1.98 + TBool operator==(const CSmsTPSRROperations&);
1.99 + };
1.100 +
1.101 +/**
1.102 + * This class will store the incomplete class 0 message information.
1.103 + *
1.104 + *
1.105 + * The object of this class will be stored inside CSmsMessageAdditionalAttributes class.
1.106 + * This class will provide 2 exported functions which will allow the caller of this class
1.107 + * to get/set incomplete class 0 message information.
1.108 + * @publishedAll
1.109 + * @released
1.110 + */
1.111 +class CIncompleteClass0MessageInfo : public CSmsNonIEOperation
1.112 + {
1.113 +public:
1.114 + CIncompleteClass0MessageInfo(TSmsNonIEIdentifier aId, CSmsMessage& aMessage);
1.115 + IMPORT_C void GetIncompleteMessageInfoL(TInt& aStartPos, TInt& aEndPos, TBool& aIsLastIncompleteMessage);
1.116 + IMPORT_C void SetIncompleteMessageInfoL(TInt aStartPos, TInt aEndPos, TBool aIsLastIncompleteMessage);
1.117 + TInt Version();
1.118 + void SetVersion(TInt aVersion);
1.119 + void InternalizeL(RReadStream& aStream);
1.120 + void ExternalizeL(RWriteStream& aStream) const;
1.121 +
1.122 +protected:
1.123 + TBool MessageTypeSupported() const;
1.124 + void ValidateOperationL() const;
1.125 + void operator=(const CIncompleteClass0MessageInfo&);
1.126 + TBool operator==(const CIncompleteClass0MessageInfo&);
1.127 +
1.128 +public:
1.129 +/**
1.130 + * Incomplete Class 0 Message versions
1.131 + */
1.132 + enum TSmsIncompleteClass0MessageVersion
1.133 + {
1.134 + /** The default value. */
1.135 + ESmsIncompleteClass0MessageV0,
1.136 + // for all other versions the corresponding enum values would be added i.e. ESmsIncompleteClass0MessageV1, etc.
1.137 + EMaxSmsIncompleteClass0MessageV
1.138 + };
1.139 +
1.140 +private:
1.141 +/**
1.142 + * iVersion is the version of CIncompleteClass0MessageInfo. This parameter will be
1.143 + * used to identify what iAdditionalInfo points to for that particular
1.144 + * version of CIncompleteClass0MessageInfo
1.145 + */
1.146 + TInt iVersion;
1.147 +
1.148 + TInt iStartPos;
1.149 + TInt iEndPos;
1.150 + TBool iIsLastIncompleteMessage;
1.151 + };
1.152 +
1.153 +#endif