35
|
1 |
/*
|
|
2 |
* Copyright (c) 2007, 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 connection notifier.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef USBUINOTIFOTGWARNING_H
|
|
20 |
#define USBUINOTIFOTGWARNING_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <aknnotewrappers.h>
|
|
24 |
#include <usbuinotif.h>
|
|
25 |
|
|
26 |
#include "usbnotifier.h" // Base class
|
|
27 |
#define KUsbUiNotifOtgGeneralNoteGranularity 1
|
|
28 |
// CLASS DECLARATION
|
|
29 |
|
|
30 |
/**
|
|
31 |
* This class is used to show general USB note.
|
|
32 |
* Synchronous call is enouph.
|
|
33 |
*
|
|
34 |
*/
|
|
35 |
NONSHARABLE_CLASS(CUsbUiNotifOtgWarning) : public CUSBUINotifierBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
// Constructors and destructor
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Two-phased constructor.
|
|
42 |
*/
|
|
43 |
static CUsbUiNotifOtgWarning* NewL();
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Destructor.
|
|
47 |
*/
|
|
48 |
virtual ~CUsbUiNotifOtgWarning();
|
|
49 |
|
|
50 |
protected:
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Second phase contructor
|
|
54 |
*/
|
|
55 |
void ConstructL();
|
|
56 |
|
|
57 |
private:
|
|
58 |
// Functions from base class
|
|
59 |
|
|
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 |
*/
|
|
72 |
void Cancel();
|
|
73 |
|
|
74 |
/**
|
|
75 |
* From CUSBUINotifierBase. Gets called when a request completes.
|
|
76 |
* @param None.
|
|
77 |
* @return None.
|
|
78 |
*/
|
|
79 |
void RunL();
|
|
80 |
|
|
81 |
/**
|
|
82 |
* From CUSBUINotifierBase. Used in asynchronous notifier launch to
|
|
83 |
* store received parameters into members variables and
|
|
84 |
* make needed initializations.
|
|
85 |
* @param aBuffer A buffer containing received parameters
|
|
86 |
* @param aReplySlot A reply slot.
|
|
87 |
* @param aMessage Should be completed when the notifier is deactivated.
|
|
88 |
* @return None.
|
|
89 |
*/
|
|
90 |
void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot,
|
|
91 |
const RMessagePtr2& aMessage);
|
|
92 |
|
|
93 |
private:
|
|
94 |
|
|
95 |
/**
|
|
96 |
* C++ default constructor.
|
|
97 |
*/
|
|
98 |
CUsbUiNotifOtgWarning();
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Publish the dialog to the cover UI
|
|
102 |
* The cover UI may use the personality ID or the localized
|
|
103 |
* personality name e.g. "Mass storage".
|
|
104 |
* @param aNote The dialog to be published.
|
|
105 |
* @param aPersonalityId The personality ID.
|
|
106 |
* @param aLocalizedPersonalityDescriptor The personality as a string.
|
|
107 |
*/
|
|
108 |
void
|
|
109 |
PublishToCoverUiL(CAknResourceNoteDialog* aNote,
|
|
110 |
TInt aPersonalityId,
|
|
111 |
const HBufC* aLocalizedPersonalityDescriptor);
|
|
112 |
|
|
113 |
private:
|
|
114 |
// data
|
|
115 |
RArray<TInt> iStringIds;
|
|
116 |
|
|
117 |
//Own
|
|
118 |
CAknResourceNoteDialog* iNote;
|
|
119 |
|
|
120 |
TInt iNoteId;
|
|
121 |
};
|
|
122 |
#endif // USBUINOTIFOTGWARNING_H
|
|
123 |
// End of file
|