X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=example%2Finterface_v1.cc;h=61dd929d0f3f96280d16acd1a748e06703bd18fa;hb=00ce081cdb5bcb602d6303dcf691d981ec8926e0;hp=a4364918146b91c740b91d9d5bdaa20f35f79ace;hpb=357b107e59d9918a0f3bdd7e4aad9493c70e03f1;p=awesomized%2Flibmemcached diff --git a/example/interface_v1.cc b/example/interface_v1.cc index a4364918..61dd929d 100644 --- a/example/interface_v1.cc +++ b/example/interface_v1.cc @@ -2,26 +2,30 @@ /** * This file contains an implementation of the callback interface for level 1 * in the protocol library. If you compare the implementation with the one - * in interface_v0.c you will see that this implementation is much easier and + * in interface_v0.cc you will see that this implementation is much easier and * hides all of the protocol logic and let you focus on the application * logic. One "problem" with this layer is that it is synchronous, so that * you will not receive the next command before a answer to the previous * command is being sent. */ -#include "config.h" -#include +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include #include #include #include "example/memcached_light.h" #include "example/storage.h" +#include "util/log.hpp" + +static datadifferential::util::log_info_st *log_file= NULL; static protocol_binary_response_status add_handler(const void *cookie, const void *key, @@ -390,8 +394,9 @@ static protocol_binary_response_status version_handler(const void *cookie, memcached_binary_protocol_callback_st interface_v1_impl; -void initialize_interface_v1_handler(void) +void initialize_interface_v1_handler(datadifferential::util::log_info_st& arg) { + log_file= &arg; memset(&interface_v1_impl, 0, sizeof(memcached_binary_protocol_callback_st)); interface_v1_impl.interface_version= MEMCACHED_PROTOCOL_HANDLER_V1;