56
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Global Note Implementation for Common Adapter.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef GLOBALNOTEIMPL_H
|
|
20 |
#define GLOBALNOTEIMPL_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <AknGlobalNote.h>
|
|
25 |
#include <GlobalNote.h>
|
|
26 |
|
|
27 |
// CLASS DECLARATION
|
|
28 |
|
|
29 |
/**
|
|
30 |
* Global Note Internal Implementation API.
|
|
31 |
* This API offers methods and mappings for the global note adapter into S60
|
|
32 |
* global note functionality.
|
|
33 |
*
|
|
34 |
* @lib CommonAdapter.lib
|
|
35 |
* @since 2.0
|
|
36 |
*/
|
|
37 |
NONSHARABLE_CLASS( CGlobalNoteImpl ): public CBase
|
|
38 |
{
|
|
39 |
public: // New functions
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Two phase constructor
|
|
43 |
* @since 2.0
|
|
44 |
*/
|
|
45 |
static CGlobalNoteImpl* NewL();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Destructor
|
|
49 |
*/
|
|
50 |
~CGlobalNoteImpl();
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Wrapper to call @c CAknGlobalNote::ShowNoteL()
|
|
54 |
* @since 2.0
|
|
55 |
*
|
|
56 |
* @param aType Note type.
|
|
57 |
* @param aNoteText Note text.
|
|
58 |
*
|
|
59 |
* @return Note ID.
|
|
60 |
*/
|
|
61 |
TInt ShowNoteL( TGlobalNoteType aType, const TDesC& aNoteText );
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Wrapper to call @c CAknGlobalNote::ShowNoteL()
|
|
65 |
* @since 2.0
|
|
66 |
*
|
|
67 |
* @param aStatus After user has pressed a softkey, this returns the
|
|
68 |
* corresponding @c TGlobalNoteResult code of
|
|
69 |
* the pressed softkey.
|
|
70 |
* @param aType Note type.
|
|
71 |
* @param aNoteText Note text.
|
|
72 |
*
|
|
73 |
* @return Note ID.
|
|
74 |
*/
|
|
75 |
TInt ShowNoteL( TRequestStatus& aStatus,
|
|
76 |
TGlobalNoteType aType,
|
|
77 |
const TDesC& aNoteText );
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Wrapper to call @c CAknGlobalNote::CancelGlobalNoteL()
|
|
81 |
* @since 2.0
|
|
82 |
*
|
|
83 |
* @param aNoteId ID of the note to be canceled.
|
|
84 |
*/
|
|
85 |
void CancelGlobalNoteL( TInt aNoteId );
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Wrapper to call @c CAknGlobalNote::SetSoftKeys()
|
|
89 |
* @since 2.0
|
|
90 |
*
|
|
91 |
* @param aId Softkey ID.
|
|
92 |
*/
|
|
93 |
void SetSoftkeys( TInt aId );
|
|
94 |
|
|
95 |
private: // New functions
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Default constructor
|
|
99 |
*/
|
|
100 |
CGlobalNoteImpl();
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Second part of two phase construction.
|
|
104 |
*/
|
|
105 |
void ConstructL();
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Maps AVKON global note type according to @c TGlobalNoteType given.
|
|
109 |
* @since 2.0
|
|
110 |
*
|
|
111 |
* @param aType Common global note type.
|
|
112 |
* @param[out] aAknType Corresponding type in AVKON global notes.
|
|
113 |
*
|
|
114 |
* @return @c KErrNotFound if note type not supported in AVKON.
|
|
115 |
*/
|
|
116 |
TInt NoteTypeInAvkon( const TGlobalNoteType& aType,
|
|
117 |
TAknGlobalNoteType& aAknType ) const;
|
|
118 |
|
|
119 |
/**
|
|
120 |
* Maps AVKON soft key resource id according to @c aId given.
|
|
121 |
* @since 2.0
|
|
122 |
*
|
|
123 |
* @param aId Common softkey ID.
|
|
124 |
* @param[out] aAknId Corresponding AVKON softkey ID.
|
|
125 |
*
|
|
126 |
* @return @c KErrNotFound if softkey ID not found from AVKON.
|
|
127 |
*/
|
|
128 |
void SoftKeysInAvkon( const TInt& aId, TInt& aAknId ) const;
|
|
129 |
|
|
130 |
private: // Member definitions
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Pointer to AVKON global note instance.
|
|
134 |
* Own.
|
|
135 |
*/
|
|
136 |
CAknGlobalNote* iAknGlobalNote;
|
|
137 |
};
|
|
138 |
|
|
139 |
#endif // GLOBALNOTEIMPL_H
|
|
140 |
|
|
141 |
// End of File
|