mirror of https://github.com/bqv/weechat-xmpp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
760 B
C++
34 lines
760 B
C++
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, version 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#include "strophe.hh"
|
|
|
|
xmpp_log_t* logger = nullptr;
|
|
|
|
namespace xmpp {
|
|
context::context()
|
|
: context(xmpp_ctx_new(nullptr, logger)) {
|
|
}
|
|
|
|
context::context(xmpp_ctx_ptr ptr)
|
|
: xmpp_ctx_ptr(std::move(ptr)) {
|
|
}
|
|
|
|
context::context(xmpp_ctx_t *ptr)
|
|
: context(std::move(xmpp_ctx_ptr(
|
|
ptr, [this] (xmpp_ctx_t *ctx) {
|
|
xmpp_ctx_free(ctx);
|
|
}
|
|
))) {
|
|
}
|
|
|
|
context::~context() {
|
|
this->reset(nullptr);
|
|
}
|
|
|
|
void shutdown() {
|
|
xmpp_shutdown();
|
|
}
|
|
}
|