williamr@4
|
1 |
/*
|
williamr@4
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
3 |
* All rights reserved.
|
williamr@4
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
williamr@4
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
8 |
*
|
williamr@4
|
9 |
* Initial Contributors:
|
williamr@4
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@4
|
11 |
*
|
williamr@4
|
12 |
* Contributors:
|
williamr@4
|
13 |
*
|
williamr@4
|
14 |
* Description:
|
williamr@4
|
15 |
* RAuthclient - external authentication client session interface
|
williamr@4
|
16 |
* The defined fuctionality is used by clients to access the authentication
|
williamr@4
|
17 |
* server.
|
williamr@4
|
18 |
* The access to a specific functionality is dependant on the client
|
williamr@4
|
19 |
* capabilities and may be restricted.
|
williamr@4
|
20 |
*
|
williamr@4
|
21 |
*/
|
williamr@4
|
22 |
|
williamr@4
|
23 |
|
williamr@4
|
24 |
/**
|
williamr@4
|
25 |
@file
|
williamr@4
|
26 |
@publishedAll
|
williamr@4
|
27 |
@released
|
williamr@4
|
28 |
*/
|
williamr@4
|
29 |
|
williamr@4
|
30 |
#ifndef AUTHCLIENT_H
|
williamr@4
|
31 |
#define AUTHCLIENT_H
|
williamr@4
|
32 |
|
williamr@4
|
33 |
#include "authserver/identity.h"
|
williamr@4
|
34 |
#include "authserver/authexpression.h"
|
williamr@4
|
35 |
#include "authserver/plugindesc.h"
|
williamr@4
|
36 |
#include "authserver/idandstring.h"
|
williamr@4
|
37 |
#include <scs/scsclient.h>
|
williamr@4
|
38 |
namespace AuthServer
|
williamr@4
|
39 |
{
|
williamr@4
|
40 |
|
williamr@4
|
41 |
class CAsyncResponseDecoder;
|
williamr@4
|
42 |
|
williamr@4
|
43 |
/**
|
williamr@4
|
44 |
* Client side interface to the authentication server providing general
|
williamr@4
|
45 |
* authentication and plugin query services.
|
williamr@4
|
46 |
*
|
williamr@4
|
47 |
*/
|
williamr@4
|
48 |
class RAuthClient : public RScsClientBase
|
williamr@4
|
49 |
{
|
williamr@4
|
50 |
|
williamr@4
|
51 |
friend class CAsyncResponseDecoder;
|
williamr@4
|
52 |
|
williamr@4
|
53 |
public:
|
williamr@4
|
54 |
|
williamr@4
|
55 |
IMPORT_C RAuthClient();
|
williamr@4
|
56 |
|
williamr@4
|
57 |
IMPORT_C TInt Connect();
|
williamr@4
|
58 |
|
williamr@4
|
59 |
IMPORT_C void AuthenticateL(
|
williamr@4
|
60 |
const CAuthExpression& aExpression,
|
williamr@4
|
61 |
TTimeIntervalSeconds aTimeout,
|
williamr@4
|
62 |
TBool aClientSpecificKey,
|
williamr@4
|
63 |
TBool aWithString,
|
williamr@4
|
64 |
CIdentity*& aIdentityResult,
|
williamr@4
|
65 |
TRequestStatus& aStatus);
|
williamr@4
|
66 |
|
williamr@4
|
67 |
IMPORT_C CIdentity* AuthenticateL(
|
williamr@4
|
68 |
const CAuthExpression& aExpression,
|
williamr@4
|
69 |
TTimeIntervalSeconds aTimeout,
|
williamr@4
|
70 |
TBool aClientSpecificKey,
|
williamr@4
|
71 |
TBool aWithString);
|
williamr@4
|
72 |
|
williamr@4
|
73 |
IMPORT_C CIdentity* AuthenticateL(
|
williamr@4
|
74 |
const CAuthExpression& aAuthExpression,
|
williamr@4
|
75 |
TTimeIntervalSeconds aTimeout,
|
williamr@4
|
76 |
TBool aClientSpecificKey,
|
williamr@4
|
77 |
TUid aClientSid,
|
williamr@4
|
78 |
TBool aWithString,
|
williamr@4
|
79 |
const TDesC& aClientMessage);
|
williamr@4
|
80 |
|
williamr@4
|
81 |
IMPORT_C void AuthenticateL(
|
williamr@4
|
82 |
const CAuthExpression& aAuthExpression,
|
williamr@4
|
83 |
TTimeIntervalSeconds aTimeout,
|
williamr@4
|
84 |
TBool aClientSpecificKey,
|
williamr@4
|
85 |
TUid aClientSid,
|
williamr@4
|
86 |
TBool aWithString,
|
williamr@4
|
87 |
const TDesC& aClientMessage,
|
williamr@4
|
88 |
CIdentity*& aIdentityResult,
|
williamr@4
|
89 |
TRequestStatus& aStatus
|
williamr@4
|
90 |
);
|
williamr@4
|
91 |
|
williamr@4
|
92 |
IMPORT_C void DeauthenticateL();
|
williamr@4
|
93 |
|
williamr@4
|
94 |
IMPORT_C void PluginsL(RPluginDescriptions& aPluginList);
|
williamr@4
|
95 |
IMPORT_C void ActivePluginsL(RPluginDescriptions& aPluginList);
|
williamr@4
|
96 |
IMPORT_C void PluginsOfTypeL(TAuthPluginType aType,
|
williamr@4
|
97 |
RPluginDescriptions& aPluginList);
|
williamr@4
|
98 |
|
williamr@4
|
99 |
IMPORT_C void PluginsWithTrainingStatusL(
|
williamr@4
|
100 |
TAuthTrainingStatus aStatus,
|
williamr@4
|
101 |
RPluginDescriptions& aPluginList);
|
williamr@4
|
102 |
|
williamr@4
|
103 |
IMPORT_C void IdentitiesL(RIdentityIdArray& aIdList);
|
williamr@4
|
104 |
IMPORT_C void IdentitiesWithStringL(RIdAndStringArray& aList);
|
williamr@4
|
105 |
|
williamr@4
|
106 |
IMPORT_C HBufC* IdentityStringL(TIdentityId aId);
|
williamr@4
|
107 |
IMPORT_C void SetIdentityStringL(TIdentityId aId, const TDesC& aString);
|
williamr@4
|
108 |
|
williamr@4
|
109 |
IMPORT_C TPluginId PreferredTypePluginL(TAuthPluginType aPluginType);
|
williamr@4
|
110 |
|
williamr@4
|
111 |
IMPORT_C TUint Cancel();
|
williamr@4
|
112 |
IMPORT_C void Close();
|
williamr@4
|
113 |
|
williamr@4
|
114 |
IMPORT_C void ListAuthAliasesL(RPointerArray<HBufC>& aAuthAliasList);
|
williamr@4
|
115 |
|
williamr@4
|
116 |
IMPORT_C CAuthExpression* CreateAuthExpressionL(const TDesC& aAuthString) const;
|
williamr@4
|
117 |
|
williamr@4
|
118 |
protected:
|
williamr@4
|
119 |
/* @internalComponent */
|
williamr@4
|
120 |
void CheckAsyncDecoderL();
|
williamr@4
|
121 |
/* @internalComponent */
|
williamr@4
|
122 |
HBufC8* SendReceiveBufferLC(TInt aMessage);
|
williamr@4
|
123 |
/* @internalComponent */
|
williamr@4
|
124 |
HBufC8* SendReceiveBufferLC(TInt aMessage, TIpcArgs& aArgs);
|
williamr@4
|
125 |
|
williamr@4
|
126 |
private:
|
williamr@4
|
127 |
TInt StartAuthServer();
|
williamr@4
|
128 |
|
williamr@4
|
129 |
protected:
|
williamr@4
|
130 |
CAsyncResponseDecoder* iAsyncResponseDecoder;
|
williamr@4
|
131 |
};
|
williamr@4
|
132 |
|
williamr@4
|
133 |
} // namespace
|
williamr@4
|
134 |
#endif
|
williamr@4
|
135 |
|