Commit Graph

14 Commits

Author SHA1 Message Date
Jack Moffitt
3b47afaac9 Fix warnings and line endings from previous SRV commit. Get rid of domain parameter of xmpp_connect_client(). Remove usused handler.c helper left over from previous commit. 2008-07-03 05:20:59 +00:00
Jack Moffitt
a1a9328698 Added bot example given to us by Matthew Wild <mwild1@gmail.com>. 2008-07-03 02:48:32 +00:00
Jack Moffitt
9c49b16554 Fix examples to use new API and lots of compiler warnings. 2008-07-02 23:17:27 +00:00
Jack Moffitt
927c229a42 Fix a typo in error case comparison. 2006-05-03 16:02:16 +00:00
Ralph Giles
7c7e844f43 Rename basic_logging.c to basic.c, replacing the old version.
Having debugging on by default in the example seems to help
people trying out the library, and with the default_logger()
call it's not too much extra complication.

We should also write an example/complex.c that exercises
all the callback options, a custom allocator and so on.
2005-06-29 18:07:20 +00:00
Ralph Giles
a6d7d9ef96 remove basic.c in preparation for replacing it with basic_logging.c. svn is stupid. 2005-06-29 17:54:29 +00:00
Ralph Giles
673a1308b1 Add a new xmpp_get_default_logger(level) call to provide access to
(a filtered version of) the default logger which we implemented in
the library but was no longer accessible. This makes it much easier
for the caller to turn logging on by just passing this default
log handler callback pointer into xmpp_ctx_new() instead of having
to always implement boilerplate.

Another option would have been xmpp_get_default_log_level(ctx, level)
to change the filter level of the build in logger, which is installed
if you pass NULL to xmpp_ctx_new(). In this method the logger would 
filter everything by default.
2005-06-29 17:51:18 +00:00
Ralph Giles
83b5721607 Move the log_level_name[] definitions back to private status within the library.
Defining static data in the header causes warnings on Apple gcc, and in general
this should be the client's responsibility. The names are obvious from the
log_level enum, which is public, and it's only one line of boilerplate to
copy in implementing a custom logging function.
2005-06-29 15:36:40 +00:00
Ralph Giles
64b85aadda Make the server argument optional. Passing a NULL domain arg to xmpp_connect_client()
now derives the domain from the jid.

Is it reasonable to just remove the 'domain' (more properly server) argument directly?
The library should always handle this and I can't think why you'd want to override unless
maybe if you have a proxy.
2005-06-29 15:23:51 +00:00
Jack Moffitt
c24df2b5f0 Added a basic_logging.c which shows how to use the logging stuff. Moved
xmpp_log_level_name into strophe.h for client access.
2005-06-28 21:23:57 +00:00
Ralph Giles
76e0c6a4b3 Add the 'libstrophe' name to the copyright headers. 2005-06-15 16:58:11 +00:00
Jack Moffitt
3cf080bb2d Add library init and shutdown. 2005-06-15 05:37:24 +00:00
Ralph Giles
72699eff45 Rename xmpp.h to strophe.h and apply the name changes to the internal
header multiple include protection.
2005-06-14 14:25:42 +00:00
Ralph Giles
f27235b862 Move the xmpp library to its new name. 2005-06-14 14:10:31 +00:00