Get library version and supported features.
These functions and macros may be used to conditionally compile features depending on the version of the library being used. They may also be used to employ various features at runtime and to retrieve the version for informational purposes.
|
#define | LCB_VERSION_STRING |
| libcouchbase version string
|
|
#define | LCB_VERSION |
| libcouchbase hex version
|
|
#define | LCB_VERSION_CHANGESET |
| The SCM revision ID.
|
|
#define | LCB_SUPPORTS_SSL |
| Whether the library has SSL support.
|
|
#define | LCB_SUPPORTS_SNAPPY |
| Whether the library has experimental compression support.
|
|
#define | LCB_SUPPORTS_TRACING |
| Whether the library has experimental tracing support.
|
|
|
LCB_EXTERN_VAR const lcb_U32 | lcb_version_g |
| Global/extern variable containing the version of the library.
|
|
◆ lcb_get_version()
const char * lcb_get_version |
( |
lcb_U32 * |
version | ) |
|
Get the version of the library.
- Parameters
-
version | where to store the numeric representation of the version (or NULL if you don't care) |
- Returns
- the textual description of the version ('\0' terminated). Do not try to release this string.
◆ lcb_supports_feature()
int lcb_supports_feature |
( |
int |
n | ) |
|
- Stability
- Committed:
- Determine if this version has support for a particularl feature
- Parameters
-
n | the feature ID to check for |
- Returns
- 0 if not supported, nonzero if supported.
◆ LCB_VERSION
libcouchbase hex version
This number contains the hexadecimal representation of the library version. It is in a format of 0xXXYYZZ
where XX
is the two digit major version (e.g. 02
), YY
is the minor version (e.g. 05
) and ZZ
is the patch version (e.g. 24
).
For example:
String | Hex |
2.0.0 | 0x020000 |
2.1.3 | 0x020103 |
3.0.15 | 0x030015 |
◆ LCB_VERSION_CHANGESET
#define LCB_VERSION_CHANGESET |