Fix problem where hostname would end up with trailing . and be accepted as
[m6w6/libmemcached] / libmemcached / stats.h
index 79f7e6cfbc666b2e7a307a547ee65cfc12885df9..a3040306003b0a34cc95818ba1f0562524658c85 100644 (file)
@@ -5,16 +5,12 @@
  * Use and distribution licensed under the BSD license.  See
  * the COPYING file in the parent directory for full text.
  *
- * Summary: Change the behavior of the memcached connection.
+ * Summary: Collect up the stats for a memcached server.
  *
  */
 
-#ifndef __MEMCACHED_STATS_H__
-#define __MEMCACHED_STATS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#ifndef __LIBMEMCACHED_STATS_H__
+#define __LIBMEMCACHED_STATS_H__
 
 struct memcached_stat_st {
   uint32_t connection_structures;
@@ -41,10 +37,15 @@ struct memcached_stat_st {
   uint64_t get_misses;
   uint64_t limit_maxbytes;
   char version[MEMCACHED_VERSION_STRING_LENGTH];
+  memcached_st *root;
 };
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 LIBMEMCACHED_API
-void memcached_stat_free(memcached_st *, memcached_stat_st *);
+void memcached_stat_free(const memcached_st *, memcached_stat_st *);
 
 LIBMEMCACHED_API
 memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_return_t *error);
@@ -53,8 +54,19 @@ LIBMEMCACHED_API
 memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char *args,
                                              const char *hostname, in_port_t port);
 
+LIBMEMCACHED_API
+char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_stat,
+                               const char *key, memcached_return_t *error);
+
+LIBMEMCACHED_API
+char ** memcached_stat_get_keys(const memcached_st *ptr, memcached_stat_st *memc_stat,
+                                memcached_return_t *error);
+
+LIBMEMCACHED_API
+memcached_return_t memcached_stat_execute(memcached_st *memc, const char *args,  memcached_stat_fn func, void *context);
+
 #ifdef __cplusplus
-}
+} // extern "C"
 #endif
 
-#endif /* __MEMCACHED_STATS_H__ */
+#endif /* __LIBMEMCACHED_STATS_H__ */