sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Classes used for communication between the reference dialog creator
|
sl@0
|
16 |
* and the reference notifier implementations.
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
/**
|
sl@0
|
22 |
@file
|
sl@0
|
23 |
@internalTechnology
|
sl@0
|
24 |
@test
|
sl@0
|
25 |
*/
|
sl@0
|
26 |
|
sl@0
|
27 |
#ifndef UPSNOTIFIERUTIL_H
|
sl@0
|
28 |
#define UPSNOTIFIERUTIL_H
|
sl@0
|
29 |
|
sl@0
|
30 |
#include <e32base.h>
|
sl@0
|
31 |
#include <e32cmn.h>
|
sl@0
|
32 |
#include <s32strm.h>
|
sl@0
|
33 |
#include <ups/policy.h>
|
sl@0
|
34 |
#include <ups/upsconst.h>
|
sl@0
|
35 |
#include <ups/upstypes.h>
|
sl@0
|
36 |
|
sl@0
|
37 |
namespace UserPromptService
|
sl@0
|
38 |
{
|
sl@0
|
39 |
/**
|
sl@0
|
40 |
Enum for bitmask that influences visual style or behavior of dialog.
|
sl@0
|
41 |
*/
|
sl@0
|
42 |
typedef enum
|
sl@0
|
43 |
{
|
sl@0
|
44 |
ETrustedClient = 0x0001, ///< Client SID is protected so client name is trusted
|
sl@0
|
45 |
EBuiltInApp = 0x0002 ///< Built-in application ... exe loaded for Z drive.
|
sl@0
|
46 |
} TUpsDialogFlags;
|
sl@0
|
47 |
|
sl@0
|
48 |
/**
|
sl@0
|
49 |
Contains the data needed to display a prompt.
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
NONSHARABLE_CLASS(CPromptData) : public CBase
|
sl@0
|
52 |
{
|
sl@0
|
53 |
public:
|
sl@0
|
54 |
IMPORT_C static CPromptData* NewL();
|
sl@0
|
55 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
sl@0
|
56 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
sl@0
|
57 |
~CPromptData();
|
sl@0
|
58 |
private:
|
sl@0
|
59 |
CPromptData();
|
sl@0
|
60 |
void Reset();
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
RBuf iClientName; ///< From AppArc, SIS registry or process filename
|
sl@0
|
63 |
RBuf iVendorName; ///< Vendor name
|
sl@0
|
64 |
TSecureId iClientSid; ///< SID of client application requesting the service
|
sl@0
|
65 |
TSecureId iServerSid; ///< Needed to lookup localized text for service
|
sl@0
|
66 |
TServiceId iServiceId; ///< ID of the requested service
|
sl@0
|
67 |
RBuf iDestination; ///< The destination of the request
|
sl@0
|
68 |
RBuf8 iOpaqueData; ///< The Opaque data
|
sl@0
|
69 |
RPointerArray<HBufC> iDescriptions; ///< Array of fingerprint descriptions
|
sl@0
|
70 |
TUint32 iOptions; ///< A bit field containing the set of allowed responses (CPolicy::TOptions)
|
sl@0
|
71 |
TUint32 iFlags; ///< Dialog style e.g. whether client identity is trusted
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
class TPromptResult
|
sl@0
|
75 |
{
|
sl@0
|
76 |
public:
|
sl@0
|
77 |
TPromptResult();
|
sl@0
|
78 |
CPolicy::TOptions iSelected; ///< The button that was pressed
|
sl@0
|
79 |
TInt iDestination; ///< The destination selected if applicable.
|
sl@0
|
80 |
};
|
sl@0
|
81 |
|
sl@0
|
82 |
inline TPromptResult::TPromptResult() :
|
sl@0
|
83 |
iSelected(CPolicy::ENo), iDestination(0)
|
sl@0
|
84 |
{
|
sl@0
|
85 |
}
|
sl@0
|
86 |
}
|
sl@0
|
87 |
#endif // UPSNOTIFIERUTIL_H
|