#include <djv_security.h>
List of all members.
Detailed Description
This class provide an access to the internal security information.
Member Function Documentation
| virtual void Celartem::DjVu::SecurityProvider::clearUserPropSets |
( |
|
) |
[pure virtual] |
Remove all the user property-sets.
| virtual AutoPtr<Stream> Celartem::DjVu::SecurityProvider::createDecryptionStream |
( |
Stream * |
inStream, |
|
|
size_t |
inStreamSize | |
|
) |
| | const [pure virtual] |
Create a new Stream with which you can access the decrypted chunk data.
- Parameters:
-
| inStream | The stream which contains the encrypted data. |
| inStreamSize | The size of the stream. |
- Returns:
- Pointer to the newly created Stream instance.
| virtual AutoPtr<Stream> Celartem::DjVu::SecurityProvider::createEncryptionStream |
( |
Stream * |
inStream, |
|
|
u32 |
inSalt | |
|
) |
| | const [pure virtual] |
Create a new Stream with which you can encrypt the chunk data.
- Parameters:
-
Create a new SecurityProvider instance of PWD1 for encrypting the resource.
- Parameters:
-
- Returns:
- Pointer to the newly created SecurityInfo instance.
Create a new SecurityProvider instance of PWD2 for encrypting the resource.
- Parameters:
-
- Returns:
- Pointer to the newly created SecurityInfo instance.
Create a new SecurityProvider instance of PXL4 for encrypting the resource.
- Parameters:
-
| inPixelSafeServerUrl | Url of the PixelSafe Protocol 4.X server. This implementation is not compatible to PixelSafe 2.X protocol and cannot communicate with 2.X servers. |
| inCredProv | Pointer to a CredentialProvider instance which provides the credentials to authenticate the user. |
- Returns:
- Pointer to the newly created SecurityInfo instance.
| virtual AutoPtr<Chunk> Celartem::DjVu::SecurityProvider::encodeSINFChunk |
( |
|
) |
const [pure virtual] |
Create SINF chunk from the security information gathered into this instance.
- Returns:
- Pointer to the newly created
SINF chunk.
| virtual void Celartem::DjVu::SecurityProvider::getAssociatedUserList |
( |
SimpleArray< String > & |
outUserList |
) |
const [pure virtual] |
Get the list of the users, who have a permission entry on this document.
This method fails if you don't have sufficient privilege.
- Parameters:
-
| outUserList | A SimpleArray<String> instance which receives the list of users. |
| virtual void Celartem::DjVu::SecurityProvider::getAvailableUserList |
( |
SimpleArray< String > & |
outUserList |
) |
const [pure virtual] |
Get the list of available users.
This method gathers the full list of the users, which can be obtained with your privileges. Please note that there might be users who you cannot obtain with this method. This method fails if you don't have sufficient privileges.
- Parameters:
-
| outUserList | A SimpleArray<String> instance which receives the list of users. |
| virtual PropertySet* Celartem::DjVu::SecurityProvider::getEditablePropSet |
( |
|
) |
[pure virtual] |
Get the property-set which can be edited.
- Returns:
- Pointer to the property-set.
| virtual PropertySet* Celartem::DjVu::SecurityProvider::getEditableUserPropSet |
( |
const String & |
inUserId = NullString |
) |
[pure virtual] |
Get the user's property-set which can be edited.
- Parameters:
-
| inUserId | User to get property-set. NullString to get the current user's property-set. |
- Returns:
- Pointer to the property-set.
| Time Celartem::DjVu::SecurityProvider::getExpiry |
( |
const String & |
inUserId = NullString |
) |
const |
Get the expiry date of this document.
- Parameters:
-
| inUserId | User to determine the expiry. NullString for the current user. |
- Returns:
- Return the expiry date if exists; otherwise The t field of the returned Time instance is 0.
| virtual size_t Celartem::DjVu::SecurityProvider::getNumOfUserPropSets |
( |
|
) |
const [pure virtual] |
Get the number of user property-sets.
- Returns:
- The number of user property-sets.
| String Celartem::DjVu::SecurityProvider::getPropFallback |
( |
const String & |
inKey, |
|
|
const String & |
inUserId = NullString | |
|
) |
| | const |
Get the property from both of global and user property-sets.
This method firstly tries to get the specified property from the global one, which is obtained by getPropSet method and then tries to get the same one from the user ones.
- Parameters:
-
| inKey | A key of a property. |
- Returns:
- The value if the key exists; otherwise returns NullString.
| virtual const PropertySet* Celartem::DjVu::SecurityProvider::getPropSet |
( |
|
) |
const [pure virtual] |
Get the property-set.
- Returns:
- Pointer to the property-set.
| virtual String Celartem::DjVu::SecurityProvider::getUserId |
( |
|
) |
const [pure virtual] |
Get the current user ID.
- Returns:
- The user ID.
| virtual const PropertySet* Celartem::DjVu::SecurityProvider::getUserPropSet |
( |
const String & |
inUserId = NullString |
) |
const [pure virtual] |
Get the user's property-set.
- Parameters:
-
| inUserId | User to get property-set. NullString to get the current user's property-set. |
- Returns:
- Pointer to the property-set.
| bool Celartem::DjVu::SecurityProvider::hasExpiry |
( |
const String & |
inUserId = NullString |
) |
const |
Determines whether the document has expiry.
- Returns:
true if this document has expiry; otherwise false.
Determine whether the specified property is enabled or not.
Actual security enforcement status is determined by isEnforced method and you should use isPermitted method to determine whether an user can (or cannot) do the things.
- Parameters:
-
| inPriPro | One of PredefinedPrivilegesAndProperties enumeration values which specify a privilege or a property. |
| inUserId | User to determine the property. NullString for the current user. |
| virtual bool Celartem::DjVu::SecurityProvider::isEnforced |
( |
|
) |
const [pure virtual] |
Determine whether the security is enforced or not.
- Returns:
true if the security is enforced; otherwise false.
| bool Celartem::DjVu::SecurityProvider::isExpired |
( |
const String & |
inUserId = NullString |
) |
const |
Determine whether the document is expired or not.
This method checks both document-level and user-level expiries.
- Parameters:
-
| inUserId | User to determine the expiry. NullString for the current user. |
Determine whether an user has the specified privilege or not.
This method is used to determine the actual security enforcement and not a method to determine a property status.
- Parameters:
-
| inPriPro | One of PredefinedPrivilegesAndProperties enumeration values which specify a privilege. |
| inUserId | User to determine the privilege. NullString for the current user. |
| virtual bool Celartem::DjVu::SecurityProvider::isUserAssociated |
( |
const String & |
inUserId |
) |
const [pure virtual] |
Determine whether a specified user has a permission entry on this document or not.
This method fails if you don't have sufficient privileges.
- Parameters:
-
| inUserId | User to remove his (her) property-set. |
- Returns:
true if associated; otherwise false.
| virtual void Celartem::DjVu::SecurityProvider::removeUserPropSet |
( |
const String & |
inUserId |
) |
[pure virtual] |
Remove a user property-set.
- Parameters:
-
| inUserId | User to remove his (her) property-set. |
Throws an exception of errInvalidParam if no permission for the specified privilege.
- Parameters:
-
| inPriPro | One of PredefinedPrivilegesAndProperties enumeration values which specify a privilege. |
| inUserId | User to determine the privilege. NullString for the current user. |
The documentation for this class was generated from the following file: