FOBJ-SPI
FLAM Object Store Exit (FOBJ) Service Provider Interface (SPI) Version: 5.2.1-42969
FOBJ.h
Go to the documentation of this file.
1
129
131#ifndef INC_FOBJ_H
132#define INC_FOBJ_H
133#ifdef __cplusplus
134 extern "C" {
135#endif
137
138/**********************************************************************/
139
140#include "FLMRTC.h"
141
142/**********************************************************************/
143
157#define FOBJ_FUNC_OPN 1U
161#define FOBJ_FUNC_CLS 2U
164#define FOBJ_FUNC_GET 3U
166#define FOBJ_FUNC_PUT 4U
168#define FOBJ_FUNC_DEL 5U
171#define FOBJ_FUNC_CHK 6U
175#define FOBJ_FUNC_DST 7U
180#define FOBJ_FUNC_EXS 8U
185#define FOBJ_FUNC_NEW 9U
190#define FOBJ_FUNC_FRE 10U
192
203#define FOBJ_RTC_OK 0
207#define FOBJ_RTC_NFD 1
209
216#define FOBJ_DEFLIB_NAME "libfsse"
218#define FOBJ_DEFFUC_NAME "FOBJUSR"
220
251#define FOBJ_VERSION 0x0201U
253#define FOBJ_VER_MAJOR(v) ((v) >> 8)
255#define FOBJ_VER_MINOR(v) ((v) & 0xFFU)
257
301#define FOBJ_FLAG_WRITE 0x00000001U
306#define FOBJ_FLAG_OVERWRITE 0x00000002U
311#define FOBJ_FLAG_LOG 0x00000004U
316#define FOBJ_FLAG_DEBUG 0x00000008U
318#define FOBJ_FLAG_TRACE 0x00000010U
319/* 0x00000020U is reserved for future use; do not define. */
325#define FOBJ_FLAG_ACCESS 0x00000040U
333#define FOBJ_FLAG_STRONG 0x00000080U
335
336/**********************************************************************/
337
343
360typedef struct FobjOpn {
362 unsigned int uiFlg;
376 unsigned int uiMaxObjLen;
379 long long siVerId;
381 unsigned int uiNamLen;
385 unsigned int uiParLen;
387 const char* pcNamStr;
389 const char* pcParStr;
396 const char** ppcName;
398
405typedef struct FobjCls {
407 unsigned int isCommit;
409
423typedef struct FobjGet {
425 unsigned int uiKeyLen;
427 unsigned int uiDatLen;
429 const char* pcKeyStr;
431 const unsigned char* ppDatPtr;
433
437typedef struct FobjPut {
439 unsigned int uiKeyLen;
441 unsigned int uiDatLen;
443 const char* pcKeyStr;
445 const unsigned char* pcDatPtr;
447
451typedef struct FobjDel {
453 unsigned int uiKeyLen;
455 unsigned int uiRes0;
457 const char* pcKeyStr;
459
480typedef struct FobjChk {
482 unsigned int uiKeyLen;
484 unsigned int uiMinLen;
486 const char* pcKeyStr;
488 unsigned int isExists;
495 unsigned int isTooShort;
497
505typedef struct FobjDst {
507 unsigned int uiRes0;
509
517typedef struct FobjExs {
519 unsigned int uiKeyLen;
521 unsigned int isExists;
523 const char* pcKeyStr;
525
537typedef struct FobjNew {
539 unsigned int uiNamLen;
543 unsigned int uiParLen;
547 const char* pcNamStr;
550 const char* pcParStr;
557 unsigned int uiMaxObjLen;
559
566typedef struct FobjFre {
568 unsigned int uiRes0;
570
588
590
591/**********************************************************************/
592
599
672typedef void TfFobjExit(
673 void* pvGbl,
674 void** ppHdl,
675 int* piRetco,
676 const unsigned int* piVersion,
677 const unsigned int* piFunc,
678 TuFobjPar* puPara,
679 const unsigned int* piMsgSiz,
680 char* pcMsg);
681
683
684/**********************************************************************/
685
687#ifdef __cplusplus
688 }
689#endif
690#endif /* INC_FOBJ_H */
FLMRTC - FLAM-Return-Codes.
struct FobjChk TsFobjChk
Parameters for FOBJ_FUNC_CHK.
struct FobjDel TsFobjDel
Parameters for FOBJ_FUNC_DEL.
struct FobjOpn TsFobjOpn
Parameters for FOBJ_FUNC_OPN.
struct FobjExs TsFobjExs
Parameters for FOBJ_FUNC_EXS.
struct FobjGet TsFobjGet
Parameters for FOBJ_FUNC_GET.
struct FobjDst TsFobjDst
Parameters for FOBJ_FUNC_DST.
struct FobjFre TsFobjFre
Parameters for FOBJ_FUNC_FRE.
struct FobjPut TsFobjPut
Parameters for FOBJ_FUNC_PUT.
struct FobjNew TsFobjNew
Parameters for FOBJ_FUNC_NEW.
struct FobjCls TsFobjCls
Parameters for FOBJ_FUNC_CLS.
union FobjPar TuFobjPar
Union of all FOBJ function parameter structures.
void TfFobjExit(void *pvGbl, void **ppHdl, int *piRetco, const unsigned int *piVersion, const unsigned int *piFunc, TuFobjPar *puPara, const unsigned int *piMsgSiz, char *pcMsg)
FOBJ provider entry point function type.
Definition FOBJ.h:672
Parameters for FOBJ_FUNC_CHK.
Definition FOBJ.h:480
unsigned int uiKeyLen
[INPUT] Byte length of pcKeyStr (without null).
Definition FOBJ.h:482
unsigned int isTooShort
[OUTPUT] 1 if the object exists but is shorter than uiMinLen.
Definition FOBJ.h:495
unsigned int isExists
[OUTPUT] 1 if object exists with length >= uiMinLen; else 0.
Definition FOBJ.h:488
const char * pcKeyStr
[INPUT] Object key string (null-terminated).
Definition FOBJ.h:486
unsigned int uiMinLen
[INPUT] Minimum data length required in bytes (0 = any).
Definition FOBJ.h:484
Parameters for FOBJ_FUNC_CLS.
Definition FOBJ.h:405
unsigned int isCommit
[INPUT] 1 = commit writes; 0 = rollback / abort.
Definition FOBJ.h:407
Parameters for FOBJ_FUNC_DEL.
Definition FOBJ.h:451
const char * pcKeyStr
[INPUT] Object key string (null-terminated).
Definition FOBJ.h:457
unsigned int uiRes0
[DUMMY] Reserved; set to 0.
Definition FOBJ.h:455
unsigned int uiKeyLen
[INPUT] Byte length of pcKeyStr (without null).
Definition FOBJ.h:453
Parameters for FOBJ_FUNC_DST.
Definition FOBJ.h:505
unsigned int uiRes0
[DUMMY] Reserved; set to 0.
Definition FOBJ.h:507
Parameters for FOBJ_FUNC_EXS.
Definition FOBJ.h:517
unsigned int isExists
[OUTPUT] 1 if the object exists, 0 if it does not.
Definition FOBJ.h:521
const char * pcKeyStr
[INPUT] Object key string (null-terminated).
Definition FOBJ.h:523
unsigned int uiKeyLen
[INPUT] Byte length of pcKeyStr (without null).
Definition FOBJ.h:519
Parameters for FOBJ_FUNC_FRE.
Definition FOBJ.h:566
unsigned int uiRes0
[DUMMY] Reserved; set to 0.
Definition FOBJ.h:568
Parameters for FOBJ_FUNC_GET.
Definition FOBJ.h:423
unsigned int uiDatLen
[OUTPUT] Number of valid bytes at *ppDatPtr.
Definition FOBJ.h:427
unsigned int uiKeyLen
[INPUT] Byte length of pcKeyStr (without null).
Definition FOBJ.h:425
const unsigned char * ppDatPtr
[OUTPUT] Pointer to provider's internal data buffer.
Definition FOBJ.h:431
const char * pcKeyStr
[INPUT] Object key string (null-terminated).
Definition FOBJ.h:429
Parameters for FOBJ_FUNC_NEW.
Definition FOBJ.h:537
unsigned int uiParLen
[INPUT] Byte length of pcParStr (without null). Paired with uiNamLen so that both pointers start on 8...
Definition FOBJ.h:543
unsigned int uiNamLen
[INPUT] Byte length of pcNamStr (without null).
Definition FOBJ.h:539
const char * pcParStr
[INPUT] Provider-specific parameter string (null-terminated). Same lifetime constraint as pcNamStr.
Definition FOBJ.h:550
unsigned int uiMaxObjLen
[INPUT] Largest object this store has to expect in normal operation, in bytes, or 0 when the caller h...
Definition FOBJ.h:557
const char * pcNamStr
[INPUT] Archive namespace string (null-terminated). The provider must copy this string; the pointer i...
Definition FOBJ.h:547
Parameters for FOBJ_FUNC_OPN.
Definition FOBJ.h:360
long long siVerId
[INPUT] Always -1; SEGOBJ embeds version in object key prefix. Providers may ignore this field.
Definition FOBJ.h:379
const char * pcParStr
[INPUT] Provider-specific parameter string (null-terminated).
Definition FOBJ.h:389
const char * pcNamStr
[INPUT] Archive namespace string (null-terminated).
Definition FOBJ.h:387
unsigned int uiMaxObjLen
[INPUT] Largest object this store has to expect in normal operation, in bytes, or 0 when the caller h...
Definition FOBJ.h:376
unsigned int uiNamLen
[INPUT] Byte length of pcNamStr (without null).
Definition FOBJ.h:381
unsigned int uiFlg
[INPUT] Flag word; see Flags for OPN.
Definition FOBJ.h:362
unsigned int uiParLen
[INPUT] Byte length of pcParStr (without null). Placed here (paired with uiNamLen) so that both point...
Definition FOBJ.h:385
const char ** ppcName
[OUTPUT] Canonical archive identifier; on successful return from FOBJ_FUNC_OPN the provider writes th...
Definition FOBJ.h:396
Parameters for FOBJ_FUNC_PUT.
Definition FOBJ.h:437
unsigned int uiDatLen
[INPUT] Object data length in bytes.
Definition FOBJ.h:441
unsigned int uiKeyLen
[INPUT] Byte length of pcKeyStr (without null).
Definition FOBJ.h:439
const unsigned char * pcDatPtr
[INPUT] Object data pointer (valid for this call only).
Definition FOBJ.h:445
const char * pcKeyStr
[INPUT] Object key string (null-terminated).
Definition FOBJ.h:443
Union of all FOBJ function parameter structures.
Definition FOBJ.h:576
TsFobjOpn stOpn
FOBJ_FUNC_OPN
Definition FOBJ.h:577
TsFobjNew stNew
FOBJ_FUNC_NEW
Definition FOBJ.h:585
TsFobjFre stFre
FOBJ_FUNC_FRE
Definition FOBJ.h:586
TsFobjDst stDst
FOBJ_FUNC_DST
Definition FOBJ.h:583
TsFobjCls stCls
FOBJ_FUNC_CLS
Definition FOBJ.h:578
TsFobjGet stGet
FOBJ_FUNC_GET
Definition FOBJ.h:579
TsFobjExs stExs
FOBJ_FUNC_EXS
Definition FOBJ.h:584
TsFobjPut stPut
FOBJ_FUNC_PUT
Definition FOBJ.h:580
TsFobjDel stDel
FOBJ_FUNC_DEL
Definition FOBJ.h:581
TsFobjChk stChk
FOBJ_FUNC_CHK
Definition FOBJ.h:582