williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Setting page used to selection target memory.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#ifndef C_AKNMEMORYSELECTIONSETTINGPAGE_H
|
williamr@2
|
21 |
#define C_AKNMEMORYSELECTIONSETTINGPAGE_H
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <CAknMemorySelectionDialog.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
class MAknMemorySelectionObserver;
|
williamr@2
|
27 |
|
williamr@2
|
28 |
/**
|
williamr@2
|
29 |
* A class that launches a popup setting page for memory selection.
|
williamr@2
|
30 |
*
|
williamr@2
|
31 |
* @lib CommonDialogs.lib
|
williamr@2
|
32 |
* @since S60 1.2
|
williamr@2
|
33 |
*/
|
williamr@2
|
34 |
NONSHARABLE_CLASS(CAknMemorySelectionSettingPage)
|
williamr@2
|
35 |
: public CAknMemorySelectionDialog
|
williamr@2
|
36 |
{
|
williamr@2
|
37 |
|
williamr@2
|
38 |
public:
|
williamr@2
|
39 |
|
williamr@2
|
40 |
// Constructors and destructors
|
williamr@2
|
41 |
|
williamr@2
|
42 |
/**
|
williamr@2
|
43 |
* Static constructor. Loads default settings.
|
williamr@2
|
44 |
* @return Returns a pointer to an instance of itself.
|
williamr@2
|
45 |
*/
|
williamr@2
|
46 |
IMPORT_C static CAknMemorySelectionSettingPage* NewL();
|
williamr@2
|
47 |
|
williamr@2
|
48 |
/**
|
williamr@2
|
49 |
* Static constructor.
|
williamr@2
|
50 |
* @param aResourceId A resource id (MEMORYSELECTIONDIALOG).
|
williamr@2
|
51 |
* @return Returns a pointer to an instance of itself.
|
williamr@2
|
52 |
*/
|
williamr@2
|
53 |
IMPORT_C static CAknMemorySelectionSettingPage* NewL( TInt aResourceId );
|
williamr@2
|
54 |
|
williamr@2
|
55 |
IMPORT_C ~CAknMemorySelectionSettingPage();
|
williamr@2
|
56 |
|
williamr@2
|
57 |
// New functions
|
williamr@2
|
58 |
|
williamr@2
|
59 |
/**
|
williamr@2
|
60 |
* Executes the memory selection setting page.
|
williamr@2
|
61 |
*
|
williamr@2
|
62 |
* @param aSelectedMemory A reference to a memory (TMemory).
|
williamr@2
|
63 |
* If one of the memories is selected, the selected memory is
|
williamr@2
|
64 |
* stored to the parameter.
|
williamr@2
|
65 |
* @return Returns true if user has selected an item and false
|
williamr@2
|
66 |
* if user hits cancel.
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
IMPORT_C TReturnKey ExecuteL( TMemory& aSelectedMemory );
|
williamr@2
|
69 |
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
* Executes the memory selection setting page.
|
williamr@2
|
73 |
*
|
williamr@2
|
74 |
* @param aSelectedMemory A reference to a memory (TMemory).
|
williamr@2
|
75 |
* If one of the memories is selected, the selected memory is
|
williamr@2
|
76 |
* stored to the parameter.
|
williamr@2
|
77 |
* @param aRootPath A pointer to a descriptor where the root path
|
williamr@2
|
78 |
* of the selected memory is stored.
|
williamr@2
|
79 |
* @param aDefaultFolder A pointer to a descriptor where the default folder
|
williamr@2
|
80 |
* of the selected memory is stored.
|
williamr@2
|
81 |
* @return Returns true if user has selected an item and false
|
williamr@2
|
82 |
* if user hits cancel.
|
williamr@2
|
83 |
*/
|
williamr@2
|
84 |
IMPORT_C TReturnKey ExecuteL(
|
williamr@2
|
85 |
TMemory& aSelectedMemory, TDes* aRootPath, TDes* aDefaultFolder );
|
williamr@2
|
86 |
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
* Static methods for launching memory selection dialog
|
williamr@2
|
89 |
* Parameters & return value are descibed in method RunL
|
williamr@2
|
90 |
*/
|
williamr@2
|
91 |
|
williamr@2
|
92 |
IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
|
williamr@2
|
93 |
MAknMemorySelectionObserver* aObserver = NULL );
|
williamr@2
|
94 |
|
williamr@2
|
95 |
IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
|
williamr@2
|
96 |
const TDesC& aTitle,
|
williamr@2
|
97 |
MAknMemorySelectionObserver* aObserver = NULL );
|
williamr@2
|
98 |
|
williamr@2
|
99 |
IMPORT_C static TBool RunDlgLD( TMemory& aSelectedMemory,
|
williamr@2
|
100 |
TInt aResourceId,
|
williamr@2
|
101 |
TDes* aRootPath = NULL, TDes* aDefaultFolder = NULL,
|
williamr@2
|
102 |
MAknMemorySelectionObserver* aObserver = NULL );
|
williamr@2
|
103 |
|
williamr@2
|
104 |
private:
|
williamr@2
|
105 |
|
williamr@2
|
106 |
// Constructors and destructors
|
williamr@2
|
107 |
|
williamr@2
|
108 |
CAknMemorySelectionSettingPage();
|
williamr@2
|
109 |
|
williamr@2
|
110 |
// New functions
|
williamr@2
|
111 |
|
williamr@2
|
112 |
/**
|
williamr@2
|
113 |
* A static method for launching a memory selection setting page.
|
williamr@2
|
114 |
* Creates, constructs, runs and deletes a memory selection dialog with
|
williamr@2
|
115 |
* different parameters.
|
williamr@2
|
116 |
*
|
williamr@2
|
117 |
* @param aResourceId An id of a resource.
|
williamr@2
|
118 |
* @param aSelectedMemory A reference to a memory described in ExecuteL.
|
williamr@2
|
119 |
* @param aTitle A title for memory selection dialog.
|
williamr@2
|
120 |
* @param aRootPath A pointer to a descriptor where the root path
|
williamr@2
|
121 |
* of the selected memory is stored.
|
williamr@2
|
122 |
* @param aDefaultFolder A pointer to a descriptor where the default folder
|
williamr@2
|
123 |
* of the selected memory is stored.
|
williamr@2
|
124 |
* @param aObserver An observer which is asked if the selected item
|
williamr@2
|
125 |
* can be selected. Implemented in application.
|
williamr@2
|
126 |
*/
|
williamr@2
|
127 |
static TBool RunL(
|
williamr@2
|
128 |
TInt aResourceId,
|
williamr@2
|
129 |
TMemory& aSelectedMemory,
|
williamr@2
|
130 |
const TDesC& aTitle,
|
williamr@2
|
131 |
TDes* aRootPath,
|
williamr@2
|
132 |
TDes* aDefaultFolder,
|
williamr@2
|
133 |
MAknMemorySelectionObserver* aObserver );
|
williamr@2
|
134 |
|
williamr@2
|
135 |
};
|
williamr@2
|
136 |
|
williamr@2
|
137 |
#endif // C_AKNMEMORYSELECTIONSETTINGPAGE_H
|