Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refactor: rename Membase to Couchbase

  • Loading branch information...
commit d356243bf0d7406d91b216955ec896d8bd7959b2 1 parent 184fee6
Trond Norbye authored February 10, 2011
2  AUTHORS
... ...
@@ -1,3 +1,3 @@
1  
-The following people contributed to libmembase
  1
+The following people contributed to libcouchbase
2 2
 
3 3
 Trond Norbye, trond.norbye@gmail.com
26  Makefile.am
... ...
@@ -1,5 +1,5 @@
1 1
 #
2  
-#     Copyright 2010 Membase, Inc.
  2
+#     Copyright 2010 Couchbase, Inc.
3 3
 #
4 4
 #   Licensed under the Apache License, Version 2.0 (the "License");
5 5
 #   you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15 15
 #
16 16
 
17 17
 #
18  
-# Automake file used to build libmembase. Please avoid using propritary
  18
+# Automake file used to build libcouchbase. Please avoid using propritary
19 19
 # make constructs, but keep the syntax portable. To reduce the posibility
20 20
 # for merge conflicts all list of files should be sorted aphabetically
21 21
 # (If everyone always add their files to the end of the list that line will
@@ -25,14 +25,14 @@
25 25
 #
26 26
 ACLOCAL_AMFLAGS = -I m4 --force
27 27
 
28  
-lib_LTLIBRARIES = libmembase.la memcached_packet_debug.la
  28
+lib_LTLIBRARIES = libcouchbase.la memcached_packet_debug.la
29 29
 
30 30
 pkginclude_HEADERS = \
31  
-                     include/libmembase/callbacks.h \
32  
-                     include/libmembase/membase.h \
33  
-                     include/libmembase/types.h
  31
+                     include/libcouchbase/callbacks.h \
  32
+                     include/libcouchbase/couchbase.h \
  33
+                     include/libcouchbase/types.h
34 34
 
35  
-libmembase_la_SOURCES = \
  35
+libcouchbase_la_SOURCES = \
36 36
                         src/arithmetic.c \
37 37
                         src/base64.c \
38 38
                         src/cookie.c \
@@ -50,9 +50,9 @@ libmembase_la_SOURCES = \
50 50
 
51 51
 # Please remember to update the version info before each release if you
52 52
 # add / remove functions.
53  
-libmembase_la_LDFLAGS=$(LTLIBEVENT) $(LTLIBVBUCKET) $(LTLIBSASL) $(LTLIBSASL2) \
  53
+libcouchbase_la_LDFLAGS=$(LTLIBEVENT) $(LTLIBVBUCKET) $(LTLIBSASL) $(LTLIBSASL2) \
54 54
                       -version-info 0:0:0
55  
-libmembase_la_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -DLIBMEMBASE_INTERNAL=1
  55
+libcouchbase_la_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -DLIBCOUCHBASE_INTERNAL=1
56 56
 
57 57
 memcached_packet_debug_la_SOURCES= src/packet_debug.c \
58 58
                                    src/utilities.c
@@ -69,17 +69,17 @@ noinst_PROGRAMS = \
69 69
                example/memrm
70 70
 
71 71
 example_memcat_SOURCES = example/memcat.c
72  
-example_memcat_LDADD = libmembase.la
  72
+example_memcat_LDADD = libcouchbase.la
73 73
 example_memcat_LDFLAGS = $(LTLIBEVENT)
74 74
 
75 75
 example_memcp_SOURCES = example/memcp.c
76  
-example_memcp_LDADD = libmembase.la
  76
+example_memcp_LDADD = libcouchbase.la
77 77
 example_memcp_LDFLAGS = $(LTLIBEVENT)
78 78
 
79 79
 example_memdump_SOURCES = example/memdump.c
80  
-example_memdump_LDADD = libmembase.la
  80
+example_memdump_LDADD = libcouchbase.la
81 81
 example_memdump_LDFLAGS = $(LTLIBEVENT)
82 82
 
83 83
 example_memrm_SOURCES = example/memrm.c
84  
-example_memrm_LDADD = libmembase.la
  84
+example_memrm_LDADD = libcouchbase.la
85 85
 example_memrm_LDFLAGS = $(LTLIBEVENT)
6  README
... ...
@@ -1,7 +1,7 @@
1 1
 Hi!
2 2
 
3  
-I started implementing libmembase during the release testing of
4  
-Membase. We didn't have a "smart client" in C at the moment, so I had
  3
+I started implementing libcouchbase during the release testing of
  4
+Couchbase. We didn't have a "smart client" in C at the moment, so I had
5 5
 to revert to Python/Java to run my tests. A "smart client" is a client
6 6
 that utilize the REST interface to locate the server hosting a given
7 7
 vbucket.
@@ -12,7 +12,7 @@ libmemcached already implements everything I need except for the
12 12
 the existing codebase, because libmemcached doesn't use vbuckets and
13 13
 the serverlist is provided by the caller. I'm not saying that it would
14 14
 be impossible to refactor the code so that it works, but libmemcached
15  
-isn't targeted to membase only (and adding vendor-specific logic to
  15
+isn't targeted to couchbase only (and adding vendor-specific logic to
16 16
 a generic library didn't feel right).
17 17
 
18 18
 You might think that I suffer for the "not invented here" syndrome by
8  configure.ac
... ...
@@ -1,5 +1,5 @@
1 1
 #
2  
-#     Copyright 2010 Membase, Inc.
  2
+#     Copyright 2010 Couchbase, Inc.
3 3
 #
4 4
 #   Licensed under the Apache License, Version 2.0 (the "License");
5 5
 #   you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15 15
 #
16 16
 
17 17
 #
18  
-# Configure script to check for all dependencies needed by libmembase.
  18
+# Configure script to check for all dependencies needed by libcouchbase.
19 19
 # I prefer using the macros from the "pandora build system" where I can
20 20
 # since they adds increased flexibility for searching for libraries and
21 21
 # support multi-isa target systems.
@@ -24,7 +24,7 @@
24 24
 #
25 25
 AC_PREREQ(2.60)
26 26
 #m4_include([m4/version.m4])
27  
-AC_INIT(libmembase, VERSION_NUMBER, trond.norbye@gmail.com)
  27
