Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rmaauth.h « realmedia « include - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 866bf87bfc54edbdf88ba4de3763d2bab4585024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
/****************************************************************************
 * 
 *  $Id: rmaauth.h 7 2003-05-30 02:18:02Z gabest $
 *  
 *  Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
 *
 *  http://www.real.com/devzone
 *
 *  This program contains proprietary 
 *  information of Progressive Networks, Inc, and is licensed
 *  subject to restrictions on use and distribution.
 *
 *  Authentication and password interfaces. 
 *
 */

#ifndef _RMAAUTH_H_
#define _RMAAUTH_H_

/*
 * Forward declarations of some interfaces defined or used here-in.
 */
typedef _INTERFACE  IRMAAuthenticator		    IRMAAuthenticator;
typedef _INTERFACE  IRMAAuthenticatorResponse	    IRMAAuthenticatorResponse;
typedef _INTERFACE  IRMAAuthenticatorRequest	    IRMAAuthenticatorRequest;
typedef _INTERFACE  IRMAPassword		    IRMAPassword;
typedef _INTERFACE  IRMAAuthenticationManagerResponse IRMAAuthenticationManagerResponse;
typedef _INTERFACE  IRMAValues			    IRMAValues;
typedef _INTERFACE  IRMABuffer			    IRMABuffer;

/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAAuthenticator
 * 
 *  Purpose:
 * 
 *      Provide a means of authenticating users.
 *
 *  IID_IRMAAuthenticator:
 * 
 *      {00001800-0901-11d1-8B06-00A024406D59}
 * 
 */

