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

SoapSlave.h

00001 #ifndef __SOAP_SLAVE__
00002 #define __SOAP_SLAVE__
00003 
00004 #define ACTION_ADD_RENDITION 1;
00005 #define ACTION_CHANGE_DOCUMENT 2;
00006 
00007 typedef struct{
00008   int action; /* what binary action are we performing on the DIME stream? */
00009   long docid; 
00010   long revid;
00011   long fileid;
00012   string mimetype;
00013 } BinaryAction;
00014 
00015 class StrongroomCore;
00016 
00023 class SoapSlave{
00024 public:
00025   SoapSlave(int slaveSocket,int slaveId,pthread_t *threadid,void *soapServer, void *soap,StrongroomCore *core);
00026   virtual ~SoapSlave();
00027 
00038   void process_request();  
00039 
00047   bool parseHeader(char *header,BinaryAction *binaction);
00048 
00052   void soapError(string message);
00053 
00057   void soapCoreError(CoreError err);
00058 
00062   void createSession();
00063 
00067   void useSession(const char* cookie_ptr);
00068 
00075   bool login(string response);
00076 
00080   void logout();
00081 
00088   string annotate(string username);
00089 
00093   string getDocumentInfo(long docid);
00094 
00098   string queryUpdates(long first,long maxlen);
00099 
00103   void deleteRevision(long docid,long revid);
00104 
00108   void deleteDocument(long docid);
00109 
00113   void changeDocInfo(long docid,string metadata);
00114 
00120   long changeDocument(long docid,long fileid,string mimetype);
00121 
00128   void addRendition(long docid,long revid,long fileid, string mimetype);
00129 
00133   long createDocument(string metadata);
00134 
00135   BinaryAction *binaction;
00136   string secret;           /* secret message from client cookie */
00137   int soap_return; /* global error code */
00138   StrongroomCore *core;
00139   void *soapServer; 
00140   long revid; /* the id of last revision that was uploaded, (not used) */
00141   
00142 private:
00146   void printIP(int i,unsigned int addr,int socket);
00147 
00148   int slaveSocket; 
00149   int slaveId;              /* our slot in the slavelist */
00150   struct soap *soap;
00151   pthread_t *tid;
00152 
00153 };
00154 
00155 
00156 #endif

Generated on Wed Feb 18 13:45:55 2004 for strongroom by doxygen1.2.18