33 is done because of the
switch to RNP
35 #ifndef RPCCLIENTCOMM_HH
36 #define RPCCLIENTCOMM_HH
109 int openDB(
const char* database );
279 unsigned long clientID;
287 unsigned long status;
296 int aliveSignalRemaining;
302 int concatArrayData(
const char *source,
unsigned long srcSize,
char *&dest,
303 unsigned long &destSize,
unsigned long &destLevel );
324 int serverRPCversion;
331 char* transferFormatParams;
333 char *storageFormatParams;
347 int serverCompresses;
353 int connectToServer(
unsigned short readOnly);
356 int disconnectFromServer()
throw();
359 int getFreeServer(
unsigned short readOnly);
362 int executeGetFreeServer(
unsigned short readOnly);
365 int executeOpenDB(
const char* database );
368 int executeCloseDB();
371 int executeOpenTA(
unsigned short readOnly = 0 );
374 int executeCommitTA();
377 int executeAbortTA();
386 char serverHost[100];
389 unsigned long RPCIF_PARA;
396 char capability[100];
399 char identificationString[100];
void insertMDD(const char *collName, r_GMarray *mar)
inserts a MDD object in an existing MDD collection on the server
RpcClientComm(const char *rasmgrHost, int rasmgrPort=RASMGRPORT)
constructor getting the host name of the rasmgr host and it's listening port (default 7001)...
r_Type_Type
Definition: clientcomm.hh:196
int setStorageFormat(r_Data_Format format, const char *formatParams=NULL)
set the preferred storage format
Definition: raslib/basetype.hh:47
const char * getServerName()
get real server name (the dinamic one, assigned by the RasMGR)
void triggerAliveSignal()
triggers an alive signal
int closeDB()
close current database
~RpcClientComm()
destructor (closes the connection and releases resources)
Definition: clientcomm.hh:46
unsigned long getClientID() const
provides read access to my clientID
r_Ref_Any getCollOIdsByName(const char *name)
gets collection references by name
r_Ref_Any getMDDByOId(const r_OId &oid)
gets MDD object by oid
void removeObjFromColl(const char *name, const r_OId &oid)
removes an object from a collection
unsigned short getObjectType(const r_OId &oid)
get oid type
CLIENT * getBindingHandle() const
provides read access to my binding handle
Definition: clientcomm.hh:67
void setUserIdentification(const char *userName, const char *plainTextPassword)
user identification for RasMGR
void setMaxRetry(unsigned int newMaxRetry)
set maximum retry to get a server
r_Ref_Any getCollOIdsByOId(const r_OId &oid)
gets collection references by oid
int openTA(unsigned short readOnly=0)
begin transaction
int setTransferFormat(r_Data_Format format, const char *formatParams=NULL)
set the preferred transfer format
int abortTA()
abort current transaction
r_Data_Format
Definition: mddtypes.hh:133
void deleteObjByOId(const r_OId &oid)
deletes an object by oid (right now, objects are collection only)
Definition: gmarray.hh:66
void deleteCollByName(const char *collName)
deletes an MDD collection by name
int destroyDB(const char *name)
destroy a database
Definition: mddtypes.hh:135
r_Ref_Any getCollByName(const char *name)
gets collection by name
Definition: rpcclientcomm.hh:87
Definition: parseparams.hh:44
void setRPCInactive()
frees the mutex for RPC and calls sendAliveSignal() for sending remaining signals ...
Definition: oqlquery.hh:81
int readWholeMessage(int socket, char *destBuffer, int buffSize)
int commitTA()
commit current transaction
void insertColl(const char *collName, const char *typeName, const r_OId &oid)
creates an empty MDD collection on the server
void setTimeoutInterval(int seconds)
set and get communication timeout interval. Only RNP really uses it
void setRPCActive()
sets a mutex for RPC
char * getTypeStructure(const char *typeName, r_Type_Type typeType)
get type structure dallocate using delete []
int createDB(const char *name)
create a database
int openDB(const char *database)
open database
unsigned int getMaxRetry()
get maximum retry to get a server
void sendAliveSignal()
send an alive signal if necessary and possible
r_Ref_Any getCollByOId(const r_OId &oid)
gets collection by oid
int writeWholeMessage(int socket, char *destBuffer, int buffSize)
r_OId getNewOId(unsigned short objType)
get new oid
const int RASMGRPORT
Definition: rminit.hh:59
const char * getExtendedErrorInfo()
get extended error information
int checkRPCActive()
checks if an RPC is active
void executeQuery(const r_OQL_Query &query, r_Set< r_Ref_Any > &result)
query execution