Sha256: ed9e0c67ffcdf9c605efbe20eb8c2f431cddf757dfd2ea50c59b2104818d527b

Contents?: true

Size: 1016 Bytes

Versions: 4

Compression:

Stored size: 1016 Bytes

Contents

#ifndef LCB_AUTH_PRIV_H
#define LCB_AUTH_PRIV_H
#include <libcouchbase/auth.h>

#ifdef __cplusplus
#include <string>
#include <map>

namespace lcb {
class Authenticator {
public:
    typedef std::map<std::string,std::string> Map;
    const std::string& username() const { return m_username; }
    const std::string& password() const { return m_password; }
    const Map& buckets() const { return m_buckets; }
    Authenticator() : m_refcount(1) {}
    Authenticator(const Authenticator&);

    size_t refcount() const { return m_refcount; }
    void incref() { ++m_refcount; }
    void decref() { if (!--m_refcount) { delete this; } }
    lcb_error_t add(const char *user, const char *pass, int flags);
    lcb_error_t init(const std::string& username_, const std::string& bucket,
        const std::string& password, lcb_type_t conntype);

private:
    // todo: refactor these out
    Map m_buckets;
    std::string m_username;
    std::string m_password;
    size_t m_refcount;
};
}
#endif
#endif /* LCB_AUTH_H */

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
libcouchbase-0.2.0 ext/libcouchbase/src/auth-priv.h
libcouchbase-0.1.0 ext/libcouchbase/src/auth-priv.h
libcouchbase-0.0.9 ext/libcouchbase/src/auth-priv.h
libcouchbase-0.0.8 ext/libcouchbase/src/auth-priv.h