DEFINE_GUID(IID_IRMAAuthenticator, 0x00001800, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#define CLSID_IRMAAuthenticator IID_IRMAAuthenticator

#undef  INTERFACE
#define INTERFACE IRMAAuthenticator

DECLARE_INTERFACE_(IRMAAuthenticator, IUnknown)
{
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;

    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /*
     * InitAuthenticator is called by the creator of the Authenticator
     * object in order to pass it an IRMAAuthenticatorRequest object,
     * usually implemented by the creator itself.
     */
    STDMETHOD(InitAuthenticator) (THIS_ 
				  IRMAAuthenticatorRequest* pRequest) PURE;
    /*
     * Authenticate is called by a file object (and others??)
     * when it wants to ask the creator, presumably an FS Manager,
     * for authorization to open it's file.
     *
     * Authenticate will call IRMAAuthenticateResponse::AuthenticateDone
     * when done with PNR_OK or an error.
     *
     * File objects will presumably perform the Authenticate response as
     * part of their Init() call, and not call InitDone until they receive
     * a response one way or the other.
     */
    STDMETHOD(Authenticate) (THIS_
			     IRMAValues* pValues,
			     IRMAAuthenticatorResponse* pResponse) PURE;

    /* GenerateAuthRequest is called by the creator of this object
     * when they want to send an authentication request to someone.
     */
    STDMETHOD(GenerateAuthRequest) (THIS_
				    UINT32 authType,
				    REF(IRMAValues*) pValues) PURE;
    /*
     * AuthValuesReady is called by IRMAAuthenticatorRequest when it
     * is ready to respond to a GetAuthValues request.
     */
    STDMETHOD(AuthValuesReady) (THIS_ 
				PN_RESULT result,
				IRMAValues* pValues) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAAuthenticatorResponse
 * 
 *  Purpose:
 *
 *      Response object for the Authenticator class.
 * 
 *  IID_IRMAAuthenticatorResponse:
 * 
 *      {00001801-0901-11d1-8B06-00A024406D59}
 * 
 */

DEFINE_GUID(IID_IRMAAuthenticatorResponse, 0x00001801, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE IRMAAuthenticatorResponse

DECLARE_INTERFACE_(IRMAAuthenticatorResponse, IUnknown)
{
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;

    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /* AuthenticateDone is called by an IRMAAuthenticator when it has
     * finished it's authorization steps.  If the result is PNR_OK,
     * then the values contain authorization information as generated by
     * IRMAPassword.
     */
    STDMETHOD(AuthenticateDone) (THIS_ PN_RESULT result,
				IRMAValues* pAuthResponseValues) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAAuthenticatorRequest
 * 
 *  Purpose:
 *
 *      Request object for the Authenticator class.
 * 
 *  IID_IRMAAuthenticatorRequest:
 * 
 *      {00001802-0901-11d1-8B06-00A024406D59}
 * 
 */

DEFINE_GUID(IID_IRMAAuthenticatorRequest, 0x00001802, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE IRMAAuthenticatorRequest

DECLARE_INTERFACE_(IRMAAuthenticatorRequest, IUnknown)
{
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;

    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /* GetAuthValues is called by the Authenticator object when it
     * needs to know the authorization info for this transaction.
     *
     * This object should call AuthValuesReady when ready.
     */
    STDMETHOD(GetAuthValues) (THIS_ IRMAValues* pOrigValues) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAPassword
 * 
 *  Purpose:
 * 
 *      Provides a general password facility for storing of passwords in
 *	an encrypted form and a facility for verifying passwords securely
 *	over the network.
 * 
 *  IID_IRMAPassword:
 * 
 *      {00001700-0901-11d1-8B06-00A024406D59}
 * 
 */

#define PN_AUTH_BASIC	1
#define PN_AUTH_DIGEST	2
#define PN_AUTH_RN5	3
#define PN_AUTH_NTLM	4

DEFINE_GUID(IID_IRMAPassword, 0x00001700, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
			0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE IRMAPassword

DECLARE_INTERFACE_(IRMAPassword, IUnknown)
{
    /*
     *  IUnknown methods
     */
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;

    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;

    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /*
     *  IRMAPassword methods
     */

    STDMETHOD(Crypt) (THIS_ IRMAValues* pAuthentication) PURE;
    STDMETHOD(Verify) (THIS_ IRMAValues* pAuth1, IRMAValues* pAuth2) PURE;

    STDMETHOD(AsString) (THIS_ IRMAValues* pAuth, REF(IRMABuffer*) pBuffer) PURE;
    STDMETHOD(AsValues) (THIS_ const char* str, IRMAValues* pValues) PURE;

    /*
     * CreateBuffer is provided for the convenince of external users,
     * who would otherwise have to get a context and common class factory
     * just to create IRMABuffers.  This method can be used instead, but
     * is not advisable if other means are available.
     */
    STDMETHOD(CreateBuffer) (THIS_ REF(IRMABuffer*) pBuffer) PURE;

    /*
     * Ditto for CreateValues
     */
    STDMETHOD(CreateValues) (THIS_ REF(IRMAValues*) pValues) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAAuthenticationManager
 * 
 *  Purpose:
 * 
 *      Provide a means of authenticating users.
 *
 *  IID_IRMAAuthenticator:
 * 
 *      {00001a00-0901-11d1-8B06-00A024406D59}
 * 
 */

DEFINE_GUID(IID_IRMAAuthenticationManager, 0x00001a00, 0x901, 0x11d1,
	    0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);

#undef  INTERFACE
#define INTERFACE IRMAAuthenticationManager

DECLARE_INTERFACE_(IRMAAuthenticationManager, IUnknown)
{
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;
    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /* HandleAuthenticationRequest is called when the core wants us to get
     * a username and password.
     */
    STDMETHOD(HandleAuthenticationRequest) (
	THIS_ IRMAAuthenticationManagerResponse* pResponse) PURE;
};


/****************************************************************************
 * 
 *  Interface:
 * 
 *      IRMAAuthenticationManagerResponse
 * 
 *  Purpose:
 * 
 *      Response object for IRMAAuthenticationManager.
 *
 *  IID_IRMAAuthenticator:
 * 
 *      {00001a01-0901-11d1-8B06-00A024406D59}
 * 
 */

DEFINE_GUID(IID_IRMAAuthenticationManagerResponse, 0x00001a01, 0x901, 0x11d1,
            0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59); 


#undef  INTERFACE
#define INTERFACE IRMAAuthenticationManagerResponse

DECLARE_INTERFACE_(IRMAAuthenticationManagerResponse, IUnknown)
{
    STDMETHOD(QueryInterface)           (THIS_
					REFIID riid,
					void** ppvObj) PURE;
    STDMETHOD_(ULONG,AddRef)          (THIS) PURE;
    STDMETHOD_(ULONG,Release)         (THIS) PURE;

    /* HandleAuthenticationRequest is called when the core wants us to get
     * a username and password.
     */
    STDMETHOD(AuthenticationRequestDone) (THIS_
					  PN_RESULT result,
					  const char* pUserName,
					  const char* pPassword) PURE;
};

#ifdef _MACINTOSH
#pragma export on
#endif

STDAPI CreatePassword(IUnknown** /* OUT */ ppIUnknown);

#ifdef _MACINTOSH
#pragma export off
#endif

#endif /* _RMAAUTH_H_ */