24
|
1 |
// Copyright (c) 2007-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 __SMSPFACADESTOR_H__
|
|
22 |
#define __SMSPFACADESTOR_H__
|
|
23 |
|
|
24 |
#include "smspstor.h"
|
|
25 |
#include "smspclass0stor.h"
|
|
26 |
|
|
27 |
/**
|
|
28 |
CFacadeSmsReassemblyStore.
|
|
29 |
|
|
30 |
This class will act as a container class for both class 0 & non-class 0
|
|
31 |
reassembly store. It will provide generic interface through which client
|
|
32 |
of this class will add, delete or process the SMS message.
|
|
33 |
It also provides few class 0 specific functions because sometimes class 0 messsages
|
|
34 |
needs to be handled differently.
|
|
35 |
Internally it will store the SMS message in its respective reassembly store.
|
|
36 |
|
|
37 |
@internalComponent
|
|
38 |
*/
|
|
39 |
class CFacadeSmsReassemblyStore : public CBase
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
static CFacadeSmsReassemblyStore* NewL(RFs& aFs, MSmsComm& aSmsComm);
|
|
43 |
~CFacadeSmsReassemblyStore();
|
|
44 |
|
|
45 |
void OpenStoreL();
|
|
46 |
void Close();
|
|
47 |
RFs& FileSession() const;
|
|
48 |
|
|
49 |
void InitL();
|
|
50 |
void PurgeL(const TTimeIntervalMinutes& aTimeIntervalMinutes,TBool aPurgeIncompleteOnly);
|
|
51 |
TBool IsFull();
|
|
52 |
void DeleteEnumeratedSIMEntries();
|
|
53 |
TInt ExternalizeEnumeratedMessagesL(CSmsProvider& aProvider,TInt& aCount);
|
|
54 |
void ProcessCompleteSmsMessagesL(MSmsComm& aSmsComm, const CSmsMessage* aCurrentSmsMessage);
|
|
55 |
|
|
56 |
void AddSegmentToReassemblyStoreL(CSmsMessage& aSmsMessage,const TGsmSms& aGsmSms, TInt& aIndex, TBool& aIsComplete, TBool aIsEnumeration, TInt& aCount, TInt& aTotal);
|
|
57 |
void DeleteMessageL(const CSmsMessage& aSmsMessage, TBool aPassed);
|
|
58 |
void UpdateLogServerIdL(const CSmsMessage& aSmsMessage, TInt aIndex);
|
|
59 |
void SetMessagePassedToClientL(const CSmsMessage& aSmsMessage, TBool aPassed=ETrue);
|
|
60 |
TBool IsSeparateClass0StoreSupported();
|
|
61 |
//Class 0 Specific function.
|
|
62 |
void ProcessMessageIfExceedLimitationL(MSmsComm& aSmsComm);
|
|
63 |
void ForwardCompleteClass0SmsMessagesL(MSmsComm& aSmsComm, const CSmsMessage& aSmsMessage, const TSmsAddr* aOriginalSmsAddr,const CSmsMessage* aOriginalSmsMessage,TDes& aDes);
|
|
64 |
void SetIncompleteMessageForwardedToClientL(const CSmsMessage& aSmsMessage);
|
|
65 |
void SetDiskSpaceState(TSmsDiskSpaceMonitorStatus aDiskSpaceStatus);
|
|
66 |
TBool IsWapSMS(const CSmsMessage& aSmsMessage);
|
|
67 |
|
|
68 |
private:
|
|
69 |
CFacadeSmsReassemblyStore(RFs& aFs, MSmsComm& aSmsComm);
|
|
70 |
void ConstructL();
|
|
71 |
|
|
72 |
private:
|
|
73 |
void InitializeNonClass0StoreL();
|
|
74 |
void DeleteNonClass0EnumeratedSIMEntries();
|
|
75 |
void DeleteNonClass0MessageL(const CSmsMessage& aSmsMessage, TBool aPassed);
|
|
76 |
void AddSegmentToNonClass0ReassemblyStoreL(CSmsMessage& aSmsMessage,const TGsmSms& aGsmSms, TInt& aIndex, TBool& aIsComplete, TBool aIsEnumeration, TInt& aCount, TInt& aTotal);
|
|
77 |
TInt ExternalizeEnumeratedNonClass0SmsMessagesL(CSmsProvider& aProvider,TInt& aCount);
|
|
78 |
TInt ExternalizeEnumeratedClass0SmsMessagesL(CSmsProvider& aProvider,TInt& aCount);
|
|
79 |
void ProcessCompleteNonClass0SmsMessagesL(MSmsComm& aSmsComm, const CSmsMessage* aCurrentSmsMessage);
|
|
80 |
void ProcessCompleteClass0SmsMessagesL(MSmsComm& aSmsComm, const CSmsMessage* aCurrentSmsMessage);
|
|
81 |
TInt NumberOfCompleteNonClass0Messages();
|
|
82 |
void SetNonClass0MessagePassedToClientL(const CSmsMessage& aSmsMessage, TBool aPassed=ETrue);
|
|
83 |
void UpdateLogServerIdOfNonClass0MessageL(const CSmsMessage& aSmsMessage, TInt aIndex);
|
|
84 |
TBool IsForClass0ReassemblyStore(const CSmsMessage& aSmsMessage);
|
|
85 |
|
|
86 |
private:
|
|
87 |
RFs& iFs;
|
|
88 |
MSmsComm& iSmsComm;
|
|
89 |
/** This re-assembly store will contain non-class 0 SMS messages
|
|
90 |
& also WAP class 0 messages if SMS stack is configured for handling
|
|
91 |
class 0 messages in out of disk condition.
|
|
92 |
In other case it will contain all type (class 0 & non-class 0) of SMS messages.
|
|
93 |
*/
|
|
94 |
|
|
95 |
CSmsReassemblyStore* iReassemblyStore;
|
|
96 |
|
|
97 |
/** This re-assembly store will contain only class 0 sms messages if
|
|
98 |
SMS stack is configured for handling class 0 messages in out of disk condition.
|
|
99 |
In other case it will not be used. */
|
|
100 |
|
|
101 |
CClass0SmsReassemblyStore* iClass0ReassemblyStore;
|
|
102 |
|
|
103 |
/** Maximum number of comlete SMS messages that can be stored in reassembly store before
|
|
104 |
it (re-assembly store) considered to be full. IsFull() function returns TRUE if
|
|
105 |
re-assembly store contains more than this defined number of complete SMS messages. */
|
|
106 |
TInt iMaxmumNumberOfCompleteMessagesInReassemblyStore;
|
|
107 |
};
|
|
108 |
|
|
109 |
#endif //__SMSPFACADESTOR_H__
|
|
110 |
|