24
|
1 |
// Copyright (c) 1997-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 "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalAll
|
|
19 |
*/
|
|
20 |
|
|
21 |
#ifndef __MSMSMEM_H__
|
|
22 |
#define __MSMSMEM_H__
|
|
23 |
|
|
24 |
#include "smsbase.H"
|
|
25 |
#include "mSMSSTOR.H"
|
|
26 |
|
|
27 |
const TInt KStorageArraySize=5;
|
|
28 |
|
|
29 |
struct TMemType
|
|
30 |
{
|
|
31 |
TBuf8<12> iStoreName;
|
|
32 |
TUint32 iMems;
|
|
33 |
};
|
|
34 |
|
|
35 |
enum
|
|
36 |
{
|
|
37 |
KMemTypeReadAndDeleted=0x00000001,
|
|
38 |
KMemTypeWriteAndSend=0x00000002,
|
|
39 |
KMemTypeBroadcast=0x00000004
|
|
40 |
};
|
|
41 |
|
|
42 |
class CATSmsMemoryStorage : public CATSmsCommands
|
|
43 |
{
|
|
44 |
public:
|
|
45 |
static CATSmsMemoryStorage* NewL(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aGsmStatus);
|
|
46 |
CATSmsMemoryStorage(CATIO* aIo, CTelObject* aTelObject, CATInit* aInit, CPhoneGlobals* aGsmStatus);
|
|
47 |
~CATSmsMemoryStorage();
|
|
48 |
virtual void EventSignal(TEventSource aSource);
|
|
49 |
virtual void CompleteWithIOError(TEventSource aSource, TInt aStatus);
|
|
50 |
void Start(TTsyReqHandle aTsyReqHandle, TAny* aParams);
|
|
51 |
void StartGetInfo(TTsyReqHandle aTsyReqHandle, TAny* aParams);
|
|
52 |
void Stop(TTsyReqHandle aTsyReqHandle);
|
|
53 |
void Complete(TInt aError);
|
|
54 |
virtual void Complete(TInt aError, TEventSource aSource);
|
|
55 |
TInt GetNumberOfMessageStores();
|
|
56 |
TInt WhichPreferredMem(TInt aIndex);
|
|
57 |
void EnumerateCPMSResponseL();
|
|
58 |
void CopyDataFromCATInit(CATInit* aInit);
|
|
59 |
void GetPrefMemL();
|
|
60 |
private:
|
|
61 |
void ConstructL();
|
|
62 |
void CPMSResponseL();
|
|
63 |
TInt SMSStoreCaps(TDes& aName);
|
|
64 |
private:
|
|
65 |
enum {
|
|
66 |
EATNotInProgress,
|
|
67 |
EATWaitForSettingMem,
|
|
68 |
EATWaitForSettingMemComplete,
|
|
69 |
EATWaitForSendingCPMSRequestComplete,
|
|
70 |
EATWaitForCPMSResponseComplete
|
|
71 |
} iState;
|
|
72 |
|
|
73 |
TStorageType iRequestedMem;
|
|
74 |
TInt iClientPreferredMem;
|
|
75 |
TBuf8<KGenericBufferSize> iTxBuffer;
|
|
76 |
|
|
77 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg* iInfoPckg;
|
|
78 |
|
|
79 |
TInt iStoreCounter;
|
|
80 |
TMemType iPeekPrevStorage[KStorageArraySize];
|
|
81 |
CMobileSmsStore* iSmsStore;
|
|
82 |
TBool iCancelled;
|
|
83 |
};
|
|
84 |
|
|
85 |
#endif
|