Products Support Documentation Download
rdmtfsapi.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * Raima Database Manager
3  *
4  * Copyright (c) 2014 Raima Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  * ----------------------------------------------------------------------------
11  */
12 
17 #include "rdmtfstypes.h"
18 #include "rdmtypes.h"
19 
52 #if defined(RDM_UNICODE)
53 #define rdm_tfsAllocEncrypt RDM_T_FUNC (rdm_tfsAllocEncrypt)
54 #define rdm_tfsDropDatabase RDM_T_FUNC (rdm_tfsDropDatabase)
55 #define rdm_tfsGetConnections RDM_T_FUNC (rdm_tfsGetConnections)
56 #define rdm_tfsGetOption RDM_T_FUNC (rdm_tfsGetOption)
57 #define rdm_tfsGetOptions RDM_T_FUNC (rdm_tfsGetOptions)
58 #define rdm_tfsKillAllRemoteConnections \
59  RDM_T_FUNC (rdm_tfsKillAllRemoteConnections)
60 #define rdm_tfsKillRemoteConnection RDM_T_FUNC (rdm_tfsKillRemoteConnection)
61 #define rdm_tfsPing RDM_T_FUNC (rdm_tfsPing)
62 #define rdm_tfsSetIniValue RDM_T_FUNC (rdm_tfsSetIniValue)
63 #define rdm_tfsSetOption RDM_T_FUNC (rdm_tfsSetOption)
64 #define rdm_tfsSetOptions RDM_T_FUNC (rdm_tfsSetOptions)
65 #define rdm_tfsGetCapability RDM_T_FUNC (rdm_tfsGetCapability)
66 #endif
67 
68 #if defined(__cplusplus)
69 extern "C" {
70 #endif
71 
88 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsAllocDatabase (
89  RDM_TFS tfs,
90  RDM_DB *pDb
91 );
92 
153 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsAllocEncrypt (
154  RDM_TFS hTFS,
155  const RDM_TCHAR_T
156  *passcode,
157  RDM_ENCRYPT *pEnc
158 );
159 
176 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsDisableListener (
177  RDM_TFS hTFS
178 );
179 
206 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsDropDatabase (
207  RDM_TFS tfs,
208  const RDM_TCHAR_T *dbNameSpec
210 );
211 
226 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsEnableListener (
227  RDM_TFS hTFS
228 );
229 
238 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsFree (
239  RDM_TFS hTFS
240 );
241 
258 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetMemUsage (
259  RDM_TFS tfs,
260  size_t *curr_usage,
261  size_t *max_usage
262 );
263 
277 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetConnections (
278  RDM_TFS hTFS,
279  const RDM_TCHAR_T *uri,
280  const RDM_TCHAR_T *const **ppszUserIDs,
281  uint32_t *puUserCount
282 );
283 
294 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetEncrypt (
295  RDM_TFS hTFS,
296  RDM_ENCRYPT *pEncCtx
297 );
298 
321 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetOption (
322  RDM_TFS tfs,
323  const RDM_TCHAR_T *keyword,
324  RDM_TCHAR_T *optValue,
325  size_t bytesIn,
326  size_t *bytesOut
327 );
328 
351 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetOptions (
352  RDM_TFS tfs,
353  RDM_TCHAR_T *optString,
354  size_t bytesIn,
355  size_t *bytesOut
356 );
357 
369 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetVersion (
370  RDM_TFS hTFS,
371  uint16_t *pMajorV,
372  uint16_t *pMinorV,
373  TFS_TYPE *pTfsType
374 );
375 
388 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsKillAllRemoteConnections (
389  RDM_TFS tfs,
390  const RDM_TCHAR_T *uri
391 );
392 
402 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsKillRemoteConnection (
403  RDM_TFS hTFS,
404  const RDM_TCHAR_T *uri,
405  const RDM_TCHAR_T *dbUserID
406 );
407 
420 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsPing (
421  RDM_TFS hTFS,
422  const RDM_TCHAR_T *uri
423 );
424 
443 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsSetOption (
444  RDM_TFS tfs,
445  const RDM_TCHAR_T *keyword,
446  const RDM_TCHAR_T *strValue
447 );
448 
467 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsSetOptions (
468  RDM_TFS tfs,
469  const RDM_TCHAR_T *optString
470 );
471 
482 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_tfsGetCapability (
483  RDM_TFS tfs,
484  const RDM_TCHAR_T *name,
485  RDM_BOOL_T *value
486 );
487 
488 #if defined(__cplusplus)
489 }
490 #endif
RDM_RETCODE rdm_tfsGetConnections(RDM_TFS hTFS, const RDM_TCHAR_T *uri, const RDM_TCHAR_T *const **ppszUserIDs, uint32_t *puUserCount)
Get the list of users connected to the TFS.
RDM_RETCODE rdm_tfsGetMemUsage(RDM_TFS tfs, size_t *curr_usage, size_t *max_usage)
Get memory usage associated with the TFS.
RDM_BOOL_T
Definition: psptypes.h:62
Header for the native RDM Runtime types.
RDM_RETCODE rdm_tfsGetCapability(RDM_TFS tfs, const RDM_TCHAR_T *name, RDM_BOOL_T *value)
Get a TFS capability.
RDM_RETCODE rdm_tfsEnableListener(RDM_TFS hTFS)
Starts the listener process for the TFS.
RDM_RETCODE rdm_tfsKillRemoteConnection(RDM_TFS hTFS, const RDM_TCHAR_T *uri, const RDM_TCHAR_T *dbUserID)
Kill the TFS connection associated with a user.
RDM_RETCODE rdm_tfsDropDatabase(RDM_TFS tfs, const RDM_TCHAR_T *dbNameSpec)
Drop the specified database.
struct RDM_TFS_S * RDM_TFS
RDM TFS Handle.
Definition: rdmtfstypes.h:21
RDM_RETCODE rdm_tfsFree(RDM_TFS hTFS)
Terminate a TFS service.
RDM_RETCODE rdm_tfsGetOption(RDM_TFS tfs, const RDM_TCHAR_T *keyword, RDM_TCHAR_T *optValue, size_t bytesIn, size_t *bytesOut)
Get a single TFS option into a string.
RDM_RETCODE
RDM status and error return codes.
RDM_RETCODE rdm_tfsSetOptions(RDM_TFS tfs, const RDM_TCHAR_T *optString)
Set TFS options.
RDM_RETCODE rdm_tfsKillAllRemoteConnections(RDM_TFS tfs, const RDM_TCHAR_T *uri)
Kill all the TFS connections.
RDM_RETCODE rdm_tfsPing(RDM_TFS hTFS, const RDM_TCHAR_T *uri)
Ping a remote TFS.
RDM_RETCODE rdm_tfsGetVersion(RDM_TFS hTFS, uint16_t *pMajorV, uint16_t *pMinorV, TFS_TYPE *pTfsType)
Get the TFS type and version.
RDM_RETCODE rdm_tfsGetEncrypt(RDM_TFS hTFS, RDM_ENCRYPT *pEncCtx)
Get the encryption context from a TFS.
RDM_RETCODE rdm_tfsSetOption(RDM_TFS tfs, const RDM_TCHAR_T *keyword, const RDM_TCHAR_T *strValue)
Set a single TFS option from a string.
RDM_RETCODE rdm_tfsDisableListener(RDM_TFS hTFS)
Stop the listener process for the TFS.
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:265
RDM_RETCODE rdm_tfsAllocEncrypt(RDM_TFS hTFS, const RDM_TCHAR_T *passcode, RDM_ENCRYPT *pEnc)
Allocate an encryption context.
TFS_TYPE
Definition: rdmtfstypes.h:24
RDM_RETCODE rdm_tfsAllocDatabase(RDM_TFS tfs, RDM_DB *pDb)
Allocate memory for a new RDM db.
Header for the Transactional File Server (TFS) types.
RDM_RETCODE rdm_tfsGetOptions(RDM_TFS tfs, RDM_TCHAR_T *optString, size_t bytesIn, size_t *bytesOut)
Get TFS options.
#define RDM_TCHAR_T
Definition: psptypes.h:134
struct RDM_ENCRYPT_S * RDM_ENCRYPT
Definition: psptypes.h:77