diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-10-19 23:39:10 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-10-19 23:39:10 +0100 | 
| commit | 0eb971a6d1a996fbb76eae815145a88abebad75d (patch) | |
| tree | 52038e0cf798d50233e960a4ef2eca99dd73a1f0 /protocols | |
| parent | 13df5155b5351d8804d3cf81d6cc9280aa53f387 (diff) | |
Removing some fully dead code.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/nogaim.h | 2 | ||||
| -rw-r--r-- | protocols/oscar/aim.h | 1 | ||||
| -rw-r--r-- | protocols/oscar/bos.c | 80 | ||||
| -rw-r--r-- | protocols/oscar/oscar.c | 42 | ||||
| -rw-r--r-- | protocols/oscar/ssi.c | 71 | ||||
| -rw-r--r-- | protocols/oscar/ssi.h | 1 | 
6 files changed, 1 insertions, 196 deletions
| diff --git a/protocols/nogaim.h b/protocols/nogaim.h index a98b7054..eccf77da 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -197,7 +197,7 @@ struct prpl {  	void (* add_deny)	(struct im_connection *, char *who);  	void (* rem_permit)	(struct im_connection *, char *who);  	void (* rem_deny)	(struct im_connection *, char *who); -	/* Doesn't actually have UI hooks. */ +	/* Doesn't actually have UI hooks. Not used at all, can be removed. */  	void (* set_permit_deny)(struct im_connection *);  	/* Request profile info. Free-formatted stuff, the IM module gives back diff --git a/protocols/oscar/aim.h b/protocols/oscar/aim.h index 479f8fd0..e63c7e1c 100644 --- a/protocols/oscar/aim.h +++ b/protocols/oscar/aim.h @@ -605,7 +605,6 @@ int aim_send_warning(aim_session_t *sess, aim_conn_t *conn, const char *destsn,  int aim_nop(aim_session_t *, aim_conn_t *);  int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn);  int aim_bos_setidle(aim_session_t *, aim_conn_t *, guint32); -int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *);  int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *);  int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, guint32 caps);  int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, guint32 mask); diff --git a/protocols/oscar/bos.c b/protocols/oscar/bos.c index e7f12f79..4a1c5036 100644 --- a/protocols/oscar/bos.c +++ b/protocols/oscar/bos.c @@ -55,86 +55,6 @@ int aim_bos_setgroupperm(aim_session_t *sess, aim_conn_t *conn, guint32 mask)  	return aim_genericreq_l(sess, conn, 0x0009, 0x0004, &mask);  } -/* - * Modify permit/deny lists (group 9, types 5, 6, 7, and 8) - * - * Changes your visibility depending on changetype: - * - *  AIM_VISIBILITYCHANGE_PERMITADD: Lets provided list of names see you - *  AIM_VISIBILITYCHANGE_PERMIDREMOVE: Removes listed names from permit list - *  AIM_VISIBILITYCHANGE_DENYADD: Hides you from provided list of names - *  AIM_VISIBILITYCHANGE_DENYREMOVE: Lets list see you again - * - * list should be a list of  - * screen names in the form "Screen Name One&ScreenNameTwo&" etc. - * - * Equivelents to options in WinAIM: - *   - Allow all users to contact me: Send an AIM_VISIBILITYCHANGE_DENYADD - *      with only your name on it. - *   - Allow only users on my Buddy List: Send an  - *      AIM_VISIBILITYCHANGE_PERMITADD with the list the same as your - *      buddy list - *   - Allow only the uesrs below: Send an AIM_VISIBILITYCHANGE_PERMITADD  - *      with everyone listed that you want to see you. - *   - Block all users: Send an AIM_VISIBILITYCHANGE_PERMITADD with only  - *      yourself in the list - *   - Block the users below: Send an AIM_VISIBILITYCHANGE_DENYADD with - *      the list of users to be blocked - * - * XXX ye gods. - */ -int aim_bos_changevisibility(aim_session_t *sess, aim_conn_t *conn, int changetype, const char *denylist) -{ -	aim_frame_t *fr; -	int packlen = 0; -	guint16 subtype; -	char *localcpy = NULL, *tmpptr = NULL; -	int i; -	int listcount; -	aim_snacid_t snacid; - -	if (!denylist) -		return -EINVAL; - -	if (changetype == AIM_VISIBILITYCHANGE_PERMITADD) -		subtype = 0x05; -	else if (changetype == AIM_VISIBILITYCHANGE_PERMITREMOVE) -		subtype = 0x06; -	else if (changetype == AIM_VISIBILITYCHANGE_DENYADD) -		subtype = 0x07; -	else if (changetype == AIM_VISIBILITYCHANGE_DENYREMOVE) -		subtype = 0x08; -	else -		return -EINVAL; - -	localcpy = g_strdup(denylist); - -	listcount = aimutil_itemcnt(localcpy, '&'); -	packlen = aimutil_tokslen(localcpy, 99, '&') + listcount + 9; - -	if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, packlen))) { -		g_free(localcpy); -		return -ENOMEM; -	} - -	snacid = aim_cachesnac(sess, 0x0009, subtype, 0x0000, NULL, 0); -	aim_putsnac(&fr->data, 0x0009, subtype, 0x00, snacid); - -	for (i = 0; (i < (listcount - 1)) && (i < 99); i++) { -		tmpptr = aimutil_itemidx(localcpy, i, '&'); - -		aimbs_put8(&fr->data, strlen(tmpptr)); -		aimbs_putraw(&fr->data, (guint8 *)tmpptr, strlen(tmpptr)); - -		g_free(tmpptr); -	} -	g_free(localcpy); - -	aim_tx_enqueue(sess, fr); - -	return 0; -} -  static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)  { diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 1366fe41..a5e177e9 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -2102,47 +2102,6 @@ static int gaim_ssi_parseack( aim_session_t *sess, aim_frame_t *fr, ... )  	return( 1 );  } -static void oscar_set_permit_deny(struct im_connection *ic) { -	struct oscar_data *od = (struct oscar_data *)ic->proto_data; -	if (od->icq) { -		GSList *list; -		char buf[MAXMSGLEN]; -		int at; - -		switch(ic->permdeny) { -		case 1: -			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->acc->user); -			break; -		case 2: -			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->acc->user); -			break; -		case 3: -			list = ic->permit; -			at = 0; -			while (list) { -				at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); -				list = list->next; -			} -			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf); -			break; -		case 4: -			list = ic->deny; -			at = 0; -			while (list) { -				at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); -				list = list->next; -			} -			aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf); -			break; -			default: -			break; -		} -	} else { -		if (od->sess->ssi.received_data) -			aim_ssi_setpermdeny(od->sess, od->conn, ic->permdeny, 0xffffffff); -	} -} -  static void oscar_add_permit(struct im_connection *ic, char *who) {  	struct oscar_data *od = (struct oscar_data *)ic->proto_data;  	if (od->icq) { @@ -2623,7 +2582,6 @@ void oscar_initmodule()  	ret->add_deny = oscar_add_deny;  	ret->rem_permit = oscar_rem_permit;  	ret->rem_deny = oscar_rem_deny; -	ret->set_permit_deny = oscar_set_permit_deny;  	ret->send_typing = oscar_send_typing;  	ret->handle_cmp = aim_sncmp; diff --git a/protocols/oscar/ssi.c b/protocols/oscar/ssi.c index f37d98e5..14201a44 100644 --- a/protocols/oscar/ssi.c +++ b/protocols/oscar/ssi.c @@ -999,77 +999,6 @@ int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned i  }  /** - * Stores your permit/deny setting on the server, and starts using it. - * - * @param sess The oscar session. - * @param conn The bos connection for this session. - * @param permdeny Your permit/deny setting.  Can be one of the following: - *        1 - Allow all users - *        2 - Block all users - *        3 - Allow only the users below - *        4 - Block only the users below - *        5 - Allow only users on my buddy list - * @param vismask A bitmask of the class of users to whom you want to be  - *        visible.  See the AIM_FLAG_BLEH #defines in aim.h - * @return Return 0 if no errors, otherwise return the error number. - */ -int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, guint8 permdeny, guint32 vismask) { -	struct aim_ssi_item *cur; //, *tmp; -//	guint16 j; -	aim_tlv_t *tlv; - -	if (!sess || !conn) -		return -EINVAL; - -	/* Look up the permit/deny settings item */ -	cur = aim_ssi_itemlist_finditem(sess->ssi.items, NULL, NULL, AIM_SSI_TYPE_PDINFO); - -	if (cur) { -		/* The permit/deny item exists */ -		if (cur->data && (tlv = aim_gettlv(cur->data, 0x00ca, 1))) { -			/* Just change the value of the x00ca TLV */ -			if (tlv->length != 1) { -				tlv->length = 1; -				g_free(tlv->value); -				tlv->value = (guint8 *)g_malloc(sizeof(guint8)); -			} -			tlv->value[0] = permdeny; -		} else { -			/* Need to add the x00ca TLV to the TLV chain */ -			aim_addtlvtochain8((aim_tlvlist_t**)&cur->data, 0x00ca, permdeny); -		} - -		if (cur->data && (tlv = aim_gettlv(cur->data, 0x00cb, 1))) { -			/* Just change the value of the x00cb TLV */ -			if (tlv->length != 4) { -				tlv->length = 4; -				g_free(tlv->value); -				tlv->value = (guint8 *)g_malloc(4*sizeof(guint8)); -			} -			aimutil_put32(tlv->value, vismask); -		} else { -			/* Need to add the x00cb TLV to the TLV chain */ -			aim_addtlvtochain32((aim_tlvlist_t**)&cur->data, 0x00cb, vismask); -		} - -		/* Send the mod item SNAC */ -		aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_MOD); -	} else { -		/* Need to add the permit/deny item */ -		if (!(cur = aim_ssi_itemlist_add(&sess->ssi.items, NULL, NULL, AIM_SSI_TYPE_PDINFO))) -			return -ENOMEM; -		aim_addtlvtochain8((aim_tlvlist_t**)&cur->data, 0x00ca, permdeny); -		aim_addtlvtochain32((aim_tlvlist_t**)&cur->data, 0x00cb, vismask); -		aim_ssi_addmoddel(sess, conn, &cur, 1, AIM_CB_SSI_ADD); -	} - -	/* Begin sending SSI SNACs */ -	aim_ssi_dispatch(sess, conn); - -	return 0; -} - -/**   * Stores your setting for whether you should show up as idle or not.   *   * @param sess The oscar session. diff --git a/protocols/oscar/ssi.h b/protocols/oscar/ssi.h index 94b18d60..d01bcea4 100644 --- a/protocols/oscar/ssi.h +++ b/protocols/oscar/ssi.h @@ -70,7 +70,6 @@ int aim_ssi_delmastergroup(aim_session_t *sess, aim_conn_t *conn);  int aim_ssi_delgroups(aim_session_t *sess, aim_conn_t *conn, char **gn, unsigned int num);  int aim_ssi_deletelist(aim_session_t *sess, aim_conn_t *conn);  int aim_ssi_delpord(aim_session_t *sess, aim_conn_t *conn, char **sn, unsigned int num, guint16 type); -int aim_ssi_setpermdeny(aim_session_t *sess, aim_conn_t *conn, guint8 permdeny, guint32 vismask);  int aim_ssi_setpresence(aim_session_t *sess, aim_conn_t *conn, guint32 presence);  int aim_ssi_auth_request(aim_session_t *sess, aim_conn_t *conn, char *uin, char *reason);  int aim_ssi_auth_reply(aim_session_t *sess, aim_conn_t *conn, char *uin, int yesno, char *reason); | 
