diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/connection.c | 10 | ||||
-rw-r--r-- | src/xmpp/iq.c | 56 | ||||
-rw-r--r-- | src/xmpp/message.c | 42 | ||||
-rw-r--r-- | src/xmpp/presence.c | 34 | ||||
-rw-r--r-- | src/xmpp/roster.c | 12 |
5 files changed, 77 insertions, 77 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index c51652fa..295c8f2f 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -438,7 +438,7 @@ _connection_handler(xmpp_conn_t * const conn, // logged in with account if (saved_account.name != NULL) { log_debug("Connection handler: logged in with account name: %s", saved_account.name); - handle_login_account_success(saved_account.name); + srv_login_account_success(saved_account.name); // logged in without account, use details to create new account } else { @@ -446,7 +446,7 @@ _connection_handler(xmpp_conn_t * const conn, accounts_add(saved_details.name, saved_details.altdomain, saved_details.port); accounts_set_jid(saved_details.name, saved_details.jid); - handle_login_account_success(saved_details.name); + srv_login_account_success(saved_details.name); saved_account.name = strdup(saved_details.name); saved_account.passwd = strdup(saved_details.passwd); @@ -486,7 +486,7 @@ _connection_handler(xmpp_conn_t * const conn, // lost connection for unknown reason if (jabber_conn.conn_status == JABBER_CONNECTED) { log_debug("Connection handler: Lost connection for unknown reason"); - handle_lost_connection(); + srv_lost_connection(); if (prefs_get_reconnect() != 0) { assert(reconnect_timer == NULL); reconnect_timer = g_timer_new(); @@ -503,7 +503,7 @@ _connection_handler(xmpp_conn_t * const conn, log_debug("Connection handler: Login failed"); if (reconnect_timer == NULL) { log_debug("Connection handler: No reconnect timer"); - handle_failed_login(); + srv_failed_login(); _connection_free_saved_account(); _connection_free_saved_details(); _connection_free_session_data(); @@ -563,7 +563,7 @@ _xmpp_file_logger(void * const userdata, const xmpp_log_level_t level, log_level_t prof_level = _get_log_level(level); log_msg(prof_level, area, msg); if ((g_strcmp0(area, "xmpp") == 0) || (g_strcmp0(area, "conn")) == 0) { - handle_xmpp_stanza(msg); + srv_xmpp_stanza(msg); } } diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index adee07b8..71876cdc 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -515,7 +515,7 @@ _pong_handler(xmpp_conn_t *const conn, xmpp_stanza_t * const stanza, if (errtype != NULL) { if (strcmp(errtype, "cancel") == 0) { log_warning("Server ping (id=%s) error type 'cancel', disabling autoping.", id); - handle_autoping_cancel(); + srv_autoping_cancel(); xmpp_timed_handler_delete(conn, _ping_timed_handler); } } @@ -739,7 +739,7 @@ _enable_carbons_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, char *type = xmpp_stanza_get_type(stanza); if (g_strcmp0(type, "error") == 0) { char *error_message = stanza_get_error_message(stanza); - handle_enable_carbons_error(error_message); + srv_enable_carbons_error(error_message); log_debug("Error enabling carbons: %s", error_message); } else { log_debug("Message carbons enabled."); @@ -754,7 +754,7 @@ _disable_carbons_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, char *type = xmpp_stanza_get_type(stanza); if (g_strcmp0(type, "error") == 0) { char *error_message = stanza_get_error_message(stanza); - handle_disable_carbons_error(error_message); + srv_disable_carbons_error(error_message); log_debug("Error disabling carbons: %s", error_message); } else { log_debug("Message carbons disabled."); @@ -774,7 +774,7 @@ _manual_pong_handler(xmpp_conn_t *const conn, xmpp_stanza_t * const stanza, // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_ping_error_result(from, error_message); + srv_ping_error_result(from, error_message); free(error_message); g_date_time_unref(sent); return 0; @@ -788,7 +788,7 @@ _manual_pong_handler(xmpp_conn_t *const conn, xmpp_stanza_t * const stanza, g_date_time_unref(sent); g_date_time_unref(now); - handle_ping_result(from, elapsed_millis); + srv_ping_result(from, elapsed_millis); return 0; } @@ -865,7 +865,7 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, presence = string_from_resource_presence(resource->presence); } - handle_software_version_result(jid, presence, name_str, version_str, os_str); + srv_software_version_result(jid, presence, name_str, version_str, os_str); jid_destroy(jidp); @@ -1062,7 +1062,7 @@ _destroy_room_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const sta if (from == NULL) { log_error("No from attribute for IQ destroy room result"); } else { - handle_room_destroy(from); + srv_room_destroy(from); } return 0; @@ -1085,40 +1085,40 @@ _room_config_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_configuration_form_error(from, error_message); + srv_room_configuration_form_error(from, error_message); free(error_message); return 0; } if (from == NULL) { log_warning("No from attribute for IQ config request result"); - handle_room_configuration_form_error(from, "No from attribute for room cofig response."); + srv_room_configuration_form_error(from, "No from attribute for room cofig response."); return 0; } xmpp_stanza_t *query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_QUERY); if (query == NULL) { log_warning("No query element found parsing room config response"); - handle_room_configuration_form_error(from, "No query element found parsing room config response"); + srv_room_configuration_form_error(from, "No query element found parsing room config response"); return 0; } xmpp_stanza_t *x = xmpp_stanza_get_child_by_ns(query, STANZA_NS_DATA); if (x == NULL) { log_warning("No x element found with %s namespace parsing room config response", STANZA_NS_DATA); - handle_room_configuration_form_error(from, "No form configuration options available"); + srv_room_configuration_form_error(from, "No form configuration options available"); return 0; } char *form_type = xmpp_stanza_get_attribute(x, STANZA_ATTR_TYPE); if (g_strcmp0(form_type, "form") != 0) { log_warning("x element not of type 'form' parsing room config response"); - handle_room_configuration_form_error(from, "Form not of type 'form' parsing room config response."); + srv_room_configuration_form_error(from, "Form not of type 'form' parsing room config response."); return 0; } DataForm *form = form_create(x); - handle_room_configure(from, form); + srv_room_configure(from, form); return 0; } @@ -1140,7 +1140,7 @@ static int _room_affiliation_set_result_handler(xmpp_conn_t * const conn, xmpp_s // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); + srv_room_affiliation_set_error(from, affiliation_set->item, affiliation_set->privilege, error_message); free(error_message); } @@ -1168,7 +1168,7 @@ static int _room_role_set_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_role_set_error(from, role_set->item, role_set->privilege, error_message); + srv_room_role_set_error(from, role_set->item, role_set->privilege, error_message); free(error_message); } @@ -1196,7 +1196,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_affiliation_list_result_error(from, affiliation, error_message); + srv_room_affiliation_list_result_error(from, affiliation, error_message); free(error_message); free(affiliation); return 0; @@ -1218,7 +1218,7 @@ _room_affiliation_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * } } - handle_room_affiliation_list(from, affiliation, jids); + srv_room_affiliation_list(from, affiliation, jids); free(affiliation); g_slist_free(jids); @@ -1242,7 +1242,7 @@ _room_role_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const s // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_role_list_result_error(from, role, error_message); + srv_room_role_list_result_error(from, role, error_message); free(error_message); free(role); return 0; @@ -1264,7 +1264,7 @@ _room_role_list_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const s } } - handle_room_role_list(from, role, nicks); + srv_room_role_list(from, role, nicks); free(role); g_slist_free(nicks); @@ -1288,12 +1288,12 @@ _room_config_submit_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stan // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_config_submit_result_error(from, error_message); + srv_room_config_submit_result_error(from, error_message); free(error_message); return 0; } - handle_room_config_submit_result(from); + srv_room_config_submit_result(from); return 0; } @@ -1315,7 +1315,7 @@ _room_kick_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_room_kick_result_error(from, nick, error_message); + srv_room_kick_result_error(from, nick, error_message); free(error_message); free(nick); return 0; @@ -1359,7 +1359,7 @@ _room_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stan if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { if (cb_data->display) { char *error_message = stanza_get_error_message(stanza); - handle_room_info_error(cb_data->room, error_message); + srv_room_info_error(cb_data->room, error_message); free(error_message); } free(cb_data->room); @@ -1411,7 +1411,7 @@ _room_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stan child = xmpp_stanza_get_next(child); } - handle_room_disco_info(cb_data->room, identities, features, cb_data->display); + srv_room_disco_info(cb_data->room, identities, features, cb_data->display); g_slist_free_full(features, free); g_slist_free_full(identities, (GDestroyNotify)_identity_destroy); @@ -1439,7 +1439,7 @@ _disco_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const sta // handle error responses if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { char *error_message = stanza_get_error_message(stanza); - handle_disco_info_error(from, error_message); + srv_disco_info_error(from, error_message); free(error_message); return 0; } @@ -1488,7 +1488,7 @@ _disco_info_response_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const sta child = xmpp_stanza_get_next(child); } - handle_disco_info(from, identities, features); + srv_disco_info(from, identities, features); g_slist_free_full(features, free); g_slist_free_full(identities, (GDestroyNotify)_identity_destroy); @@ -1536,9 +1536,9 @@ _disco_items_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stan } if (g_strcmp0(id, "confreq") == 0) { - handle_room_list(items, from); + srv_room_list(items, from); } else if (g_strcmp0(id, "discoitemsreq") == 0) { - handle_disco_items(items, from); + srv_disco_items(items, from); } g_slist_free_full(items, (GDestroyNotify)_item_destroy); diff --git a/src/xmpp/message.c b/src/xmpp/message.c index ac20cbaf..8febbe11 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -299,7 +299,7 @@ _message_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, g_string_free(log_msg, TRUE); - handle_message_error(jid, type, err_msg); + srv_message_error(jid, type, err_msg); free(err_msg); @@ -346,7 +346,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, password = xmpp_stanza_get_text(password_st); } - handle_room_invite(INVITE_MEDIATED, invitor, room, reason, password); + srv_room_invite(INVITE_MEDIATED, invitor, room, reason, password); jid_destroy(jidp); if (reason) { xmpp_free(ctx, reason); @@ -390,7 +390,7 @@ _conference_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, reason = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_REASON); password = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_PASSWORD); - handle_room_invite(INVITE_DIRECT, invitor, room, reason, password); + srv_room_invite(INVITE_DIRECT, invitor, room, reason, password); jid_destroy(jidp); @@ -414,7 +414,7 @@ _captcha_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, if (body != NULL) { char *message = xmpp_stanza_get_text(body); if (message != NULL) { - handle_room_broadcast(from, message); + srv_room_broadcast(from, message); xmpp_free(ctx, message); } } @@ -435,7 +435,7 @@ _groupchat_handler(xmpp_conn_t * const conn, xmpp_stanza_t *subject = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_SUBJECT); if (subject != NULL) { message = xmpp_stanza_get_text(subject); - handle_room_subject(jid->barejid, jid->resourcepart, message); + srv_room_subject(jid->barejid, jid->resourcepart, message); xmpp_free(ctx, message); jid_destroy(jid); @@ -448,7 +448,7 @@ _groupchat_handler(xmpp_conn_t * const conn, if (body != NULL) { message = xmpp_stanza_get_text(body); if (message != NULL) { - handle_room_broadcast(room_jid, message); + srv_room_broadcast(room_jid, message); xmpp_free(ctx, message); } } @@ -480,9 +480,9 @@ _groupchat_handler(xmpp_conn_t * const conn, message = xmpp_stanza_get_text(body); if (message != NULL) { if (delayed) { - handle_room_history(jid->barejid, jid->resourcepart, tv_stamp, message); + srv_room_history(jid->barejid, jid->resourcepart, tv_stamp, message); } else { - handle_room_message(jid->barejid, jid->resourcepart, message); + srv_room_message(jid->barejid, jid->resourcepart, message); } xmpp_free(ctx, message); } @@ -536,7 +536,7 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, char *fulljid = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM); if (fulljid) { Jid *jidp = jid_create(fulljid); - handle_message_receipt(jidp->barejid, id); + srv_message_receipt(jidp->barejid, id); jid_destroy(jidp); return 1; } @@ -573,11 +573,11 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, if (message != NULL) { // if we are the recipient, treat as standard incoming message if(g_strcmp0(my_jid->barejid, jid_to->barejid) == 0){ - handle_incoming_message(jid_from->barejid, jid_from->resourcepart, message); + srv_incoming_message(jid_from->barejid, jid_from->resourcepart, message); } // else treat as a sent message else{ - handle_carbon(jid_to->barejid, message); + srv_carbon(jid_to->barejid, message); } xmpp_free(ctx, message); } @@ -615,9 +615,9 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, char *message = xmpp_stanza_get_text(body); if (message != NULL) { if (delayed) { - handle_delayed_private_message(jid->str, message, tv_stamp); + srv_delayed_private_message(jid->str, message, tv_stamp); } else { - handle_incoming_private_message(jid->str, message); + srv_incoming_private_message(jid->str, message); } xmpp_free(ctx, message); } @@ -639,9 +639,9 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, char *message = xmpp_stanza_get_text(body); if (message != NULL) { if (delayed) { - handle_delayed_message(jid->barejid, message, tv_stamp); + srv_delayed_message(jid->barejid, message, tv_stamp); } else { - handle_incoming_message(jid->barejid, jid->resourcepart, message); + srv_incoming_message(jid->barejid, jid->resourcepart, message); } if (id && prefs_get_boolean(PREF_RECEIPTS_SEND)) { xmpp_stanza_t *receipts = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_RECEIPTS); @@ -663,17 +663,17 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, gboolean paused = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_PAUSED) != NULL; gboolean inactive = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_INACTIVE) != NULL; if (gone) { - handle_gone(jid->barejid, jid->resourcepart); + srv_gone(jid->barejid, jid->resourcepart); } else if (typing) { - handle_typing(jid->barejid, jid->resourcepart); + srv_typing(jid->barejid, jid->resourcepart); } else if (paused) { - handle_paused(jid->barejid, jid->resourcepart); + srv_paused(jid->barejid, jid->resourcepart); } else if (inactive) { - handle_inactive(jid->barejid, jid->resourcepart); + srv_inactive(jid->barejid, jid->resourcepart); } else if (stanza_contains_chat_state(stanza)) { - handle_activity(jid->barejid, jid->resourcepart, TRUE); + srv_activity(jid->barejid, jid->resourcepart, TRUE); } else { - handle_activity(jid->barejid, jid->resourcepart, FALSE); + srv_activity(jid->barejid, jid->resourcepart, FALSE); } } diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 2be9780a..403ddc4e 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -372,7 +372,7 @@ _presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, } log_info("Error joining room: %s, reason: %s", fulljid->barejid, error_cond); - handle_room_join_error(fulljid->barejid, error_cond); + srv_room_join_error(fulljid->barejid, error_cond); jid_destroy(fulljid); return 1; } @@ -400,7 +400,7 @@ _presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, g_string_free(log_msg, TRUE); - handle_presence_error(from, type, err_msg); + srv_presence_error(from, type, err_msg); free(err_msg); @@ -416,7 +416,7 @@ _unsubscribed_handler(xmpp_conn_t * const conn, Jid *from_jid = jid_create(from); log_debug("Unsubscribed presence handler fired for %s", from); - handle_subscription(from_jid->barejid, PRESENCE_UNSUBSCRIBED); + srv_subscription(from_jid->barejid, PRESENCE_UNSUBSCRIBED); autocomplete_remove(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -432,7 +432,7 @@ _subscribed_handler(xmpp_conn_t * const conn, Jid *from_jid = jid_create(from); log_debug("Subscribed presence handler fired for %s", from); - handle_subscription(from_jid->barejid, PRESENCE_SUBSCRIBED); + srv_subscription(from_jid->barejid, PRESENCE_SUBSCRIBED); autocomplete_remove(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -452,7 +452,7 @@ _subscribe_handler(xmpp_conn_t * const conn, return 1; } - handle_subscription(from_jid->barejid, PRESENCE_SUBSCRIBE); + srv_subscription(from_jid->barejid, PRESENCE_SUBSCRIBE); autocomplete_add(sub_requests_ac, from_jid->barejid); jid_destroy(from_jid); @@ -480,11 +480,11 @@ _unavailable_handler(xmpp_conn_t * const conn, if (strcmp(my_jid->barejid, from_jid->barejid) !=0) { if (from_jid->resourcepart != NULL) { - handle_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str); + srv_contact_offline(from_jid->barejid, from_jid->resourcepart, status_str); // hack for servers that do not send full jid with unavailable presence } else { - handle_contact_offline(from_jid->barejid, "__prof_default", status_str); + srv_contact_offline(from_jid->barejid, "__prof_default", status_str); } } else { if (from_jid->resourcepart != NULL) { @@ -596,7 +596,7 @@ _available_handler(xmpp_conn_t * const conn, if (g_strcmp0(xmpp_presence->jid->barejid, my_jid->barejid) == 0) { connection_add_available_resource(resource); } else { - handle_contact_online(xmpp_presence->jid->barejid, resource, xmpp_presence->last_activity); + srv_contact_online(xmpp_presence->jid->barejid, resource, xmpp_presence->last_activity); } jid_destroy(my_jid); @@ -682,7 +682,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * char *new_jid = stanza_get_muc_destroy_alternative_room(stanza); char *password = stanza_get_muc_destroy_alternative_password(stanza); char *reason = stanza_get_muc_destroy_reason(stanza); - handle_room_destroyed(room, new_jid, password, reason); + srv_room_destroyed(room, new_jid, password, reason); free(password); free(reason); @@ -690,19 +690,19 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * } else if (g_slist_find_custom(status_codes, "307", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_room_kicked(room, actor, reason); + srv_room_kicked(room, actor, reason); free(reason); // banned from room } else if (g_slist_find_custom(status_codes, "301", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_room_banned(room, actor, reason); + srv_room_banned(room, actor, reason); free(reason); // normal exit } else { - handle_leave_room(room); + srv_leave_room(room); } g_slist_free_full(status_codes, free); @@ -713,7 +713,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * gboolean config_required = stanza_muc_requires_config(stanza); char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_muc_self_online(room, nick, config_required, role, affiliation, actor, reason, jid, show_str, status_str); + srv_muc_self_online(room, nick, config_required, role, affiliation, actor, reason, jid, show_str, status_str); } // handle presence from room members @@ -735,19 +735,19 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * if (g_slist_find_custom(status_codes, "307", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_room_occupent_kicked(room, nick, actor, reason); + srv_room_occupent_kicked(room, nick, actor, reason); free(reason); // banned from room } else if (g_slist_find_custom(status_codes, "301", (GCompareFunc)g_strcmp0) != NULL) { char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_room_occupent_banned(room, nick, actor, reason); + srv_room_occupent_banned(room, nick, actor, reason); free(reason); // normal exit } else { - handle_room_occupant_offline(room, nick, "offline", status_str); + srv_room_occupant_offline(room, nick, "offline", status_str); } g_slist_free_full(status_codes, free); @@ -765,7 +765,7 @@ _muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * char *actor = stanza_get_actor(stanza); char *reason = stanza_get_reason(stanza); - handle_muc_occupant_online(room, nick, jid, role, affiliation, actor, reason, show_str, status_str); + srv_muc_occupant_online(room, nick, jid, role, affiliation, actor, reason, show_str, status_str); } } diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 2e9d461b..51880d77 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -163,7 +163,7 @@ _group_add_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, { if (userdata != NULL) { GroupData *data = userdata; - handle_group_add(data->name, data->group); + srv_group_add(data->name, data->group); free(data->name); free(data->group); free(userdata); @@ -210,7 +210,7 @@ _group_remove_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, { if (userdata != NULL) { GroupData *data = userdata; - handle_group_remove(data->name, data->group); + srv_group_remove(data->name, data->group); free(data->name); free(data->group); free(userdata); @@ -260,7 +260,7 @@ _roster_set_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, roster_remove(name, barejid_lower); - handle_roster_remove(barejid_lower); + srv_roster_remove(barejid_lower); // otherwise update local roster } else { @@ -278,10 +278,10 @@ _roster_set_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, if (contact == NULL) { gboolean added = roster_add(barejid_lower, name, groups, sub, pending_out); if (added) { - handle_roster_add(barejid_lower, name); + srv_roster_add(barejid_lower, name); } } else { - handle_roster_update(barejid_lower, name, groups, sub, pending_out); + srv_roster_update(barejid_lower, name, groups, sub, pending_out); } } @@ -330,7 +330,7 @@ _roster_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, item = xmpp_stanza_get_next(item); } - handle_roster_received(); + srv_roster_received(); resource_presence_t conn_presence = accounts_get_login_presence(jabber_get_account_name()); presence_update(conn_presence, NULL, 0); |