Add pgs color type setting
[xy_vsfilter.git] / include / realmedia / rmaauthn.h
blob4f2e39b7f6fa83eb53a025efdae420f4c30331ac
1 /****************************************************************************
2 *
3 * $Id: rmaauthn.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
6 *
7 * http://www.real.com/devzone
9 * This program contains proprietary
10 * information of Progressive Networks, Inc, and is licensed
11 * subject to restrictions on use and distribution.
14 * RealMedia Architecture Interface.
18 #ifndef _RMAAUTHN_H_
19 #define _RMAAUTHN_H_
22 * Forward declarations of some interfaces defined or used here-in.
24 typedef _INTERFACE IUnknown IUnknown;
25 typedef _INTERFACE IRMACredRequest IRMACredRequest;
26 typedef _INTERFACE IRMACredRequestResponse IRMACredRequestResponse;
27 typedef _INTERFACE IRMAClientAuthConversation IRMAClientAuthConversation;
28 typedef _INTERFACE IRMAClientAuthResponse IRMAClientAuthResponse;
29 typedef _INTERFACE IRMAServerAuthConversation IRMAServerAuthConversation;
30 typedef _INTERFACE IRMAServerAuthResponse IRMAServerAuthResponse;
31 typedef _INTERFACE IRMAUserContext IRMAUserContext;
32 typedef _INTERFACE IRMAUserProperties IRMAUserProperties;
33 typedef _INTERFACE IRMAUserImpersonation IRMAUserImpersonation;
34 typedef _INTERFACE IRMAChallenge IRMAChallenge;
35 typedef _INTERFACE IRMAChallengeResponse IRMAChallengeResponse;
36 typedef _INTERFACE IRMARequest IRMARequest;
37 typedef _INTERFACE IRMABuffer IRMABuffer;
38 typedef _INTERFACE IRMAValues IRMAValues;
41 /****************************************************************************
43 * Interface:
45 * IRMACredRequest
47 * Purpose:
49 * This is queried from the response interface passed into
50 * IRMAClientAuthConversation::MakeResponse. MakeResponse
51 * uses it to request the current user to enter their credentials.
53 * IRMACredRequest:
55 * {00002801-0901-11d1-8B06-00A024406D59}
58 DEFINE_GUID(IID_IRMACredRequest, 0x00002801, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
60 #undef INTERFACE
61 #define INTERFACE IRMACredRequest
63 DECLARE_INTERFACE_(IRMACredRequest, IUnknown)
66 * IUnknown methods
68 STDMETHOD(QueryInterface) (THIS_
69 REFIID riid,
70 void** ppvObj) PURE;
72 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
74 STDMETHOD_(ULONG,Release) (THIS) PURE;
76 /************************************************************************
77 * Method:
78 * IRMACredRequest::GetCredentials
79 * Purpose:
81 * Call this to request the credentials. Usually presents UI to
82 * the user asking for username and password.
84 * While ignored at this time, pValuesCredentialRequest should
85 * contain CString properties that describe the reason for the
86 * request. (like the URL, the Realm, the Auth protocol, and how
87 * secure it is, etc..) In the future this data will be displayed
88 * to the user.
91 STDMETHOD(GetCredentials)
93 THIS_
94 IRMACredRequestResponse* pCredRequestResponseRequester,
95 IRMAValues* pValuesCredentialRequest
96 ) PURE;
100 /****************************************************************************
102 * Interface:
104 * IRMACredRequestResponse
106 * Purpose:
108 * This is implemented by a client authenticator in order to receive
109 * the credentials requested in IRMACredRequest::GetCredentials
111 * IRMACredRequestResponse:
113 * {00002800-0901-11d1-8B06-00A024406D59}
116 DEFINE_GUID(IID_IRMACredRequestResponse, 0x00002800, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
118 #undef INTERFACE
119 #define INTERFACE IRMACredRequestResponse
121 DECLARE_INTERFACE_(IRMACredRequestResponse, IUnknown)
124 * IUnknown methods
126 STDMETHOD(QueryInterface) (THIS_
127 REFIID riid,
128 void** ppvObj) PURE;
130 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
132 STDMETHOD_(ULONG,Release) (THIS) PURE;
134 /************************************************************************
135 * Method:
136 * IRMACredRequestResponse::CredentialsReady
137 * Purpose:
139 * Reports the success or failure of
140 * IRMACredRequest::GetCredentials
142 * If successful pValuesCredentials contains the requested
143 * credentials. (usually CString:Username and CString:Password)
146 STDMETHOD(CredentialsReady)
148 THIS_
149 PN_RESULT ResultStatus,
150 IRMAValues* pValuesCredentials
151 ) PURE;
155 /****************************************************************************
157 * Interface:
159 * IRMAClientAuthConversation
161 * Purpose:
163 * This is implemented by a client authenticator in order to perform
164 * the client side of an authentication protocol.
166 * IRMAClientAuthConversation:
168 * {00002803-0901-11d1-8B06-00A024406D59}
171 DEFINE_GUID(IID_IRMAClientAuthConversation, 0x00002803, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
174 * The IRMACommonClassFactory supports creating an instance
175 * of this object.
177 #define CLSID_CRMAClientAuthenticator IID_IRMAClientAuthConversation
179 #undef INTERFACE
180 #define INTERFACE IRMAClientAuthConversation
182 DECLARE_INTERFACE_(IRMAClientAuthConversation, IUnknown)
185 * IUnknown methods
187 STDMETHOD(QueryInterface) (THIS_
188 REFIID riid,
189 void** ppvObj) PURE;
191 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
193 STDMETHOD_(ULONG,Release) (THIS) PURE;
195 /************************************************************************
196 * Method:
197 * IRMAClientAuthConversation::MakeResponse
198 * Purpose:
200 * Call this when a challenge is received from the server.
202 * pRequestChallengeHeaders should contain the server challenge.
205 STDMETHOD(MakeResponse)
207 THIS_
208 IRMAClientAuthResponse* pClientAuthResponseRequester,
209 IRMARequest* pRequestChallengeHeaders
210 ) PURE;
212 /************************************************************************
213 * Method:
214 * IRMAClientAuthConversation::IsDone
215 * Purpose:
217 * Call this to determine whether the conversation is complete.
218 * (some protocols have more then one message exchange.)
221 STDMETHOD_(BOOL,IsDone)(THIS) PURE;
223 /************************************************************************
224 * Method:
225 * IRMAClientAuthConversation::Authenticated
226 * Purpose:
228 * Call this to signal the authenticator that the conversation
229 * just completed succeeded or failed.
232 STDMETHOD(Authenticated)(THIS_ BOOL bAuthenticated) PURE;
235 /****************************************************************************
237 * Interface:
239 * IRMAClientAuthResponse
241 * Purpose:
243 * This is implemented by the client core in order to receive the
244 * response generated by IRMAClientAuthConversation::MakeResponse
246 * IRMAClientAuthResponse:
248 * {00002802-0901-11d1-8B06-00A024406D59}
251 DEFINE_GUID(IID_IRMAClientAuthResponse, 0x00002802, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
253 #undef INTERFACE
254 #define INTERFACE IRMAClientAuthResponse
256 DECLARE_INTERFACE_(IRMAClientAuthResponse, IUnknown)
259 * IUnknown methods
261 STDMETHOD(QueryInterface) (THIS_
262 REFIID riid,
263 void** ppvObj) PURE;
265 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
267 STDMETHOD_(ULONG,Release) (THIS) PURE;
269 /************************************************************************
270 * Method:
271 * IRMAClientAuthResponse::ResponseReady
272 * Purpose:
274 * Reports the success or failure of
275 * IRMAClientAuthConversation::MakeResponse
277 * pRequestResponseHeaders should be the same Request object
278 * that was passed into MakeResponse, it should contain
279 * CString values for each MimeHeader it wishes to send to
280 * the Server.
283 STDMETHOD(ResponseReady)
285 THIS_
286 PN_RESULT ResultStatus,
287 IRMARequest* pRequestResponseHeaders
288 ) PURE;
293 /****************************************************************************
295 * Interface:
297 * IRMAServerAuthConversation
299 * Purpose:
301 * This is implemented by a server authenticator in order to perform
302 * the server side of an authentication protocol.
304 * IRMAServerAuthConversation:
306 * {00002805-0901-11d1-8B06-00A024406D59}
309 DEFINE_GUID(IID_IRMAServerAuthConversation, 0x00002805, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
312 * The IRMACommonClassFactory supports creating an instance
313 * of this object.
315 #define CLSID_CRMAServerAuthenticator IID_IRMAServerAuthResponse
317 #undef INTERFACE
318 #define INTERFACE IRMAServerAuthConversation
320 DECLARE_INTERFACE_(IRMAServerAuthConversation, IUnknown)
323 * IUnknown methods
325 STDMETHOD(QueryInterface) (THIS_
326 REFIID riid,
327 void** ppvObj) PURE;
329 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
331 STDMETHOD_(ULONG,Release) (THIS) PURE;
333 /************************************************************************
334 * Method:
335 * IRMAServerAuthConversation::MakeChallenge
336 * Purpose:
338 * Call this to create a challenge for a client. If the request
339 * passed in does not contain a respose from the client, then it
340 * will generate the initial challenge.
342 * pRequestResponseHeaders is the request for a secured URL. If
343 * this is the initial request for the URL it probably does not
344 * have any credentials from the client.
347 STDMETHOD(MakeChallenge)
349 THIS_
350 IRMAServerAuthResponse* pServerAuthResponseRequester,
351 IRMARequest* pRequestResponseHeaders
352 ) PURE;
354 /************************************************************************
355 * Method:
356 * IRMAServerAuthConversation::IsAuthenticated
357 * Purpose:
359 * Call this to determine whether the last response from the
360 * client completed the authentication successfully.
363 STDMETHOD_(BOOL,IsAuthenticated)(THIS) PURE;
365 /************************************************************************
366 * Method:
367 * IRMAServerAuthConversation::GetUserContext
368 * Purpose:
370 * Call this to retrieve the Context of the user that completed
371 * authentication successfully.
373 * If successful pUnknownUser is a valid context
376 STDMETHOD(GetUserContext)(THIS_ REF(IUnknown*) pUnknownUser) PURE;
380 /****************************************************************************
382 * Interface:
384 * IRMAServerAuthResponse
386 * Purpose:
388 * This is implemented by various server plugins in order to receive the
389 * challenge generated by IRMAServerAuthConversation::MakeChallenge
391 * IRMAServerAuthResponse:
393 * {00002804-0901-11d1-8B06-00A024406D59}
396 DEFINE_GUID(IID_IRMAServerAuthResponse, 0x00002804, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
398 #undef INTERFACE
399 #define INTERFACE IRMAServerAuthResponse
401 DECLARE_INTERFACE_(IRMAServerAuthResponse, IUnknown)
404 * IUnknown methods
406 STDMETHOD(QueryInterface) (THIS_
407 REFIID riid,
408 void** ppvObj) PURE;
410 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
412 STDMETHOD_(ULONG,Release) (THIS) PURE;
414 /************************************************************************
415 * Method:
416 * IRMAServerAuthResponse::ChallengeReady
417 * Purpose:
419 * Reports the success or failure of
420 * IRMAServerAuthConversation::MakeChallenge
422 * pRequestChallengeHeaders should be the same Request object
423 * that was passed into MakeChallenge, it should contain
424 * CString values for each MimeHeader it wishes to send to
425 * the client.
428 STDMETHOD(ChallengeReady)
430 THIS_
431 PN_RESULT ResultStatus,
432 IRMARequest* pRequestChallengeHeaders
433 ) PURE;
438 /****************************************************************************
440 * Interface:
442 * IRMAUserContext
444 * Purpose:
446 * This is implemented by a user context in order to provide
447 * access to information about the currently authenticated user.
449 * IRMAUserContext:
451 * {00002806-0901-11d1-8B06-00A024406D59}
454 DEFINE_GUID(IID_IRMAUserContext, 0x00002806, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
456 #undef INTERFACE
457 #define INTERFACE IRMAUserContext
459 DECLARE_INTERFACE_(IRMAUserContext, IUnknown)
462 * IUnknown methods
464 STDMETHOD(QueryInterface) (THIS_
465 REFIID riid,
466 void** ppvObj) PURE;
468 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
470 STDMETHOD_(ULONG,Release) (THIS) PURE;
472 /************************************************************************
473 * Method:
474 * IRMAUserContext::IsMemberOf
475 * Purpose:
477 * Call this to determine whether the authenticated user
478 * is a member of the specified group.
481 STDMETHOD(IsMemberOf)(THIS_ IRMABuffer* pBufferGroupID) PURE;
485 /****************************************************************************
487 * Interface:
489 * IRMAUserProperties
491 * Purpose:
493 * This is implemented by a user context in order to provide
494 * access to properties of the currently authenticated user.
496 * IRMAUserProperties:
498 * {00002807-0901-11d1-8B06-00A024406D59}
501 DEFINE_GUID(IID_IRMAUserProperties, 0x00002807, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
503 #undef INTERFACE
504 #define INTERFACE IRMAUserProperties
506 DECLARE_INTERFACE_(IRMAUserProperties, IUnknown)
509 * IUnknown methods
511 STDMETHOD(QueryInterface) (THIS_
512 REFIID riid,
513 void** ppvObj) PURE;
515 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
517 STDMETHOD_(ULONG,Release) (THIS) PURE;
520 /************************************************************************
521 * Method:
522 * IRMAUserProperties::GetPrincipalID
523 * Purpose:
525 * Call this to determine the principalID of the authenticated user.
528 STDMETHOD(GetPrincipalID)(THIS_ REF(IRMABuffer*) pBufferPrincipalID) PURE;
530 /************************************************************************
531 * Method:
532 * IRMAUserProperties::GetAuthorityName
533 * Purpose:
535 * Call this to determine the authority name that authorized the
536 * authenticated user. (realm or domain name)
539 STDMETHOD(GetAuthorityName)(THIS_ REF(IRMABuffer*) pBufferAuthorityName) PURE;
544 /****************************************************************************
546 * Interface:
548 * IRMAUserImpersonation
550 * Purpose:
552 * This can be implemented by a user context in order to provide
553 * the ability to have the server impersonate the currently authenticated
554 * user.
556 * IRMAUserImpersonation:
558 * {00002808-0901-11d1-8B06-00A024406D59}
561 DEFINE_GUID(IID_IRMAUserImpersonation, 0x00002808, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
563 #undef INTERFACE
564 #define INTERFACE IRMAUserImpersonation
566 DECLARE_INTERFACE_(IRMAUserImpersonation, IUnknown)
569 * IUnknown methods
571 STDMETHOD(QueryInterface) (THIS_
572 REFIID riid,
573 void** ppvObj) PURE;
575 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
577 STDMETHOD_(ULONG,Release) (THIS) PURE;
579 /************************************************************************
580 * Method:
581 * IRMAUserImpersonation::Start
582 * Purpose:
584 * Call this to impersonate the authenticated user.
587 STDMETHOD(Start)(THIS) PURE;
589 /************************************************************************
590 * Method:
591 * IRMAUserImpersonation::Stop
592 * Purpose:
594 * Call this to stop impersonating the authenticated user.
597 STDMETHOD(Stop)(THIS) PURE;
601 /****************************************************************************
603 * Interface:
605 * IRMAChallenge
607 * Purpose:
609 * This is implemented by the server core in order to allow
610 * additional exchanges of information with the client without
611 * creating a new request. (It is stored in the IRMARequest object
612 * and can be retrieved by calling IRMARequestContext::GetRequester()
613 * if it is absent then the protocol that this request was made on
614 * does not support multi-message authentication (PNA doesn't) )
616 * IRMAChallenge:
618 * {0000280A-0901-11d1-8B06-00A024406D59}
621 DEFINE_GUID(IID_IRMAChallenge, 0x0000280A, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
623 #undef INTERFACE
624 #define INTERFACE IRMAChallenge
626 DECLARE_INTERFACE_(IRMAChallenge, IUnknown)
629 * IUnknown methods
631 STDMETHOD(QueryInterface) (THIS_
632 REFIID riid,
633 void** ppvObj) PURE;
635 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
637 STDMETHOD_(ULONG,Release) (THIS) PURE;
639 /************************************************************************
640 * Method:
641 * IRMAChallenge::SendChallenge
642 * Purpose:
644 * Call this to request additional information from the client.
646 * pRequestChallenge should be the same Request object
647 * that was passed into MakeChallenge, it should contain
648 * CString values for each MimeHeader it wishes to send to
649 * the client.
652 STDMETHOD(SendChallenge)
654 THIS_
655 IRMAChallengeResponse* pChallengeResponseSender,
656 IRMARequest* pRequestChallenge
657 ) PURE;
661 /****************************************************************************
663 * Interface:
665 * IRMAChallengeResponse
667 * Purpose:
669 * This is implemented by a server authenticator in order to
670 * receive the Response returned by the client in response to
671 * IRMAChallenge::SendChallenge.
673 * IRMAChallengeResponse:
675 * {00002809-0901-11d1-8B06-00A024406D59}
678 DEFINE_GUID(IID_IRMAChallengeResponse, 0x00002809, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
680 #undef INTERFACE
681 #define INTERFACE IRMAChallengeResponse
683 DECLARE_INTERFACE_(IRMAChallengeResponse, IUnknown)
686 * IUnknown methods
688 STDMETHOD(QueryInterface) (THIS_
689 REFIID riid,
690 void** ppvObj) PURE;
692 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
694 STDMETHOD_(ULONG,Release) (THIS) PURE;
696 /************************************************************************
697 * Method:
698 * IRMAChallengeResponse::ResponseReady
699 * Purpose:
701 * Called this to return the additional information requested
702 * from IRMAChallenge::SendChallenge.
704 * pRequestResponse should be the same Request object
705 * that was passed into MakeChallenge and SendChallenge.
708 STDMETHOD(ResponseReady)
710 THIS_
711 IRMARequest* pRequestResponse
712 ) PURE;
716 #endif //!_RMAAUTHN_H_