X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fprotocol%2Fcallback.h;h=e7efaad7ca47871f43beb4f843724ec8feff7234;hb=c2aabfa4fef8c0069f693a5522c6c23a00ae9d83;hp=826a317da4f0ecbc33710328c030b41e56ac0637;hpb=7ed5aa2c6673ab92559e52a29e83c0a44f3beebc;p=m6w6%2Flibmemcached diff --git a/libmemcached/protocol/callback.h b/libmemcached/protocol/callback.h index 826a317d..e7efaad7 100644 --- a/libmemcached/protocol/callback.h +++ b/libmemcached/protocol/callback.h @@ -338,15 +338,28 @@ typedef struct { memcached_binary_protocol_version_response_handler response_handler); } memcached_binary_protocol_callback_v1_st; + /** - * + * The version numbers for the different callback structures. + */ +typedef enum { + /** Version 0 is a lowlevel interface that tries to maximize your freedom */ + MEMCACHED_PROTOCOL_HANDLER_V0= 0, + /** + * Version 1 abstracts more of the protocol details, and let you work at + * a logical level + */ + MEMCACHED_PROTOCOL_HANDLER_V1= 1, +} memcached_protocol_interface_version_t; + +/** + * Definition of the protocol callback structure. */ typedef struct { /** - * The interface version used (set to 0 if you don't have any specialized - * command handlers). + * The interface version you provide callbacks for. */ - uint64_t interface_version; + memcached_protocol_interface_version_t interface_version; /** * Callback fired just before the command will be executed.