author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:44:03 +0100 | |
branch | GCC_SURGE |
changeset 63 | ef2686f7597e |
parent 31 | dfdd8240f7c8 |
parent 38 | 218231f2b3b3 |
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 Cable Connected notifier class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef USBUINCABLECONNECTEDNOTIFIER_H |
|
19 |
#define USBUINCABLECONNECTEDNOTIFIER_H |
|
20 |
||
21 |
// INCLUDES |
|
22 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
23 |
#include <hb/hbcore/hbdevicedialogsymbian.h> |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
24 |
#include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h> |
35 | 25 |
|
26 |
#include "usbnotifier.h" // Base class |
|
27 |
// CLASS DECLARATION |
|
28 |
||
29 |
/** |
|
30 |
* This class is used to show query related to the USB cable connection |
|
31 |
* |
|
32 |
* @lib |
|
33 |
*/ |
|
34 |
NONSHARABLE_CLASS(CUSBUICableConnectedNotifier) : public CUSBUINotifierBase, |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
35 |
public MHbDeviceNotificationDialogObserver |
35 | 36 |
{ |
37 |
public: |
|
38 |
// Constructors and destructor |
|
39 |
||
40 |
/** |
|
41 |
* Two-phased constructor. |
|
42 |
*/ |
|
43 |
static CUSBUICableConnectedNotifier* NewL(); |
|
44 |
||
45 |
/** |
|
46 |
* Destructor. |
|
47 |
*/ |
|
48 |
virtual ~CUSBUICableConnectedNotifier(); |
|
49 |
||
50 |
private: |
|
51 |
// Functions from base class |
|
52 |
||
53 |
/** |
|
54 |
* From CUSBUINotifierBase Called when a notifier is first loaded. |
|
55 |
* @param None. |
|
56 |
* @return A structure containing priority and channel info. |
|
57 |
*/ |
|
58 |
TNotifierInfo RegisterL(); |
|
59 |
||
60 |
/** |
|
61 |
* From CUSBUINotifierBase The notifier has been deactivated |
|
62 |
* so resources can be freed and outstanding messages completed. |
|
63 |
* @param None. |
|
64 |
* @return None. |
|
65 |
*/ |
|
66 |
void Cancel(); |
|
67 |
||
68 |
/** |
|
69 |
* From CUSBUINotifierBase Used in asynchronous notifier launch to |
|
70 |
* store received parameters into members variables and |
|
71 |
* make needed initializations. |
|
72 |
* @param aBuffer A buffer containing received parameters |
|
73 |
* @param aReplySlot a Reply slot. |
|
74 |
* @param aMessage Should be completed when the notifier is deactivated. |
|
75 |
* @return None. |
|
76 |
*/ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
77 |
void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
35 | 78 |
const RMessagePtr2& aMessage); |
79 |
||
80 |
||
81 |
private: |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
82 |
// functions from MHbDeviceNotificationDialogObserver |
35 | 83 |
/** |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
84 |
* Callback function which is called when the dialog is tapped |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
85 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
86 |
void NotificationDialogActivated(const CHbDeviceNotificationDialogSymbian* aDialog); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
87 |
/** |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
88 |
* Callback function which is called when the dialog is closed |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
89 |
*/ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
90 |
void NotificationDialogClosed(const CHbDeviceNotificationDialogSymbian* aDialog, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
91 |
TInt aCompletionCode); |
35 | 92 |
|
93 |
private: |
|
94 |
//New functions |
|
95 |
/** |
|
96 |
* Get the ID for current USB personality mode |
|
97 |
* @param aCurrentPersonality current personality id |
|
98 |
*/ |
|
99 |
void GetCurrentIdL(TInt& aCurrentPersonality); |
|
100 |
/** |
|
101 |
* Get the mode name and header for current personality |
|
102 |
* The parameters are pushed to the cleanup stack in order |
|
103 |
* aDescription, aHeader. |
|
104 |
* @param aDescription The returned current personality string. |
|
105 |
* @param aHeader The header string for message query. |
|
106 |
*/ |
|
107 |
void GetPersonalityStringLC(HBufC*& aHeader,HBufC*& aDescription ); |
|
108 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
109 |
/** |
35 | 110 |
* launches the (USB) application |
111 |
* @param aProcessName The process name (*.exe) |
|
112 |
* @param TUidType |
|
113 |
*/ |
|
114 |
void LaunchApplication(const TDesC & aProcessName,const TUidType & aUidType) const; |
|
115 |
||
116 |
private: |
|
117 |
/** |
|
118 |
* C++ default constructor. |
|
119 |
*/ |
|
120 |
CUSBUICableConnectedNotifier(); |
|
121 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
122 |
CHbDeviceNotificationDialogSymbian* iDialog; |
35 | 123 |
|
124 |
}; |
|
125 |
#endif // USBUINCABLECONNECTEDNOTIFIER_H |