iauthorization.h File Reference
Description
RealityServer(R) Web Services connection authorization API. See Request Authorization.
Code Example
iauthorization.h
/******************************************************************************
* Copyright 2010-2014 migenius pty ltd, Australia. All rights reserved.
*****************************************************************************/
//*****************************************************************************
#ifndef MI_RS_WEB_SERVICES_IAUTHORIZATION_H
#define MI_RS_WEB_SERVICES_IAUTHORIZATION_H
#include <mi/base/interface_declare.h>
namespace mi {
class IData;
class IMap;
namespace http {
class IResponse;
class IRequest;
} // namespace http
namespace rswservices {
class IAuthorization_context : public
mi::base::Interface_declare<0x3658FAB6,0xC3DC,0x40A6,0xBE,0x65,0x55,0x98,0xB1,0x3D,0x59,0x80>
{
public:
virtual const char * get_peer_address ()=0;
virtual bool check_error ()=0;
virtual http::IRequest * get_request ()=0;
virtual http::IResponse * get_response ()=0;
virtual void set_attachment (const char *key, const char *value)=0;
virtual const char * get_attachment (const char *key) const=0;
virtual void remove_attachment (const char *key)=0;
virtual bool set_failure_body(const Uint8 *content, const Uint32 size) = 0;
};
class IRtmp_authorization_context: public
mi::base::Interface_declare<0x2478D0A7,0x8B28,0x4349,0x95,0x59,0xE8,0xCD,0x1B,0xDE,0xEC,0x7F>
{
public:
virtual const char * get_peer_address () const =0;
virtual const char * get_url() const =0;
virtual const IMap * get_arguments() const =0;
virtual const IData * get_user_arguments() const =0;
template<class T>
const T *get_user_arguments() const
{
const base::IInterface* ptr_iinterface = get_user_arguments();
if ( !ptr_iinterface)
return 0;
const T* ptr_T = static_cast<const T*>( ptr_iinterface->get_interface( typename T::IID()));
ptr_iinterface->release();
return ptr_T;
};
};
class IAuthorizer : public
mi::base::Interface_declare<0x5AF238B4,0xC9DE,0x468E,0xA8,0x4D,0x44,0x27,0x98,0xBF,0x8D,0xE9>
{
public:
virtual const char *get_name() const = 0;
virtual bool authorize(IAuthorization_context* context) = 0;
virtual bool authorize(IRtmp_authorization_context* context) = 0;
};
// end group mi_rswservices_authorization
} // namespace rswservices
} // namespace mi
#endif // MI_RS_WEB_SERVICES_IAUTHORIZATION_H
Namespaces
- namespace mi
- namespace mi::http
- namespace
- Namespace for the RealityServer Web Services API. More...