24
|
1 |
// Copyright (c) 2001-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 |
// Class declaration for CMobileSmsMessaging.
|
|
15 |
// This class declaration is intended to be public (ie. exported to \epoc32\include).
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file
|
|
21 |
@internalAll
|
|
22 |
*/
|
|
23 |
|
|
24 |
|
|
25 |
#ifndef __MSMSMESS_H__
|
|
26 |
#define __MSMSMESS_H__
|
|
27 |
|
|
28 |
#include <et_phone.h>
|
|
29 |
#include "Matstd.h"
|
|
30 |
#include "mPHONE.H"
|
|
31 |
#include "mSMSCSCA.H"
|
|
32 |
|
|
33 |
_LIT8(KSmsEnterPduModeResponse, "> "); // NB. Must use partial matching with this string
|
|
34 |
|
|
35 |
|
|
36 |
// Forward class declarations
|
|
37 |
class CATIO;
|
|
38 |
class CATInit;
|
|
39 |
class CATSmsMessagingSend;
|
|
40 |
class CATSmsMessagingRead;
|
|
41 |
class CATSmsMemoryStorage;
|
|
42 |
class CATSmsGetSCAddress;
|
|
43 |
class CATSmsSetSCAddress;
|
|
44 |
class CATSetPhoneToCMTMode;
|
|
45 |
class CATSetPhoneToCMTIMode;
|
|
46 |
class CReceiveSmsQueue;
|
|
47 |
class CATSmsWaitForAndHandleCMTIStored;
|
|
48 |
class CATSmsWaitForAndHandleCMTUnstored;
|
|
49 |
|
|
50 |
|
|
51 |
class CMobileSmsMessaging : public CSubSessionExtBase
|
|
52 |
/**
|
|
53 |
* This class deals with the processing of the Multimode SMS Messaging IPC requests
|
|
54 |
* generated by a client of Etel.
|
|
55 |
*/
|
|
56 |
{
|
|
57 |
public:
|
|
58 |
// Class construction
|
|
59 |
static CMobileSmsMessaging* NewL(CATIO* aATIO,CATInit* aInit, CPhoneGlobals* aPhoneGlobals);
|
|
60 |
CMobileSmsMessaging(CATIO* aATIO,CATInit* aInit, CPhoneGlobals* aPhoneGlobals);
|
|
61 |
|
|
62 |
// Class destruction
|
|
63 |
~CMobileSmsMessaging();
|
|
64 |
|
|
65 |
// from MSubSessionExtBaseTSY
|
|
66 |
virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
|
|
67 |
|
|
68 |
// from MTelObjectTSY which have to be implemented
|
|
69 |
virtual void Init();
|
|
70 |
virtual CTelObject* OpenNewObjectByNameL(const TDesC&);
|
|
71 |
virtual CTelObject* OpenNewObjectL(TDes& aNewName);
|
|
72 |
virtual TInt RegisterNotification(const TInt aIpc);
|
|
73 |
virtual TInt DeregisterNotification(const TInt aIpc);
|
|
74 |
|
|
75 |
// from MTelObjectTSY needed as we've implemented extensions
|
|
76 |
virtual CTelObject::TReqMode ReqModeL(const TInt aIPC);
|
|
77 |
virtual TInt NumberOfSlotsL(const TInt aIpc);
|
|
78 |
virtual TInt CancelService(const TInt aIpc, const TTsyReqHandle aTsyReqHandle);
|
|
79 |
|
|
80 |
// Callback function for CATSmsGetSCAddress to signal 2-phase list cancel completion
|
|
81 |
TInt CompleteSmspListCancel(const TTsyReqHandle aTsyReqHandle);
|
|
82 |
|
|
83 |
private:
|
|
84 |
// Class construction
|
|
85 |
void ConstructL();
|
|
86 |
|
|
87 |
// Extension IPC handlers (with 1 argument)
|
|
88 |
TInt GetCaps(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1);
|
|
89 |
TInt StoreSmspList(const TTsyReqHandle aTsyReqHandle, TDes8* aBuffer);
|
|
90 |
TInt SetReceiveMode(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1);
|
|
91 |
TInt GetReceiveMode(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1);
|
|
92 |
TInt EnumerateMessageStores(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1);
|
|
93 |
|
|
94 |
// Extension IPC handlers (with 2 arguments)
|
|
95 |
TInt SendMessage(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1,TDes8* aParam2);
|
|
96 |
TInt ReceiveMessage(const TTsyReqHandle aTsyReqHandle,TDes8* aSmsPdu,TDes8* aAttrib);
|
|
97 |
void CancelReceiveMessage();
|
|
98 |
TInt GetSmspListPhase1(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1,TDes8* aParam2);
|
|
99 |
void GetSmspListPhase1L(TTsyReqHandle aTsyReqHandle,RMobilePhone::TClientId& aClient,TInt& aBufSize);
|
|
100 |
TInt GetSmspListPhase2(const TTsyReqHandle aTsyReqHandle,TDes8* aParam1,TDes8* aParam2);
|
|
101 |
TInt ProcessStoreSmspListL(const TTsyReqHandle aTsyReqHandle, TDes8* aBuffer);
|
|
102 |
TInt GetMessageStoreInfo(const TTsyReqHandle aTsyReqHandle, TDes8* aParam1, TDes8* aParam2);
|
|
103 |
|
|
104 |
// Utility
|
|
105 |
TBool IsSupportedIPC(const TInt aIpc) const;
|
|
106 |
|
|
107 |
private:
|
|
108 |
// AT command objects
|
|
109 |
CATIO* iIo;
|
|
110 |
CATInit* iInit;
|
|
111 |
CATSmsMessagingSend* iATSmsMessagingSend;
|
|
112 |
CATSmsMemoryStorage* iATSmsMemoryStorage;
|
|
113 |
CATSmsGetSCAddress* iATSmsGetSCAddress;
|
|
114 |
CATSmsSetSCAddress* iATSmsSetSCAddress;
|
|
115 |
CATSetPhoneToCMTIMode* iATSetPhoneToCMTIMode;
|
|
116 |
CATSetPhoneToCMTMode* iATSetPhoneToCMTMode;
|
|
117 |
|
|
118 |
// SMS Receiving objects
|
|
119 |
CReceiveSmsQueue* iReceiveSmsQueue;
|
|
120 |
CATSmsWaitForAndHandleCMTIStored* iWaitForCMTIStored;
|
|
121 |
CATSmsWaitForAndHandleCMTUnstored* iWaitForCMTUnstored;
|
|
122 |
|
|
123 |
// Structure of phone capabilities populated by CATInit
|
|
124 |
CPhoneGlobals* iGlobals; // This object not owned by this class
|
|
125 |
|
|
126 |
// Store current receive mode of phone
|
|
127 |
RMobileSmsMessaging::TMobileSmsReceiveMode iCurrentRxMode;
|
|
128 |
|
|
129 |
CArrayPtrFlat<CListReadAllAttempt>* iGetSmspList;
|
|
130 |
|
|
131 |
CATSmsGetSCAddress::TTsySmsp iSmspListInfo;
|
|
132 |
|
|
133 |
RMobileSmsMessaging::TMobileSmspEntryV1 iSCEntry;
|
|
134 |
};
|
|
135 |
|
|
136 |
#endif
|