24
|
1 |
// Copyright (c) 2008-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 |
#ifndef __CPHONEBOOKENDISPATCHER_H_
|
|
17 |
#define __CPHONEBOOKENDISPATCHER_H_
|
|
18 |
|
|
19 |
// INCLUDES
|
|
20 |
#include <e32std.h>
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <e32def.h>
|
|
23 |
#include <etelmm.h>
|
|
24 |
|
|
25 |
#include <ctsy/ltsy/mltsydispatchfactory.h>
|
|
26 |
#include <ctsy/serviceapi/cmmgsmphonestorageutility.h>
|
|
27 |
|
|
28 |
#include "requestqueueoneshot.h"
|
|
29 |
#include <ctsy/ltsy/ltsylogger.h>
|
|
30 |
#include "mdispatchercallback.h"
|
|
31 |
|
|
32 |
// FORWARD DECLARATIONS
|
|
33 |
class CMmDataPackage;
|
|
34 |
class MmMessageManagerCallback;
|
|
35 |
class TDispatcherHolder;
|
|
36 |
|
|
37 |
class MLtsyDispatchPhonebookEnStoreGetInfo;
|
|
38 |
class MLtsyDispatchPhonebookEnStoreReadAll;
|
|
39 |
class MLtsyDispatchPhonebookEnStoreReadEntry;
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
// CLASS DECLARATION
|
|
44 |
|
|
45 |
/**
|
|
46 |
* This class is responsible for packing and unpacking data belonging
|
|
47 |
* to PhonebookEn related requests to the Licensee LTSY.
|
|
48 |
*/
|
|
49 |
class CPhonebookEnDispatcher : public CBase, public MDispatcherCallback
|
|
50 |
{
|
|
51 |
public:
|
|
52 |
|
|
53 |
virtual ~CPhonebookEnDispatcher();
|
|
54 |
|
|
55 |
static CPhonebookEnDispatcher* NewL(
|
|
56 |
MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
57 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
58 |
CRequestQueueOneShot& aRequestAsyncOneShot);
|
|
59 |
|
|
60 |
static CPhonebookEnDispatcher* NewLC(
|
|
61 |
MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
62 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
63 |
CRequestQueueOneShot& aRequestAsyncOneShot);
|
|
64 |
|
|
65 |
// Dispatcher functions for dispatching requests DOWN to the Licensee LTSY
|
|
66 |
|
|
67 |
TInt DispatchStoreGetInfoL();
|
|
68 |
TInt DispatchStoreReadAllL();
|
|
69 |
TInt DispatchStoreReadEntryL(const CMmDataPackage* aDataPackage);
|
|
70 |
|
|
71 |
|
|
72 |
// Complete functions for receiving completions UP from the Licensee LTSY
|
|
73 |
// via the CCtsyDispatcherCallback object.
|
|
74 |
|
|
75 |
void CallbackStoreGetInfo(TInt aError, TInt aUsedEntries);
|
|
76 |
void CallbackStoreReadAll(TInt aError, TInt aIndex, const TDesC& aNumber, TBool aMoreToCome);
|
|
77 |
void CallbackStoreReadEntry(TInt aError, TInt aIndex, const TDesC& aNumber);
|
|
78 |
|
|
79 |
|
|
80 |
// From MDispatcherCallback
|
|
81 |
void CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage);
|
|
82 |
|
|
83 |
// Other public functions
|
|
84 |
void SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder);
|
|
85 |
|
|
86 |
private:
|
|
87 |
|
|
88 |
CPhonebookEnDispatcher(MLtsyDispatchFactoryV1& aLtsyFactory,
|
|
89 |
MmMessageManagerCallback& aMessageManagerCallback,
|
|
90 |
CRequestQueueOneShot& aRequestAsyncOneShot);
|
|
91 |
|
|
92 |
void ConstructL();
|
|
93 |
|
|
94 |
void FillEnStoreResponseListL(TInt aIndex, const TDesC& aNumber);
|
|
95 |
private: // Not owned
|
|
96 |
static const TInt KMaxTotalEntries = 255;
|
|
97 |
|
|
98 |
MLtsyDispatchFactoryV1& iLtsyFactoryV1;
|
|
99 |
MmMessageManagerCallback& iMessageManagerCallback;
|
|
100 |
CRequestQueueOneShot& iRequestAsyncOneShot;
|
|
101 |
TDispatcherHolder* iDispatcherHolder;
|
|
102 |
|
|
103 |
// Interfaces in the Licensee LTSY, not owned by this object
|
|
104 |
|
|
105 |
MLtsyDispatchPhonebookEnStoreGetInfo* iLtsyDispatchPhonebookEnStoreGetInfo;
|
|
106 |
MLtsyDispatchPhonebookEnStoreReadAll* iLtsyDispatchPhonebookEnStoreReadAll;
|
|
107 |
MLtsyDispatchPhonebookEnStoreReadEntry* iLtsyDispatchPhonebookEnStoreReadEntry;
|
|
108 |
|
|
109 |
CArrayPtrFlat<TENStoreResponse>* iEnEntriesArray;
|
|
110 |
|
|
111 |
}; // class CPhonebookEnDispatcher
|
|
112 |
|
|
113 |
#endif // __CPHONEBOOKENDISPATCHER_H_
|
|
114 |
|