Commit Graph

27 Commits

Author SHA1 Message Date
Dmitry Podgorny
b7fbc81740 conn: added API xmpp_conn_is_secured()
This patch is provided by @kjkao. New API is already used in
WorksSystems/wks_xep0047.
2015-10-13 00:10:02 +03:00
Dmitry Podgorny
36af7afa27 conn: implemented old-style SSL connection
Added new API xmpp_conn_set_old_style_ssl(). This function forces
using of old-style SSL connection.
2015-10-12 22:25:39 +03:00
Dmitry Podgorny
8627fbb13f Implemented UUID generation (RFC4122)
This patch adds new API:
  * xmpp_uuid_gen()
2015-10-12 15:17:22 +03:00
Dmitry Podgorny
0fed8a55e4 examples: updated header in component.c 2014-12-15 14:47:47 +02:00
Milan Kubik
c52ba85846 XEP-0114: Added an example for component connection.
The example is based on basic.c program.
To run the example, a configured server is needed.
2014-12-15 14:42:50 +02:00
Dariusz Dwornikowski
71f75b2e2e Closes #31 2014-10-23 08:44:52 +02:00
Dmytro Podgornyi
9af64e244e examples/bot: removed non-standard strcpy_s/strcat_s
strncpy/strncat must be used instead. But in this case they don't make
sense, because string has enough space.
2014-08-08 18:27:02 +03:00
h0ru5
4111cf772a patch to avoid crash when messages without type are sent 2014-01-06 22:46:16 +01:00
Markus Kohlhase
95fd3ea3d0 added host parameter; replaced tabs with whitespace 2012-02-15 01:26:09 +01:00
Jack Moffitt
370a371800 Dual licensed libstrophe under MIT and GPLv3.
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Dustin Sallings
2b661bd1f4 Handle a case where the query has no namespace.
When I tried this sample code, it failed due to a NULL namespace being
returned (and a later strdup(NULL)).
2009-04-14 13:11:33 -07:00
Jack Moffitt
1ac33269ac Removed unneeded variables from bot.c. 2009-04-14 13:47:20 -06:00
Matthew Wild
bc5265f6c9 Bot shouldn't reply to message type="error", and also fixed comment. 2008-09-18 03:36:19 +00:00
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