+AC_INIT(libcouchbase, VERSION_NUMBER, trond.norbye@gmail.com)
28 28
 AC_CONFIG_SRCDIR([src/internal.h])
29 29
 AC_CONFIG_AUX_DIR(config)
30 30
 
@@ -69,7 +69,7 @@ AH_TOP([
69 69
 #define CONFIG_H
70 70
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
71 71
 /*
72  
- *     Copyright 2010 Membase, Inc.
  72
+ *     Copyright 2010 Couchbase, Inc.
73 73
  *
74 74
  *   Licensed under the Apache License, Version 2.0 (the "License");
75 75
  *   you may not use this file except in compliance with the License.
34  example/memcat.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16 16
  */
17 17
 
18 18
 /**
19  
- * Example program using libmembase_mget.
  19
+ * Example program using libcouchbase_mget.
20 20
  *
21 21
  * @author Trond Norbye
22 22
  * @todo add documentation
@@ -33,7 +33,7 @@
33 33
 #include <assert.h>
34 34
 #include <event.h>
35 35
 
36  
-#include <libmembase/membase.h>
  36
+#include <libcouchbase/couchbase.h>
37 37
 
38 38
 static void usage(char cmd, const void *arg, void *cookie);
39 39
 static void set_char_ptr(char cmd, const void *arg, void *cookie) {
@@ -163,15 +163,15 @@ static void handle_options(int argc, char **argv) {
163 163
 
164 164
 FILE *output;
165 165
 
166  
-static void get_callback(libmembase_t instance,
167  
-                         libmembase_error_t error,
  166
+static void get_callback(libcouchbase_t instance,
  167
+                         libcouchbase_error_t error,
168 168
                          const void *key, size_t nkey,
169 169
                          const void *bytes, size_t nbytes,
170 170
                          uint32_t flags, uint64_t cas)
171 171
 {
172 172
     (void)instance;
173 173
     (void)bytes;
174  
-    fprintf(output, "%s <", error == LIBMEMBASE_SUCCESS ? "Found" : "Missing");
  174
+    fprintf(output, "%s <", error == LIBCOUCHBASE_SUCCESS ? "Found" : "Missing");
175 175
     fwrite(key, nkey, 1, output);
176 176
     fprintf(output, "> size: %zu flags %04x cas: %"PRIu64"\n",
177 177
             nbytes, flags, cas);
@@ -202,31 +202,31 @@ int main(int argc, char **argv)
202 202
     }
203 203
 
204 204
     struct event_base *evbase = event_init();
205  
-    libmembase_t instance = libmembase_create(host, username,
206  
-                                              passwd, bucket, evbase);
  205
+    libcouchbase_t instance = libcouchbase_create(host, username,
  206
+                                                  passwd, bucket, evbase);
207 207
     if (instance == NULL) {
208  
-        fprintf(stderr, "Failed to create libmembase instance\n");
  208
+        fprintf(stderr, "Failed to create libcouchbase instance\n");
209 209
         return 1;
210 210
     }
211 211
 
212  
-    if (libmembase_connect(instance) != LIBMEMBASE_SUCCESS) {
213  
-        fprintf(stderr, "Failed to connect libmembase instance to server\n");
  212
+    if (libcouchbase_connect(instance) != LIBCOUCHBASE_SUCCESS) {
  213
+        fprintf(stderr, "Failed to connect libcouchbase instance to server\n");
214 214
         return 1;
215 215
     }
216 216
 
217  
-    libmembase_callback_t callbacks = {
  217
+    libcouchbase_callback_t callbacks = {
218 218
         .get = get_callback
219 219
     };
220  
-    libmembase_set_callbacks(instance, &callbacks);
  220
+    libcouchbase_set_callbacks(instance, &callbacks);
221 221
 
222  
-    if (libmembase_mget(instance, jj,
223  
-                        (const void * const *)keys,
224  
-                        nkey) != LIBMEMBASE_SUCCESS) {
  222
+    if (libcouchbase_mget(instance, jj,
  223
+                          (const void * const *)keys,
  224
+                          nkey) != LIBCOUCHBASE_SUCCESS) {
225 225
         fprintf(stderr, "Failed to send requests\n");
226 226
         return 1;
227 227
     }
228 228
 
229  
-    libmembase_execute(instance);
  229
+    libcouchbase_execute(instance);
230 230
     free(keys);
231 231
     free(nkey);
232 232
 
40  example/memcp.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16 16
  */
17 17
 
18 18
 /**
19  
- * Example program using libmembase_storage.
  19
+ * Example program using libcouchbase_storage.
20 20
  *
21 21
  * @author Trond Norbye
22 22
  * @todo add documentation
@@ -36,7 +36,7 @@
36 36
 #include <assert.h>
37 37
 #include <sys/mman.h>
38 38
 #include <event.h>
39  
-#include <libmembase/membase.h>
  39
+#include <libcouchbase/couchbase.h>
40 40
 
41 41
 static void usage(char cmd, const void *arg, void *cookie);
42 42
 static void set_char_ptr(char cmd, const void *arg, void *cookie) {
@@ -166,14 +166,14 @@ static void handle_options(int argc, char **argv) {
166 166
 
167 167
 FILE *output;
168 168
 
169  
-static void storage_callback(libmembase_t instance,
170  
-                             libmembase_error_t error,
  169
+static void storage_callback(libcouchbase_t instance,
  170
+                             libcouchbase_error_t error,
171 171
                              const void *key, size_t nkey,
172 172
                              uint64_t cas)
173 173
 {
174 174
     (void)instance;
175 175
     fprintf(output, "%sstore <",
176  
-            error == LIBMEMBASE_SUCCESS ? "" : "Failed to ");
  176
+            error == LIBCOUCHBASE_SUCCESS ? "" : "Failed to ");
177 177
     fwrite(key, nkey, 1, output);
178 178
     fprintf(output, "> cas: %"PRIu64"\n", cas);
179 179
 }
@@ -194,22 +194,22 @@ int main(int argc, char **argv)
194 194
     }
195 195
 
196 196
     struct event_base *evbase = event_init();
197  
-    libmembase_t instance = libmembase_create(host, username,
198  
-                                              passwd, bucket, evbase);
  197
+    libcouchbase_t instance = libcouchbase_create(host, username,
  198
+                                                  passwd, bucket, evbase);
199 199
     if (instance == NULL) {
200  
-        fprintf(stderr, "Failed to create libmembase instance\n");
  200
+        fprintf(stderr, "Failed to create libcouchbase instance\n");
201 201
         return 1;
202 202
     }
203 203
 
204  
-    if (libmembase_connect(instance) != LIBMEMBASE_SUCCESS) {
205  
-        fprintf(stderr, "Failed to connect libmembase instance to server\n");
  204
+    if (libcouchbase_connect(instance) != LIBCOUCHBASE_SUCCESS) {
  205
+        fprintf(stderr, "Failed to connect libcouchbase instance to server\n");
206 206
         return 1;
207 207
     }
208 208
 
209  
-    libmembase_callback_t callbacks = {
  209
+    libcouchbase_callback_t callbacks = {
210 210
         .storage = storage_callback
211 211
     };
212  
-    libmembase_set_callbacks(instance, &callbacks);
  212
+    libcouchbase_set_callbacks(instance, &callbacks);
213 213
 
214 214
     for (int ii = optind; ii < argc; ++ii) {
215 215
         const char *key = argv[ii];
@@ -221,13 +221,13 @@ int main(int argc, char **argv)
221 221
             void *bytes = mmap(NULL, (size_t)st.st_size, PROT_READ,
222 222
                                MAP_NORESERVE | MAP_PRIVATE, fileno(fp), 0);
223 223
             if (bytes != NULL) {
224  
-                libmembase_error_t err;
225  
-                err = libmembase_store(instance,
226  
-                                       LIBMEMBASE_SET,
227  
-                                       key, nkey,
228  
-                                       bytes, (size_t)st.st_size,
229  
-                                       0, 0, 0);
230  
-                libmembase_execute(instance);
  224
+                libcouchbase_error_t err;
  225
+                err = libcouchbase_store(instance,
  226
+                                         LIBCOUCHBASE_SET,
  227
+                                         key, nkey,
  228
+                                         bytes, (size_t)st.st_size,
  229
+                                         0, 0, 0);
  230
+                libcouchbase_execute(instance);
231 231
                 munmap(bytes, (size_t)st.st_size);
232 232
                 fclose(fp);
233 233
             } else {
24  example/memdump.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16 16
  */
17 17
 
18 18
 /**
19  
- * Example program using libmembase_tap_cluster.
  19
+ * Example program using libcouchbase_tap_cluster.
20 20
  *
21 21
  * @author Trond Norbye
22 22
  * @todo add documentation
@@ -31,7 +31,7 @@
31 31
 #include <string.h>
32 32
 #include <event.h>
33 33
 
34  
-#include <libmembase/membase.h>
  34
+#include <libcouchbase/couchbase.h>
35 35
 
36 36
 static void usage(char cmd, const void *arg, void *cookie);
37 37
 static void set_char_ptr(char cmd, const void *arg, void *cookie) {
@@ -161,7 +161,7 @@ static void handle_options(int argc, char **argv) {
161 161
 
162 162
 FILE *output;
163 163
 
164  
-static void tap_mutation(libmembase_t instance,
  164
+static void tap_mutation(libcouchbase_t instance,
165 165
                          const void *key,
166 166
                          size_t nkey,
167 167
                          const void *data,
@@ -198,23 +198,23 @@ int main(int argc, char **argv)
198 198
 
199 199
     struct event_base *evbase = event_init();
200 200
 
201  
-    libmembase_t instance = libmembase_create(host, username,
202  
-                                              passwd, bucket, evbase);
  201
+    libcouchbase_t instance = libcouchbase_create(host, username,
  202
+                                                  passwd, bucket, evbase);
203 203
     if (instance == NULL) {
204  
-        fprintf(stderr, "Failed to create libmembase instance\n");
  204
+        fprintf(stderr, "Failed to create libcouchbase instance\n");
205 205
         return 1;
206 206
     }
207 207
 
208  
-    if (libmembase_connect(instance) != LIBMEMBASE_SUCCESS) {
209  
-        fprintf(stderr, "Failed to connect libmembase instance to server\n");
  208
+    if (libcouchbase_connect(instance) != LIBCOUCHBASE_SUCCESS) {
  209
+        fprintf(stderr, "Failed to connect libcouchbase instance to server\n");
210 210
         return 1;
211 211
     }
212 212
 
213  
-    libmembase_callback_t callbacks = {
  213
+    libcouchbase_callback_t callbacks = {
214 214
         .tap_mutation = tap_mutation,
215 215
     };
216  
-    libmembase_set_callbacks(instance, &callbacks);
217  
-    libmembase_tap_cluster(instance, NULL, true);
  216
+    libcouchbase_set_callbacks(instance, &callbacks);
  217
+    libcouchbase_tap_cluster(instance, NULL, true);
218 218
 
219 219
     return 0;
220 220
 }
32  example/memrm.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16 16
  */
17 17
 
18 18
 /**
19  
- * Example program using libmembase_delete.
  19
+ * Example program using libcouchbase_delete.
20 20
  *
21 21
  * @author Trond Norbye
22 22
  * @todo add documentation
@@ -36,7 +36,7 @@
36 36
 #include <assert.h>
37 37
 #include <sys/mman.h>
38 38
 #include <event.h>
39  
-#include <libmembase/membase.h>
  39
+#include <libcouchbase/couchbase.h>
40 40
 
41 41
 static void usage(char cmd, const void *arg, void *cookie);
42 42
 static void set_char_ptr(char cmd, const void *arg, void *cookie) {
@@ -156,14 +156,14 @@ static void handle_options(int argc, char **argv) {
156 156
     }
157 157
 }
158 158
 
159  
-static void remove_callback(libmembase_t instance,
160  
-                             libmembase_error_t error,
161  
-                             const void *key, size_t nkey)
  159
+static void remove_callback(libcouchbase_t instance,
  160
+                            libcouchbase_error_t error,
  161
+                            const void *key, size_t nkey)
162 162
 {
163 163
     (void)instance;
164 164
     fprintf(stdout, "Remove <");
165 165
     fwrite(key, nkey, 1, stdout);
166  
-    fprintf(stdout, "> %s\n", error == LIBMEMBASE_SUCCESS ? "OK" : "Failed");
  166
+    fprintf(stdout, "> %s\n", error == LIBCOUCHBASE_SUCCESS ? "OK" : "Failed");
167 167
 }
168 168
 
169 169
 int main(int argc, char **argv)
@@ -171,29 +171,29 @@ int main(int argc, char **argv)
171 171
     handle_options(argc, argv);
172 172
 
173 173
     struct event_base *evbase = event_init();
174  
-    libmembase_t instance = libmembase_create(host, username,
175  
-                                              passwd, bucket, evbase);
  174
+    libcouchbase_t instance = libcouchbase_create(host, username,
  175
+                                                  passwd, bucket, evbase);
176 176
     if (instance == NULL) {
177  
-        fprintf(stderr, "Failed to create libmembase instance\n");
  177
+        fprintf(stderr, "Failed to create libcouchbase instance\n");
178 178
         return 1;
179 179
     }
180 180
 
181  
-    if (libmembase_connect(instance) != LIBMEMBASE_SUCCESS) {
182  
-        fprintf(stderr, "Failed to connect libmembase instance to server\n");
  181
+    if (libcouchbase_connect(instance) != LIBCOUCHBASE_SUCCESS) {
  182
+        fprintf(stderr, "Failed to connect libcouchbase instance to server\n");
183 183
         return 1;
184 184
     }
185 185
 
186  
-    libmembase_callback_t callbacks = {
  186
+    libcouchbase_callback_t callbacks = {
187 187
         .remove = remove_callback
188 188
     };
189  
-    libmembase_set_callbacks(instance, &callbacks);
  189
+    libcouchbase_set_callbacks(instance, &callbacks);
190 190
 
191 191
     for (int ii = optind; ii < argc; ++ii) {
192  
-        libmembase_remove(instance, argv[ii], strlen(argv[ii]), 0);
  192
+        libcouchbase_remove(instance, argv[ii], strlen(argv[ii]), 0);
193 193
     }
194 194
 
195 195
 
196  
-    libmembase_execute(instance);
  196
+    libcouchbase_execute(instance);
197 197
 
198 198
     return 0;
199 199
 }
38  include/libmembase/callbacks.h → include/libcouchbase/callbacks.h
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -21,11 +21,11 @@
21 21
  *
22 22
  * @author Trond Norbye
23 23
  */
24  
-#ifndef LIBMEMBASE_CALLBACKS_H
25  
-#define LIBMEMBASE_CALLBACKS_H 1
  24
+#ifndef LIBCOUCHBASE_CALLBACKS_H
  25
+#define LIBCOUCHBASE_CALLBACKS_H 1
26 26
 
27  
-#ifndef LIBMEMBASE_MEMBASE_H
28  
-#error "Include libmembase/membase.h instead"
  27
+#ifndef LIBCOUCHBASE_COUCHBASE_H
  28
+#error "Include libcouchbase/couchbase.h instead"
29 29
 #endif
30 30
 
31 31
 #ifdef __cplusplus
@@ -33,23 +33,23 @@ extern "C" {
33 33
 #endif
34 34
 
35 35
     typedef struct {
36  
-        void (*get)(libmembase_t instance,
37  
-                    libmembase_error_t error,
  36
+        void (*get)(libcouchbase_t instance,
  37
+                    libcouchbase_error_t error,
38 38
                     const void *key, size_t nkey,
39 39
                     const void *bytes, size_t nbytes,
40 40
                     uint32_t flags, uint64_t cas);
41  
-        void (*storage)(libmembase_t instance,
42  
-                        libmembase_error_t error,
  41
+        void (*storage)(libcouchbase_t instance,
  42
+                        libcouchbase_error_t error,
43 43
                         const void *key, size_t nkey,
44 44
                         uint64_t cas);
45  
-        void (*arithmetic)(libmembase_t instance,
46  
-                           libmembase_error_t error,
  45
+        void (*arithmetic)(libcouchbase_t instance,
  46
+                           libcouchbase_error_t error,
47 47
                            const void *key, size_t nkey,
48 48
                            uint64_t value, uint64_t cas);
49  
-        void (*remove)(libmembase_t instance,
50  
-                       libmembase_error_t error,
  49
+        void (*remove)(libcouchbase_t instance,
  50
+                       libcouchbase_error_t error,
51 51
                        const void *key, size_t nkey);
52  
-        void (*tap_mutation)(libmembase_t instance,
  52
+        void (*tap_mutation)(libcouchbase_t instance,
53 53
                              const void *key,
54 54
                              size_t nkey,
55 55
                              const void *data,
@@ -58,23 +58,23 @@ extern "C" {
58 58
                              uint32_t exp,
59 59
                              const void *es,
60 60
                              size_t nes);
61  
-        void (*tap_deletion)(libmembase_t instance,
  61
+        void (*tap_deletion)(libcouchbase_t instance,
62 62
                              const void *key,
63 63
                              size_t nkey,
64 64
                              const void *es,
65 65
                              size_t nes);
66  
-        void (*tap_flush)(libmembase_t instance,
  66
+        void (*tap_flush)(libcouchbase_t instance,
67 67
                           const void *es,
68 68
                           size_t nes);
69  
-        void (*tap_opaque)(libmembase_t instance,
  69
+        void (*tap_opaque)(libcouchbase_t instance,
70 70
                            const void *es,
71 71
                            size_t nes);
72  
-        void (*tap_vbucket_set)(libmembase_t instance,
  72
+        void (*tap_vbucket_set)(libcouchbase_t instance,
73 73
                                 uint16_t vbid,
74 74
                                 vbucket_state_t state,
75 75
                                 const void *es,
76 76
                                 size_t nes);
77  
-    } libmembase_callback_t;
  77
+    } libcouchbase_callback_t;
78 78
 
79 79
 #ifdef __cplusplus
80 80
 }
181  include/libmembase/membase.h → include/libcouchbase/couchbase.h
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -20,8 +20,8 @@
20 20
  *
21 21
  * @author Trond Norbye
22 22
  */
23  
-#ifndef LIBMEMBASE_MEMBASE_H
24  
-#define LIBMEMBASE_MEMBASE_H 1
  23
+#ifndef LIBCOUCHBASE_COUCHBASE_H
  24
+#define LIBCOUCHBASE_COUCHBASE_H 1
25 25
 
26 26
 #include <stdint.h>
27 27
 #include <stddef.h>
@@ -31,8 +31,8 @@
31 31
 #endif
32 32
 
33 33
 #include <memcached/vbucket.h>
34  
-#include <libmembase/types.h>
35  
-#include <libmembase/callbacks.h>
  34
+#include <libcouchbase/types.h>
  35
+#include <libcouchbase/callbacks.h>
36 36
 
37 37
 struct event_base;
38 38
 
@@ -41,88 +41,88 @@ extern "C" {
41 41
 #endif
42 42
 
43 43
     /**
44  
-     * Create an instance of libmembase
  44
+     * Create an instance of libcouchbase
45 45
      * @param host The host (with optional port) to connect to retrieve the
46 46
      *             vbucket list from
47 47
      * @param user the username to use
48 48
      * @param passwd The password
49 49
      * @param bucket The bucket to connect to
50 50
      * @param base the libevent base we're for this instance
51  
-     * @return A handle to libmembase, or NULL if an error occured.
  51
+     * @return A handle to libcouchbase, or NULL if an error occured.
52 52
      */
53  
-    libmembase_t libmembase_create(const char *host,
54  
-                                   const char *user,
55  
-                                   const char *passwd,
56  
-                                   const char *bucket,
57  
-                                   struct event_base *base);
  53
+    libcouchbase_t libcouchbase_create(const char *host,
  54
+                                       const char *user,
  55
+                                       const char *passwd,
  56
+                                       const char *bucket,
  57
+                                       struct event_base *base);
58 58
 
59 59
 
60 60
     /**
61  
-     * Destroy (and release all allocated resources) an instance of libmembase.
  61
+     * Destroy (and release all allocated resources) an instance of libcouchbase.
62 62
      * Using instance after calling destroy will most likely cause your
63 63
      * application to crash.
64 64
      *
65 65
      * @param instance the instance to destroy.
66 66
      */
67  
-    void libmembase_destroy(libmembase_t instance);
  67
+    void libcouchbase_destroy(libcouchbase_t instance);
68 68
 
69 69
     /**
70 70
      * Connect to the server and get the vbucket and serverlist.
71 71
      */
72  
-    libmembase_error_t libmembase_connect(libmembase_t instance);
  72
+    libcouchbase_error_t libcouchbase_connect(libcouchbase_t instance);
73 73
 
74 74
     /**
75  
-     * Associate a cookie with an instance of libmembase
  75
+     * Associate a cookie with an instance of libcouchbase
76 76
      * @param instance the instance to associate the cookie to
77 77
      * @param cookie the cookie to associate with this instance.
78 78
      */
79  
-    void libmembase_set_cookie(libmembase_t instance, const void *cookie);
  79
+    void libcouchbase_set_cookie(libcouchbase_t instance, const void *cookie);
80 80
 
81 81
 
82 82
     /**
83 83
      * Retrieve the cookie associated with this instance
84  
-     * @param instance the instance of libmembase
  84
+     * @param instance the instance of libcouchbase
85 85
      * @return The cookie associated with this instance or NULL
86 86
      */
87  
-    const void *libmembase_get_cookie(libmembase_t instance);
  87
+    const void *libcouchbase_get_cookie(libcouchbase_t instance);
88 88
 
89 89
     /**
90 90
      * Set the packet filter for this instance
91  
-     * @param instance the instance of libmembase
  91
+     * @param instance the instance of libcouchbase
92 92
      * @param filter the new packet filter to associate with this instance
93 93
      */
94  
-    void libmembase_set_packet_filter(libmembase_t instance,
95  
-                                      libmembase_packet_filter_t filter);
  94
+    void libcouchbase_set_packet_filter(libcouchbase_t instance,
  95
+                                        libcouchbase_packet_filter_t filter);
96 96
 
97 97
     /**
98 98
      * Set the command handlers
99  
-     * @param instance the instance of libmembase
  99
+     * @param instance the instance of libcouchbase
100 100
      * @param callback the new set of callbacks
101 101
      */
102  
-    void libmembase_set_callbacks(libmembase_t instance,
103  
-                                  libmembase_callback_t *callbacks);
  102
+    void libcouchbase_set_callbacks(libcouchbase_t instance,
  103
+                                    libcouchbase_callback_t *callbacks);
104 104
 
105 105
     /**
106 106
      * Use the TAP protocol to tap the cluster
107 107
      * @param instance the instance to tap
108 108
      * @param filter the tap filter to use
109 109
      * @param callbacks the calback to use
110  
-     * @param block set to true if you want libmembase to run the event
  110
+     * @param block set to true if you want libcouchbase to run the event
111 111
      *              dispatcher loop
112 112
      */
113  
-    void libmembase_tap_cluster(libmembase_t instance,
114  
-                                libmembase_tap_filter_t filter,
115  
-                                bool block);
  113
+    void libcouchbase_tap_cluster(libcouchbase_t instance,
  114
+                                  libcouchbase_tap_filter_t filter,
  115
+                                  bool block);
116 116
 
117 117
     /**
118 118
      * Execute all of the batched requests
119 119
      * @param instance the instance containing the requests
120 120
      */
121  
-    void libmembase_execute(libmembase_t instance);
  121
+    void libcouchbase_execute(libcouchbase_t instance);
122 122
 
123 123
     /**
124 124
      * Get a number of values from the cache. You need to run the
125  
-     * event loop yourself (or call libmembase_execute) to retrieve
  125
+     * event loop yourself (or call libcouchbase_execute) to retrieve
126 126
      * the data.
127 127
      *
128 128
      * @param instance the instance used to batch the requests from
@@ -131,14 +131,14 @@ extern "C" {
131 131
      * @param nkey the array containing the lengths of the keys
132 132
      * @return The status of the operation
133 133
      */
134  
-    libmembase_error_t libmembase_mget(libmembase_t instance,
135  
-                                       size_t num_keys,
136  
-                                       const void * const *keys,
137  
-                                       const size_t *nkey);
  134
+    libcouchbase_error_t libcouchbase_mget(libcouchbase_t instance,
  135
+                                           size_t num_keys,
  136
+                                           const void * const *keys,
  137
+                                           const size_t *nkey);
138 138
 
139 139
     /**
140 140
      * Get a number of values from the cache. You need to run the
141  
-     * event loop yourself (or call libmembase_execute) to retrieve
  141
+     * event loop yourself (or call libcouchbase_execute) to retrieve
142 142
      * the data.
143 143
      *
144 144
      * @param instance the instance used to batch the requests from
@@ -149,19 +149,19 @@ extern "C" {
149 149
      * @param nkey the array containing the lengths of the keys
150 150
      * @return The status of the operation
151 151
      */
152  
-    libmembase_error_t libmembase_mget_by_key(libmembase_t instance,
153  
-                                              const void *hashkey,
154  
-                                              size_t nhashkey,
155  
-                                              size_t num_keys,
156  
-                                              const void * const *keys,
157  
-                                              const size_t *nkey);
  152
+    libcouchbase_error_t libcouchbase_mget_by_key(libcouchbase_t instance,
  153
+                                                  const void *hashkey,
  154
+                                                  size_t nhashkey,
  155
+                                                  size_t num_keys,
  156
+                                                  const void * const *keys,
  157
+                                                  const size_t *nkey);
158 158
 
159 159
     /**
160 160
      * Spool a store operation to the cluster. The operation <b>may</b> be
161 161
      * sent immediately, but you won't be sure (or get the result) until you
162  
-     * run the event loop (or call libmembase_execute).
  162
+     * run the event loop (or call libcouchbase_execute).
163 163
      *
164  
-     * @param instance the handle to libmembase
  164
+     * @param instance the handle to libcouchbase
165 165
      * @param operation constraints for the storage operation (add/replace etc)
166 166
      * @param key the key to set
167 167
      * @param nkey the number of bytes in the key
@@ -175,19 +175,19 @@ extern "C" {
175 175
      *            any cas value.
176 176
      * @return Status of the operation.
177 177
      */
178  
-    libmembase_error_t libmembase_store(libmembase_t instance,
179  
-                                        libmembase_storage_t operation,
180  
-                                        const void *key, size_t nkey,
181  
-                                        const void *bytes, size_t nbytes,
182  
-                                        uint32_t flags, time_t exp,
183  
-                                        uint64_t cas);
  178
+    libcouchbase_error_t libcouchbase_store(libcouchbase_t instance,
  179
+                                            libcouchbase_storage_t operation,
  180
+                                            const void *key, size_t nkey,
  181
+                                            const void *bytes, size_t nbytes,
  182
+                                            uint32_t flags, time_t exp,
  183
+                                            uint64_t cas);
184 184
 
185 185
     /**
186 186
      * Spool a store operation to the cluster. The operation <b>may</b> be
187 187
      * sent immediately, but you won't be sure (or get the result) until you
188  
-     * run the event loop (or call libmembase_execute).
  188
+     * run the event loop (or call libcouchbase_execute).
189 189
      *
190  
-     * @param instance the handle to libmembase
  190
+     * @param instance the handle to libcouchbase
191 191
      * @param operation constraints for the storage operation (add/replace etc)
192 192
      * @param hashkey the key to use for hashing
193 193
      * @param nhashkey the number of bytes in hashkey
@@ -203,21 +203,24 @@ extern "C" {
203 203
      *            any cas value.
204 204
      * @return Status of the operation.
205 205
      */
206  
-    libmembase_error_t libmembase_store_by_key(libmembase_t instance,
207  
-                                               libmembase_storage_t operation,
208  
-                                               const void *hashkey,
209  
-                                               size_t nhashkey,
210  
-                                               const void *key, size_t nkey,
211  
-                                               const void *bytes, size_t nbytes,
212  
-                                               uint32_t flags, time_t exp,
213  
-                                               uint64_t cas);
  206
+    libcouchbase_error_t libcouchbase_store_by_key(libcouchbase_t instance,
  207
+                                                   libcouchbase_storage_t operation,
  208
+                                                   const void *hashkey,
  209
+                                                   size_t nhashkey,
  210
+                                                   const void *key,
  211
+                                                   size_t nkey,
  212
+                                                   const void *bytes,
  213
+                                                   size_t nbytes,
  214
+                                                   uint32_t flags,
  215
+                                                   time_t exp,
  216
+                                                   uint64_t cas);
214 217
 
215 218
     /**
216 219
      * Spool an arithmetic operation to the cluster. The operation <b>may</b> be
217 220
      * sent immediately, but you won't be sure (or get the result) until you
218  
-     * run the event loop (or call libmembase_execute).
  221
+     * run the event loop (or call libcouchbase_execute).
219 222
      *
220  
-     * @param instance the handle to libmembase
  223
+     * @param instance the handle to libcouchbase
221 224
      * @param key the key to set
222 225
      * @param nkey the number of bytes in the key
223 226
      * @param delta The amount to add / subtract
@@ -227,17 +230,17 @@ extern "C" {
227 230
      * @param initial The initial value of the object if we create it
228 231
      * @return Status of the operation.
229 232
      */
230  
-    libmembase_error_t libmembase_arithmetic(libmembase_t instance,
231  
-                                             const void *key, size_t nkey,
232  
-                                             int64_t delta, time_t exp,
233  
-                                             bool create, uint64_t initial);
  233
+    libcouchbase_error_t libcouchbase_arithmetic(libcouchbase_t instance,
  234
+                                                 const void *key, size_t nkey,
  235
+                                                 int64_t delta, time_t exp,
  236
+                                                 bool create, uint64_t initial);
234 237
 
235 238
     /**
236 239
      * Spool an arithmetic operation to the cluster. The operation <b>may</b> be
237 240
      * sent immediately, but you won't be sure (or get the result) until you
238  
-     * run the event loop (or call libmembase_execute).
  241
+     * run the event loop (or call libcouchbase_execute).
239 242
      *
240  
-     * @param instance the handle to libmembase
  243
+     * @param instance the handle to libcouchbase
241 244
      * @param hashkey the key to use for hashing
242 245
      * @param nhashkey the number of bytes in hashkey
243 246
      * @param key the key to set
@@ -249,36 +252,37 @@ extern "C" {
249 252
      * @param initial The initial value of the object if we create it
250 253
      * @return Status of the operation.
251 254
      */
252  
-    libmembase_error_t libmembase_arithmetic_by_key(libmembase_t instance,
253  
-                                                    const void *hashkey,
254  
-                                                    size_t nhashkey,
255  
-                                                    const void *key,
256  
-                                                    size_t nkey,
257  
-                                                    int64_t delta, time_t exp,
258  
-                                                    bool create,
259  
-                                                    uint64_t initial);
  255
+    libcouchbase_error_t libcouchbase_arithmetic_by_key(libcouchbase_t instance,
  256
+                                                        const void *hashkey,
  257
+                                                        size_t nhashkey,
  258
+                                                        const void *key,
  259
+                                                        size_t nkey,
  260
+                                                        int64_t delta,
  261
+                                                        time_t exp,
  262
+                                                        bool create,
  263
+                                                        uint64_t initial);
260 264
 
261 265
     /**
262 266
      * Spool a remove operation to the cluster. The operation <b>may</b> be
263 267
      * sent immediately, but you won't be sure (or get the result) until you
264  
-     * run the event loop (or call libmembase_execute).
  268
+     * run the event loop (or call libcouchbase_execute).
265 269
      *
266  
-     * @param instance the handle to libmembase
  270
+     * @param instance the handle to libcouchbase
267 271
      * @param key the key to delete
268 272
      * @param nkey the number of bytes in the key
269 273
      * @param cas the cas value for the object (or 0 if you don't care)
270 274
      * @return Status of the operation.
271 275
      */
272  
-    libmembase_error_t libmembase_remove(libmembase_t instance,
273  
-                                         const void *key, size_t nkey,
274  
-                                         uint64_t cas);
  276
+    libcouchbase_error_t libcouchbase_remove(libcouchbase_t instance,
  277
+                                             const void *key, size_t nkey,
  278
+                                             uint64_t cas);
275 279
 
276 280
     /**
277 281
      * Spool a remove operation to the cluster. The operation <b>may</b> be
278 282
      * sent immediately, but you won't be sure (or get the result) until you
279  
-     * run the event loop (or call libmembase_execute).
  283
+     * run the event loop (or call libcouchbase_execute).
280 284
      *
281  
-     * @param instance the handle to libmembase
  285
+     * @param instance the handle to libcouchbase
282 286
      * @param hashkey the key to use for hashing
283 287
      * @param nhashkey the number of bytes in hashkey
284 288
      * @param key the key to delete
@@ -286,11 +290,12 @@ extern "C" {
286 290
      * @param cas the cas value for the object (or 0 if you don't care)
287 291
      * @return Status of the operation.
288 292
      */
289  
-    libmembase_error_t libmembase_remove_by_key(libmembase_t instance,
290  
-                                                const void *hashkey,
291  
-                                                size_t nhashkey,
292  
-                                                const void *key, size_t nkey,
293  
-                                                uint64_t cas);
  293
+    libcouchbase_error_t libcouchbase_remove_by_key(libcouchbase_t instance,
  294
+                                                    const void *hashkey,
  295
+                                                    size_t nhashkey,
  296
+                                                    const void *key,
  297
+                                                    size_t nkey,
  298
+                                                    uint64_t cas);
294 299
 
295 300
 #ifdef __cplusplus
296 301
 }
60  include/libmembase/types.h → include/libcouchbase/types.h
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -16,18 +16,18 @@
16 16
  */
17 17
 
18 18
 /**
19  
- * Public types and datatypes exported through the libmembase API.
20  
- * Please note that libmembase should be binary compatible across versions
  19
+ * Public types and datatypes exported through the libcouchbase API.
  20
+ * Please note that libcouchbase should be binary compatible across versions
21 21
  * so remember to update the library version numbers if you change any
22 22
  * of the values.
23 23
  *
24 24
  * @author Trond Norbye
25 25
  */
26  
-#ifndef LIBMEMBASE_TYPES_H
27  
-#define LIBMEMBASE_TYPES_H 1
  26
+#ifndef LIBCOUCHBASE_TYPES_H
  27
+#define LIBCOUCHBASE_TYPES_H 1
28 28
 
29  
-#ifndef LIBMEMBASE_MEMBASE_H
30  
-#error "Include libmembase/membase.h instead"
  29
+#ifndef LIBCOUCHBASE_COUCHBASE_H
  30
+#error "Include libcouchbase/couchbase.h instead"
31 31
 #endif
32 32
 
33 33
 #ifdef __cplusplus
@@ -40,53 +40,53 @@ extern "C" {
40 40
      * internal layout makes it a lot harder to keep binary compatibility
41 41
      * (if people tries to use it's sice etc).
42 42
      */
43  
-#ifdef LIBMEMBASE_INTERNAL
44  
-    struct libmembase_st;
45  
-    typedef struct libmembase_st* libmembase_t;
  43
+#ifdef LIBCOUCHBASE_INTERNAL
  44
+    struct libcouchbase_st;
  45
+    typedef struct libcouchbase_st* libcouchbase_t;
46 46
 #else
47  
-    typedef void* libmembase_t;
  47
+    typedef void* libcouchbase_t;
48 48
 #endif
49 49
 
50 50
     /**
51 51
      * Define the error codes in use by the library
52 52
      */
53 53
     typedef enum {
54  
-        LIBMEMBASE_SUCCESS,
55  
-        LIBMEMBASE_ENOMEM,
56  
-        LIBMEMBASE_E2BIG,
57  
-        LIBMEMBASE_UNKNOWN_HOST,
58  
-        LIBMEMBASE_NETWORK_ERROR,
59  
-        LIBMEMBASE_LIBEVENT_ERROR,
60  
-        LIBMEMBASE_KEY_ENOENT,
61  
-        LIBMEMBASE_ERROR
62  
-    } libmembase_error_t;
  54
+        LIBCOUCHBASE_SUCCESS,
  55
+        LIBCOUCHBASE_ENOMEM,
  56
+        LIBCOUCHBASE_E2BIG,
  57
+        LIBCOUCHBASE_UNKNOWN_HOST,
  58
+        LIBCOUCHBASE_NETWORK_ERROR,
  59
+        LIBCOUCHBASE_LIBEVENT_ERROR,
  60
+        LIBCOUCHBASE_KEY_ENOENT,
  61
+        LIBCOUCHBASE_ERROR
  62
+    } libcouchbase_error_t;
63 63
 
64 64
     /**
65  
-     * Storing an item in membase is only one operation with a different
  65
+     * Storing an item in couchbase is only one operation with a different
66 66
      * set of attributes / constraints.
67 67
      */
68 68
     typedef enum {
69 69
         /** Add the item to the cache, but fail if the object exists alread */
70  
-        LIBMEMBASE_ADD,
  70
+        LIBCOUCHBASE_ADD,
71 71
         /** Replace the existing object in the cache */
72  
-        LIBMEMBASE_REPLACE,
  72
+        LIBCOUCHBASE_REPLACE,
73 73
         /** Unconditionally set the object in the cache */
74  
-        LIBMEMBASE_SET,
  74
+        LIBCOUCHBASE_SET,
75 75
         /** Append this object to the existing object */
76  
-        LIBMEMBASE_APPEND,
  76
+        LIBCOUCHBASE_APPEND,
77 77
         /** Prepend this  object to the existing object */
78  
-        LIBMEMBASE_PREPEND
79  
-    } libmembase_storage_t;
  78
+        LIBCOUCHBASE_PREPEND
  79
+    } libcouchbase_storage_t;
80 80
 
81 81
     /**
82 82
      * We might want to tap just a subset of the bucket. Right now
83 83
      * it's not supported...
84 84
      * @todo come up with how I want the filters to look like
85 85
      */
86  
-    typedef void* libmembase_tap_filter_t;
  86
+    typedef void* libcouchbase_tap_filter_t;
87 87
 
88  
-    typedef bool (*libmembase_packet_filter_t)(libmembase_t instance,
89  
-                                               const void *packet);
  88
+    typedef bool (*libcouchbase_packet_filter_t)(libcouchbase_t instance,
  89
+                                                 const void *packet);
90 90
 
91 91
 
92 92
 #ifdef __cplusplus
44  src/arithmetic.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -22,26 +22,26 @@
22 22
  * @author Trond Norbye
23 23
  * @todo add documentation
24 24
  */
25  
-LIBMEMBASE_API
26  
-libmembase_error_t libmembase_arithmetic(libmembase_t instance,
27  
-                                         const void *key, size_t nkey,
28  
-                                         int64_t delta, time_t exp,
29  
-                                         bool create, uint64_t initial)
  25
+LIBCOUCHBASE_API
  26
+libcouchbase_error_t libcouchbase_arithmetic(libcouchbase_t instance,
  27
+                                             const void *key, size_t nkey,
  28
+                                             int64_t delta, time_t exp,
  29
+                                             bool create, uint64_t initial)
30 30
 {
31  
-    return libmembase_arithmetic_by_key(instance, NULL, 0, key, nkey,
32  
-                                        delta, exp, create, initial);
  31
+    return libcouchbase_arithmetic_by_key(instance, NULL, 0, key, nkey,
  32
+                                          delta, exp, create, initial);
33 33
 }
34 34
 
35  
-LIBMEMBASE_API
36  
-libmembase_error_t libmembase_arithmetic_by_key(libmembase_t instance,
37  
-                                                const void *hashkey,
38  
-                                                size_t nhashkey,
39  
-                                                const void *key, size_t nkey,
40  
-                                                int64_t delta, time_t exp,
41  
-                                                bool create, uint64_t initial)
  35
+LIBCOUCHBASE_API
  36
+libcouchbase_error_t libcouchbase_arithmetic_by_key(libcouchbase_t instance,
  37
+                                                    const void *hashkey,
  38
+                                                    size_t nhashkey,
  39
+                                                    const void *key, size_t nkey,
  40
+                                                    int64_t delta, time_t exp,
  41
+                                                    bool create, uint64_t initial)
42 42
 {
43 43
     // we need a vbucket config before we can start getting data..
44  
-    libmembase_ensure_vbucket_config(instance);
  44
+    libcouchbase_ensure_vbucket_config(instance);
45 45
     assert(instance->vbucket_config);
46 46
 
47 47
     uint16_t vb;
@@ -53,7 +53,7 @@ libmembase_error_t libmembase_arithmetic_by_key(libmembase_t instance,
53 53
                                                   key, nkey);
54 54
     }
55 55
 
56  
-    libmembase_server_t *server;
  56
+    libcouchbase_server_t *server;
57 57
     server = instance->servers + instance->vb_server_map[vb];
58 58
     protocol_binary_request_incr req;
59 59
     memset(&req, 0, sizeof(req));
@@ -79,10 +79,10 @@ libmembase_error_t libmembase_arithmetic_by_key(libmembase_t instance,
79 79
                sizeof(req.message.body.expiration));
80 80
     }
81 81
 
82  
-    libmembase_server_start_packet(server, req.bytes, sizeof(req.bytes));
83  
-    libmembase_server_write_packet(server, key, nkey);
84  
-    libmembase_server_end_packet(server);
85  
-    libmembase_server_send_packets(server);
  82
+    libcouchbase_server_start_packet(server, req.bytes, sizeof(req.bytes));
  83
+    libcouchbase_server_write_packet(server, key, nkey);
  84
+    libcouchbase_server_end_packet(server);
  85
+    libcouchbase_server_send_packets(server);
86 86
 
87  
-    return LIBMEMBASE_SUCCESS;
  87
+    return LIBCOUCHBASE_SUCCESS;
88 88
 }
4  src/base64.c
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3  
- *     Copyright 2010 Membase, Inc.
  3
+ *     Copyright 2010 Couchbase, Inc.
4 4
  *
5 5
  *   Licensed under the Apache License, Version 2.0 (the "License");
6 6
  *   you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@ static void encode(const char *s, char *d, size_t num) {
65 65
  * @param sz size of destination buffer
66 66
  * @return 0 if success, -1 if the destination buffer isn't big enough
67 67
  */
68  
-int libmembase_base64_encode(const char *src, char *dst, size_t sz) {
  68
+int libcouchbase_base64_encode(const char *src, char *dst, size_t sz) {
69 69
     size_t len = strlen(src);
70 70
     size_t triplets = len / 3;
71 71
     size_t rest = len % 3;
18  src/config_static.h
... ...
@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 2
 /*
3