You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(13) |
Jun
(3) |
Jul
(4) |
Aug
(30) |
Sep
(17) |
Oct
(2) |
Nov
(6) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(9) |
Feb
(30) |
Mar
(22) |
Apr
(23) |
May
(25) |
Jun
(25) |
Jul
(4) |
Aug
(21) |
Sep
(16) |
Oct
(44) |
Nov
(15) |
Dec
(3) |
2009 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(10) |
Dec
|
2014 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(2) |
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(2) |
2015 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(6) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
Update of /cvsroot/emacs-jabber/tox In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15060 Added Files: Makefile README main.c tox-marshal.list tox-object.xml tox-session.c tox-session.h tox-session.xml tox.c tox.h Log Message: Initial import of tox sources --- NEW FILE: tox.c --- #include <dbus/dbus-glib.h> #include <glib/gprintf.h> #include "tox.h" #include "tox-session.h" typedef struct _ToxObjectPrivate { guint session_counter; DBusGConnection *connection; } ToxObjectPrivate; G_DEFINE_TYPE(ToxObject, tox_object, G_TYPE_OBJECT) gboolean tox_create_session(ToxObject *obj, guint8 dir, char **ret, GError **error); /* properties */ enum { TOX_DBUS_CONNECTION = 1, }; static void tox_set_property(GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec); static void tox_get_property(GObject *obj, guint property_id, GValue *value, GParamSpec *pspec); #include "tox-object-glue.h" void tox_object_init(ToxObject *obj) { obj->priv = g_new0(ToxObjectPrivate, 1); } void tox_object_class_init(ToxObjectClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GParamSpec *connection_param_spec; gobject_class->set_property = tox_set_property; gobject_class->get_property = tox_get_property; connection_param_spec = g_param_spec_boxed("dbus-connection", "D-Bus connection", "Connection where new sessions are registered", DBUS_TYPE_G_CONNECTION, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE); g_object_class_install_property(gobject_class, TOX_DBUS_CONNECTION, connection_param_spec); dbus_g_object_type_install_info(TOX_TYPE_OBJECT, &dbus_glib_tox_object_info); } static void tox_set_property(GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec) { ToxObject *self = (ToxObject *)obj; switch(property_id) { case TOX_DBUS_CONNECTION: /* XXX: this should be a weak ref */ /* hm? */ /* if (self->priv->connection) */ /* dbus_g_connection_unref(self->priv->connection); */ self->priv->connection = (DBusGConnection *)g_value_get_boxed(value); /* dbus_g_connection_ref(self->priv->connection); */ break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, property_id, pspec); } } static void tox_get_property(GObject *obj, guint property_id, GValue *value, GParamSpec *pspec) { ToxObject *self = (ToxObject *)obj; switch(property_id) { case TOX_DBUS_CONNECTION: g_value_set_boxed(value, self->priv->connection); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, property_id, pspec); } } gboolean tox_create_session(ToxObject *obj, guint8 dir, char **ret, GError **error) { guint session_number = ++obj->priv->session_counter; DBusGConnection *connection = obj->priv->connection; ToxSession *session; if (dir < 1 || dir > 3) { /* XXX: how to set the D-Bus error name? */ g_set_error(error, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION, "Direction out of range (was %u, should be 1 <= dir <= 3)", dir); return FALSE; } session = g_object_new(TOX_TYPE_SESSION, "direction", dir, NULL); *ret = g_strdup_printf("/net/sourceforge/emacs_jabber/Tox/%u", session_number); dbus_g_connection_register_g_object(connection, *ret, G_OBJECT(session)); g_printf("CreateSession called, returning %s\n", *ret); return TRUE; } --- NEW FILE: tox-object.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node name='/net/sourceforce/emacs_jabber/Tox'> <!-- Note the underscore in the interface name! Bus names can have hyphens, but interface names can't. I guess that's a good way to distinguish them. --> <interface name='net.sourceforge.emacs_jabber.Tox'> <method name='CreateSession'> <!-- 1: send only. 2: receive only. 3: send and receive. --> <arg name='direction' direction='in' type='y'/> <arg name='session' type='o' direction='out'/> </method> </interface> </node> --- NEW FILE: main.c --- #include <farsight/farsight.h> #include <dbus/dbus-glib.h> #include <glib/gprintf.h> #include <string.h> #include "tox.h" int main(int argc, char *argv[]) { GMainLoop *loop; DBusGConnection *connection; DBusGProxy *bus_proxy; GError *error = NULL; ToxObject *obj; guint32 x; g_type_init(); gst_init(&argc, &argv); { GLogLevelFlags fatal_mask; fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK); /* not aborting on warnings because of: farsight-rtp-WARNING **: Not enough information in rtp caps */ fatal_mask |= /*G_LOG_LEVEL_WARNING | */ G_LOG_LEVEL_CRITICAL; g_log_set_always_fatal (fatal_mask); } connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (connection == NULL) { g_printerr("Failed to open connection to bus: %s\n", error->message); exit(1); } bus_proxy = dbus_g_proxy_new_for_name(connection, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus"); if (!dbus_g_proxy_call(bus_proxy, "RequestName", &error, G_TYPE_STRING, "net.sourceforge.emacs-jabber.Tox", G_TYPE_UINT, /* these settings are good for debugging. we should listen for the NameLost signal, though. */ DBUS_NAME_FLAG_ALLOW_REPLACEMENT | DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE, G_TYPE_INVALID, G_TYPE_UINT, &x, G_TYPE_INVALID)) { g_printerr("Couldn't acquire name: %s\n", error->message); exit(1); } else if (x != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { g_printerr("Couldn't acquire name: RequestName returned %u\n", x); exit(1); } obj = g_object_new(TOX_TYPE_OBJECT, "dbus-connection", connection, NULL); dbus_g_connection_register_g_object(connection, "/net/sourceforge/emacs_jabber/Tox", G_OBJECT(obj)); loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(loop); return 0; } --- NEW FILE: tox.h --- #ifndef __TOX_H__ #define __TOX_H__ typedef struct ToxObject { GObject parent; struct _ToxObjectPrivate *priv; } ToxObject; typedef struct ToxObjectClass { GObjectClass parent; } ToxObjectClass; GType tox_object_get_type(void); #define TOX_TYPE_OBJECT (tox_object_get_type()) #define TOX_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), TOX_TYPE_OBJECT, ToxObject)) #define TOX_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TOX_TYPE_OBJECT, ToxObjectClass)) #define TOX_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), TOX_TYPE_OBJECT)) #define TOX_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TOX_TYPE_OBJECT)) #define TOX_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TOX_TYPE_OBJECT, ToxObjectClass)) #endif /* __TOX_H__ */ --- NEW FILE: Makefile --- CFLAGS=-g -Wall `pkg-config --cflags farsight-0.1 dbus-glib-1` LDFLAGS=`pkg-config --libs farsight-0.1 dbus-glib-1` OBJS=main.o tox.o tox-session.o tox-marshal.o tox : $(OBJS) gcc -o tox $(OBJS) $(LDFLAGS) main.o : tox.h tox.o : tox.h tox-object-glue.h tox-session.h tox-object-glue.h : tox-object.xml dbus-binding-tool --mode=glib-server --output=tox-object-glue.h --prefix=tox tox-object.xml tox-session.o : tox-session.h tox-session-glue.h tox-marshal.h tox-session-glue.h : tox-session.xml dbus-binding-tool --mode=glib-server --output=tox-session-glue.h --prefix=tox_session tox-session.xml tox-marshal.c : tox-marshal.list glib-genmarshal --prefix=tox_marshal tox-marshal.list --header --body > tox-marshal.c tox-marshal.h : tox-marshal.list glib-genmarshal --prefix=tox_marshal tox-marshal.list --header > tox-marshal.h --- NEW FILE: tox-session.h --- #ifndef __TOX_SESSION_H__ #define __TOX_SESSION_H__ typedef struct ToxSession { GObject parent; struct _ToxSessionPrivate *priv; } ToxSession; typedef struct ToxSessionClass { GObjectClass parent; } ToxSessionClass; GType tox_session_get_type(void); #define TOX_TYPE_SESSION (tox_session_get_type()) #define TOX_SESSION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), TOX_TYPE_SESSION, ToxSession)) #define TOX_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TOX_TYPE_SESSION, ToxSessionClass)) #define TOX_IS_SESSION(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), TOX_TYPE_SESSION)) #define TOX_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TOX_TYPE_SESSION)) #define TOX_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TOX_TYPE_SESSION, ToxSessionClass)) #endif /* __TOX_SESSION_H__ */ --- NEW FILE: tox-marshal.list --- VOID:BOXED --- NEW FILE: README --- Tox (Talk Over XMPP, or something) is a utility for adding Jingle functionality to a Jabber client, primarily voice communication. It interfaces to the Jabber client using DBus. The DBus interface is described below. From this you should be able to piece together a Jingle client. Good luck! Tox registers the well-known name net.sourceforge.emacs-jabber.Tox (NB: hyphen, not underscore) on the session bus. /net/sourceforge/emacs_jabber/Tox (NB: underscore, not hyphen) is the path to the main object. This object has one method in the interface net.sourceforge.emacs_jabber.Tox (NB: underscore, not hyphen): object_path CreateSession(byte direction) Creates an audio session. direction is 1 for "send only", 2 for "receive only", and 3 for "send and receive". The path to the new session is returned. The session object in turn has methods in the interface net.sourceforge.emacs_jabber.ToxSession (NB: underscore, not hyphen): void Destroy() Destroys the session. void SetDefaultAudioSink() Create an "autoaudiosink" GStreamer element and connect it to the session. This usually means that you will hear things in your speakers. void SetOggVorbisAudioSource(string filename) Set the named Ogg Vorbis file as audio source, i.e. what to send over the session. void AddRemoteCandidate(array components) Add a transport candidate of the remote party, consisting of the given components. "components" is an array of structs with signature "(susqsssyyss)" and meaning: - Candidate ID - Component (starting from 1) - IP number (as a string) - Port number - Protocol ("tcp" or "udp") - Protocol subtype (only "RTP" supported) - Protocol profile (only "AVP" supported) - Preference, between 0 and 100 - Type. 0 means local, 1 means derived (e.g. through STUN), 2 means relay - Username (may be empty) - Password (may be empty) signal NativeCandidatesPrepared(array components) Signalled when the local candidates have been determined, and are ready to send to the other party. The argument is the same as to AddRemoteCandidate. void SetRemoteCodecs(array codecs) Set the codecs that the remote party claims to support. codecs is an array of structs with signature "(isyuua{ss})" and meaning: - numeric identifier - codec name - media type: 0 is audio, 1 is video - clock rate - number of channels - optional parameters array GetLocalCodecs() Get the codecs supported by this implementation. The return value is of the same type as the argument to SetRemoteCodecs. array GetCodecIntersection() Get the intersection of supported codecs of remote and local parties. The return value is like the argument to SetRemoteCodecs. --- NEW FILE: tox-session.xml --- <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> <interface name='net.sourceforge.emacs_jabber.ToxSession'> <method name='Destroy'/> <method name='SetDefaultAudioSink'/> <method name='SetOggVorbisAudioSource'> <arg name='filename' direction='in' type='s'/> </method> <method name='AddRemoteCandidate'> <arg name='transport' direction='in' type='a(susqsssyyss)'/> <!-- Each element is a candidate component. (Usually each candidate has only one component) Struct members are: - Candidate ID - Component (starting from 1) - IP number (as a string) - Port number - Protocol ("tcp" or "udp") - Protocol subtype (only "RTP" supported) - Protocol profile (only "AVP" supported) - Preference, between 0 and 100 - Type. 0 means local, 1 means derived (e.g. through STUN), 2 means relay - Username (may be empty) - Password (may be empty) --> </method> <signal name="NativeCandidatesPrepared"> <arg name="candidates" type="a(susqsssyyss)"/> <!-- Argument as to AddRemoteCandidate --> </signal> <method name='SetRemoteCodecs'> <arg name='codec-list' direction='in' type='a(isyuua{ss})'/> <!-- Each element is a codec. Struct members are: - numeric identifier - codec name - media type: 0 is audio, 1 is video - clock rate - number of channels - optional parameters --> </method> <method name='GetLocalCodecs'> <arg name='codec-list' direction='out' type='a(isyuua{ss})'/> <!-- Argument as to SetRemoteCodecs --> </method> <method name='GetCodecIntersection'> <arg name='codec-list' direction='out' type='a(isyuua{ss})'/> <!-- Argument layout: see SetRemoteCodecs --> </method> </interface> </node> --- NEW FILE: tox-session.c --- #include <glib.h> #include <farsight/farsight.h> #include <farsight/farsight-transport.h> #include <dbus/dbus-glib.h> #include <glib/gprintf.h> #include <string.h> #include "tox-session.h" #include "tox-marshal.h" G_DEFINE_TYPE(ToxSession, tox_session, G_TYPE_OBJECT) typedef struct _ToxSessionPrivate { FarsightSession *session; /* for now, one stream is enough */ FarsightStream *stream; int have_source, have_sink; gboolean dispose_has_run; } ToxSessionPrivate; gboolean tox_session_destroy(ToxSession *obj, GError **error); gboolean tox_session_set_default_audio_sink(ToxSession *obj, GError **error); gboolean tox_session_set_ogg_vorbis_audio_source(ToxSession *obj, char *filename, GError **error); gboolean tox_session_add_remote_candidate(ToxSession *obj, GPtrArray *candidate, GError **error); gboolean tox_session_set_remote_codecs(ToxSession *obj, GPtrArray *codecs, GError **error); gboolean tox_session_get_local_codecs(ToxSession *obj, GPtrArray **codecs, GError **error); gboolean tox_session_get_codec_intersection(ToxSession *obj, GPtrArray **codecs, GError **error); /* properties */ enum { DIRECTION = 1 }; static void tox_session_set_property(GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec); /* signals */ enum { NATIVE_CANDIDATES_PREPARED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL]; #include "tox-session-glue.h" static GstElement *prepare_source(const char *filename); static void new_pad(GstElement *, GstPad *, gpointer); static GstElement *prepare_sink(void); static void stream_done(ToxSession *); static void tox_session_native_candidates_prepared(FarsightStream *stream, gpointer user_data); static void tox_session_new_native_candidate(FarsightStream *stream, gchar *candidate_id, ToxSession *self); void tox_session_init(ToxSession *obj) { ToxSessionPrivate *priv; priv = g_new0(ToxSessionPrivate, 1); obj->priv = priv; priv->session = farsight_session_factory_make("rtp"); g_assert(priv->session); /* we need to know the direction to create a stream, so we do that when that property is set. */ } static GObjectClass *parent_class = NULL; static void tox_session_dispose(GObject *obj) { ToxSession *self = (ToxSession *)obj; if (self->priv->dispose_has_run) { return; } g_printf("in tox_session_dispose\n"); self->priv->dispose_has_run = TRUE; if (self->priv->stream) g_object_unref(self->priv->stream); if (self->priv->session) g_object_unref(self->priv->session); self->priv->stream = NULL; self->priv->session = NULL; G_OBJECT_CLASS(parent_class)->dispose(obj); } static void tox_session_finalize(GObject *obj) { ToxSession *self = (ToxSession *)obj; g_printf("in tox_session_finalize\n"); g_free(self->priv); G_OBJECT_CLASS(parent_class)->finalize(obj); } void tox_session_class_init(ToxSessionClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GParamSpec *direction_param_spec; gobject_class->dispose = tox_session_dispose; gobject_class->finalize = tox_session_finalize; gobject_class->set_property = tox_session_set_property; direction_param_spec = g_param_spec_uint("direction", "stream direction", "1 means send-only, 2 means receive-only, 3 means both", 1, 3, 1, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE); g_object_class_install_property(gobject_class, DIRECTION, direction_param_spec); signals[NATIVE_CANDIDATES_PREPARED] = g_signal_new("native-candidates-prepared", G_OBJECT_CLASS_TYPE(klass), G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, 0, NULL, NULL, tox_marshal_VOID__BOXED, G_TYPE_NONE, 1, G_TYPE_POINTER); dbus_g_object_type_install_info(TOX_TYPE_SESSION, &dbus_glib_tox_session_object_info); parent_class = g_type_class_peek_parent (klass); } static void tox_session_set_property(GObject *obj, guint property_id, const GValue *value, GParamSpec *pspec) { ToxSession *self = (ToxSession *)obj; guint dir; switch(property_id) { case DIRECTION: if (self->priv->stream) g_object_unref(self->priv->stream); /* Now we know the direction, so we create a stream. */ dir = g_value_get_uint(value); self->priv->stream = farsight_session_create_stream(self->priv->session, FARSIGHT_MEDIA_TYPE_AUDIO, dir); g_assert(self->priv->stream); g_object_set(G_OBJECT(self->priv->stream), "transmitter", "libjingle", NULL); /* XXX: should we set null source/sink here? */ switch (dir) { case 1: /* send-only, we need no sink */ self->priv->have_sink = 1; break; case 2: /* receive-only, we need no source */ self->priv->have_source = 1; break; } /* start preparing native candidates */ g_print("About to prepare native candidates...\n"); g_signal_connect(self->priv->stream, "new-native-candidate", (GCallback)tox_session_new_native_candidate, (gpointer)self); g_signal_connect(self->priv->stream, "native-candidates-prepared", (GCallback)tox_session_native_candidates_prepared, (gpointer)self); /* but we can't actually do it until we have a pipeline. so, we'll call stream_done when we do. */ break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, property_id, pspec); } } gboolean tox_session_destroy(ToxSession *obj, GError **error) { g_object_unref(obj); return TRUE; } gboolean tox_session_set_default_audio_sink(ToxSession *obj, GError **error) { GstElement *sink = prepare_sink(); farsight_stream_set_sink(obj->priv->stream, sink); obj->priv->have_sink = 1; if (obj->priv->have_sink && obj->priv->have_source) stream_done(obj); return TRUE; } gboolean tox_session_set_ogg_vorbis_audio_source(ToxSession *obj, char *filename, GError **error) { GstElement *source = prepare_source(filename); farsight_stream_set_source(obj->priv->stream, source); obj->priv->have_source = 1; if (obj->priv->have_sink && obj->priv->have_source) stream_done(obj); return TRUE; } static GstElement * prepare_source(const char *filename) { GstElement *bin, *filesrc, *demux, *decode; bin = gst_bin_new("mysource"); filesrc = gst_element_factory_make("filesrc", "file-source"); g_object_set(G_OBJECT(filesrc), "location", filename, NULL); demux = gst_element_factory_make("oggdemux", "ogg-parser"); decode = gst_element_factory_make("vorbisdec", "vorbis-decoder"); gst_element_link(filesrc, demux); g_signal_connect(demux, "pad-added", G_CALLBACK(new_pad), decode); gst_bin_add_many(GST_BIN(bin), filesrc, demux, decode, NULL); return bin; } static void new_pad(GstElement *demux, GstPad *pad, gpointer data) { GstElement *decode = (GstElement*)data; GstPad *decoder_pad; decoder_pad = gst_element_get_pad(decode, "sink"); gst_pad_link(pad, decoder_pad); gst_object_unref(decoder_pad); } static GstElement * prepare_sink(void) { GstElement *bin, *converter, *audiosink; bin = gst_bin_new("mysink"); converter = gst_element_factory_make("audioconvert", "converter"); audiosink = gst_element_factory_make("autoaudiosink", "audiosink"); gst_element_link(converter, audiosink); gst_bin_add_many(GST_BIN(bin), converter, audiosink, NULL); return bin; } static void stream_done(ToxSession *self) { farsight_stream_prepare_transports(self->priv->stream); } gboolean tox_session_add_remote_candidate(ToxSession *self, GPtrArray *candidate, GError **error) { int i; guint n; GList *candidate_list; candidate_list = NULL; /* Here we convert the array of structs into a GList of FarsightTransportInfo. The argument list is described in tox-session.xml. */ for (i = 0; i < candidate->len; i++) { GValueArray *component; FarsightTransportInfo *info; gchar *s; component = g_ptr_array_index(candidate, i); info = g_new0(FarsightTransportInfo, 1); info->candidate_id = g_value_dup_string( g_value_array_get_nth(component, 0)); info->component = g_value_get_uint( g_value_array_get_nth(component, 1)); info->ip = g_value_dup_string( g_value_array_get_nth(component, 2)); info->port = g_value_get_uint( g_value_array_get_nth(component, 3)); s = g_value_dup_string(g_value_array_get_nth(component, 4)); if (strcmp(s, "tcp") == 0) info->proto = FARSIGHT_NETWORK_PROTOCOL_TCP; else if (strcmp(s, "udp") == 0) info->proto = FARSIGHT_NETWORK_PROTOCOL_UDP; else { g_set_error(error, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION, "Unexpected protocol '%s'", s); g_free(s); g_free(info); goto fail; } g_free(s); /* this should be "RTP" */ info->proto_subtype = g_value_dup_string( g_value_array_get_nth(component, 5)); /* this should be "AVP" */ info->proto_profile = g_value_dup_string( g_value_array_get_nth(component, 6)); info->preference = g_value_get_uint( g_value_array_get_nth(component, 7)) * 0.01; n = g_value_get_uint(g_value_array_get_nth(component, 8)); switch (n) { case 0: info->type = FARSIGHT_CANDIDATE_TYPE_LOCAL; break; case 1: info->type = FARSIGHT_CANDIDATE_TYPE_DERIVED; break; case 2: info->type = FARSIGHT_CANDIDATE_TYPE_RELAY; break; default: g_set_error(error, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION, "Unexpected type %u", n); g_free(info); goto fail; } info->username = g_value_dup_string( g_value_array_get_nth(component, 9)); info->password = g_value_dup_string( g_value_array_get_nth(component, 10)); candidate_list = g_list_append(candidate_list, info); } farsight_stream_add_remote_candidate(self->priv->stream, candidate_list); return TRUE; fail: farsight_transport_list_destroy(candidate_list); return FALSE; } gboolean tox_session_set_remote_codecs(ToxSession *obj, GPtrArray *codecs, GError **error) { GList *codec_list; int i; /* GList *j; */ codec_list = NULL; for (i = 0; i < codecs->len; i++) { GValueArray *codec_in; FarsightCodec *codec_out; codec_in = g_ptr_array_index(codecs, i); codec_out = g_new0(FarsightCodec, 1); codec_out->id = g_value_get_int(g_value_array_get_nth(codec_in, 0)); codec_out->encoding_name = g_value_dup_string(g_value_array_get_nth(codec_in, 1)); /* maybe check range of media_type... */ codec_out->media_type = g_value_get_int(g_value_array_get_nth(codec_in, 2)); codec_out->clock_rate = g_value_get_uint(g_value_array_get_nth(codec_in, 3)); codec_out->channels = g_value_get_uint(g_value_array_get_nth(codec_in, 4)); codec_list = g_list_append(codec_list, codec_out); } farsight_stream_set_remote_candidate_list(obj->priv->stream, codec_list); /* should the elements be freed, or just the list itself? */ /*for (j = codec_list; j; j = g_list_next(j)) { g_free(j->data); }*/ g_list_free(codec_list); return TRUE; } gboolean tox_session_get_local_codecs(ToxSession *obj, GPtrArray **codecs, GError **error) { FarsightStream *stream; const GList *codec_list; GType hash_string_string; stream = obj->priv->stream; codec_list = farsight_stream_get_local_codecs(stream); hash_string_string = dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_STRING); *codecs = g_ptr_array_sized_new(g_list_length(codec_list)); for (; codec_list; codec_list = g_list_next(codec_list)) { GValueArray *codec_struct; const FarsightCodec *codec; GValue value; GHashTable *parameters; GList *p; memset(&value, 0, sizeof value); codec = (const FarsightCodec*)codec_list->data; codec_struct = g_value_array_new(2); g_value_init(&value, G_TYPE_INT); g_value_set_int(&value, codec->id); g_value_array_append(codec_struct, &value); g_value_unset(&value); g_value_init(&value, G_TYPE_STRING); g_value_set_string(&value, codec->encoding_name); g_value_array_append(codec_struct, &value); g_value_unset(&value); g_value_init(&value, G_TYPE_UCHAR); g_value_set_uchar(&value, codec->media_type); g_value_array_append(codec_struct, &value); g_value_unset(&value); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, codec->clock_rate); g_value_array_append(codec_struct, &value); g_value_unset(&value); g_value_init(&value, G_TYPE_UINT); g_value_set_uint(&value, codec->channels); g_value_array_append(codec_struct, &value); g_value_unset(&value); /* optional parameters - this should be a hash table, I think */ /* parameters = g_hash_table_new(g_str_hash, g_str_equal); */ parameters = dbus_g_type_specialized_construct(hash_string_string); for (p = codec->optional_params; p; p = g_list_next(p)) { FarsightCodecParameter *param = p->data; g_hash_table_insert(parameters, param->name, param->value); } g_value_init(&value, hash_string_string); g_value_set_boxed(&value, parameters); g_value_array_append(codec_struct, &value); g_value_unset(&value); g_hash_table_unref(parameters); g_assert(codec_struct->n_values == 6); g_ptr_array_add(*codecs, codec_struct); } return TRUE; } gboolean tox_session_get_codec_intersection(ToxSession *obj, GPtrArray **codecs, GError **error) { FarsightStream *stream; GList *codec_list; stream = obj->priv->stream; codec_list = farsight_stream_get_codec_intersection(stream); *codecs = g_ptr_array_sized_new(g_list_length(codec_list)); for (; codec_list; codec_list = g_list_next(codec_list)) { GValueArray *codec_struct; FarsightCodec *codec; GValue *value; codec = (FarsightCodec*)codec_list->data; codec_struct = g_value_array_new(6); value = g_new(GValue, 1); g_value_init(value, G_TYPE_INT); g_value_set_int(value, codec->id); g_value_array_append(codec_struct, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, codec->encoding_name); g_value_array_append(codec_struct, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UCHAR); g_value_set_uchar(value, codec->media_type); g_value_array_append(codec_struct, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, codec->clock_rate); g_value_array_append(codec_struct, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, codec->channels); g_value_array_append(codec_struct, value); /* XXX: do something about optional parameters */ value = g_new(GValue, 1); g_value_init(value, G_TYPE_HASH_TABLE); g_value_set_boxed(value, g_hash_table_new(g_str_hash, g_str_equal)); g_value_array_append(codec_struct, value); g_assert(codec_struct->n_values == 6); g_ptr_array_add(*codecs, codec_struct); } return TRUE; } static void tox_session_native_candidates_prepared(FarsightStream *stream, gpointer user_data) { ToxSession *self = (ToxSession *)user_data; const GList *candidates; GPtrArray *array; candidates = farsight_stream_get_native_candidate_list(stream); array = g_ptr_array_new(); for (; candidates; candidates = g_list_next(candidates)) { GValueArray *candidate; FarsightTransportInfo *info; GValue *value; info = (FarsightTransportInfo*)candidates->data; candidate = g_value_array_new(10); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->candidate_id); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, info->component); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->ip); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, info->port); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); switch(info->proto) { case FARSIGHT_NETWORK_PROTOCOL_UDP: g_value_set_static_string(value, "udp"); break; case FARSIGHT_NETWORK_PROTOCOL_TCP: g_value_set_static_string(value, "tcp"); break; default: g_error("Unknown protocol value %u\n", info->proto); } g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->proto_subtype); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->proto_profile); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); g_value_set_uint(value, (guint)(info->preference * 100)); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_UINT); switch(info->type) { case FARSIGHT_CANDIDATE_TYPE_LOCAL: g_value_set_uint(value, 0); break; case FARSIGHT_CANDIDATE_TYPE_DERIVED: g_value_set_uint(value, 1); break; case FARSIGHT_CANDIDATE_TYPE_RELAY: g_value_set_uint(value, 2); break; default: g_error("Unknown candidate type %u\n", info->proto); } g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->username); g_value_array_append(candidate, value); value = g_new(GValue, 1); g_value_init(value, G_TYPE_STRING); g_value_set_string(value, info->password); g_value_array_append(candidate, value); g_assert(candidate->n_values == 11); g_ptr_array_add(array, candidate); } g_print("Sending signal NativeCandidatesPrepared!\n"); g_signal_emit(self, signals[NATIVE_CANDIDATES_PREPARED], 0, array); } static void tox_session_new_native_candidate(FarsightStream *stream, gchar *candidate_id, ToxSession *self) { GList *candidate = farsight_stream_get_native_candidate (stream, candidate_id); FarsightTransportInfo *trans = candidate->data; FarsightMediaType type; g_message ("tox_session_new_native_candidate: New native candidate: " "<id: %s, " "component: %d, " "ip: %s port: %d " "proto: %d, " "proto_subtype: %s, " "proto_profile: %s, " "preference: %f, " "type: %d " "username: %s password: %s>", trans->candidate_id, trans->component, trans->ip, trans->port, trans->proto, trans->proto_subtype, trans->proto_profile, trans->preference, trans->type, trans->username, trans->password); } |
From: Magnus H. <leg...@us...> - 2008-01-16 18:08:32
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14322 Modified Files: jabber-xmessage.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-437 Creator: Magnus Henoch <ma...@fr...> Add timeout option to xmessage alerts Index: jabber-xmessage.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-xmessage.el,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jabber-xmessage.el 31 Aug 2005 20:10:15 -0000 1.1 +++ jabber-xmessage.el 16 Jan 2008 18:08:29 -0000 1.2 @@ -1,5 +1,6 @@ ;; jabber-xmessage.el - emacs-jabber interface to xmessage +;; Copyright (C) 2008 - Magnus Henoch ;; Copyright (C) 2005 - Mario Domenech Goulart ;; This file is a part of jabber.el. @@ -18,10 +19,20 @@ ;; along with this program; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +(defcustom jabber-xmessage-timeout 15 + "Timeout in seconds for xmessage alerts. +Set this to nil to have no timeout." + :type '(choice (integer :tag "Seconds") + (const :tag "No timeout" nil)) + :group 'jabber-alerts) + (defun jabber-xmessage-display-message (message) "Displays MESSAGE using the xmessage program." - (let ((process-connection-type nil)) - (start-process "xmessage" nil "xmessage" message))) + (let* ((process-connection-type nil) + (timeout-args (when jabber-xmessage-timeout + (list "-timeout" (number-to-string jabber-xmessage-timeout)))) + (args (append timeout-args (list message)))) + (apply 'start-process "xmessage" nil "xmessage" args))) (define-jabber-alert xmessage "Display a message using the xmessage program." 'jabber-xmessage-display-message) |
From: Magnus H. <leg...@us...> - 2008-01-16 17:48:22
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4839 Modified Files: jabber-events.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-436 Creator: Magnus Henoch <ma...@fr...> Check jabber-chatting-with being non-nil in jabber-events-confirm-display-in-window Index: jabber-events.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-events.el,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- jabber-events.el 5 Feb 2007 21:59:03 -0000 1.11 +++ jabber-events.el 16 Jan 2008 17:48:18 -0000 1.12 @@ -1,6 +1,6 @@ ;;; jabber-events.el --- Message events (JEP-0022) implementation -;; Copyright (C) 2005 Magnus Henoch +;; Copyright (C) 2005, 2008 Magnus Henoch ;; Author: Magnus Henoch <ma...@fr...> @@ -124,6 +124,10 @@ (when (and jabber-events-confirm-displayed (not jabber-events-display-confirmed) (memq 'displayed jabber-events-requested) + ;; XXX: if jabber-events-requested is non-nil, how can + ;; jabber-chatting-with be nil? See + ;; http://sourceforge.net/tracker/index.php?func=detail&aid=1872560&group_id=88346&atid=586350 + jabber-chatting-with ;; don't send to bare jids (jabber-jid-resource jabber-chatting-with)) (jabber-send-sexp |
From: Magnus H. <leg...@us...> - 2008-01-16 15:22:59
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7427 Modified Files: jabber-util.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-435 Creator: Magnus Henoch <ma...@fr...> Add interactive form to jabber-uncache-password Index: jabber-util.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-util.el,v retrieving revision 2.52 retrieving revision 2.53 diff -u -d -r2.52 -r2.53 --- jabber-util.el 17 Sep 2007 20:25:44 -0000 2.52 +++ jabber-util.el 16 Jan 2008 15:22:49 -0000 2.53 @@ -1,6 +1,6 @@ ;; jabber-util.el - various utility functions -*- coding: utf-8; -*- -;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr... +;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - ma...@fr... ;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in... ;; This file is a part of jabber.el. @@ -272,6 +272,8 @@ (defun jabber-uncache-password (bare-jid) "Uncache cached password for BARE-JID. Useful if the password proved to be wrong." + (interactive (list (jabber-jid-user + (completing-read "Forget password of account: " jabber-account-list)))) (when (fboundp 'password-cache-remove) (password-cache-remove (jabber-password-key bare-jid)))) |
From: Magnus H. <leg...@us...> - 2008-01-13 18:13:20
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26043 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-434 Creator: Magnus Henoch <ma...@fr...> Flush contact information on initial roster push Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- jabber-presence.el 13 Jan 2008 18:05:21 -0000 1.41 +++ jabber-presence.el 13 Jan 2008 18:13:15 -0000 1.42 @@ -76,6 +76,15 @@ (setq roster-item jid) (push roster-item new-items)) + ;; If this is an initial push, we want to forget + ;; everything we knew about this contact before - e.g. if + ;; the contact was online when we disconnected and offline + ;; when we reconnect, we don't want to see stale presence + ;; information. This assumes that no contacts are shared + ;; between accounts. + (when (eq closure-data 'initial) + (setplist roster-item nil)) + ;; Now, get all data associated with the contact. (put roster-item 'name (jabber-xml-get-attribute item 'name)) (put roster-item 'subscription (jabber-xml-get-attribute item 'subscription)) |
From: Magnus H. <leg...@us...> - 2008-01-13 18:05:24
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv22357 Modified Files: jabber-core.el jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-433 Creator: Magnus Henoch <ma...@fr...> Add `jabber-send-sexp-if-connected' and use it in `jabber-send-presence' Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- jabber-core.el 25 Dec 2007 14:42:10 -0000 1.74 +++ jabber-core.el 13 Jan 2008 18:05:20 -0000 1.75 @@ -1,6 +1,6 @@ ;; jabber-core.el - core functions -;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr... +;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - ma...@fr... ;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in... ;; SSL-Connection Parts: @@ -674,6 +674,13 @@ (jabber-process-input fsm (cadr event)) (list :session-established state-data)))) + (:send-if-connected + ;; This is the only state in which we respond to such messages. + ;; This is to make sure we don't send anything inappropriate + ;; during authentication etc. + (jabber-send-sexp fsm (cdr event)) + (list :session-established state-data)) + (:do-disconnect (jabber-send-string fsm "</stream:stream>") (list nil (plist-put state-data @@ -917,6 +924,10 @@ (sit-for 2))) (jabber-send-string jc (jabber-sexp2xml sexp))) +(defun jabber-send-sexp-if-connected (jc sexp) + "Send the stanza SEXP only if JC has established a session." + (fsm-send-sync jc (cons :send-if-connected sexp))) + (defun jabber-send-stream-header (jc) "Send stream header to connection JC." (let ((stream-header Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- jabber-presence.el 28 Dec 2007 22:39:04 -0000 1.40 +++ jabber-presence.el 13 Jan 2008 18:05:21 -0000 1.41 @@ -1,6 +1,6 @@ ;; jabber-presence.el - roster and presence bookkeeping -;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr... +;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - ma...@fr... ;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in... ;; This file is a part of jabber.el. @@ -304,7 +304,7 @@ (dolist (jc jabber-connections) (let ((subelements (jabber-presence-children jc))) (aput 'subelements-map jc subelements) - (jabber-send-sexp jc `(presence () ,@subelements)))) + (jabber-send-sexp-if-connected jc `(presence () ,@subelements)))) ;; Then send presence to groupchats (dolist (groupchat *jabber-active-groupchats*) (let* ((buffer (get-buffer (jabber-muc-get-buffer (car groupchat)))) @@ -312,7 +312,7 @@ (buffer-local-value 'jabber-buffer-connection buffer))) (subelements (cdr (assq jc subelements-map)))) (when jc - (jabber-send-sexp jc `(presence ((to . ,(car groupchat))) ,@subelements)))))) + (jabber-send-sexp-if-connected jc `(presence ((to . ,(car groupchat))) ,@subelements)))))) (jabber-display-roster)) (defun jabber-presence-children (jc) |
From: Magnus H. <leg...@us...> - 2007-12-28 22:39:09
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14621 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-432 Creator: Magnus Henoch <ma...@fr...> Require assoc in jabber-presence (for aput) Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- jabber-presence.el 9 Dec 2007 23:19:18 -0000 1.39 +++ jabber-presence.el 28 Dec 2007 22:39:04 -0000 1.40 @@ -26,6 +26,8 @@ (require 'jabber-menu) (require 'jabber-muc) +(require 'assoc) + (defvar jabber-presence-element-functions nil "List of functions returning extra elements for <presence/> stanzas. Each function takes one argument, the connection, and returns a |
From: Magnus H. <leg...@us...> - 2007-12-25 14:42:16
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv23564 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-431 Creator: Magnus Henoch <ma...@fr...> Reuse connection fsm when autoreconnecting. Refactor XML logging, split per account. Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- jabber-core.el 9 Dec 2007 00:55:26 -0000 1.73 +++ jabber-core.el 25 Dec 2007 14:42:10 -0000 1.74 @@ -225,11 +225,8 @@ "Start a Jabber connection." (let* ((connection-type (or connection-type jabber-default-connection-type)) - (connect-function - (jabber-get-connect-function connection-type)) - (send-function - (jabber-get-send-function connection-type))) - (funcall connect-function fsm server network-server port) + (send-function + (jabber-get-send-function connection-type))) (list :connecting (list :send-function send-function @@ -239,17 +236,19 @@ :password password :registerp registerp :connection-type connection-type - :encrypted (eq connection-type 'ssl)))))) + :encrypted (eq connection-type 'ssl) + :network-server network-server + :port port))))) (define-enter-state jabber-connection nil (fsm state-data) - ;; `nil' is the error state. Remove the connection from the list. - (setq jabber-connections - (delq fsm jabber-connections)) + ;; `nil' is the error state. + ;; Close the network connection. (let ((connection (plist-get state-data :connection))) (when (processp connection) (delete-process connection))) + (setq state-data (plist-put state-data :connection nil)) ;; Remove lost connections from the roster buffer. (jabber-display-roster) (let ((expected (plist-get state-data :disconnection-expected)) @@ -260,25 +259,40 @@ (plist-get state-data :username) (plist-get state-data :server) (plist-get state-data :resource) - reason) + reason)) - (when jabber-auto-reconnect - (run-with-timer jabber-reconnect-delay nil - 'jabber-connect - (plist-get state-data :username) - (plist-get state-data :server) - (plist-get state-data :resource) - nil - (plist-get state-data :password) - (plist-get state-data :network-server) - (plist-get state-data :port) - (plist-get state-data :connection-type))))) + (if (and jabber-auto-reconnect (not expected)) + ;; Reconnect after a short delay? + (list state-data jabber-reconnect-delay) + ;; Else the connection is really dead. Remove it from the list + ;; of connections. + (setq jabber-connections + (delq fsm jabber-connections)) + ;; And let the FSM sleep... + (list state-data nil)))) - (list state-data nil)) +(define-state jabber-connection nil + (fsm state-data event callback) + ;; In the `nil' state, the connection is dead. We wait for a + ;; :timeout message, meaning to reconnect, or :do-disconnect, + ;; meaning to cancel reconnection. + (case event + (:timeout + (list :connecting state-data)) + (:do-disconnect + (setq jabber-connections + (delq fsm jabber-connections)) + (list nil state-data nil)))) -;; There is no `define-state' for `nil', since any message received -;; there is an error. They will be silently ignored, and only logged -;; in *fsm-debug*. +(define-enter-state jabber-connection :connecting + (fsm state-data) + (let* ((connection-type (plist-get state-data :connection-type)) + (connect-function (jabber-get-connect-function connection-type)) + (server (plist-get state-data :server)) + (network-server (plist-get state-data :network-server)) + (port (plist-get state-data :port))) + (funcall connect-function fsm server network-server port)) + (list state-data nil)) (define-state jabber-connection :connecting (fsm state-data event callback) @@ -292,9 +306,7 @@ (with-current-buffer (process-buffer connection) (erase-buffer)) - ;; state-data is a list here, so we can use nconc for appending - ;; without losing the correct reference. - (nconc state-data (list :connection connection)) + (setq state-data (plist-put state-data :connection connection)) (set-process-filter connection (fsm-make-filter fsm)) (set-process-sentinel connection (fsm-make-sentinel fsm)) @@ -711,6 +723,18 @@ (setq *jabber-active-groupchats* nil) (run-hooks 'jabber-post-disconnect-hook)) +(defun jabber-log-xml (fsm direction data) + "Print DATA to XML log. +If `jabber-debug-log-xml' is nil, do nothing. +FSM is the connection that is sending/receiving. +DIRECTION is a string, either \"sending\" or \"receive\". +DATA is any sexp." + (when jabber-debug-log-xml + (with-current-buffer (get-buffer-create (format "*-jabber-xml-log-%s-*" (jabber-connection-bare-jid fsm))) + (save-excursion + (goto-char (point-max)) + (insert (format "%s %S\n\n" direction data)))))) + (defun jabber-pre-filter (process string fsm) (with-current-buffer (process-buffer process) ;; Append new data @@ -757,12 +781,8 @@ (string-match "version='\\([0-9.]+\\)'" stream-header) (string-match "version=\"\\([0-9.]+\\)\"" stream-header)) (match-string 1 stream-header))) - (if jabber-debug-log-xml - (with-current-buffer (get-buffer-create "*-jabber-xml-log-*") - (save-excursion - (goto-char (point-max)) - (insert (format "receive %S\n\n" stream-header))))) - + (jabber-log-xml fsm "receive" stream-header) + ;; If the server is XMPP compliant, i.e. there is a version attribute ;; and it's >= 1.0, there will be a stream:features tag shortly, ;; so just wait for that. @@ -795,11 +815,7 @@ ;; If there's a problem with writing the XML log, ;; make sure the stanza is delivered, at least. (condition-case e - (if jabber-debug-log-xml - (with-current-buffer (get-buffer-create "*-jabber-xml-log-*") - (save-excursion - (goto-char (point-max)) - (insert (format "receive %S\n\n" (car xml-data)))))) + (jabber-log-xml fsm "receive" (car xml-data)) (error (ding) (message "Couldn't write XML log: %s" (error-message-string e)) @@ -894,11 +910,7 @@ (defun jabber-send-sexp (jc sexp) "Send the xml corresponding to SEXP to connection JC." (condition-case e - (if jabber-debug-log-xml - (with-current-buffer (get-buffer-create "*-jabber-xml-log-*") - (save-excursion - (goto-char (point-max)) - (insert (format "sending %S\n\n" sexp))))) + (jabber-log-xml jc "sending" sexp) (error (ding) (message "Couldn't write XML log: %s" (error-message-string e)) @@ -919,11 +931,7 @@ "> "))) (jabber-send-string jc stream-header) - (when jabber-debug-log-xml - (with-current-buffer (get-buffer-create "*-jabber-xml-log-*") - (save-excursion - (goto-char (point-max)) - (insert (format "sending %S\n\n" stream-header))))))) + (jabber-log-xml jc "sending" stream-header))) (defun jabber-send-string (jc string) "Send STRING to the connection JC." |
From: Magnus H. <leg...@us...> - 2007-12-09 23:19:22
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19515 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-430 Creator: Magnus Henoch <ma...@fr...> Send presence updates to joined groupchats Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- jabber-presence.el 9 Dec 2007 00:55:34 -0000 1.38 +++ jabber-presence.el 9 Dec 2007 23:19:18 -0000 1.39 @@ -294,15 +294,23 @@ (setq *jabber-current-status* status) (setq *jabber-current-show* show) (setq *jabber-current-priority* (string-to-number priority)) + (let (subelements-map) + ;; For each connection, we use a different set of subelements. We + ;; cache them, to only generate them once. + + ;; Ordinary presence, with no specified recipient (dolist (jc jabber-connections) - ;; First send presence to everyone subscribed (let ((subelements (jabber-presence-children jc))) - (jabber-send-sexp jc `(presence () ,@subelements)) - ;; Then send to every joined MUC room - ;; XXX: implement reverse mapping - ;; (dolist (groupchat *jabber-active-groupchats*) -;; (jabber-send-sexp `(presence ((to . ,(car groupchat))) ,@subelements))) - )) + (aput 'subelements-map jc subelements) + (jabber-send-sexp jc `(presence () ,@subelements)))) + ;; Then send presence to groupchats + (dolist (groupchat *jabber-active-groupchats*) + (let* ((buffer (get-buffer (jabber-muc-get-buffer (car groupchat)))) + (jc (when buffer + (buffer-local-value 'jabber-buffer-connection buffer))) + (subelements (cdr (assq jc subelements-map)))) + (when jc + (jabber-send-sexp jc `(presence ((to . ,(car groupchat))) ,@subelements)))))) (jabber-display-roster)) (defun jabber-presence-children (jc) |
From: Magnus H. <leg...@us...> - 2007-12-09 00:55:37
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15642 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-429 Creator: Magnus Henoch <ma...@fr...> Handle unavailable and error presence from bare JID Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- jabber-presence.el 26 Oct 2007 14:04:42 -0000 1.37 +++ jabber-presence.el 9 Dec 2007 00:55:34 -0000 1.38 @@ -134,6 +134,20 @@ (get buddy 'resources)))) newstatus) (cond + ((and (string= resource "") (member type '("unavailable" "error"))) + ;; 'unavailable' or 'error' from bare JID means that all resources + ;; are offline. + (setq resource-plist nil) + (setq newstatus (if (string= type "error") "error" nil)) + (let ((new-message (if error + (jabber-parse-error error) + presence-status))) + ;; erase any previous information + (put buddy 'resources nil) + (put buddy 'connected nil) + (put buddy 'show newstatus) + (put buddy 'status new-message))) + ((string= type "unavailable") (setq resource-plist (plist-put resource-plist 'connected nil)) @@ -173,11 +187,12 @@ (plist-put resource-plist 'priority priority)) (setq newstatus (or presence-show "")))) - ;; this is for `assoc-set!' in guile - (if (assoc resource (get buddy 'resources)) - (setcdr (assoc resource (get buddy 'resources)) resource-plist) - (put buddy 'resources (cons (cons resource resource-plist) (get buddy 'resources)))) - (jabber-prioritize-resources buddy) + (when resource-plist + ;; this is for `assoc-set!' in guile + (if (assoc resource (get buddy 'resources)) + (setcdr (assoc resource (get buddy 'resources)) resource-plist) + (put buddy 'resources (cons (cons resource resource-plist) (get buddy 'resources)))) + (jabber-prioritize-resources buddy)) (jabber-roster-update jc nil (list buddy) nil) |
From: Magnus H. <leg...@us...> - 2007-12-09 00:55:31
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15629 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-428 Creator: Magnus Henoch <ma...@fr...> Handle :do-disconnect events in state :register-account Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- jabber-core.el 17 Nov 2007 11:14:52 -0000 1.72 +++ jabber-core.el 9 Dec 2007 00:55:26 -0000 1.73 @@ -450,7 +450,12 @@ (jabber-process-stream-error (cadr event) state-data) (progn (jabber-process-input fsm (cadr event)) - (list :register-account state-data)))))) + (list :register-account state-data)))) + + (:do-disconnect + (jabber-send-string fsm "</stream:stream>") + (list nil (plist-put state-data + :disconnection-expected t))))) (define-enter-state jabber-connection :legacy-auth (fsm state-data) |
From: Magnus H. <leg...@us...> - 2007-12-09 00:55:21
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15616 Modified Files: jabber-socks5.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-427 Creator: Magnus Henoch <ma...@fr...> Fix searching for XEP-0065 proxy Index: jabber-socks5.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-socks5.el,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- jabber-socks5.el 17 Sep 2007 12:26:16 -0000 1.17 +++ jabber-socks5.el 9 Dec 2007 00:55:18 -0000 1.18 @@ -145,11 +145,14 @@ (define-enter-state jabber-socks5 seek-proxies (fsm state-data) ;; Look for items at the server. - (jabber-disco-get-items (plist-get state-data :jc) - nil nil - (lambda (jc fsm result) - (fsm-send-sync fsm (cons :items result))) - fsm) + (let* ((jc (plist-get state-data :jc)) + (server (jabber-jid-server (jabber-connection-jid jc)))) + (jabber-disco-get-items jc + server + nil + (lambda (jc fsm result) + (fsm-send-sync fsm (cons :items result))) + fsm)) ;; Spend no more than five seconds looking for a proxy. (list state-data 5)) |
From: Magnus H. <leg...@us...> - 2007-12-08 23:44:07
|
Update of /cvsroot/emacs-jabber/www/html In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19488/html Added Files: index.html list-of-releases.html Log Message: Initial commit of new webpage --- NEW FILE: index.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jabber.el</title> <meta name="generator" content="muse.el"> <style type="text/css"> body { background: white; color: black; margin-left: 3%; margin-right: 7%; } p { margin-top: 1% } p.verse { margin-left: 3% } .example { margin-left: 3% } h2 { margin-top: 25px; margin-bottom: 0px; } h3 { margin-bottom: 0px; } </style> </head> <body> <h1>jabber.el</h1> <!-- Page published by Emacs Muse begins here --> <p><a href="http://sourceforge.net"> <img border="0" src="http://sourceforge.net/sflogo.php?group_id=88346&type=2" width="125" height="37" alt="SourceForge.net Logo" style="position: absolute; top: 0em; right: 0em;"></a></p> <p>jabber.el is a Jabber client for Emacs.</p> <div class="contents"> <dl> <dt> <a href="#sec1">What is Jabber?</a> </dt> <dt> <a href="#sec2">What is jabber.el?</a> </dt> <dt> <a href="#sec3">Downloading and installing</a> </dt> <dd> <dl> <dt> <a href="#sec4">Prepackaged</a> </dt> <dt> <a href="#sec5">Dependencies</a> </dt> <dt> <a href="#sec6">Downloading</a> </dt> <dt> <a href="#sec7">Using</a> </dt> </dl> </dd> <dt> <a href="#sec8">Reporting bugs</a> </dt> <dt> <a href="#sec9">Latest source</a> </dt> <dd> <dl> <dt> <a href="#sec10">CVS</a> </dt> <dt> <a href="#sec11">GNU Arch</a> </dt> <dt> <a href="#sec12">git</a> </dt> </dl> </dd> <dt> <a href="#sec13">List of releases</a> </dt> </dl> </div> <p>External resources:</p> <ul> <li><a href="http://sourceforge.net/projects/emacs-jabber/">Sourceforge project page</a></li> <li><a href="http://www.emacswiki.org/cgi-bin/wiki/JabberEl">the JabberEl page of EmacsWiki</a></li> <li>the mailing list <a href="http://lists.sourceforge.net/lists/listinfo/emacs-jabber-general">emacs-jabber-general</a>; also available as <a href="http://dir.gmane.org/gmane.emacs.jabber.general">gmane.emacs.jabber.general</a> on <a href="http://gmane.org">Gmane</a></li> <li>read-only mailing list of CVS commits <a href="http://lists.sourceforge.net/lists/listinfo/emacs-jabber-commit">emacs-jabber-commit</a>; also available as <a href="http://dir.gmane.org/gmane.emacs.jabber.scm">gmane.emacs.jabber.scm</a> on <a href="http://gmane.org">Gmane</a></li> <li>the Jabber chat room <a href="xmpp:jab...@co...?join">jab...@co...</a>, and its <a href="http://www.jabber.se/muc-logs/jab...@co.../">logs</a></li> <li>the <a href="manual-0.7.1/">manual for jabber.el 0.7.1</a> (also included in the release files)</li> </ul> <h2><a name="sec1" id="sec1"></a> What is Jabber?</h2> <p class="first">Jabber is an open instant messaging (IM) system, also known as XMPP. It is described in <a href="http://www.xmpp.org/rfcs/">RFCs 3920-3923</a> and a series of <a href="http://www.xmpp.org/extensions/">XEPs</a> (XMPP Extension Proposals). That is, unlike legacy IM systems (such as ICQ or MSN Messenger), the protocol is published in the open, free for anyone to implement. Therefore you shouldn't be surprised that there is a Jabber client for Emacs, too. (If you are not of the Emacs persuasion, see this <a href="http://www.jabber.org/software/clients.shtml">list of Jabber clients</a>.)</p> <p>Jabber is, like e-mail, a decentralised system. A Jabber identifier (JID) is of the form <code>username@server</code>, just like an e-mail address, and every Jabber user whose server is open to Internet connections can communicate with any other user. This is in stark contrast to the legacy "walled-garden" IM systems, where you need a separate account for each system to be able to communicate with its users. Note that the <a href="http://talk.google.com">Google Talk</a> service is an XMPP service, so if you have a GMail account, you already have a JID ending with <code>@gmail.com</code>.</p> <p>In Jabber, you have a "roster", a list of contacts. You can see which of them are online at the moment, and chat with them. (You can also send messages to an offline contact, and the message will be stored on the server for later delivery.) Jabber also supports IRC-style chat rooms.</p> <h2><a name="sec2" id="sec2"></a> What is jabber.el?</h2> <p class="first">jabber.el is a Jabber client for Emacs. It may seem strange to have a chat client in an editor, but consider that chatting is, after all, just a special case of text editing.</p> <h2><a name="sec3" id="sec3"></a> Downloading and installing</h2> <h3><a name="sec4" id="sec4"></a> Prepackaged</h3> <p class="first">Note that jabber.el is available as <a href="http://packages.debian.org/emacs-jabber">emacs-jabber in Debian</a>, and in <a href="http://packages.ubuntu.com/emacs-jabber">Ubuntu's "universe" section</a>.</p> <h3><a name="sec5" id="sec5"></a> Dependencies</h3> <p class="first">jabber.el requires either GNU Emacs 22, or GNU Emacs 21 combined with Gnus 5.10. You should get these from your distribution, or from the <a href="http://www.gnu.org/software/emacs/">Emacs</a> and <a href="http://gnus.org">Gnus</a> web sites.</p> <p>However, if you want to connect to servers that use SRV records (e.g. Google Talk), it is recommended to use either No Gnus or Gnus 5.13.</p> <p>If you want encrypted connections (some servers, e.g. Google Talk, require it), you need <a href="http://www.gnu.org/software/gnutls/">GnuTLS</a> installed.</p> <h3><a name="sec6" id="sec6"></a> Downloading</h3> <p class="first">Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339">latest release</a> and unpack it in a suitable location. Add something like the following to your <code>.emacs</code> file:</p> <pre class="example"> ;; adjust this path: (add-to-list 'load-path "/path/to/emacs-jabber") (require 'jabber) </pre> <p>Either evaluate those lines, or restart Emacs.</p> <h3><a name="sec7" id="sec7"></a> Using</h3> <p class="first">See the <a href="manual-0.7.1/Basic-operation.html">Basic Operation</a> in the manual.</p> <h2><a name="sec8" id="sec8"></a> Reporting bugs</h2> <p class="first">Bug reports can be sent either to the mailing list <a href="http://lists.sourceforge.net/lists/listinfo/emacs-jabber-general">emacs-jabber-general</a> or to the <a href="http://sourceforge.net/tracker/?group_id=88346&atid=586350">bug tracker</a>.</p> <h2><a name="sec9" id="sec9"></a> Latest source</h2> <p class="first">jabber.el releases are, unfortunately, less frequent than they would be in an ideal world. You can get the latest development version using various version control systems.</p> <h3><a name="sec10" id="sec10"></a> CVS</h3> <p class="first">See <a href="http://sourceforge.net/cvs/?group_id=88346">the Sourceforge CVS page</a>. In short, run the following command:</p> <pre class="example"> cvs -z3 -d:pserver:ano...@em...:/cvsroot/emacs-jabber co -P emacs-jabber </pre> <h3><a name="sec11" id="sec11"></a> GNU Arch</h3> <p class="first">The commands are:</p> <pre class="example"> tla register-archive http://www.dtek.chalmers.se/~henoch/archive-2005 tla get ma...@fr...--2005/emacs-jabber--cvs-head--0 emacs-jabber </pre> <p>If you are using Bazaar 1, substitute <code>baz</code> for <code>tla</code>.</p> <h3><a name="sec12" id="sec12"></a> git</h3> <pre class="example"> git-clone git://git.catap.ru/emacs-jabber.git </pre> <h2><a name="sec13" id="sec13"></a> List of releases</h2> <p class="first">The list of releases has been moved to a <a href="list-of-releases.html">separate page</a>.</p> <!-- Page published by Emacs Muse ends here --> </body> </html> --- NEW FILE: list-of-releases.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>List of releases - jabber.el</title> <meta name="generator" content="muse.el"> <style type="text/css"> body { background: white; color: black; margin-left: 3%; margin-right: 7%; } p { margin-top: 1% } p.verse { margin-left: 3% } .example { margin-left: 3% } h2 { margin-top: 25px; margin-bottom: 0px; } h3 { margin-bottom: 0px; } </style> </head> <body> <h1>List of releases - jabber.el</h1> <!-- Page published by Emacs Muse begins here --> <p><a href="index.html">Back to main page</a> <h3>version 0.7.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=482983">31-Jan-2007</a></h3> <ul> <li>STARTTLS</li> <li>SRV records (requires No Gnus)</li> <li>Message composition buffer</li> <li>XMPP URIs are handled (see <a href="manual-0.7.1/XMPP-URIs.html">manual</a> for setup)</li> <li>Autoaway</li> <li>MUC improvements <ul> <li>Don't display alerts for your own messages</li> <li>Presence changes are sent to MUC rooms too</li> <li>Check room features before joining</li> </ul> <li>Avatars</li> <li>File transfer</li> <li>Sound files per contact for alerts</li> <li>New function: jabber-send-directed-presence</li> <li>Entity time supported (XEP-0090)</li> <li>Last activity supported (XEP-0012)</li> </ul> <p>Read the <a href="manual-0.7.1/">manual</a>.</p> <h3>version 0.7 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=381160">27-Dec-2005</a></h3> <ul> <li>SSL connections possible</li> <li>Chat buffers rewritten</li> <li>MUC improved</li> <li>Global key bindings under C-x C-j</li> <li>Vcard viewer and editor</li> <li>Roster export</li> <li>Message events (JEP-0022)</li> <li>Easy way to define external notifiers</li> <li>Activity mode improved</li> <li>Roster display optimized</li> <li>Optionally use per-contact history files</li> <li>Jabber menu in menubar not enabled by default</li> <li>Flyspell in chat buffers</li> <li>Different time formats for instant and delayed messages</li> <li>Chat buffers in inactive windows are scrolled</li> <li>Roster is sorted by name also</li> <li>Countless bugfixes</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.7/">manual</a>.</p> <h3>version 0.6.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=292750">27-Dec-2004</a></h3> <ul> <li>Now works with ejabberd</li> <li>Message history (Mathias Dahl)</li> <li>Backlogs</li> <li>Activity tracking on the mode line (Carl Henrik Lunde)</li> <li>Receive an alert when a specific person goes online (Mathias Dahl)</li> <li>Support for /me in chats (Nolan Eakins)</li> <li>Message alerts for current buffer can be disabled</li> <li>Basic moderation support in MUC</li> <li>MUC alerts are separated from ordinary message alerts</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.6.1/">manual</a>, in which there is now a section on <a href="http://emacs-jabber.sourceforge.net/manual-0.6.1/Protocol-support.html">protocol support</a>.</p> <h3>version 0.6 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=275815">17-Oct-2004</a></h3> <ul> <li>Chat buffers no longer use the minibuffer, making it easier to use ordinary editor commands and to pause writing halfway</li> <li>The roster display and the chat buffer prompts are now customizable</li> <li>The online status of the contact is displayed in the chat buffer (Emacs only)</li> <li>The connect function automatically sends presence after connecting</li> <li>The names of the roster buffer and chat buffers are customizable</li> <li>RET and C-k do what you would expect in the roster buffer</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.6/">manual</a>.</p> <h3>version 0.5.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=236857">08-May-2004</a></h3> <ul> <li>Nicknames are accepted whenever a JID is asked for.</li> <li>Roster entry spacing is customizable (default is none)</li> <li>Bug fix regarding mixed-case JIDs</li> <li>Experimental code for receiving files - see the README</li> <li>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.5.1/">manual</a></li> </ul> <h3>version 0.5 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=228471">03-April-2004</a></h3> <ul> <li>Modular design; plugins easier to write</li> <li>Support for Ad-Hoc Commands and setting presence remotely</li> <li><a href="manual-0.5/">Browse documentation here</a></li> </ul> <h3>version 0.4.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=217577">16-February-2004</a></h3> <ul> <li> XEmacs support - basically works, needs testing and care.</li> <li> "Set status" menu fixed</li> </ul> <h3>version 0.4 - 05-February-2004</h3> <ul> <li> SHA-1 password hashing</li> <li> customisation hooks</li> <li> browsing improved</li> <li> added service discovery</li> <li> added in-band registration</li> <li> added searching</li> <li> <a href="/emacs-jabber/jabber.html">new manual</a></li> </ul> <h3>version 0.3 - 21-April-2002</h3> <ul> <li> improved groupchat support (thanks to nimrod for tip)</li> <li> improved roster (buddy-list) display</li> <li> infoquery rewritten - great improvement</li> <li> improved minimal browsing support !</li> <li> added customizable faces</li> <li> added more customizable variables</li> <li> more (helpful) comments in code</li> <li> added explicit licensing (GPL, like emacs itself)</li> </ul><br> <h3>version 0.2 - 05-April-2002</h3> <ul> <li> added groupchat support !</li> <li> added minimal browsing support !</li> <li> fixed bug in chat mode</li> <li> abolished message mode (i only use chat mode anyway)</li> <li> fixed some problems with incoming xml</li> <li> added a pull-down menu</li> <li> added customizable variables</li> </ul><br> <br> <h3>features currently missing (TODO)</h3> <ul> <li> global keymaps</li> <li> logging (history)</li> <li> overall exception handling</li> <li> sanity checks (for incoming xml, and for myself :)</li> <li> clickable URLs in messages</li> <li> support for versions other than gnu-emacs-21 (older emacs, xemacs, jemacs)</li> <li> and more...</li> </ul><br> <!-- Page published by Emacs Muse ends here --> </body> </html> |
From: Magnus H. <leg...@us...> - 2007-12-08 23:44:06
|
Update of /cvsroot/emacs-jabber/www In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19488 Added Files: index.muse list-of-releases.muse setup.el Log Message: Initial commit of new webpage --- NEW FILE: setup.el --- ;; Muse setup for jabber.el WWW pages ;; Find the directory this file lives in... this should work, I think. (let ((dir (if load-file-name (file-name-directory load-file-name) default-directory))) (aput 'muse-project-alist "jabber.el-www" (list ;;sources (list dir) ;;outputs (list :base "html" :path (expand-file-name "html/" dir))))) --- NEW FILE: list-of-releases.muse --- #title List of releases - jabber.el [[index][Back to main page]] <literal> <h3>version 0.7.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=482983">31-Jan-2007</a></h3> <ul> <li>STARTTLS</li> <li>SRV records (requires No Gnus)</li> <li>Message composition buffer</li> <li>XMPP URIs are handled (see <a href="manual-0.7.1/XMPP-URIs.html">manual</a> for setup)</li> <li>Autoaway</li> <li>MUC improvements <ul> <li>Don't display alerts for your own messages</li> <li>Presence changes are sent to MUC rooms too</li> <li>Check room features before joining</li> </ul> <li>Avatars</li> <li>File transfer</li> <li>Sound files per contact for alerts</li> <li>New function: jabber-send-directed-presence</li> <li>Entity time supported (XEP-0090)</li> <li>Last activity supported (XEP-0012)</li> </ul> <p>Read the <a href="manual-0.7.1/">manual</a>.</p> <h3>version 0.7 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=381160">27-Dec-2005</a></h3> <ul> <li>SSL connections possible</li> <li>Chat buffers rewritten</li> <li>MUC improved</li> <li>Global key bindings under C-x C-j</li> <li>Vcard viewer and editor</li> <li>Roster export</li> <li>Message events (JEP-0022)</li> <li>Easy way to define external notifiers</li> <li>Activity mode improved</li> <li>Roster display optimized</li> <li>Optionally use per-contact history files</li> <li>Jabber menu in menubar not enabled by default</li> <li>Flyspell in chat buffers</li> <li>Different time formats for instant and delayed messages</li> <li>Chat buffers in inactive windows are scrolled</li> <li>Roster is sorted by name also</li> <li>Countless bugfixes</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.7/">manual</a>.</p> <h3>version 0.6.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=292750">27-Dec-2004</a></h3> <ul> <li>Now works with ejabberd</li> <li>Message history (Mathias Dahl)</li> <li>Backlogs</li> <li>Activity tracking on the mode line (Carl Henrik Lunde)</li> <li>Receive an alert when a specific person goes online (Mathias Dahl)</li> <li>Support for /me in chats (Nolan Eakins)</li> <li>Message alerts for current buffer can be disabled</li> <li>Basic moderation support in MUC</li> <li>MUC alerts are separated from ordinary message alerts</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.6.1/">manual</a>, in which there is now a section on <a href="http://emacs-jabber.sourceforge.net/manual-0.6.1/Protocol-support.html">protocol support</a>.</p> <h3>version 0.6 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=275815">17-Oct-2004</a></h3> <ul> <li>Chat buffers no longer use the minibuffer, making it easier to use ordinary editor commands and to pause writing halfway</li> <li>The roster display and the chat buffer prompts are now customizable</li> <li>The online status of the contact is displayed in the chat buffer (Emacs only)</li> <li>The connect function automatically sends presence after connecting</li> <li>The names of the roster buffer and chat buffers are customizable</li> <li>RET and C-k do what you would expect in the roster buffer</li> </ul> <p>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.6/">manual</a>.</p> <h3>version 0.5.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=236857">08-May-2004</a></h3> <ul> <li>Nicknames are accepted whenever a JID is asked for.</li> <li>Roster entry spacing is customizable (default is none)</li> <li>Bug fix regarding mixed-case JIDs</li> <li>Experimental code for receiving files - see the README</li> <li>Read the <a href="http://emacs-jabber.sourceforge.net/manual-0.5.1/">manual</a></li> </ul> <h3>version 0.5 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=228471">03-April-2004</a></h3> <ul> <li>Modular design; plugins easier to write</li> <li>Support for Ad-Hoc Commands and setting presence remotely</li> <li><a href="manual-0.5/">Browse documentation here</a></li> </ul> <h3>version 0.4.1 - <a href="http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339&release_id=217577">16-February-2004</a></h3> <ul> <li> XEmacs support - basically works, needs testing and care.</li> <li> "Set status" menu fixed</li> </ul> <h3>version 0.4 - 05-February-2004</h3> <ul> <li> SHA-1 password hashing</li> <li> customisation hooks</li> <li> browsing improved</li> <li> added service discovery</li> <li> added in-band registration</li> <li> added searching</li> <li> <a href="/emacs-jabber/jabber.html">new manual</a></li> </ul> <h3>version 0.3 - 21-April-2002</h3> <ul> <li> improved groupchat support (thanks to nimrod for tip)</li> <li> improved roster (buddy-list) display</li> <li> infoquery rewritten - great improvement</li> <li> improved minimal browsing support !</li> <li> added customizable faces</li> <li> added more customizable variables</li> <li> more (helpful) comments in code</li> <li> added explicit licensing (GPL, like emacs itself)</li> </ul><br> <h3>version 0.2 - 05-April-2002</h3> <ul> <li> added groupchat support !</li> <li> added minimal browsing support !</li> <li> fixed bug in chat mode</li> <li> abolished message mode (i only use chat mode anyway)</li> <li> fixed some problems with incoming xml</li> <li> added a pull-down menu</li> <li> added customizable variables</li> </ul><br> <br> <h3>features currently missing (TODO)</h3> <ul> <li> global keymaps</li> <li> logging (history)</li> <li> overall exception handling</li> <li> sanity checks (for incoming xml, and for myself :)</li> <li> clickable URLs in messages</li> <li> support for versions other than gnu-emacs-21 (older emacs, xemacs, jemacs)</li> <li> and more...</li> </ul><br> </literal> --- NEW FILE: index.muse --- #title jabber.el <literal> <a href="http://sourceforge.net"> <img border="0" src="http://sourceforge.net/sflogo.php?group_id=88346&type=2" width="125" height="37" alt="SourceForge.net Logo" style="position: absolute; top: 0em; right: 0em;"></a> </literal> jabber.el is a Jabber client for Emacs. <contents> External resources: - [[http://sourceforge.net/projects/emacs-jabber/][Sourceforge project page]] - [[http://www.emacswiki.org/cgi-bin/wiki/JabberEl][the JabberEl page of EmacsWiki]] - the mailing list [[http://lists.sourceforge.net/lists/listinfo/emacs-jabber-general][emacs-jabber-general]]; also available as [[http://dir.gmane.org/gmane.emacs.jabber.general][gmane.emacs.jabber.general]] on [[http://gmane.org][Gmane]] - read-only mailing list of CVS commits [[http://lists.sourceforge.net/lists/listinfo/emacs-jabber-commit][emacs-jabber-commit]]; also available as [[http://dir.gmane.org/gmane.emacs.jabber.scm][gmane.emacs.jabber.scm]] on [[http://gmane.org][Gmane]] - the Jabber chat room [[xmpp:jab...@co...?join][jab...@co...]], and its [[http://www.jabber.se/muc-logs/jab...@co.../][logs]] - the [[manual-0.7.1/][manual for jabber.el 0.7.1]] (also included in the release files) * What is Jabber? Jabber is an open instant messaging (IM) system, also known as XMPP. It is described in [[http://www.xmpp.org/rfcs/][RFCs 3920-3923]] and a series of [[http://www.xmpp.org/extensions/][XEPs]] (XMPP Extension Proposals). That is, unlike legacy IM systems (such as ICQ or MSN Messenger), the protocol is published in the open, free for anyone to implement. Therefore you shouldn't be surprised that there is a Jabber client for Emacs, too. (If you are not of the Emacs persuasion, see this [[http://www.jabber.org/software/clients.shtml][list of Jabber clients]].) Jabber is, like e-mail, a decentralised system. A Jabber identifier (JID) is of the form =username@server=, just like an e-mail address, and every Jabber user whose server is open to Internet connections can communicate with any other user. This is in stark contrast to the legacy "walled-garden" IM systems, where you need a separate account for each system to be able to communicate with its users. Note that the [[http://talk.google.com][Google Talk]] service is an XMPP service, so if you have a GMail account, you already have a JID ending with =@gmail.com=. In Jabber, you have a "roster", a list of contacts. You can see which of them are online at the moment, and chat with them. (You can also send messages to an offline contact, and the message will be stored on the server for later delivery.) Jabber also supports IRC-style chat rooms. * What is jabber.el? jabber.el is a Jabber client for Emacs. It may seem strange to have a chat client in an editor, but consider that chatting is, after all, just a special case of text editing. * Downloading and installing ** Prepackaged Note that jabber.el is available as [[http://packages.debian.org/emacs-jabber][emacs-jabber in Debian]], and in [[http://packages.ubuntu.com/emacs-jabber][Ubuntu's "universe" section]]. ** Dependencies jabber.el requires either GNU Emacs 22, or GNU Emacs 21 combined with Gnus 5.10. You should get these from your distribution, or from the [[http://www.gnu.org/software/emacs/][Emacs]] and [[http://gnus.org][Gnus]] web sites. However, if you want to connect to servers that use SRV records (e.g. Google Talk), it is recommended to use either No Gnus or Gnus 5.13. If you want encrypted connections (some servers, e.g. Google Talk, require it), you need [[http://www.gnu.org/software/gnutls/][GnuTLS]] installed. ** Downloading Download the [[http://sourceforge.net/project/showfiles.php?group_id=88346&package_id=92339][latest release]] and unpack it in a suitable location. Add something like the following to your =.emacs= file: <example> ;; adjust this path: (add-to-list 'load-path "/path/to/emacs-jabber") (require 'jabber) </example> Either evaluate those lines, or restart Emacs. ** Using See the [[manual-0.7.1/Basic-operation.html][Basic Operation]] in the manual. * Reporting bugs Bug reports can be sent either to the mailing list [[http://lists.sourceforge.net/lists/listinfo/emacs-jabber-general][emacs-jabber-general]] or to the [[http://sourceforge.net/tracker/?group_id=88346&atid=586350][bug tracker]]. * Latest source jabber.el releases are, unfortunately, less frequent than they would be in an ideal world. You can get the latest development version using various version control systems. ** CVS See [[http://sourceforge.net/cvs/?group_id=88346][the Sourceforge CVS page]]. In short, run the following command: <example> cvs -z3 -d:pserver:ano...@em...:/cvsroot/emacs-jabber co -P emacs-jabber </example> ** GNU Arch The commands are: <example> tla register-archive http://www.dtek.chalmers.se/~henoch/archive-2005 tla get ma...@fr...--2005/emacs-jabber--cvs-head--0 emacs-jabber </example> If you are using Bazaar 1, substitute =baz= for =tla=. ** git <example> git-clone git://git.catap.ru/emacs-jabber.git </example> * List of releases The list of releases has been moved to a [[list-of-releases][separate page]]. |
From: Magnus H. <leg...@us...> - 2007-12-08 23:43:34
|
Update of /cvsroot/emacs-jabber/www/html In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19467/html Log Message: Directory /cvsroot/emacs-jabber/www/html added to the repository |
From: Magnus H. <leg...@us...> - 2007-11-26 01:06:02
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv5690 Modified Files: jabber-activity.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-426 Creator: Magnus Henoch <ma...@fr...> jabber-activity-switch-to: don't switch back unless we are in a chat buffer Index: jabber-activity.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-activity.el,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- jabber-activity.el 14 Sep 2007 23:14:03 -0000 1.30 +++ jabber-activity.el 26 Nov 2007 01:05:58 -0000 1.31 @@ -309,9 +309,11 @@ (setq jabber-activity-last-buffer (current-buffer))) (switch-to-buffer (jabber-activity-find-buffer-name jid)) (jabber-activity-clean)) - ;; Switch back to the buffer used last - (when (buffer-live-p jabber-activity-last-buffer) - (switch-to-buffer jabber-activity-last-buffer)))) + (if (eq major-mode 'jabber-chat-mode) + ;; Switch back to the buffer used last + (when (buffer-live-p jabber-activity-last-buffer) + (switch-to-buffer jabber-activity-last-buffer)) + (message "No new activity")))) ;;;###autoload (define-minor-mode jabber-activity-mode |
From: Magnus H. <leg...@us...> - 2007-11-21 12:48:08
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv28232 Modified Files: jabber-xml.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-425 Creator: Magnus Henoch <ma...@fr...> Don't signal error in jabber-xml-get-attribute if NODE is a string Index: jabber-xml.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-xml.el,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- jabber-xml.el 20 Mar 2007 11:49:25 -0000 1.20 +++ jabber-xml.el 21 Nov 2007 12:48:01 -0000 1.21 @@ -1,7 +1,7 @@ ;; jabber-xml.el - XML functions +;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr... ;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in... -;; Copyright (C) 2003, 2004 - Magnus Henoch - ma...@fr... ;; This file is a part of jabber.el. @@ -158,12 +158,14 @@ (defsubst jabber-xml-get-attribute (node attribute) "Get from NODE the value of ATTRIBUTE. Return nil if the attribute was not found." - (xml-get-attribute-or-nil node attribute)) + (when (consp node) + (xml-get-attribute-or-nil node attribute))) (defsubst jabber-xml-get-attribute (node attribute) "Get from NODE the value of ATTRIBUTE. Return nil if the attribute was not found." - (let ((result (xml-get-attribute node attribute))) - (and (> (length result) 0) result))))) + (when (consp node) + (let ((result (xml-get-attribute node attribute))) + (and (> (length result) 0) result)))))) (defsubst jabber-xml-get-xmlns (node) "Get \"xmlns\" attribute of NODE, or nil if not present." |
From: Magnus H. <leg...@us...> - 2007-11-18 21:04:56
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31967 Modified Files: jabber-sasl.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-424 Creator: Magnus Henoch <ma...@fr...> Copy stored password for SASL authentication Index: jabber-sasl.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-sasl.el,v retrieving revision 2.14 retrieving revision 2.15 diff -u -d -r2.14 -r2.15 --- jabber-sasl.el 2 Nov 2007 13:25:07 -0000 2.14 +++ jabber-sasl.el 18 Nov 2007 21:04:50 -0000 2.15 @@ -86,7 +86,7 @@ (lexical-let ((password (plist-get (fsm-get-state-data jc) :password)) (bare-jid (jabber-connection-bare-jid jc))) (if password - (lambda (prompt) password) + (lambda (prompt) (copy-sequence password)) (lambda (prompt) (jabber-read-password bare-jid))))) (defun jabber-sasl-process-input (jc xml-data sasl-data) |
From: Magnus H. <leg...@us...> - 2007-11-17 11:29:15
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv20274 Modified Files: README jabber.texi NEWS Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-423 Creator: Magnus Henoch <ma...@fr...> Update documentation Patch from Evgenii Terechkov. Index: README =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/README,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- README 31 Jan 2007 22:26:42 -0000 1.17 +++ README 17 Nov 2007 11:29:00 -0000 1.18 @@ -1,4 +1,4 @@ -This is jabber.el 0.7.1, a Jabber client for Emacs. If you don't know +This is jabber.el 0.8, a Jabber client for Emacs. If you don't know what Jabber is, see http://www.jabber.org . Home page: http://emacs-jabber.sourceforge.net @@ -64,6 +64,9 @@ that jabber-alert-presence-hooks doesn't contain jabber-presence-watch. +Also, users upgrading from 0.7-0.7.x may meet some configuration +issues. Please, report them as bugs in tracker, to help update docs. + Usage ===== To start using it, type M-x jabber-customize and set your username and Index: NEWS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/NEWS,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- NEWS 14 Sep 2007 23:14:03 -0000 1.62 +++ NEWS 17 Nov 2007 11:29:01 -0000 1.63 @@ -3,34 +3,33 @@ * New features in jabber.el 0.8 ** Support for multiple accounts -(not documented yet) +See section "Account settings" in manual. ** Automatic reconnection -Not enabled by default; see jabber-auto-reconnect. -(not documented yet) +Not enabled by default; See "Reconnecting" section in manual. -** Support for XEP-0085 +** support for XEP-0085 This means "contact is typing" notifications when chatting with Gajim or Google Talk users, among others. -(not documented yet) +See "XEP-0085" section in manual ** Option: hide offline contacts in roster -See jabber-show-offline-contacts. -(not documented yet) +See "The roster buffer" in manual. ** Clean history from chat buffers -See jabber-truncate-top and new option for jabber-alert-muc-hooks. -(not documented yet) +See jabber-truncate-* functions and new options for +jabber-alert-muc-hooks and jabber-alert-message-hooks. See section +"Message history" in manual too. ** MUC bookmarks -(not documented yet) +See jabber-edit-bookmarks function and "Bookmarks" section in manual. ** Name of browse buffers customizable -See jabber-browse-buffer-format. -(not documented yet) +See "Services" section in manual. ** Subscription requests are sent to chat buffers -(not documented yet) +Subscription requests now displayed in chat buffers. See "Presence +subscription" section in manual. * New features in jabber.el 0.7.1 Index: jabber.texi =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber.texi,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- jabber.texi 15 Apr 2007 23:53:09 -0000 1.79 +++ jabber.texi 17 Nov 2007 11:29:00 -0000 1.80 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename jabber.info -@settitle jabber.el manual 0.7.1 +@settitle jabber.el manual 0.8 @c %**end of header @dircategory Emacs @@ -10,7 +10,7 @@ @end direntry @copying -This manual is for jabber.el, version 0.7.1. +This manual is for jabber.el, version 0.8. Copyright @copyright{} 2004, 2005, 2006, 2007 Magnus Henoch, Tom Berger. @@ -120,7 +120,9 @@ @node Connecting, Chatting, Basic operation, Basic operation @section Connecting +@findex jabber-connect-all @findex jabber-connect +@findex jabber-disconnect-all @findex jabber-disconnect @cindex Connecting @@ -130,17 +132,17 @@ not, consult the @file{README} file. Also, make sure you have @code{(require 'jabber)} in your @file{.emacs}. -Now, type @kbd{M-x jabber-customize}. This brings up a customize -buffer for jabber.el. The most important variables to customize are -@code{jabber-username} and -@code{jabber-server}.@footnote{@xref{Connection settings}, for other -things you might have to change.} Save your changes, and type -@kbd{M-x jabber-connect} to connect. +Now, type @kbd{M-x jabber-customize}. This brings up a customize +buffer for jabber.el. One variable to customize are +@code{jabber-account-list}. It sets accounts, that jabber.el knows about. See +comments for this variable to learn how to set it up. Save your +changes, and type @kbd{M-x jabber-connect-all} or @kbd{C-x C-j C-c} to +connect. Use @kbd{M-x jabber-connect} to connect just one account. If you do not yet have a Jabber account, you can register one. Enter -your desired username for @code{jabber-username} and the server you wish -to use for @code{jabber-server}, save, and type @kbd{C-u M-x -jabber-connect} or @kbd{C-u C-x C-j C-c}. If the server supports +your desired username and the server you wish +to use in @code{jabber-account-list}, save, and type @kbd{C-u M-x +jabber-connect}. If the server supports in-band registration, you will be presented with a registration form to fill out and send. There the username you chose will be prefilled. Don't change it, otherwise jabber.el will be confused. @@ -153,6 +155,7 @@ C-j C-p}. @xref{Presence}, for more information. To disconnect, type @kbd{M-x jabber-disconnect} or @kbd{C-x C-j C-d}. +Use @kbd{M-x jabber-disconnect-one} to disconnect just one account. @node Chatting, Presence, Connecting, Basic operation @section Chatting @@ -254,9 +257,9 @@ @dfn{subscribing to his presence}. Presence subscription between two persons can be asymmetric. -When jabber.el receives a presence subscription request, it will -present it to you in an alert requiring immediate response, and offer -you to send a subscription request back to that person. +When jabber.el receives a presence subscription request, it will present +it to you in an chat buffer, and offer you to choose subscription mode +and send a subscription request back to that person. To request subscription to someone, type @kbd{M-x jabber-send-subscription-request}. You will be prompted for the JID @@ -303,6 +306,11 @@ presence changes (@pxref{Presence alerts}). In that case, you need to call @code{jabber-display-roster} manually. +Please note, that by default offline contacts showed in roster as any +others. To hide them, you can use @kbd{o} in roster buffer. To +permanently hide them, customize @code{jabber-show-offline-contacts} +variable. + @node Groupchat, Composing messages, Basic operation, Top @chapter Groupchat @@ -363,12 +371,13 @@ @menu * Automation:: +* Bookmarks:: * Invitations:: * Private messages:: * MUC Administration:: @end menu -@node Automation, Invitations, Groupchat, Groupchat +@node Automation, Bookmarks, Groupchat, Groupchat @section Automation @vindex jabber-muc-default-nicknames @@ -377,7 +386,8 @@ @cindex Default MUC nickname @cindex Autojoin chat rooms -You can select a default nickname by setting @code{jabber-nickname}. +You can select a default nickname by setting +@code{jabber-account-list} (part of JID before @code{@@}). Additionally, you can set different nicknames for different groups, by customizing @code{jabber-muc-default-nicknames}. There you specify the JID of the group, and your preferred nickname. @@ -387,7 +397,22 @@ the rooms you want to enter. To disable this feature, remove @code{jabber-muc-autojoin} from @code{jabber-post-connect-hook}. -@node Invitations, Private messages, Automation, Groupchat +Please note, that @code{jabber-muc-default-nicknames} and +@code{jabber-muc-autojoin} are machine-local. To make them available +to any client on any machine, import them in your bookmarks. See +@xref{Bookmarks}. + +@node Bookmarks, Invitations, Automation, Groupchat +@section Bookmarks + +@cindex Bookmarks +@findex jabber-edit-bookmarks + +You can store your conference settings on server-side to make them +available from any machine and client. Use @code{M-x +jabber-edit-bookmarks} to edit server-side bookmarks. + +@node Invitations, Private messages, Bookmarks, Groupchat @section Invitations @cindex Invitations @@ -615,6 +640,9 @@ operating on a JID while point is over a JID, that JID will be the default value, so you don't have to type it or copy it yourself. +You can change browse buffer name creation template by customizing +@code{jabber-browse-buffer-format} variable. + @menu * Service discovery and browsing:: * Registering:: @@ -678,8 +706,8 @@ server. Please note that any passwords sent in this way will be sent in -cleartext to your Jabber server, unless you have enabled SSL encryption -(@pxref{Connection settings}), and possibly sent in cleartext from your +cleartext to your Jabber server, unless you have enabled SSL encryption, + and possibly sent in cleartext from your server to the server hosting the service. jabber.el will then request a registration form from that service. If @@ -827,6 +855,7 @@ * Autoaway:: * Modeline status:: * Keepalive:: +* Reconnecting:: * Tracking activity:: * Watch buddies:: * Spell checking:: @@ -889,7 +918,7 @@ the number of chatty, online, away, extended away, dnd, and offline contacts, respectively. -@node Keepalive, Tracking activity, Modeline status, Useful features +@node Keepalive, Reconnecting, Modeline status, Useful features @section Keepalive @cindex Keepalive @@ -917,7 +946,23 @@ @code{jabber-keepalive-interval} and @code{jabber-keepalive-timeout}, respectively. -@node Tracking activity, Watch buddies, Keepalive, Useful features +@node Reconnecting, Tracking activity, Keepalive, Useful features +@section Reconnecting + +@cindex Reconnect +@cindex Reconnecting +@vindex jabber-auto-reconnect + +Jabber.el support automatic reconnection to Jabber server(s) upon lost +connection. By default it is off. To turn on, customize +@code{jabber-auto-reconnect} variable. You will need +@file{password.el} to fully use this feature. It may be found in +recent Gnus (No Gnus) or downloaded and installed separately. + +See also comments about +password(s) in Custom's buffer help. + +@node Tracking activity, Watch buddies, Reconnecting, Useful features @section Tracking activity @cindex Activity @@ -997,6 +1042,11 @@ @cindex History @cindex Backlog @cindex Rotation +@cindex Truncate +@cindex Truncation +@findex jabber-truncate-top +@findex jabber-truncate-muc +@findex jabber-truncate-chat @vindex jabber-history-enabled @vindex jabber-global-history-filename @vindex jabber-use-global-history @@ -1005,6 +1055,7 @@ @vindex jabber-history-size-limit @vindex jabber-backlog-number @vindex jabber-backlog-days +@vindex jabber-log-lines-to-keep If you want a record of messages sent and received, set @code{jabber-history-enabled} to t. By default all messages to will @@ -1044,6 +1095,11 @@ presented with the per-contact history file strategy, history rotation works for both per-contact and global history logging strategies. +If you want also to truncate chat and muc buffer from growing too +much, you can customize jabber-alert-message-hooks and +jabber-alert-muc-hooks by adding truncation upon receiving message. +Truncation limit may be set by customizing +@code{jabber-log-lines-to-keep} variable. @node Message events, Roster import and export, Message history, Top @chapter Message events @@ -1182,7 +1238,6 @@ @menu * Account settings:: -* Connection settings:: * Miscellaneous settings:: * Customizing the roster buffer:: * Customizing the chat buffer:: @@ -1191,86 +1246,22 @@ * Debug options:: @end menu -@node Account settings, Connection settings, Customization, Customization +@node Account settings, Miscellaneous settings, Customization, Customization @section Account settings -@vindex jabber-username -@vindex jabber-server -@vindex jabber-password -@vindex jabber-resource -@vindex jabber-default-priority -@vindex jabber-nickname @cindex Username @cindex Resource +@cindex Password +@cindex JID +@cindex Resource -@code{jabber-username} is the username part of your JID. - -@code{jabber-server} is the JID of your server, i.e. the hostname part -of your JID. This is usually, but not necessarily, the same as the -hostname of the server. - -@code{jabber-password} is your password. You have the option to set -it here, in which case it will be stored in cleartext in your -@file{.emacs} file. If this is set to @code{nil}, you will be prompted for -your password every time you connect. - -@code{jabber-resource} is the resource you want to log in under. This -only matters if you are connected to the same account from different -clients or different computers, since each connection must have a -unique resource. You might want to set this to your hostname. - -@code{jabber-default-priority} is the default priority sent with your -presence. Regardless of what you have here, you can change your -priority during a session with @code{jabber-send-presence}. -@xref{Presence}, for more information on priority. - -@code{jabber-nickname} is your default nickname for groupchats. - -@node Connection settings, Miscellaneous settings, Account settings, Customization -@section Connection settings - -@vindex jabber-network-server -@vindex jabber-port -@vindex jabber-connection-type -@vindex jabber-connection-ssl-program -@cindex Connection settings -@cindex Network settings -@cindex SSL -@cindex TLS -@cindex STARTTLS -@cindex SRV records - -@code{jabber-network-server} is the hostname or IP address of your -server. If it is set to @code{nil}, jabber.el will use the name in -@code{jabber-server}. - -@code{jabber-port} is the TCP port of the server to connect to. If -@code{nil}, the default port is selected based on the chosen -connection method. - -If both @code{jabber-network-server} and @code{jabber-port} are nil, and -a sufficiently modern @code{dns.el} is available, jabber.el will use SRV -records to find the right hostname and port. - -@code{jabber-connection-type} specifies what kind of connection to -use. @code{network} means normal unencrypted network connection -(usually on port 5222), and @code{ssl} means encrypted connection -through GnuTLS or OpenSSL (port 5223), while @code{starttls} will -initiate an unencrypted connection and switch to encrypted if offered -by the server. You can change the settings of the encryption program -through @kbd{M-x customize-group RET tls}, @kbd{M-x customize-group RET starttls} -or @kbd{M-x customize-group RET ssl}, respectively. - -@cindex GnuTLS -@cindex OpenSSL -By default, GnuTLS will be used if the @code{tls} library is available, -and if that fails, OpenSSL will be used if the @code{ssl} library is -available. You can force the use of either program by setting -@code{jabber-connection-ssl-program} to @code{gnutls} or @code{openssl}, -respectively. If you use @code{starttls} the library with the same name is -required, and it depends on the GnuTLS command line client. +All account settings reside in @code{jabber-account-list} variable. +By customizing it, you cat set JID, password, resource, and turn +account on/off. Optionally, you can set alternative network server, +port and connection type. See comments for this variable to learn how +to set it up. -@node Miscellaneous settings, Customizing the roster buffer, Connection settings, Customization +@node Miscellaneous settings, Customizing the roster buffer, Account settings, Customization @section Miscellaneous settings @findex jabber-menu @@ -1997,6 +1988,7 @@ * XEP-0077:: In-Band Registration * XEP-0078:: Non-SASL Authentication * XEP-0082:: Jabber Date and Time Profiles +* XEP-0085:: Chat State Notifications * XEP-0086:: Error Condition Mappings * XEP-0090:: Entity Time * XEP-0091:: Delayed Delivery @@ -2168,13 +2160,23 @@ Digest is preferred, and a warning is displayed to the user if only plaintext is available. -@node XEP-0082, XEP-0086, XEP-0078, Protocol support +@node XEP-0082, XEP-0085, XEP-0078, Protocol support @section XEP-0082 (Jabber Date and Time Profiles) The DateTime profile of XEP-0082 is supported. Currently this is only used for file transfer. -@node XEP-0086, XEP-0090, XEP-0082, Protocol support +@node XEP-0085, XEP-0086, XEP-0082, Protocol support +@section XEP-0085 (Chat State Notifications) + +XEP-0085 is partially supported. Currently only active/composing +notifications are @emph{sent} though all five notifications are handled on +receipt. + +To customize sending of chat states, customize +@code{jabber-chatstates-confirm} variable. + +@node XEP-0086, XEP-0090, XEP-0085, Protocol support @section XEP-0086 (Error Condition Mappings) Legacy errors are interpreted, but never generated. XMPP style error |
From: Magnus H. <leg...@us...> - 2007-11-17 11:14:57
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14831 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-422 Creator: Magnus Henoch <ma...@fr...> Pass on all connection parameters when automatically reconnecting Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- jabber-core.el 19 Sep 2007 06:59:23 -0000 1.71 +++ jabber-core.el 17 Nov 2007 11:14:52 -0000 1.72 @@ -267,7 +267,12 @@ 'jabber-connect (plist-get state-data :username) (plist-get state-data :server) - (plist-get state-data :resource))))) + (plist-get state-data :resource) + nil + (plist-get state-data :password) + (plist-get state-data :network-server) + (plist-get state-data :port) + (plist-get state-data :connection-type))))) (list state-data nil)) |
From: Magnus H. <leg...@us...> - 2007-11-02 13:25:13
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv15888 Modified Files: jabber-sasl.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-421 Creator: Magnus Henoch <ma...@fr...> Use proper password reading function for SASL mechanisms sending initial response Index: jabber-sasl.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-sasl.el,v retrieving revision 2.13 retrieving revision 2.14 diff -u -d -r2.13 -r2.14 --- jabber-sasl.el 14 Sep 2007 22:08:28 -0000 2.13 +++ jabber-sasl.el 2 Nov 2007 13:25:07 -0000 2.14 @@ -71,6 +71,7 @@ (plist-get (fsm-get-state-data jc) :username) "xmpp" (plist-get (fsm-get-state-data jc) :server))) + (sasl-read-passphrase (jabber-sasl-read-passphrase-closure jc)) (step (sasl-next-step client nil))) (jabber-send-sexp jc @@ -80,12 +81,16 @@ (base64-encode-string (sasl-step-data step) t)))) (cons client step)))))) +(defun jabber-sasl-read-passphrase-closure (jc) + "Return a lambda function suitable for `sasl-read-passphrase' for JC." + (lexical-let ((password (plist-get (fsm-get-state-data jc) :password)) + (bare-jid (jabber-connection-bare-jid jc))) + (if password + (lambda (prompt) password) + (lambda (prompt) (jabber-read-password bare-jid))))) + (defun jabber-sasl-process-input (jc xml-data sasl-data) - (let ((sasl-read-passphrase (lexical-let ((password (plist-get (fsm-get-state-data jc) :password)) - (bare-jid (jabber-connection-bare-jid jc))) - (if password - (lambda (prompt) password) - (lambda (prompt) (jabber-read-password bare-jid))))) + (let ((sasl-read-passphrase (jabber-sasl-read-passphrase-closure jc)) (client (car sasl-data)) (step (cdr sasl-data))) (cond |
From: Magnus H. <leg...@us...> - 2007-10-26 14:34:19
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv22708 Modified Files: jabber-chatstates.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-420 Creator: Magnus Henoch <ma...@fr...> Don't send chat state notifications unless really asked for Index: jabber-chatstates.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-chatstates.el,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- jabber-chatstates.el 9 Sep 2007 14:06:11 -0000 1.2 +++ jabber-chatstates.el 26 Oct 2007 14:34:16 -0000 1.3 @@ -54,7 +54,11 @@ (defun jabber-chatstates-when-sending (text id) (jabber-chatstates-update-message) (jabber-chatstates-stop-timer) - (when jabber-chatstates-requested + (when (and jabber-chatstates-confirm jabber-chatstates-requested) + (when (eq jabber-chatstates-requested 'first-time) + ;; don't send more notifications until we know that the other + ;; side wants them. + (setq jabber-chatstates-requested nil)) `((active ((xmlns . ,jabber-chatstates-xmlns)))))) ;;; OUTGOING @@ -66,8 +70,12 @@ :group 'jabber-chatstates :type 'boolean) -(defvar jabber-chatstates-requested t - "Whether or not chat states notification was requested") +(defvar jabber-chatstates-requested 'first-time + "Whether or not chat states notification was requested. +This is one of the following: +first-time - send state in first stanza, then switch to nil +t - send states +nil - don't send states") (make-variable-buffer-local 'jabber-chatstates-requested) (defvar jabber-chatstates-composing-sent nil @@ -128,29 +136,34 @@ (setq jabber-chatstates-requested nil)) (t - ;; Set up hooks for composition notification - (when (and jabber-chatstates-confirm jabber-chatstates-requested) - (add-hook 'post-command-hook 'jabber-chatstates-after-change nil t)) + (let ((state + (or + (let ((node + (find jabber-chatstates-xmlns + (jabber-xml-node-children xml-data) + :key #'(lambda (x) (jabber-xml-get-attribute x 'xmlns)) + :test #'string=))) + (jabber-xml-node-name node)) + (let ((node + ;; XXX: this is how we interoperate with + ;; Google Talk. We should really use a + ;; namespace-aware XML parser. + (find jabber-chatstates-xmlns + (jabber-xml-node-children xml-data) + :key #'(lambda (x) (jabber-xml-get-attribute x 'xmlns:cha)) + :test #'string=))) + (when node + ;; Strip the "cha:" prefix + (let ((name (symbol-name (jabber-xml-node-name node)))) + (when (> (length name) 4) + (intern (substring name 4))))))))) + ;; Set up hooks for composition notification + (when (and jabber-chatstates-confirm state) + (setq jabber-chatstates-requested t) + (add-hook 'post-command-hook 'jabber-chatstates-after-change nil t)) - (setq jabber-chatstates-last-state - (dolist (possible-node '(active composing paused inactive gone)) - (let ((state - (or - (find jabber-chatstates-xmlns - (jabber-xml-get-children xml-data possible-node) - :key #'(lambda (x) (jabber-xml-get-attribute x 'xmlns)) - :test #'string=) - ;; XXX: this is how we interoperate with - ;; Google Talk. We should really use a - ;; namespace-aware XML parser. - (find jabber-chatstates-xmlns - (jabber-xml-get-children xml-data (intern (concat "cha:" (symbol-name possible-node)))) - :key #'(lambda (x) (jabber-xml-get-attribute x 'xmlns:cha)) - :test #'string=)))) - (when state - (setq jabber-chatstates-requested t) - (return possible-node))))) - (jabber-chatstates-update-message)))))) + (setq jabber-chatstates-last-state state) + (jabber-chatstates-update-message))))))) ;; Add function last in chain, so a chat buffer is already created. (add-to-list 'jabber-message-chain 'jabber-handle-incoming-message-chatstates t) |
From: Magnus H. <leg...@us...> - 2007-10-26 14:04:47
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv10641 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-419 Creator: Magnus Henoch <ma...@fr...> Add feedback in echo area for accepting/declining subscription request Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- jabber-presence.el 19 Sep 2007 09:06:45 -0000 1.36 +++ jabber-presence.el 26 Oct 2007 14:04:42 -0000 1.37 @@ -202,12 +202,15 @@ (run-hook-with-args hook (jabber-jid-symbol from) nil "subscribe" presence-status (funcall jabber-alert-presence-message-function (jabber-jid-symbol from) nil "subscribe" presence-status))))) (defun jabber-subscription-accept-mutual (&rest ignored) + (message "Subscription accepted; reciprocal subscription request sent") (jabber-subscription-reply "subscribed" "subscribe")) (defun jabber-subscription-accept-one-way (&rest ignored) + (message "Subscription accepted") (jabber-subscription-reply "subscribed")) (defun jabber-subscription-decline (&rest ignored) + (message "Subscription declined") (jabber-subscription-reply "unsubscribed")) (defun jabber-subscription-reply (&rest types) |
From: Magnus H. <leg...@us...> - 2007-09-19 09:06:49
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv13686 Modified Files: jabber-presence.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-418 Creator: Magnus Henoch <ma...@fr...> Clarify roster push source address error message Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- jabber-presence.el 17 Sep 2007 12:26:16 -0000 1.35 +++ jabber-presence.el 19 Sep 2007 09:06:45 -0000 1.36 @@ -50,7 +50,9 @@ (if (not (or (null from) (string= from (concat username "@" server)) (string= from (concat username "@" server "/" resource)))) - (message "Roster push with invalid \"from\": \"%s\"" from) + (message "Roster push with invalid \"from\": \"%s\" (expected \"%s@%s\" or \"%s@%s/%s\")" + from + username server username server resource) (dolist (item (jabber-xml-get-children (car (jabber-xml-get-children xml-data 'query)) 'item)) (let (roster-item |
From: Magnus H. <leg...@us...> - 2007-09-19 09:06:40
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv13669 Modified Files: jabber-chat.el jabber-muc.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-417 Creator: Magnus Henoch <ma...@fr...> Don't use jabber-nickname Index: jabber-chat.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-chat.el,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- jabber-chat.el 17 Sep 2007 12:26:07 -0000 1.84 +++ jabber-chat.el 19 Sep 2007 09:06:37 -0000 1.85 @@ -540,7 +540,7 @@ (let ((action (substring body 4)) (nick (cond ((eq who :local) - jabber-nickname) + (plist-get (fsm-get-state-data jabber-buffer-connection) :username)) ((jabber-muc-message-p xml-data) (jabber-jid-resource (jabber-xml-get-attribute xml-data 'from))) (t Index: jabber-muc.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-muc.el,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- jabber-muc.el 24 Aug 2007 01:36:06 -0000 1.71 +++ jabber-muc.el 19 Sep 2007 09:06:37 -0000 1.72 @@ -408,7 +408,7 @@ (interactive (let ((account (jabber-read-account)) (group (jabber-read-jid-completing "group: "))) - (list account group (jabber-muc-read-my-nickname group) t))) + (list account group (jabber-muc-read-my-nickname group (plist-get (fsm-get-state-data account) :username)) t))) ;; If the user is already in the room, we don't need as many checks. (if (or (assoc group *jabber-active-groupchats*) @@ -479,12 +479,12 @@ (let ((buffer (jabber-muc-create-buffer jc group))) (switch-to-buffer buffer)))) -(defun jabber-muc-read-my-nickname (group) +(defun jabber-muc-read-my-nickname (group default) "Read nickname for joining GROUP." (let ((default-nickname (or ;; XXX: use bookmarks (cdr (assoc group jabber-muc-default-nicknames)) - jabber-nickname))) + default))) (jabber-read-with-input-method (format "Nickname: (default %s) " default-nickname) nil nil default-nickname))) @@ -647,7 +647,7 @@ (let ((action `(lambda (&rest ignore) (interactive) (jabber-groupchat-join jabber-buffer-connection ,group - (jabber-muc-read-my-nickname ,group))))) + (jabber-muc-read-my-nickname ,group ,(plist-get (fsm-get-state-data jabber-buffer-connection) :username)))))) (if (fboundp 'insert-button) (insert-button "Accept" 'action action) @@ -689,20 +689,21 @@ (defun jabber-muc-autojoin (jc) "Join rooms specified in account bookmarks and global `jabber-muc-autojoin'." (interactive (list (jabber-read-account))) - (when (bound-and-true-p jabber-muc-autojoin) - (dolist (group jabber-muc-autojoin) - (jabber-groupchat-join jc group (or - (cdr (assoc group jabber-muc-default-nicknames)) - jabber-nickname)))) - (jabber-get-bookmarks - jc - (lambda (jc bookmarks) - (dolist (bookmark bookmarks) - (setq bookmark (jabber-parse-conference-bookmark bookmark)) - (when (and bookmark (plist-get bookmark :autojoin)) - (jabber-groupchat-join jc (plist-get bookmark :jid) - (or (plist-get bookmark :nick) - jabber-nickname))))))) + (let ((nickname (plist-get (fsm-get-state-data jc) :username))) + (when (bound-and-true-p jabber-muc-autojoin) + (dolist (group jabber-muc-autojoin) + (jabber-groupchat-join jc group (or + (cdr (assoc group jabber-muc-default-nicknames)) + (plist-get (fsm-get-state-data jc) :username))))) + (jabber-get-bookmarks + jc + (lambda (jc bookmarks) + (dolist (bookmark bookmarks) + (setq bookmark (jabber-parse-conference-bookmark bookmark)) + (when (and bookmark (plist-get bookmark :autojoin)) + (jabber-groupchat-join jc (plist-get bookmark :jid) + (or (plist-get bookmark :nick) + (plist-get (fsm-get-state-data jc) :username))))))))) (defun jabber-muc-message-p (message) "Return non-nil if MESSAGE is a groupchat message. |