#include <StrongroomCore.h>
Public Methods | |
StrongroomCore (string coreConfFile) | |
~StrongroomCore () | |
CoreError | coreStart () |
CoreError | systemShutdown (const UserProfile &admin) |
void | log (const string &message, int level=0) |
CoreError | createDocument (const UserProfile &user, const Document &document, NumID &docid) |
CoreError | deleteDocument (const UserProfile &user, NumID docid) |
CoreError | changeDocument (const UserProfile &user, NumID docid, NumID fileid, string mimetype, NumID &revid) |
CoreError | deleteRevision (const UserProfile &user, NumID docid, NumID revid) |
CoreError | addRendition (const UserProfile &user, NumID docid, NumID revid, NumID fileid, string mimetype) |
CoreError | getDocumentInfo (const UserProfile &user, NumID docid, Document &document) |
CoreError | changeDocumentInfo (const UserProfile &user, NumID docid, const Document &document) |
CoreError | getDocument (const UserProfile &user, NumID docid, NumID revid, string mimetype, NumID &fileid, int64_t &length) |
CoreError | queryUpdates (const UserProfile &user, NumID first, int maxlen, map< NumID, NumID > &updates) |
CoreError | getLoginChallenge (string username, string &challenge) |
CoreError | loginUser (string username, string challenge, string response, UserProfile &user) |
CoreError | addUser (const UserProfile &admin, const UserProfile &userProfile, string challenge, string password, NumID &userid) |
CoreError | deleteUser (const UserProfile &admin, NumID userid) |
CoreError | getUserProfile (const UserProfile &admin, NumID userid, UserProfile &userProfile) |
CoreError | changeUserProfile (const UserProfile &admin, NumID userid, const UserProfile &userProfile) |
CoreError | setPassword (const UserProfile &user, string challenge, string oldPassword, string newPassword) |
CoreError | clearPassword (const UserProfile &admin, NumID userid) |
CoreError | listUsers (const UserProfile &admin, vector< NumID > &users) |
CoreError | createNewFile (const UserProfile &user, NumID docid, NumID revid, NumID &fileid) |
CoreError | deleteNewFile (NumID fileid) |
int | readFromFile (NumID fileid, uint8_t *buffer, int maxlen) |
int | writeToFile (NumID fileid, const uint8_t *buffer, int length) |
CoreError | closeFile (NumID fileid) |
CoreStatus | coreStatus () |
The core provides the User module with an interface to all the major functions of the Strongroom system. The core has methods to manage files, metadata and security issues. It will also ensure that the security module performs security checks on all sensitive operations.
Security checks are done by supplying the users NumID to the core. It is very important that the User module retrieves these ID's from the security module. Users must NEVER be able to supply NumID's themselves, or they could freely access sensitive information.
|
Constructs a new StrongroomCore object using the supplied configuration file.
|
|
Destructor |
|
Add rendition to existing document revision.
|
|
Adds a new user to the system.
|
|
Makes a revision of an existing document.
|
|
Changes a document's metadata.
|
|
Changes a user's profile.
|
|
Clear user password.
|
|
Close the file.
|
|
Starts the core. This is called by main() only. It passes control to the usermodule. It returns control to main() after an admin has logged in and ordered coreShutdown()
|
|
Reports on the core's current status.
|
|
Creates a new, empty document.
|
|
Create new file for changeDocument or addRendition.
|
|
Deletes a document from the system completely!
|
|
Cancel, delete (temporary) new file.
|
|
Deletes a specific revision.
|
|
Deletes a user from the system.
|
|
Retrieves documents from the system.
|
|
Retrieves document metadata from the system.
|
|
Get login challenge for generic challenge-response protocol.
|
|
Retrieves a user's profile.
|
|
Retrieves a list of all users (list of IDs).
|
|
Writes messages to the logplugin. |
|
Login user.
|
|
Query document changes since 'first'.
|
|
Read binary data from the file.
|
|
Change current user's password.
|
|
Prepares the system for shutdown. The core will shut down all modules one by one before returning control to main().
|
|
Write binary data to the file.
|