From: Date: Thu, 27 Mar 2008 07:22:18 +0000 (-0700) Subject: Adding in missing file X-Git-Tag: _20~1^2~38 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=965a9678d6b5d904a8bae356e49bb9f4f657a9c5;p=m6w6%2Flibmemcached Adding in missing file --- diff --git a/.hgignore b/.hgignore index 5c068824..1c1d8c09 100644 --- a/.hgignore +++ b/.hgignore @@ -43,3 +43,32 @@ Makefile(.in)?$ # Merged files \.orig$ + +#HTML files +docs/libmemcached/default.css +docs/libmemcached/memcached.html +docs/libmemcached/memcached_auto.html +docs/libmemcached/memcached_behavior.html +docs/libmemcached/memcached_callback.html +docs/libmemcached/memcached_create.html +docs/libmemcached/memcached_delete.html +docs/libmemcached/memcached_examples.html +docs/libmemcached/memcached_flush.html +docs/libmemcached/memcached_get.html +docs/libmemcached/memcached_quit.html +docs/libmemcached/memcached_result_st.html +docs/libmemcached/memcached_server_st.html +docs/libmemcached/memcached_servers.html +docs/libmemcached/memcached_set.html +docs/libmemcached/memcached_stats.html +docs/libmemcached/memcached_strerror.html +docs/libmemcached/memcached_verbosity.html +docs/libmemcached/memcached_version.html +docs/libmemcached/memcat.html +docs/libmemcached/memcp.html +docs/libmemcached/memerror.html +docs/libmemcached/memflush.html +docs/libmemcached/memrm.html +docs/libmemcached/memslap.html +docs/libmemcached/memstat.html + diff --git a/libmemcached/memcached_storage.h b/libmemcached/memcached_storage.h new file mode 100644 index 00000000..83d397a7 --- /dev/null +++ b/libmemcached/memcached_storage.h @@ -0,0 +1,78 @@ +/* + * Summary: Storage functions for libmemcached + * + * Copy: See Copyright for the status of this software. + * + * Author: Brian Aker + */ + +#ifndef __MEMCACHED_STORAGE_H__ +#define __MEMCACHED_STORAGE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + SET_OP, + REPLACE_OP, + ADD_OP, + PREPEND_OP, + APPEND_OP, + CAS_OP, +} memcached_storage_action; + +/* This is not available for public use. */ +memcached_return memcached_send(memcached_st *ptr, + char *master_key, size_t master_key_length, + char *key, size_t key_length, + char *value, size_t value_length, + time_t expiration, + uint32_t flags, + uint64_t cas, + memcached_storage_action verb); + + +/* All of the functions/macros for adding data to the server */ + +#define memcached_set(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, SET_OP) + +#define memcached_add(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, ADD_OP) + +#define memcached_replace(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, REPLACE_OP) + +#define memcached_prepend(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, PREPEND_OP) + +#define memcached_append(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, APPEND_OP) + +#define memcached_cas(PTR, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS, CAS) \ + memcached_send((PTR), (KEY), (KEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), (CAS), CAS_OP) + +#define memcached_set_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, SET_OP) + +#define memcached_add_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, ADD_OP) + +#define memcached_replace_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, REPLACE_OP) + +#define memcached_prepend_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, PREPEND_OP) + +#define memcached_append_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), 0, APPEND_OP) + +#define memcached_cas_by_key(PTR, MKEY, MKEY_LEN, KEY, KEY_LEN, VALUE, VALUE_LEN, EXP, FLAGS, CAS) \ + memcached_send((PTR), (MKEY), (MKEY_LEN), (KEY), (KEY_LEN), (VALUE), (VALUE_LEN), (EXP), (FLAGS), (CAS), CAS_OP) + +#ifdef __cplusplus +} +#endif + +#endif /* __MEMCACHED_STORAGE_H__ */