UM C API  6.16
umeprofile.h File Reference

Ultra Messaging (UM) Store Repository Profiling (SRP) API. The "umeprofile.h" header file defines the APIs to extract information from a Persistent Store's cache and state files. The binary code is contained in the "umestore" library (static only on Unix: "libumestorelib.a", dynamic only on Windows: "umestore.dll"). See Store Repository Profiling (SRP) for general information on the SRP API. See Persistence for general information on the Persistent Store. See UM C API for general information on the C API. See Fundamental Concepts for an introduction to Ultra Messaging. More...

Go to the source code of this file.

Data Structures

struct  lbm_srp_repo_msg_t_stct
 Information about a message in the repository, retrieved by lbm_srp_get_repo_message(). More...
 
struct  lbm_srp_repo_rcvr_t_stct
 Receiver state information, retrieved by lbm_srp_get_repo_state() via lbm_srp_repo_t::rcvs. More...
 
struct  lbm_srp_repo_t_stct
 Overall information about a store, retrieved by lbm_srp_get_repo_state() More...
 

Macros

#define UMEStoreExpDLL
 
#define LBM_SRP_MAX_DIRECTORY_STRLEN   256
 
#define LBM_SRP_MAX_PATH_STRLEN   (256 + 40)
 
#define LBM_SRP_TOPICNAME_MAX_LEN   (256 + 8)
 
#define LBM_SRP_DISK_MAX_CKSUM_MSG_LEN   8192
 
#define LBM_SRP_LBMC_HDR_SZ   12
 

Typedefs

typedef struct lbm_srp_repo_msg_t_stct lbm_srp_repo_msg_t
 Information about a message in the repository, retrieved by lbm_srp_get_repo_message().
 
typedef struct lbm_srp_repo_rcvr_t_stct lbm_srp_repo_rcvr_t
 Receiver state information, retrieved by lbm_srp_get_repo_state() via lbm_srp_repo_t::rcvs.
 
typedef struct lbm_srp_repo_t_stct lbm_srp_repo_t
 Overall information about a store, retrieved by lbm_srp_get_repo_state()
 
typedef struct lbm_srp_t lbm_srp_t
 SRP object (opaque) for UM.
 

Enumerations

enum  lbm_srp_error_t
 Possible error values returned by lbm_srp_create(). More...
 
enum  lbm_srp_repo_status_t
 Repository status retrieved from lbm_srp_get_repo_state() via lbm_srp_repo_t_stct::repo_status. More...
 

Functions

UMEStoreExpDLL int lbm_srp_create (const char *state_pathname, const char *cache_pathname, const int check_checksum, const lbm_srp_t **srp_handle)
 Create and fill a store repository profile object. More...
 
UMEStoreExpDLL int lbm_srp_delete (const lbm_srp_t **srp_handle)
 Delete a store repository profile object. More...
 
UMEStoreExpDLL int lbm_srp_get_repo_state (const lbm_srp_t **srp_handle, int repo_idx, lbm_srp_repo_t **srp_repo)
 Get store repository profile state object. More...
 
UMEStoreExpDLL int lbm_srp_get_repo_message (lbm_srp_repo_t *srp_repo, int sqn, lbm_srp_repo_msg_t *repo_msg)
 Get store repository profile message. More...
 
UMEStoreExpDLL int lbm_srp_free_repo_state (lbm_srp_repo_t *srp_repo)
 Free store repository profile state object. More...
 

Detailed Description

Ultra Messaging (UM) Store Repository Profiling (SRP) API. The "umeprofile.h" header file defines the APIs to extract information from a Persistent Store's cache and state files. The binary code is contained in the "umestore" library (static only on Unix: "libumestorelib.a", dynamic only on Windows: "umestore.dll"). See Store Repository Profiling (SRP) for general information on the SRP API. See Persistence for general information on the Persistent Store. See UM C API for general information on the C API. See Fundamental Concepts for an introduction to Ultra Messaging.

Enumeration Type Documentation

Possible error values returned by lbm_srp_create().

Enumerator
LBM_SRP_SCAN_STATE_DIR_ERROR 

scandir failed

LBM_SRP_FINDFFIRSTFILE_ERROR 

FindFirstFile failed.

LBM_SRP_FINDNEXTFILE_ERROR 

FindNextFile failed.

Repository status retrieved from lbm_srp_get_repo_state() via lbm_srp_repo_t_stct::repo_status.

Enumerator
LBM_SRP_REPO_VALID 

Repository is valid.

LBM_SRP_INVALID_STATE_FILE_NAME 

state file name is invalid

LBM_SRP_STATE_FILE_OPEN_FAILURE 

state file open call failed

LBM_SRP_STATE_FILE_FSTAT_FAILURE 

file status [fstat] call failed

LBM_SRP_STATE_FILE_TOO_SMALL 

state file too small

LBM_SRP_STATE_FILE_GETSZ_FAILURE 

file status [GetFileSizeEx] call failed

