Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

Session Class Reference

#include <Session.h>

List of all members.

Public Methods

 Session ()
 ~Session ()
bool srconnect (string server, int port)
bool login (UserProfile profile)
bool deleteDocument (NumID docid)
bool createDocument (Document metadata, NumID &docid)
bool changeDocument (NumID docid, string mimetype, char *filedata, int64_t bytecount, string filename, int64_t &revid)
bool deleteRevision (NumID docid, NumID revid)
bool addRendition (NumID docid, NumID revid, string mimetype, char *filedata, int64_t bytecount)
bool getDocumentInfo (NumID docid, Document &metadata)
bool changeDocumentInfo (NumID docid, Document metadata)
bool getDocument (NumID docid, NumID revid, string mimetype, string &file)


Detailed Description

This library is meant to be used by strongroom clients written in C++. Using this class you won't have to implement the protocol.


Constructor & Destructor Documentation

Session::Session  
 

Initiate the strongroom session.

Session::~Session  
 

Delete the Session and log out of the strongroom server.


Member Function Documentation

bool Session::addRendition NumID    docid,
NumID    revid,
string    mimetype,
char *    filedata,
int64_t    bytecount
 

Returns:
true on success

bool Session::changeDocument NumID    docid,
string    mimetype,
char *    filedata,
int64_t    bytecount,
string    filename,
int64_t &    revid
 

Add a revision to a document.

Parameters:
docid  The document to change
mimetype  The mimetype of the new revision
filedata  Pointer to the location in memory of the document
bytecount  Length of the document in memory
filename  The filename of the new revision
revid  the created id for the revision
Returns:
true on success

bool Session::changeDocumentInfo NumID    docid,
Document    metadata
 

Change the metadata of a document

Parameters:
docid  The id of the document which metadata will be changed
metadata  The metadata to be saved
Returns:
true on success

bool Session::createDocument Document    metadata,
NumID &    docid
 

Create a document.

Parameters:
metadata  The metadata of the newly created document.
docid  This is the document id of the newly created document.
Returns:
true on success

bool Session::deleteDocument NumID    docid
 

Delete a document with all revisions and renditions from the strongroom repository.

Parameters:
docid  The id of the document that will be deleted.
Returns:
true on success.

bool Session::deleteRevision NumID    docid,
NumID    revid
 

Delete a revision

Parameters:
docid  The id of the document that contains the revision
revid  The id of the revision
Returns:
true on success

bool Session::getDocument NumID    docid,
NumID    revid,
string    mimetype,
string &    file
 

Get a rendition of a document.

Parameters:
docid  The id of the requested document.
revid  The id of the requested revision.
mimetype  The desired mimetype.
file  The file will be written into this string.
Returns:
true on success

bool Session::getDocumentInfo NumID    docid,
Document   metadata
 

Get metadata

Parameters:
docid  The id of the document
metadata  The metadata will be written in this Document object
Returns:
true on success

bool Session::login UserProfile    profile
 

Log in to the strongroom server.

Parameters:
profile  The user profile used to authenticate the user.
Returns:
true on success.

bool Session::srconnect string    server,
int    port
 

Connect to server

Returns:
true on success


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18