Changeset 7869e48 for libfaim/chatnav.c
- Timestamp:
- Jan 12, 2013, 1:43:13 PM (12 years ago)
- Children:
- e3a0d71, 4485285
- Parents:
- 4626016
- git-author:
- Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
- git-committer:
- Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfaim/chatnav.c
rcf02dd6 r7869e48 46 46 * This looks to be a big hack. You'll note that this entire 47 47 * SNAC is just a room info structure, but the hard room name, 48 * here, is set to "create". 48 * here, is set to "create". 49 49 * 50 50 * Either this goes on the "list of questions concerning … … 57 57 aimbs_putraw(&fr->data, ck, strlen(ck)); 58 58 59 /* 59 /* 60 60 * instance 61 * 61 * 62 62 * Setting this to 0xffff apparently assigns the last instance. 63 63 * … … 95 95 tlvlist = aim_tlvlist_read(bs); 96 96 97 /* 97 /* 98 98 * Type 0x0002: Maximum concurrent rooms. 99 */ 99 */ 100 100 if (aim_tlv_gettlv(tlvlist, 0x0002, 1)) 101 101 maxrooms = aim_tlv_get8(tlvlist, 0x0002, 1); 102 102 103 /* 103 /* 104 104 * Type 0x0003: Exchange information 105 105 * 106 106 * There can be any number of these, each one 107 * representing another exchange. 108 * 107 * representing another exchange. 108 * 109 109 */ 110 110 for (curexchange = 0; ((exchangetlv = aim_tlv_gettlv(tlvlist, 0x0003, curexchange+1))); ) { … … 121 121 innerlist = aim_tlvlist_read(&tbs); 122 122 123 /* 123 /* 124 124 * Type 0x000a: Unknown. 125 125 * … … 130 130 ; 131 131 132 /* 132 /* 133 133 * Type 0x000d: Unknown. 134 134 */ … … 136 136 ; 137 137 138 /* 138 /* 139 139 * Type 0x0004: Unknown 140 140 */ … … 142 142 ; 143 143 144 /* 144 /* 145 145 * Type 0x0002: Unknown 146 146 */ … … 149 149 150 150 classperms = aim_tlv_get16(innerlist, 0x0002, 1); 151 151 152 152 faimdprintf(sess, 1, "faim: class permissions %x\n", classperms); 153 153 } … … 161 161 * 8 Occupant Peek Allowed 162 162 * 163 */ 163 */ 164 164 if (aim_tlv_gettlv(innerlist, 0x00c9, 1)) 165 165 exchanges[curexchange-1].flags = aim_tlv_get16(innerlist, 0x00c9, 1); 166 167 /* 168 * Type 0x00ca: Creation Date 166 167 /* 168 * Type 0x00ca: Creation Date 169 169 */ 170 170 if (aim_tlv_gettlv(innerlist, 0x00ca, 1)) 171 171 ; 172 172 173 173 /* 174 174 * Type 0x00d0: Mandatory Channels? … … 186 186 * Type 0x00d2: Maximum Occupancy? 187 187 */ 188 if (aim_tlv_gettlv(innerlist, 0x00d2, 1)) 188 if (aim_tlv_gettlv(innerlist, 0x00d2, 1)) 189 189 ; 190 190 … … 192 192 * Type 0x00d3: Exchange Description 193 193 */ 194 if (aim_tlv_gettlv(innerlist, 0x00d3, 1)) 194 if (aim_tlv_gettlv(innerlist, 0x00d3, 1)) 195 195 exchanges[curexchange-1].name = aim_tlv_getstr(innerlist, 0x00d3, 1); 196 196 else … … 200 200 * Type 0x00d4: Exchange Description URL 201 201 */ 202 if (aim_tlv_gettlv(innerlist, 0x00d4, 1)) 202 if (aim_tlv_gettlv(innerlist, 0x00d4, 1)) 203 203 ; 204 204 … … 209 209 * 1 Room creation allowed 210 210 * 2 Exchange creation allowed 211 * 211 * 212 212 */ 213 213 if (aim_tlv_gettlv(innerlist, 0x00d5, 1)) { … … 219 219 /* 220 220 * Type 0x00d6: Character Set (First Time) 221 */ 222 if (aim_tlv_gettlv(innerlist, 0x00d6, 1)) 221 */ 222 if (aim_tlv_gettlv(innerlist, 0x00d6, 1)) 223 223 exchanges[curexchange-1].charset1 = aim_tlv_getstr(innerlist, 0x00d6, 1); 224 224 else 225 225 exchanges[curexchange-1].charset1 = NULL; 226 226 227 227 /* 228 228 * Type 0x00d7: Language (First Time) 229 */ 230 if (aim_tlv_gettlv(innerlist, 0x00d7, 1)) 229 */ 230 if (aim_tlv_gettlv(innerlist, 0x00d7, 1)) 231 231 exchanges[curexchange-1].lang1 = aim_tlv_getstr(innerlist, 0x00d7, 1); 232 232 else … … 235 235 /* 236 236 * Type 0x00d8: Character Set (Second Time) 237 */ 238 if (aim_tlv_gettlv(innerlist, 0x00d8, 1)) 237 */ 238 if (aim_tlv_gettlv(innerlist, 0x00d8, 1)) 239 239 exchanges[curexchange-1].charset2 = aim_tlv_getstr(innerlist, 0x00d8, 1); 240 240 else … … 243 243 /* 244 244 * Type 0x00d9: Language (Second Time) 245 */ 246 if (aim_tlv_gettlv(innerlist, 0x00d9, 1)) 245 */ 246 if (aim_tlv_gettlv(innerlist, 0x00d9, 1)) 247 247 exchanges[curexchange-1].lang2 = aim_tlv_getstr(innerlist, 0x00d9, 1); 248 248 else 249 249 exchanges[curexchange-1].lang2 = NULL; 250 250 251 251 /* 252 252 * Type 0x00da: Unknown 253 253 */ 254 if (aim_tlv_gettlv(innerlist, 0x00da, 1)) 254 if (aim_tlv_gettlv(innerlist, 0x00da, 1)) 255 255 ; 256 256 … … 354 354 * Subtype 0x0009 355 355 * 356 * Since multiple things can trigger this callback, we must lookup the 356 * Since multiple things can trigger this callback, we must lookup the 357 357 * snacid to determine the original snac subtype that was called. 358 358 * … … 364 364 * Nav Short Desc = 8 365 365 * Nav Instance Info = 16 366 * And then everything is really asynchronous. There is no specific 366 * And then everything is really asynchronous. There is no specific 367 367 * attachment of a response to a create room request, for example. Creating 368 368 * the room yields no different a response than requesting the room's info.
Note: See TracChangeset
for help on using the changeset viewer.