LBM_SRP_STATE_FILE_READ_FAILURE 

state file read call failed

LBM_SRP_STATE_FILE_READ_TOO_SHORT 

state file read byte count too short

LBM_SRP_STATE_FILE_BAD_MAGIC 

state file has bad magic

LBM_SRP_CACHE_FILE_OPEN_FAILURE 

cache file open failed

LBM_SRP_CACHE_MSG_CREATE_EVENT_FAILED 

cache message create event [CreateEvent] call failed at working offset

LBM_SRP_CACHE_MSG_READFILE_FAILED 

cache message read file [ReadFile] call failed at working offset

LBM_SRP_CACHE_GETOVERLAPPEDRESULT_FAILED 

cache get overlapped result [GetOverlappedResult] call failed at working offset

LBM_SRP_CACHE_MSG_HEADER_UNDERSIZED 

cache message header at working offset too small

LBM_SRP_CACHE_MSG_HEADER_READ_MISMATCHED 

cache message header read length at working offset mismatched

LBM_SRP_CACHE_MSG_BAD_REC_HEADER_LENGTH 

cache message header record length at working offset was bad

LBM_SRP_CACHE_MSG_BAD_CHECKSUM 

cache message at working offset has bad checksum

LBM_SRP_CACHE_MSG_BAD_MRKR_HEADER_LENGTH 

cache message header marker length at working offset was bad

LBM_SRP_CACHE_MSG_UNKNOWN_HEADER 

cache message at working offset has unknown header type

LBM_SRP_CACHE_MSG_MISSING_FIRST_REC 

cache message first message record missing

LBM_SRP_CACHE_MSG_FIRST_REC_SQN_MISMATCH 

cache message first message record sequence number mismatch

LBM_SRP_CACHE_MSG_MISSING_LAST_REC 

cache message last message record missing

LBM_SRP_CACHE_MSG_LAST_REC_SQN_MISMATCH 

cache message last message record sequence number mismatch

LBM_SRP_CACHE_MSG_SQN_OUT_OF_RANGE 

cache message sequence number out of range

LBM_SRP_CACHE_MSG_READ_LENGTH_MISMATCH 

cache message read length actual did not match requested

LBM_SRP_CACHE_DERIVED_LOW_SQN_MISMATCH 

cache message derived low sqn does not match lowest sqn in message map

Function Documentation

UMEStoreExpDLL int lbm_srp_create ( const char *  state_pathname,
const char *  cache_pathname,
const int  check_checksum,
const lbm_srp_t **  srp_handle 
)

Create and fill a store repository profile object.

The store repository profile object is allocated and filled with the information extracted from files contained in state and cache file directories.

Parameters
state_pathnameString containing the path to the state directory.
cache_pathnameString containing the path to the cache directory.
check_checksumFlag to enable/disable cache checksum checking.
srp_handlePointer to a store repository profile pointer. Will be filled in by this function to point to the newly created lbm_srp_t object.
Returns
number of repositories found for Success, or one of lbm_srp_error_t for error.
UMEStoreExpDLL int lbm_srp_delete ( const lbm_srp_t **  srp_handle)

Delete a store repository profile object.

Delete a store repository profile object that was created by a call to lbm_srp_create().

Parameters
srp_handlePointer to a store repository profile pointer to an lbm_srp_t object to be deleted.
Returns
0 for Success and -1 for Failure.
UMEStoreExpDLL int lbm_srp_free_repo_state ( lbm_srp_repo_t srp_repo)

Free store repository profile state object.

Free a store repository profile state object that was created by a call to lbm_srp_get_repo_state().

Parameters
srp_repoPointer to a store repository profile object to delete.
Returns
0 for Success and -1 for Failure.
UMEStoreExpDLL int lbm_srp_get_repo_message ( lbm_srp_repo_t srp_repo,
int  sqn,
lbm_srp_repo_msg_t repo_msg 
)

Get store repository profile message.

Get a store repository profile message using the store repository state profile object returned by a call to lbm_srp_get_repo_state().

Parameters
srp_repoPointer to a store repository profile.
sqnSequence number of the requested message.
repo_msgPointer to a store repository profile message. The lbm_srp_repo_msg_t object will be filled in by this function. No message body will be provided if the message buffer pointer member (buff) of the lbm_srp_repo_msg_t object is NULL.
Returns
-1 if Error, 0 if Not Found, 1 if Found.
UMEStoreExpDLL int lbm_srp_get_repo_state ( const lbm_srp_t **  srp_handle,
int  repo_idx,
lbm_srp_repo_t **  srp_repo 
)

Get store repository profile state object.

Get a store repository profile state object that was created by a call to lbm_srp_create().

Parameters
srp_handlePointer to a store repository profile object to delete.
repo_idxThe index of the store repository.
srp_repoPointer to a store repository profile state pointer. Will be filled in by this function to point to the newly created lbm_srp_repo_t object.
Returns
-1 if API error, 0 if repository is invalid, 1 if repository is valid.