onAccess() method of IFCAccessAdaptor. The plug-in can use this interface to get information about the access event. Based on the information provided, the plug-in can take appropriate action for that event.
More...
#include <IFCAccessAdaptor.h>
Public Types | |
| enum | Type { CONNECT } |
| Indicates a client is connected to the server. More... | |
Public Member Functions | |
| virtual Type | getType () const =0 |
| virtual const char * | getValue (const char *sName)=0 |
| virtual bool | setValue (const char *sName, const char *sValue)=0 |
| virtual bool | setReadAccess (const char *sReadAccess, bool bLockAccess=true)=0 |
| virtual bool | setWriteAccess (const char *sWriteAccess, bool bLockAccess=true)=0 |
| virtual void | accept ()=0 |
| virtual void | reject (const char *sReason)=0 |
| virtual void | redirect (const char *sUri, const char *sReason)=0 |
accept(), reject(), or redirect() are called. Accessing this object after calling one of these methods could access invalid memory and result in unpredictable behavior. | enum IFCAccess::Type |
| virtual Type IFCAccess::getType | ( | ) | const [pure virtual] |
Returns the type of access event.
| virtual const char* IFCAccess::getValue | ( | const char * | sName | ) | [pure virtual] |
Queries information about an event. Currently, the only type of access event supported is CONNECT, which indicates a client is connected to the server. The information being queried is returned in a string. The pointer is valid only for the scope of the call. If the plug-in needs the data to persist longer than the duration of the call, it must copy the data. The following values can be queried for a CONNECT event:
c-referrerc-user-agents-uric-ipc-proto
| sName | Name of the value to query. |
| virtual bool IFCAccess::setValue | ( | const char * | sName, | |
| const char * | sValue | |||
| ) | [pure virtual] |
Allows you to modify event information, if applicable. For a CONNECT event, you can modify the readAccess, writeAccess, readAccessLock, writeAccessLock, audioSampleAccess, videoSampleAccess, audioSampleAccessLock, videoSampleAccessLock, c-referrer, c-user-agent, and s-uri fields.
| sName | Name of the field to change. | |
| sValue | New value to set. |
| virtual bool IFCAccess::setReadAccess | ( | const char * | sReadAccess, | |
| bool | bLockAccess = true | |||
| ) | [pure virtual] |
Changes the connecting client's readAccess property. This API is deprecated; to set the readAccess and readAccessLock properties, call setValue().
| sReadAccess | The read-access permissions to set for this client. | |
| bLockAccess | If true, a server-side script is not allowed to change the client's read access. |
| virtual bool IFCAccess::setWriteAccess | ( | const char * | sWriteAccess, | |
| bool | bLockAccess = true | |||
| ) | [pure virtual] |
Changes the connecting client's writeAccess property. This API is deprecated; to set the writeAccess and writeAccessLock properties, call setValue().
| sWriteAccess | The write-access permissions to set for this client. | |
| bLockAccess | If true, a server-side script is not allowed to change a client's read access. |
| virtual void IFCAccess::accept | ( | ) | [pure virtual] |
Accepts a client connection. A client connection remains pending until this method (or the reject() method or the redirect() method) is called. The IFCAccess object is no longer available once this method is called; therefore, this method is an implicit destructor.
| virtual void IFCAccess::reject | ( | const char * | sReason | ) | [pure virtual] |
Rejects a client connection. A client connection remains pending until this method (or the accept() method or the redirect() method) is called. The IFCAccess object is no longer available once this method is called; therefore, this method is an implicit destructor.
| sReason | Specifies a reason for the rejection. This string is set in the description property of the info object that is returned to the client. |
| virtual void IFCAccess::redirect | ( | const char * | sUri, | |
| const char * | sReason | |||
| ) | [pure virtual] |
Redirects the client connection. The URI can be fully rewritten, including the protocol, host, port, application name, and so on.
A client connection remains pending until this method (or the accept() method or the reject() method) is called. The IFCAccess object is no longer available once this method is called, therefore, this method is an implicit destructor.