#include <securitypolicy.h>
Public Types | |
enum | Capabilities { CapabilityTree = 1, CapabilityGetProperties = 2, CapabilitySetProperties = 4, CapabilitySlots = 8, CapabilityFactory = 16, CapabilityTopLevel = 32, CapabilityCustom = 1024, CapabilityNone = 0, CapabilityReadOnly = CapabilityTree | CapabilityGetProperties, CapabilityReadWrite = CapabilityReadOnly | CapabilitySetProperties | CapabilitySlots, CapabilityAll = -1 } |
Public Methods | |
JSSecurityPolicy (uint capabilities=0) | |
virtual | ~JSSecurityPolicy () |
bool | hasCapability (uint cap) const |
void | setCapability (uint f) |
void | clearCapability (uint f) |
virtual bool | isInterpreterAllowed (const JSObjectProxy *prx, const KJS::Interpreter *interp) const |
virtual bool | isObjectAllowed (const JSObjectProxy *prx, const QObject *obj) const |
virtual bool | isPropertyAllowed (const JSObjectProxy *prx, const QObject *obj, const char *prop) const |
virtual bool | isCreateAllowed (const JSObjectProxy *prx, const QObject *parent, const QString &clazz, const QString &name) const |
Static Public Methods | |
JSSecurityPolicy * | defaultPolicy () |
void | setDefaultPolicy (JSSecurityPolicy *pol) |
void | setDefaultPolicy (uint capabilities) |
void | deleteDefaultPolicy () |
This class defines the interface for security policies, and provides a default implementation that should be sufficient for most situations.
|
Defines a set of flags that indicate if access to a given API should be allowed.
|
|
Returns true if any of the specified capabilities are allowed.
|
|
Specifies that the passed capabilities are allowed.
|
|
Specifies that the passed capabilities are disallowed.
|
|
Returns true if the specified interpreter may access the proxy.
|
|
Returns true if scripts are allowed to see the specified QObject.
|
|
Returns true if scripts are allowed to see the specified property.
|
|
Returns true if scripts are allowed to create the specified child object.
|
|
Returns the default SecurityPolicy.
|
|
Sets the default SecurityPolicy.
|
|
Sets the default SecurityPolicy.
|
|
Deletes the default SecurityPolicy.
|