LCOV - code coverage report
Current view: top level - root/contrail/src/contrail-common/zookeeper - zookeeper_interface.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 1 1 100.0 %
Date: 2026-08-03 02:19:58 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.
       3             : //
       4             : 
       5             : #ifndef ZOOKEEPER_ZOOKEEPER_INTERFACE_H_
       6             : #define ZOOKEEPER_ZOOKEEPER_INTERFACE_H_
       7             : 
       8             : #include <zookeeper/zookeeper.h>
       9             : 
      10             : namespace zookeeper {
      11             : namespace interface {
      12             : 
      13             : class ZookeeperInterface {
      14             :  public:
      15           6 :     virtual ~ZookeeperInterface() {}
      16             :     virtual void ZooSetDebugLevel(ZooLogLevel logLevel) = 0;
      17             :     virtual zhandle_t* ZookeeperInit(const char *host, watcher_fn fn,
      18             :         int recv_timeout, const clientid_t *clientid, void *context,
      19             :         int flags) = 0;
      20             :     virtual int ZookeeperClose(zhandle_t *zh) = 0;
      21             :     virtual int ZooState(zhandle_t *zh) = 0;
      22             :     virtual int ZooCreate(zhandle_t *zh, const char *path, const char *value,
      23             :         int valuelen, const struct ACL_vector *acl, int flags,
      24             :         char *path_buffer, int path_buffer_len) = 0;
      25             :     virtual int ZooDelete(zhandle_t *zh, const char *path, int version) = 0;
      26             :     virtual int ZooGet(zhandle_t *zh, const char *path, int watch,
      27             :         char *buffer, int* buffer_len, struct Stat *stat) = 0;
      28             :     virtual int ZooExists(zhandle_t *zh, const char *path, int watch,
      29             :                                          struct Stat *stat) = 0;
      30             :     virtual void ZooSetContext(zhandle_t * zh, void *context) = 0;
      31             :     virtual int ZooIsUnrecoverable(zhandle_t * zh) = 0;
      32             : };
      33             : 
      34             : } // namespace interface
      35             : } // namespace zookeeper
      36             : 
      37             : #endif // ZOOKEEPER_ZOOKEEPER_INTERFACE_H_

Generated by: LCOV version 1.14