From 72699eff45b3e0424ac0ab66c2b550d9a6860504 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Tue, 14 Jun 2005 14:25:42 +0000 Subject: [PATCH] Rename xmpp.h to strophe.h and apply the name changes to the internal header multiple include protection. --- SConstruct | 2 +- examples/active.c | 2 +- examples/basic.c | 2 +- examples/roster.c | 2 +- src/auth.c | 2 +- src/common.h | 8 ++++---- src/conn.c | 2 +- src/ctx.c | 2 +- src/event.c | 2 +- src/handler.c | 2 +- src/hash.c | 2 +- src/hash.h | 4 ++-- src/jid.c | 2 +- src/parser.c | 2 +- src/sasl.c | 2 +- src/sasl.h | 6 +++--- src/sock.h | 6 +++--- src/stanza.c | 2 +- src/util.c | 2 +- src/util.h | 6 +++--- xmpp.h => strophe.h | 10 +++++----- tests/test_base64.c | 2 +- tests/test_ctx.c | 2 +- tests/test_hash.c | 2 +- tests/test_jid.c | 2 +- tests/test_sasl.c | 2 +- 26 files changed, 40 insertions(+), 40 deletions(-) rename xmpp.h => strophe.h (98%) diff --git a/SConstruct b/SConstruct index 2392b8b..0d9a48b 100644 --- a/SConstruct +++ b/SConstruct @@ -48,7 +48,7 @@ Sources = Split(""" """) Headers = Split(""" - xmpp.h + strophe.h common.h sock.h hash.h diff --git a/examples/active.c b/examples/active.c index cfca183..8a9aa55 100644 --- a/examples/active.c +++ b/examples/active.c @@ -20,7 +20,7 @@ #include #include -#include +#include int handle_reply(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, diff --git a/examples/basic.c b/examples/basic.c index 8464212..f8b8d8d 100644 --- a/examples/basic.c +++ b/examples/basic.c @@ -14,7 +14,7 @@ #include -#include +#include void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status, const int error, xmpp_stream_error_t * const stream_error, diff --git a/examples/roster.c b/examples/roster.c index bc92859..7bbe040 100644 --- a/examples/roster.c +++ b/examples/roster.c @@ -19,7 +19,7 @@ #include #include -#include +#include int handle_reply(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, diff --git a/src/auth.c b/src/auth.c index fd40e33..476d466 100644 --- a/src/auth.c +++ b/src/auth.c @@ -16,7 +16,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "sasl.h" diff --git a/src/common.h b/src/common.h index 8243df1..67c2230 100644 --- a/src/common.h +++ b/src/common.h @@ -12,8 +12,8 @@ ** distribution. */ -#ifndef __LIBXMPP_XMPP_COMMON_H__ -#define __LIBXMPP_XMPP_COMMON_H__ +#ifndef __LIBSTROPHE_COMMON_H__ +#define __LIBSTROPHE_COMMON_H__ #include #include @@ -22,7 +22,7 @@ #endif -#include "xmpp.h" +#include "strophe.h" #include "sock.h" #include "hash.h" #include "util.h" @@ -269,4 +269,4 @@ void disconnect_mem_error(xmpp_conn_t * const conn); /* auth functions */ void auth_handle_open(xmpp_conn_t * const conn); -#endif /* __LIBXMPP_XMPP_COMMON_H__ */ +#endif /* __LIBSTROPHE_COMMON_H__ */ diff --git a/src/conn.c b/src/conn.c index 0d76923..9494ad9 100644 --- a/src/conn.c +++ b/src/conn.c @@ -8,7 +8,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #define DEFAULT_SEND_QUEUE_MAX 64 diff --git a/src/ctx.c b/src/ctx.c index 9797bec..9fff62d 100644 --- a/src/ctx.c +++ b/src/ctx.c @@ -17,7 +17,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "util.h" diff --git a/src/event.c b/src/event.c index 005ff8b..e174bf3 100644 --- a/src/event.c +++ b/src/event.c @@ -18,7 +18,7 @@ #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #define DEFAULT_TIMEOUT 1 diff --git a/src/handler.c b/src/handler.c index ef54dc7..47fcaa9 100644 --- a/src/handler.c +++ b/src/handler.c @@ -17,7 +17,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" void handler_fire_stanza(xmpp_conn_t * const conn, diff --git a/src/hash.c b/src/hash.c index b67dc93..3dd3454 100644 --- a/src/hash.c +++ b/src/hash.c @@ -16,7 +16,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "hash.h" diff --git a/src/hash.h b/src/hash.h index 925d34e..e552f2c 100644 --- a/src/hash.h +++ b/src/hash.h @@ -12,8 +12,8 @@ ** distribution. */ -#ifndef __LIBXMPP_HASH_H__ -#define __LIBXMPP_HASH_H__ +#ifndef __LIBSTROPHE_HASH_H__ +#define __LIBSTROPHE_HASH_H__ typedef struct _hash_t hash_t; diff --git a/src/jid.c b/src/jid.c index b2ea708..f81d047 100644 --- a/src/jid.c +++ b/src/jid.c @@ -15,7 +15,7 @@ #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" /** join jid component parts to form a new jid string */ diff --git a/src/parser.c b/src/parser.c index 4bf03ca..483404e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -18,7 +18,7 @@ #include "expat.h" -#include "xmpp.h" +#include "strophe.h" #include "common.h" static void _log_open_tag(xmpp_conn_t * const conn, diff --git a/src/sasl.c b/src/sasl.c index 3dda185..3aa13ab 100644 --- a/src/sasl.c +++ b/src/sasl.c @@ -14,7 +14,7 @@ #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "sasl.h" #include "md5.h" diff --git a/src/sasl.h b/src/sasl.h index e96392f..1340dbf 100644 --- a/src/sasl.h +++ b/src/sasl.h @@ -12,10 +12,10 @@ ** distribution. */ -#ifndef __LIBXMPP_SASL_H__ -#define __LIBXMPP_SASL_H__ +#ifndef __LIBSTROPHE_SASL_H__ +#define __LIBSTROPHE_SASL_H__ -#include "xmpp.h" +#include "strophe.h" /** low-level sasl routines */ diff --git a/src/sock.h b/src/sock.h index 1cbc1b9..37edf38 100644 --- a/src/sock.h +++ b/src/sock.h @@ -12,8 +12,8 @@ ** distribution. */ -#ifndef __LIBXMPP_SOCK_H__ -#define __LIBXMPP_SOCK_H__ +#ifndef __LIBSTROPHE_SOCK_H__ +#define __LIBSTROPHE_SOCK_H__ #include @@ -39,4 +39,4 @@ int sock_is_recoverable(const int error); /* checks for an error after connect, return 0 if connect successful */ int sock_connect_error(const sock_t sock); -#endif /* __LIBXMPP_SOCK_H__ */ +#endif /* __LIBSTROPHE_SOCK_H__ */ diff --git a/src/stanza.c b/src/stanza.c index 2680b82..0fa50fb 100644 --- a/src/stanza.c +++ b/src/stanza.c @@ -15,7 +15,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "hash.h" diff --git a/src/util.c b/src/util.c index ce14e7c..6a684a9 100644 --- a/src/util.c +++ b/src/util.c @@ -23,7 +23,7 @@ #include #endif -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "util.h" diff --git a/src/util.h b/src/util.h index fd555d5..ecc1e41 100644 --- a/src/util.h +++ b/src/util.h @@ -12,8 +12,8 @@ ** distribution. */ -#ifndef __LIBXMPP_UTIL_H__ -#define __LIBXMPP_UTIL_H__ +#ifndef __LIBSTROPHE_UTIL_H__ +#define __LIBSTROPHE_UTIL_H__ #ifndef _WIN32 #include @@ -23,4 +23,4 @@ uint64_t time_stamp(void); uint64_t time_elapsed(uint64_t t1, uint64_t t2); -#endif /* __LIBXMPP_UTIL_H__ */ +#endif /* __LIBSTROPHE_UTIL_H__ */ diff --git a/xmpp.h b/strophe.h similarity index 98% rename from xmpp.h rename to strophe.h index e7c0ffa..a813ea7 100644 --- a/xmpp.h +++ b/strophe.h @@ -1,11 +1,11 @@ -/* xmpp.h -** XMPP client library API +/* strophe.h +** libstrophe XMPP client library API ** ** Copyright (C) 2005 OGG, LLC. All rights reserved. */ -#ifndef __LIBXMPP_XMPP_H__ -#define __LIBXMPP_XMPP_H__ +#ifndef __LIBSTROPHE_STROPHE_H__ +#define __LIBSTROPHE_STROPHE_H__ #include @@ -258,4 +258,4 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout); void xmpp_run(xmpp_ctx_t *ctx); void xmpp_stop(xmpp_ctx_t *ctx); -#endif /* __LIBXMPP_XMPP_H__ */ +#endif /* __LIBSTROPHE_STROPHE_H__ */ diff --git a/tests/test_base64.c b/tests/test_base64.c index cda7498..3677ade 100644 --- a/tests/test_base64.c +++ b/tests/test_base64.c @@ -15,7 +15,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "sasl.h" diff --git a/tests/test_ctx.c b/tests/test_ctx.c index d233c80..45fad97 100644 --- a/tests/test_ctx.c +++ b/tests/test_ctx.c @@ -16,7 +16,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" static int log_called = 0; diff --git a/tests/test_hash.c b/tests/test_hash.c index 1620209..37dec0c 100644 --- a/tests/test_hash.c +++ b/tests/test_hash.c @@ -16,7 +16,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "hash.h" diff --git a/tests/test_jid.c b/tests/test_jid.c index 9ac170d..a666398 100644 --- a/tests/test_jid.c +++ b/tests/test_jid.c @@ -15,7 +15,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" static const char jid1[] = "foo@bar.com"; diff --git a/tests/test_sasl.c b/tests/test_sasl.c index a500437..5a222f9 100644 --- a/tests/test_sasl.c +++ b/tests/test_sasl.c @@ -15,7 +15,7 @@ #include #include -#include "xmpp.h" +#include "strophe.h" #include "common.h" #include "sasl.h"