1.1 --- a/epoc32/include/smutsimparam.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,147 +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 __SMUTSIMPARAM_H__
1.20 -#define __SMUTSIMPARAM_H__
1.21 -
1.22 -#include <msvapi.h>
1.23 -#include <smcmmain.h>
1.24 -
1.25 -/**
1.26 -The UID for the stream into which the SIM parameters are stored.
1.27 -
1.28 -@internalComponent
1.29 -@deprecated
1.30 -Should be moved to the cpp file for this class.
1.31 -*/
1.32 -const TUid KUidMsvSimSmsParams = {0x100081BC};
1.33 -
1.34 -class CMobilePhoneSmspList;
1.35 -class TSmsProgress;
1.36 -
1.37 -/**
1.38 -A packaged TInt value.
1.39 -
1.40 -This is used by CSmsSimParamOperation.
1.41 -
1.42 -@see CSmsSimParamOperation::ProgressL()
1.43 -
1.44 -@internalComponent
1.45 -@released
1.46 -*/
1.47 -typedef TPckgBuf<TInt> TIntBuf;
1.48 -
1.49 -/**
1.50 -Encapsulates an operation to read/write an array of SMS parameters from a SIM.
1.51 -
1.52 -An operation of this type if returned by the SMS client MTM for the read and
1.53 -write SIM paramter operations.
1.54 -
1.55 -These operations are generated from calling the SMS client MTM APIs
1.56 -CSmsClientMtm::ReadSimParamsL and CSmsClientMtm::WriteSimParamsL. The
1.57 -CSmsClientMtm::InvokeAsyncFunctionL API should not be used for these operations.
1.58 -
1.59 -@see CSmsClientMtm::ReadSimParamsL
1.60 -@see CSmsClientMtm::WriteSimParamsL
1.61 -
1.62 -@publishedAll
1.63 -@released
1.64 -*/
1.65 -class CSmsSimParamOperation : public CMsvOperation
1.66 - {
1.67 -public:
1.68 -
1.69 - static CSmsSimParamOperation* ReadSimParamsL(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus);
1.70 - static CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus);
1.71 - virtual ~CSmsSimParamOperation();
1.72 -
1.73 - inline const CMobilePhoneSmspList& SmspList() const;
1.74 -
1.75 - IMPORT_C CMobilePhoneSmspList* ServiceCentersLC() const;
1.76 - IMPORT_C const TDesC8& ProgressL();
1.77 -
1.78 - IMPORT_C static void RestoreSimParamsL(CMsvStore& aStore, CMobilePhoneSmspList& aList);
1.79 - IMPORT_C static void StoreSimParamsL(CMsvStore& aStore, const CMobilePhoneSmspList& aList);
1.80 -
1.81 -private: // methods from CActive
1.82 -
1.83 - virtual void RunL();
1.84 - virtual void DoCancel();
1.85 - virtual TInt RunError(TInt aError);
1.86 -
1.87 -private:
1.88 -
1.89 - CSmsSimParamOperation(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus);
1.90 -
1.91 - void DoReadSimParamsL();
1.92 - void DoRunReadSimParamsL(/*TSmsProgress aProgress*/);
1.93 - void DoWriteSimParamsL(const CMobilePhoneSmspList& aList);
1.94 -
1.95 - void TransferCommandL(TInt aCommandId);
1.96 - void Complete();
1.97 -
1.98 -private:
1.99 -
1.100 -/**
1.101 -This defines the state machine.
1.102 -*/
1.103 - enum TReadSimParamsState
1.104 - {
1.105 -/**
1.106 -Specifies waiting state
1.107 -*/
1.108 - EStateWaiting,
1.109 -/**
1.110 -Specifies reading state
1.111 -*/
1.112 - EStateReadingSimParams,
1.113 -/**
1.114 -Specifies writing state
1.115 -*/
1.116 - EStateWritingSimParams
1.117 - } iState;
1.118 -
1.119 -/**
1.120 -A list containing the SMS parameters
1.121 -*/
1.122 - CMobilePhoneSmspList* iSimParams;
1.123 - TInt iError;
1.124 - TIntBuf iProgressBuf;
1.125 - CMsvOperation* iOperation;
1.126 - };
1.127 -
1.128 -/**
1.129 -Gets the list of SMS parameters on the SIM, after a successfully completed
1.130 -read operation.
1.131 -
1.132 -If the operation has not successfully completed, this function returns an
1.133 -empty list.
1.134 -
1.135 -This function should ot be used with a write SIM parameters operation.
1.136 -
1.137 -@return
1.138 -The list of SMS parameters read from the SIM.
1.139 -
1.140 -@panic SMCM 3
1.141 -This operation was not reading the SIM parameters. The operation was not returned
1.142 -from CSmsClientMtm::ReadSimParamsL (debug only).
1.143 -*/
1.144 -inline const CMobilePhoneSmspList& CSmsSimParamOperation::SmspList() const
1.145 - {
1.146 - __ASSERT_DEBUG(iState == EStateReadingSimParams, Panic(ESmscPanicUnexpectedCommand));
1.147 - return *iSimParams;
1.148 - }
1.149 -
1.150 -#endif // __SMUTSIMPARAM_H__