mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Renamed capabilities.c -> xmpp_caps.c
This commit is contained in:
parent
00e400dc98
commit
070d2ced4f
@ -11,7 +11,7 @@ profanity_SOURCES = src/command.c src/contact.c src/history.c src/xmpp.h \
|
|||||||
src/muc.h src/stanza.c src/stanza.h src/parser.c src/parser.h \
|
src/muc.h src/stanza.c src/stanza.h src/parser.c src/parser.h \
|
||||||
src/theme.c src/theme.h src/window.c src/window.h src/xdg_base.c \
|
src/theme.c src/theme.h src/window.c src/window.h src/xdg_base.c \
|
||||||
src/xdg_base.h src/files.c src/files.h src/accounts.c src/accounts.h \
|
src/xdg_base.h src/files.c src/files.h src/accounts.c src/accounts.h \
|
||||||
src/jid.h src/jid.c src/capabilities.h src/capabilities.c src/xmpp_iq.c
|
src/jid.h src/jid.c src/xmpp_caps.c src/xmpp_iq.c
|
||||||
|
|
||||||
TESTS = tests/testsuite
|
TESTS = tests/testsuite
|
||||||
check_PROGRAMS = tests/testsuite
|
check_PROGRAMS = tests/testsuite
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* capabilities.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012, 2013 James Booth <boothj5@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of Profanity.
|
|
||||||
*
|
|
||||||
* Profanity is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Profanity is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Profanity. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CAPABILITIES_H
|
|
||||||
#define CAPABILITIES_H
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
#include <strophe.h>
|
|
||||||
|
|
||||||
typedef struct capabilities_t {
|
|
||||||
char *client;
|
|
||||||
} Capabilities;
|
|
||||||
|
|
||||||
void caps_init(void);
|
|
||||||
void caps_add(const char * const caps_str, const char * const client);
|
|
||||||
gboolean caps_contains(const char * const caps_str);
|
|
||||||
Capabilities* caps_get(const char * const caps_str);
|
|
||||||
char* caps_create_sha1_str(xmpp_stanza_t * const query);
|
|
||||||
xmpp_stanza_t* caps_create_query_response_stanza(xmpp_ctx_t * const ctx);
|
|
||||||
void caps_close(void);
|
|
||||||
|
|
||||||
#endif
|
|
@ -30,7 +30,6 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "accounts.h"
|
#include "accounts.h"
|
||||||
#include "capabilities.h"
|
|
||||||
#include "chat_log.h"
|
#include "chat_log.h"
|
||||||
#include "chat_session.h"
|
#include "chat_session.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "capabilities.h"
|
|
||||||
#include "chat_log.h"
|
#include "chat_log.h"
|
||||||
#include "chat_session.h"
|
#include "chat_session.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
15
src/xmpp.h
15
src/xmpp.h
@ -55,6 +55,11 @@ typedef enum {
|
|||||||
#define JABBER_PRIORITY_MIN -128
|
#define JABBER_PRIORITY_MIN -128
|
||||||
#define JABBER_PRIORITY_MAX 127
|
#define JABBER_PRIORITY_MAX 127
|
||||||
|
|
||||||
|
typedef struct capabilities_t {
|
||||||
|
char *client;
|
||||||
|
} Capabilities;
|
||||||
|
|
||||||
|
// connection functions
|
||||||
void jabber_init(const int disable_tls);
|
void jabber_init(const int disable_tls);
|
||||||
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
jabber_conn_status_t jabber_connect_with_details(const char * const jid,
|
||||||
const char * const passwd, const char * const altdomain);
|
const char * const passwd, const char * const altdomain);
|
||||||
@ -84,6 +89,16 @@ void jabber_free_resources(void);
|
|||||||
void jabber_restart(void);
|
void jabber_restart(void);
|
||||||
void jabber_set_autoping(int seconds);
|
void jabber_set_autoping(int seconds);
|
||||||
|
|
||||||
|
// iq functions
|
||||||
void iq_add_handlers(xmpp_conn_t * const conn, xmpp_ctx_t * const ctx);
|
void iq_add_handlers(xmpp_conn_t * const conn, xmpp_ctx_t * const ctx);
|
||||||
|
|
||||||
|
// caps functions
|
||||||
|
void caps_init(void);
|
||||||
|
void caps_add(const char * const caps_str, const char * const client);
|
||||||
|
gboolean caps_contains(const char * const caps_str);
|
||||||
|
Capabilities* caps_get(const char * const caps_str);
|
||||||
|
char* caps_create_sha1_str(xmpp_stanza_t * const query);
|
||||||
|
xmpp_stanza_t* caps_create_query_response_stanza(xmpp_ctx_t * const ctx);
|
||||||
|
void caps_close(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* capabilities.c
|
* xmpp_caps.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012, 2013 James Booth <boothj5@gmail.com>
|
* Copyright (C) 2012, 2013 James Booth <boothj5@gmail.com>
|
||||||
*
|
*
|
||||||
@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "capabilities.h"
|
|
||||||
#include "stanza.h"
|
#include "stanza.h"
|
||||||
|
#include "xmpp.h"
|
||||||
|
|
||||||
static GHashTable *capabilities;
|
static GHashTable *capabilities;
|
||||||
|
|
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
|
||||||
#include "capabilities.h"
|
|
||||||
#include "chat_session.h"
|
#include "chat_session.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "contact_list.h"
|
#include "contact_list.h"
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
#include <strophe.h>
|
#include <strophe.h>
|
||||||
|
|
||||||
#include "capabilities.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "contact_list.h"
|
#include "contact_list.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user