Skip to content

Commit

Permalink
librgw: add API version defines for librgw and rgw_file
Browse files Browse the repository at this point in the history
This change borrows the major, minor+extra format used by libcephfs.
The version numbering is starting at 1,1,0 on the theory that the
implicit version at Jewel is 1,0,0.

Signed-off-by: Matt Benjamin <[email protected]>
  • Loading branch information
mattbenjamin committed Aug 23, 2016
1 parent 70dad0f commit 355ccc5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/include/rados/librgw.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
extern "C" {
#endif

#define LIBRGW_VER_MAJOR 1
#define LIBRGW_VER_MINOR 1
#define LIBRGW_VER_EXTRA 0

#define LIBRGW_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
#define LIBRGW_VERSION_CODE LIBRGW_VERSION(LIBRGW_VER_MAJOR, LIBRGW_VER_MINOR, LIBRGW_VER_EXTRA)

typedef void* librgw_t;
int librgw_create(librgw_t *rgw, int argc, char **argv);
void librgw_shutdown(librgw_t rgw);
Expand Down
6 changes: 6 additions & 0 deletions src/include/rados/rgw_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
extern "C" {
#endif

#define LIBRGW_FILE_VER_MAJOR 1
#define LIBRGW_FILE_VER_MINOR 1
#define LIBRGW_FILE_VER_EXTRA 0

#define LIBRGW_FILE_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
#define LIBRGW_FILE_VERSION_CODE LIBRGW_FILE_VERSION(LIBRGW_FILE_VER_MAJOR, LIBRGW_FILE_VER_MINOR, LIBRGW_FILE_VER_EXTRA)

/*
* object types
Expand Down

0 comments on commit 355ccc5

Please sign in to comment.