- Timestamp:
- 2009-01-07T00:58:15Z (16 years ago)
- Branches:
- master
- Children:
- 359f4d9
- Parents:
- 5258dcc9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skype.c
r5258dcc9 r8c09bb3 165 165 { 166 166 struct skype_buddy_ask_data *bla = data; 167 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED TRUE", bla->handle); 167 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED TRUE", 168 bla->handle); 168 169 skype_write(bla->ic, buf); 169 170 g_free(buf); … … 175 176 { 176 177 struct skype_buddy_ask_data *bla = data; 177 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED FALSE", bla->handle); 178 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED FALSE", 179 bla->handle); 178 180 skype_write(bla->ic, buf); 179 181 g_free(buf); … … 184 186 void skype_buddy_ask(struct im_connection *ic, char *handle, char *message) 185 187 { 186 struct skype_buddy_ask_data *bla = g_new0(struct skype_buddy_ask_data, 1); 188 struct skype_buddy_ask_data *bla = g_new0(struct skype_buddy_ask_data, 189 1); 187 190 char *buf; 188 191 … … 190 193 bla->handle = g_strdup(handle); 191 194 192 buf = g_strdup_printf("The user %s wants to add you to his/her buddy list, saying: '%s'.", handle, message); 195 buf = g_strdup_printf("The user %s wants to add you to " 196 "his/her buddy list, saying: '%s'.", handle, message); 193 197 imcb_ask(ic, buf, bla, skype_buddy_ask_yes, skype_buddy_ask_no); 194 198 g_free(buf); … … 198 202 { 199 203 struct skype_buddy_ask_data *bla = data; 200 char *buf = g_strdup_printf("SET CALL %s STATUS INPROGRESS", bla->handle); 204 char *buf = g_strdup_printf("SET CALL %s STATUS INPROGRESS", 205 bla->handle); 201 206 skype_write(bla->ic, buf); 202 207 g_free(buf); … … 208 213 { 209 214 struct skype_buddy_ask_data *bla = data; 210 char *buf = g_strdup_printf("SET CALL %s STATUS FINISHED", bla->handle); 215 char *buf = g_strdup_printf("SET CALL %s STATUS FINISHED", 216 bla->handle); 211 217 skype_write(bla->ic, buf); 212 218 g_free(buf); … … 217 223 void skype_call_ask(struct im_connection *ic, char *call_id, char *message) 218 224 { 219 struct skype_buddy_ask_data *bla = g_new0(struct skype_buddy_ask_data, 1); 225 struct skype_buddy_ask_data *bla = g_new0(struct skype_buddy_ask_data, 226 1); 220 227 221 228 bla->ic = ic; … … 267 274 } 268 275 269 static gboolean skype_read_callback(gpointer data, gint fd, b_input_condition cond) 276 static gboolean skype_read_callback(gpointer data, gint fd, 277 b_input_condition cond) 270 278 { 271 279 struct im_connection *ic = data; … … 802 810 803 811 if (sd->bfd <= 0) 804 sd->bfd = b_input_add(sd->fd, GAIM_INPUT_READ, skype_read_callback, ic); 812 sd->bfd = b_input_add(sd->fd, GAIM_INPUT_READ, 813 skype_read_callback, ic); 805 814 806 815 /* Log in */ … … 851 860 852 861 imcb_log(ic, "Connecting"); 853 sd->ssl = ssl_connect(set_getstr(&acc->set, "server"), set_getint(&acc->set, "port"), skype_connected, ic); 862 sd->ssl = ssl_connect(set_getstr(&acc->set, "server"), 863 set_getint(&acc->set, "port"), skype_connected, ic); 854 864 sd->fd = sd->ssl ? ssl_getfd(sd->ssl) : -1; 855 865 sd->username = g_strdup(acc->user); … … 876 886 } 877 887 878 static int skype_buddy_msg(struct im_connection *ic, char *who, char *message, int flags) 888 static int skype_buddy_msg(struct im_connection *ic, char *who, char *message, 889 int flags) 879 890 { 880 891 char *buf, *ptr, *nick; … … 908 919 } 909 920 910 static void skype_set_away(struct im_connection *ic, char *state_txt, char *message) 921 static void skype_set_away(struct im_connection *ic, char *state_txt, 922 char *message) 911 923 { 912 924 const struct skype_away_state *state; … … 929 941 if (l == NULL) 930 942 for (i = 0; skype_away_state_list[i].full_name; i++) 931 l = g_list_append(l, (void *)skype_away_state_list[i].full_name); 943 l = g_list_append(l, 944 (void *)skype_away_state_list[i].full_name); 932 945 933 946 return l; … … 983 996 /* We are ending a call */ 984 997 if (sd->call_id) { 985 buf = g_strdup_printf("SET CALL %s STATUS FINISHED", sd->call_id); 998 buf = g_strdup_printf("SET CALL %s STATUS FINISHED", 999 sd->call_id); 986 1000 skype_write(ic, buf); 987 1001 g_free(buf); … … 1002 1016 if (ptr) 1003 1017 *ptr = '\0'; 1004 buf = g_strdup_printf("SET USER %s BUDDYSTATUS 2 Please authorize me\n", nick); 1018 buf = g_strdup_printf("SET USER %s BUDDYSTATUS 2 Please authorize me\n", 1019 nick); 1005 1020 skype_write(ic, buf); 1006 1021 g_free(nick); … … 1058 1073 struct skype_data *sd = ic->proto_data; 1059 1074 char *buf; 1060 buf = g_strdup_printf("ALTER CHAT %s SETTOPIC %s\n", gc->title, message); 1075 buf = g_strdup_printf("ALTER CHAT %s SETTOPIC %s\n", 1076 gc->title, message); 1061 1077 skype_write(ic, buf); 1062 1078 g_free(buf); … … 1145 1161 set_t *s; 1146 1162 1147 s = set_add(&acc->set, "server", SKYPE_DEFAULT_SERVER, set_eval_account, acc); 1163 s = set_add(&acc->set, "server", SKYPE_DEFAULT_SERVER, set_eval_account, 1164 acc); 1148 1165 s->flags |= ACC_SET_OFFLINE_ONLY; 1149 1166 … … 1151 1168 s->flags |= ACC_SET_OFFLINE_ONLY; 1152 1169 1153 s = set_add(&acc->set, "display_name", NULL, skype_set_display_name, acc); 1170 s = set_add(&acc->set, "display_name", NULL, skype_set_display_name, 1171 acc); 1154 1172 s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY; 1155 1173 … … 1165 1183 s->flags |= ACC_SET_OFFLINE_ONLY; 1166 1184 1167 s = set_add(&acc->set, "skypeconsole_receive", "false", set_eval_bool, acc); 1185 s = set_add(&acc->set, "skypeconsole_receive", "false", set_eval_bool, 1186 acc); 1168 1187 s->flags |= ACC_SET_OFFLINE_ONLY; 1169 1188 … … 1195 1214 register_protocol(ret); 1196 1215 } 1197 1198 /* vim: set ts=2 sw=2 noet: */
Note: See TracChangeset
for help on using the changeset viewer.