changeset 7474:2bdacd38528c

[gaim-migrate @ 8087] I renamed aim_bos_setidle to aim_srv_setidle, and removed the conn parameter. Also some other minor internal changes. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 11 Nov 2003 05:57:24 +0000
parents 859e4cf4d472
children 08ce2a94d9c7
files src/protocols/oscar/aim.h src/protocols/oscar/aim_internal.h src/protocols/oscar/conn.c src/protocols/oscar/oscar.c src/protocols/oscar/service.c
diffstat 5 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h	Tue Nov 11 05:41:44 2003 +0000
+++ b/src/protocols/oscar/aim.h	Tue Nov 11 05:57:24 2003 +0000
@@ -595,6 +595,7 @@
 
 /* 0x0001 - service.c */
 faim_export int aim_srv_setavailmsg(aim_session_t *sess, char *msg);
+faim_export int aim_srv_setidle(aim_session_t *sess, fu32_t idletime);
 
 
 
@@ -613,7 +614,6 @@
 faim_export int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn);
 faim_export int aim_nop(aim_session_t *, aim_conn_t *);
 faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn);
-faim_export int aim_bos_setidle(aim_session_t *, aim_conn_t *, fu32_t);
 faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *);
 faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask);
 faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t);
--- a/src/protocols/oscar/aim_internal.h	Tue Nov 11 05:41:44 2003 +0000
+++ b/src/protocols/oscar/aim_internal.h	Tue Nov 11 05:57:24 2003 +0000
@@ -46,7 +46,7 @@
 faim_internal int chatnav_modfirst(aim_session_t *sess, aim_module_t *mod);
 faim_internal int chat_modfirst(aim_session_t *sess, aim_module_t *mod);
 faim_internal int locate_modfirst(aim_session_t *sess, aim_module_t *mod);
-faim_internal int general_modfirst(aim_session_t *sess, aim_module_t *mod);
+faim_internal int service_modfirst(aim_session_t *sess, aim_module_t *mod);
 faim_internal int invite_modfirst(aim_session_t *sess, aim_module_t *mod);
 faim_internal int translate_modfirst(aim_session_t *sess, aim_module_t *mod);
 faim_internal int popups_modfirst(aim_session_t *sess, aim_module_t *mod);
--- a/src/protocols/oscar/conn.c	Tue Nov 11 05:41:44 2003 +0000
+++ b/src/protocols/oscar/conn.c	Tue Nov 11 05:57:24 2003 +0000
@@ -900,7 +900,7 @@
 	 * Register all the modules for this session...
 	 */
 	aim__registermodule(sess, misc_modfirst); /* load the catch-all first */
-	aim__registermodule(sess, general_modfirst);
+	aim__registermodule(sess, service_modfirst);
 	aim__registermodule(sess, locate_modfirst);
 	aim__registermodule(sess, buddylist_modfirst);
 	aim__registermodule(sess, msg_modfirst);
--- a/src/protocols/oscar/oscar.c	Tue Nov 11 05:41:44 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Nov 11 05:57:24 2003 +0000
@@ -3848,7 +3848,7 @@
 
 	aim_clientready(sess, fr->conn);
 	aim_srv_setavailmsg(sess, NULL);
-	aim_bos_setidle(sess, fr->conn, 0);
+	aim_srv_setidle(sess, 0);
 
 	if (od->icq) {
 		aim_icq_reqofflinemsgs(sess);
@@ -4448,7 +4448,7 @@
 
 static void oscar_set_idle(GaimConnection *gc, int time) {
 	OscarData *od = (OscarData *)gc->proto_data;
-	aim_bos_setidle(od->sess, od->conn, time);
+	aim_srv_setidle(od->sess, time);
 }
 
 static void oscar_set_info(GaimConnection *gc, const char *text) {
--- a/src/protocols/oscar/service.c	Tue Nov 11 05:41:44 2003 +0000
+++ b/src/protocols/oscar/service.c	Tue Nov 11 05:57:24 2003 +0000
@@ -543,8 +543,13 @@
  * call it again with zero when you're back.
  *
  */
-faim_export int aim_bos_setidle(aim_session_t *sess, aim_conn_t *conn, fu32_t idletime)
+faim_export int aim_srv_setidle(aim_session_t *sess, fu32_t idletime)
 {
+	aim_conn_t *conn;
+
+	if (!sess || !(conn = aim_conn_findbygroup(sess, AIM_CB_FAM_GEN)))
+		return -EINVAL;
+
 	return aim_genericreq_l(sess, conn, 0x0001, 0x0011, &idletime);
 }
 
@@ -1069,7 +1074,7 @@
 	return 0;
 }
 
-faim_internal int general_modfirst(aim_session_t *sess, aim_module_t *mod)
+faim_internal int service_modfirst(aim_session_t *sess, aim_module_t *mod)
 {
 
 	mod->family = 0x0001;
@@ -1077,7 +1082,7 @@
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
 	mod->flags = 0;
-	strncpy(mod->name, "general", sizeof(mod->name));
+	strncpy(mod->name, "service", sizeof(mod->name));
 	mod->snachandler = snachandler;
 
 	return 0;