1.1 --- a/epoc32/include/smsclnt.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,209 +0,0 @@
1.4 -// Copyright (c) 1999-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 -//
1.18 -
1.19 -#ifndef __SMSCLNT_H__
1.20 -#define __SMSCLNT_H__
1.21 -
1.22 -#include <mtclbase.h>
1.23 -#include <smuthdr.h>
1.24 -
1.25 -
1.26 -/**
1.27 -The UID that indentifies the SMS message editor application.
1.28 -
1.29 -This is the response to the query for the KUidMsvMtmQueryEditorUidValue
1.30 -capability.
1.31 -
1.32 -@see CSmsClientMtm::QueryCapability
1.33 -
1.34 -@publishedPartner
1.35 -@released
1.36 -*/
1.37 -const TInt KUidMsgSmsEditorAppVal=0x1000163f;
1.38 -
1.39 -/**
1.40 -The maximum number of SMS PDUs allowed in a concatenated SMS message.
1.41 -
1.42 -Together with KSmcmMaxCharsInMessageConcatenated7Bit, this is the response to
1.43 -the query for the KUidMtmQueryMaxTotalMsgSizeValue capability.
1.44 -
1.45 -@see CSmsClientMtm::QueryCapability
1.46 -@see KSmcmMaxCharsInMessageConcatenated7Bit
1.47 -
1.48 -@internalComponent
1.49 -@released
1.50 -*/
1.51 -const TInt KSmcmMaxMessageNumber=0x32;
1.52 -
1.53 -/**
1.54 -The maximum number of characters in a concatenated SMS PDU.
1.55 -
1.56 -Together with KSmcmMaxMessageNumber, this is the response to the query for the
1.57 -KUidMtmQueryMaxTotalMsgSizeValue capability.
1.58 -
1.59 -@see CSmsClientMtm::QueryCapability
1.60 -@see KSmcmMaxCharsInMessageConcatenated7Bit
1.61 -
1.62 -@internalComponent
1.63 -@released
1.64 -*/
1.65 -const TInt KSmcmMaxCharsInMessageConcatenated7Bit=0x99;
1.66 -
1.67 -/**
1.68 -The maximum number of characters in a non-concatenated SMS PDU.
1.69 -
1.70 -This is the response to the query for the KUidMtmQueryMaxBodySizeValue
1.71 -capability.
1.72 -
1.73 -@see CSmsClientMtm::QueryCapability
1.74 -
1.75 -@internalComponent
1.76 -@released
1.77 -*/
1.78 -const TInt KSmcmMaxTotalMsgSize=160;
1.79 -
1.80 -/**
1.81 -The granularity of the in-memory buffer for CRichText objects.
1.82 -
1.83 -@see CRichText::NewL
1.84 -
1.85 -@internalComponent
1.86 -@released
1.87 -*/
1.88 -const TInt KSmcmRichTextConstant=256;
1.89 -
1.90 -class CSmsHeader;
1.91 -class CSmsMessage;
1.92 -class CSmsSettings;
1.93 -class TSmsUtilities;
1.94 -class CSmsSimParamOperation;
1.95 -class CMobilePhoneSmspList;
1.96 -class RResourceFile;
1.97 -
1.98 -/**
1.99 -The SMS client MTM interface.
1.100 -
1.101 -Most of the functions in this class are implementations of the virtual functions
1.102 -defined by the base class CBaseMtm.
1.103 -
1.104 -An object of this class can be obtained from the Client MTM registry. The message
1.105 -server provides the necessary information required by the registry to provide
1.106 -the SMS client MTM.
1.107 -
1.108 -All client MTM objects have a current context. This is an entry in the message
1.109 -store that will be manipulated by certain APIs supplied by the MTM. If the
1.110 -current context is not set then certain APIs will panic.
1.111 -
1.112 -The CBaseMtm::HasContext API can be used to check that the current context has
1.113 -been set. It can be set using either the CBaseMtm::SwitchCurrenEntryL API or the
1.114 -CBaseMtm::SetCurrentEntryL API.
1.115 -
1.116 -@see CClientMtmRegistry
1.117 -@see CBaseMtm::HasContext
1.118 -@see CBaseMtm::SetCurrentEntryL
1.119 -@see CBaseMtm::SwitchCurrenEntryL
1.120 -
1.121 -@publishedAll
1.122 -@released
1.123 -*/
1.124 -class CSmsClientMtm : public CBaseMtm
1.125 - {
1.126 -public:
1.127 -
1.128 - IMPORT_C static CSmsClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession);
1.129 - virtual ~CSmsClientMtm();
1.130 -
1.131 - void HandleEntryEvent(enum MMsvEntryObserver::TMsvEntryEvent,TAny*,TAny*,TAny*);
1.132 -
1.133 - inline CSmsHeader& SmsHeader();
1.134 - inline const CSmsHeader& SmsHeader() const;
1.135 - inline CSmsSettings& ServiceSettings();
1.136 - inline const CSmsSettings& ServiceSettings() const;
1.137 - inline TInt ServiceId() const;
1.138 -
1.139 - IMPORT_C void RestoreServiceAndSettingsL();
1.140 - IMPORT_C CSmsSimParamOperation* ReadSimParamsL(TRequestStatus& aObserverRequestStatus);
1.141 - IMPORT_C CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TRequestStatus& aObserverRequestStatus);
1.142 -
1.143 - /**
1.144 - Sets the character encoding value. The character encoding value options are 7-bit,
1.145 - 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding.
1.146 - */
1.147 - void SetMessageCharacterSetL(TSmsDataCodingScheme::TSmsAlphabet aTsmsAlphabet);
1.148 -
1.149 -public: // methods from CBaseMtm
1.150 -
1.151 - virtual void SaveMessageL();
1.152 - virtual void LoadMessageL();
1.153 - virtual TMsvPartList ValidateMessage(TMsvPartList aPartList);
1.154 - virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList);
1.155 - virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus);
1.156 - virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus);
1.157 - virtual void AddAddresseeL(const TDesC& aRealAddress);
1.158 - virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias);
1.159 - virtual void RemoveAddressee(TInt aIndex);
1.160 - virtual TInt QueryCapability(TUid aCapability, TInt& aResponse);
1.161 - virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter);
1.162 - virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus);
1.163 -
1.164 - IMPORT_C void CreateMessageL(TMsvId aServiceId);
1.165 - IMPORT_C void BioTypeChangedL(TUid aBioTypeUid);
1.166 -
1.167 -protected:
1.168 - /**
1.169 - Methods from CBaseMtm, The implementation of this function assumes that
1.170 - the new service for setting the charset encoding value for a SMS message is supported.
1.171 - */
1.172 - IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
1.173 -
1.174 -private:
1.175 -
1.176 - CSmsClientMtm(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession);
1.177 - void ConstructL();
1.178 -
1.179 - void BasicReplyForwardEntry(TMsvEntry& aNewEntry) const;
1.180 - CMsvOperation* CreateNewEntryL(TMsvEntry& aNewEntry, TMsvId aDestination,CSmsHeader& aSmsHeader,const CRichText& aBody, TRequestStatus& aCompletionStatus);
1.181 - TBool ValidRecipients() const;
1.182 - TBool ValidNumber(const TDesC& aNumber) const;
1.183 -
1.184 -private: // methods from CBaseMtm
1.185 -
1.186 - virtual void ContextEntrySwitched();
1.187 -
1.188 -private:
1.189 -
1.190 - void DoAddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias);
1.191 - void AddRecipientL(const TDesC& aRealAddress, const TDesC& aAlias);
1.192 - void DoAddRecipientL(CSmsHeader* aSmsHeader, const TDesC& aRealAddress, const TDesC& aAlias);
1.193 - void ResetHeader();
1.194 - TMsvPartList DoFindL(const TDesC& aTextToFind,TMsvPartList aPartList);
1.195 - void FindL(const TDesC& aTextToFind, const TMsvPartList aPartList,TMsvPartList& aFoundList);
1.196 - void FindInBodyL(const TDesC& aTextToFind, const TMsvPartList& aFoundList, TMsvPartList& aResult);
1.197 - HBufC* ReadEmailSubjectFormatL(RResourceFile& aResourceFile, TInt aResourceId, const TDesC& aDefaultFormat);
1.198 -
1.199 -private:
1.200 -
1.201 - CSmsSettings* iServiceSettings;
1.202 - TMsvId iServiceId;
1.203 - CSmsHeader* iSmsHeader;
1.204 - TChar iRealAddressOpen;
1.205 - TChar iRealAddressClose;
1.206 - HBufC* iEmailForwardSubjectFormat;
1.207 - HBufC* iEmailReplySubjectFormat;
1.208 - };
1.209 -
1.210 -#include <smsclnt.inl>
1.211 -
1.212 -#endif // __SMSCLNT_H__