X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fstorage.h;h=0854f164decdd01c3e7c7474f8bfc72dfa8f6b87;hb=2aacfe6223ea5ff3656c900041a0f7ed847c2bf1;hp=ec982ba0bf0689054bb06e20aae434c5bceb4c37;hpb=7c7750f02368b570353ea109f23a0ea26d226e02;p=awesomized%2Flibmemcached diff --git a/libmemcached/storage.h b/libmemcached/storage.h index ec982ba0..0854f164 100644 --- a/libmemcached/storage.h +++ b/libmemcached/storage.h @@ -1,16 +1,41 @@ -/* LibMemcached - * Copyright (C) 2006-2009 Brian Aker - * All rights reserved. +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library * - * Use and distribution licensed under the BSD license. See - * the COPYING file in the parent directory for full text. + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. * - * Summary: Storage related functions, aka set, replace,.. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#ifndef __MEMCACHED_STORAGE_H__ -#define __MEMCACHED_STORAGE_H__ +#pragma once #include "libmemcached/memcached.h" @@ -20,85 +45,85 @@ extern "C" { /* All of the functions for adding data to the server */ LIBMEMCACHED_API -memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, +memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API memcached_return_t memcached_add(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API memcached_return_t memcached_replace(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_append(memcached_st *ptr, +memcached_return_t memcached_append(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_prepend(memcached_st *ptr, +memcached_return_t memcached_prepend(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_cas(memcached_st *ptr, +memcached_return_t memcached_cas(memcached_st *ptr, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas); LIBMEMCACHED_API -memcached_return_t memcached_set_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, - const char *key, size_t key_length, - const char *value, size_t value_length, +memcached_return_t memcached_set_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_add_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, +memcached_return_t memcached_add_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_replace_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, +memcached_return_t memcached_replace_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_prepend_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, +memcached_return_t memcached_prepend_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_append_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, +memcached_return_t memcached_append_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags); LIBMEMCACHED_API -memcached_return_t memcached_cas_by_key(memcached_st *ptr, - const char *master_key, size_t master_key_length, +memcached_return_t memcached_cas_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, const char *key, size_t key_length, - const char *value, size_t value_length, + const char *value, size_t value_length, time_t expiration, uint32_t flags, uint64_t cas); @@ -106,5 +131,3 @@ memcached_return_t memcached_cas_by_key(memcached_st *ptr, #ifdef __cplusplus } #endif - -#endif /* __MEMCACHED_STORAGE_H__ */