33 is done because of the
switch to RNP
35 #ifndef RPCCLIENTCOMM_HH
36 #define RPCCLIENTCOMM_HH
87 class RpcClientComm :
public ClientComm
91 RpcClientComm(
const char* rasmgrHost,
int rasmgrPort =
RASMGRPORT ) throw( r_Error );
100 ~RpcClientComm() throw();
102 bool effectivTypeIsRNP() throw();
109 int openDB( const
char* database );
113 int createDB( const
char* name ) throw(r_Error);
115 int destroyDB( const
char* name ) throw(r_Error);
125 int openTA(
unsigned short readOnly = 0 ) throw(r_Error);
127 int commitTA() throw(r_Error);
139 void insertMDD( const
char* collName, r_GMarray* mar ) throw( r_Error );
141 r_Ref_Any getMDDByOId( const r_OId& oid ) throw( r_Error );
151 void insertColl( const
char* collName, const
char* typeName, const r_OId& oid ) throw( r_Error );
153 void deleteCollByName( const
char* collName ) throw( r_Error );
155 void deleteObjByOId( const r_OId& oid ) throw( r_Error );
157 void removeObjFromColl( const
char* name, const r_OId& oid ) throw ( r_Error );
159 r_Ref_Any getCollByName( const
char* name ) throw( r_Error );
161 r_Ref_Any getCollByOId ( const r_OId& oid ) throw( r_Error );
163 r_Ref_Any getCollOIdsByName( const
char* name ) throw( r_Error );
165 r_Ref_Any getCollOIdsByOId ( const r_OId& oid ) throw( r_Error );
175 void executeQuery( const r_OQL_Query& query, r_Set< r_Ref_Any >& result ) throw( r_Error );
183 void executeQuery( const r_OQL_Query& query ) throw( r_Error );
197 r_OId getNewOId(
unsigned short objType ) throw(r_Error);
200 unsigned short getObjectType( const r_OId& oid ) throw(r_Error);
204 char* getTypeStructure( const
char* typeName, r_Type_Type typeType ) throw(r_Error);
210 inline
unsigned long getClientID() const;
213 inline CLIENT* getBindingHandle() const;
219 void triggerAliveSignal();
226 void sendAliveSignal();
234 int setTransferFormat( r_Data_Format format, const
char* formatParams=NULL );
237 int writeWholeMessage(
int socket,
char *destBuffer,
int buffSize);
238 int readWholeMessage(
int socket,
char *destBuffer,
int buffSize);
241 int setStorageFormat( r_Data_Format format, const
char *formatParams=NULL );
247 void setRPCInactive();
250 int checkRPCActive();
253 const
char *getExtendedErrorInfo() throw(r_Error);
256 const
char* getServerName();
259 void setUserIdentification(const
char *userName, const
char *plainTextPassword);
262 void setMaxRetry(
unsigned int newMaxRetry);
265 unsigned int getMaxRetry();
270 void setTimeoutInterval(
int seconds);
272 int getTimeoutInterval();
279 unsigned long clientID;
287 unsigned long status;
296 int aliveSignalRemaining;
299 unsigned short getMDDCore( r_Ref<r_GMarray> &mdd,
GetMDDRes *thisResult,
unsigned int isQuery )
throw( r_Error );
302 int concatArrayData(
const char *source,
unsigned long srcSize,
char *&dest,
303 unsigned long &destSize,
unsigned long &destLevel );
306 void getMarRpcRepresentation(
const r_GMarray* mar,
RPCMarray*& rpcMarray,
307 r_Data_Format initStorageFormat = r_Array,
308 const r_Base_Type *bt = NULL);
311 void freeMarRpcRepresentation(
const r_GMarray* mar,
RPCMarray* rpcMarray );
314 void getMDDCollection( r_Set< r_Ref_Any >& result,
unsigned int isQuery )
throw(r_Error);
317 void getElementCollection( r_Set< r_Ref_Any >& result )
throw(r_Error);
324 int serverRPCversion;
327 r_Data_Format transferFormat;
329 r_Data_Format storageFormat;
331 char* transferFormatParams;
333 char *storageFormatParams;
335 r_Parse_Params *clientParams;
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];
const int RASMGRPORT
Definition: rminit.hh:59