author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 11 Jun 2010 14:38:00 +0300 | |
changeset 38 | 218231f2b3b3 |
parent 35 | 9d8b04ca6939 |
child 63 | ef2686f7597e |
permissions | -rw-r--r-- |
35 | 1 |
/* |
2 |
* Copyright (c) 2005-2009 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: Declares USB UI Queries notifier. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef USBUINQUERIESNOTIFIER_H |
|
19 |
#define USBUINQUERIESNOTIFIER_H |
|
20 |
||
21 |
// INCLUDES |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
22 |
#include <hb/hbwidgets/hbdevicemessageboxsymbian.h> |
35 | 23 |
#include "usbnotifier.h" // Base class |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
24 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
25 |
|
35 | 26 |
// CLASS DECLARATION |
27 |
||
28 |
/** |
|
29 |
* This class is used to show USB query dialogs. |
|
30 |
* |
|
31 |
* @lib |
|
32 |
* @since S60 3.0 |
|
33 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
34 |
NONSHARABLE_CLASS(CUSBUIQueriesNotifier) : public CUSBUINotifierBase, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
35 |
public MHbDeviceMessageBoxObserver |
35 | 36 |
{ |
37 |
public: |
|
38 |
// Constructors and destructor |
|
39 |
||
40 |
/** |
|
41 |
* Two-phased constructor. |
|
42 |
*/ |
|
43 |
static CUSBUIQueriesNotifier* NewL(); |
|
44 |
||
45 |
/** |
|
46 |
* Destructor. |
|
47 |
*/ |
|
48 |
virtual ~CUSBUIQueriesNotifier(); |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
49 |
/** |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
50 |
* Call back function to observe device message box closing. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
51 |
* @param aMessageBox Pointer to the closing message box instance. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
52 |
* @param aButton Button that was pressed. |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
53 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
54 |
void MessageBoxClosed(const CHbDeviceMessageBoxSymbian* aMessageBox, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
55 |
CHbDeviceMessageBoxSymbian::TButtonId aButton); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
56 |
|
35 | 57 |
|
58 |
private: |
|
59 |
// Functions from base class |
|
60 |
||
61 |
/** |
|
62 |
* From CUSBUINotifierBase Called when a notifier is first loaded. |
|
63 |
* @param None. |
|
64 |
* @return A structure containing priority and channel info. |
|
65 |
*/ |
|
66 |
TNotifierInfo RegisterL(); |
|
67 |
||
68 |
/** |
|
69 |
* From CUSBUINotifierBase The notifier has been deactivated |
|
70 |
* so resources can be freed and outstanding messages completed. |
|
71 |
* @param None. |
|
72 |
* @return None. |
|
73 |
*/ |
|
74 |
void Cancel(); |
|
75 |
||
76 |
/** |
|
77 |
* From CUSBUINotifierBase Used in asynchronous notifier launch to |
|
78 |
* store received parameters into members variables and |
|
79 |
* make needed initializations. |
|
80 |
* @param aBuffer A buffer containing received parameters |
|
81 |
* @param aReplySlot A reply slot. |
|
82 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
83 |
* @return None. |
|
84 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
85 |
void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
35 | 86 |
const RMessagePtr2& aMessage); |
87 |
||
88 |
private: |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
89 |
|
35 | 90 |
/** |
91 |
* C++ default constructor. |
|
92 |
*/ |
|
93 |
CUSBUIQueriesNotifier(); |
|
94 |
||
95 |
||
96 |
private: |
|
97 |
// Data |
|
98 |
||
99 |
/** |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
100 |
* owned |
35 | 101 |
*/ |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
102 |
CHbDeviceMessageBoxSymbian* iUSBQueryDlg; |
35 | 103 |
TUSBUIQueries iQueryType; // To store the type of the query |
104 |
||
105 |
}; |
|
106 |
#endif // USBUINQUERIESNOTIFIER_H |