| 34 * I had one big function that handled all three cases, but then it broke |
34 * I had one big function that handled all three cases, but then it broke |
| 35 * and I split it up into three. But then I fixed it. I just never went |
35 * and I split it up into three. But then I fixed it. I just never went |
| 36 * back to the single. I don't see any advantage to doing it either way. |
36 * back to the single. I don't see any advantage to doing it either way. |
| 37 * |
37 * |
| 38 */ |
38 */ |
| 39 int |
39 void |
| 40 aim_genericreq_n(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) |
40 aim_genericreq_n(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) |
| 41 { |
41 { |
| 42 FlapFrame *frame; |
42 FlapFrame *frame; |
| 43 aim_snacid_t snacid = 0x00000000; |
43 aim_snacid_t snacid = 0x00000000; |
| 44 |
44 |
| 45 frame = flap_frame_new(od, 0x02, 10); |
45 frame = flap_frame_new(od, 0x02, 10); |
| 46 |
46 |
| 47 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
47 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
| 48 |
48 |
| 49 flap_connection_send(conn, frame); |
49 flap_connection_send(conn, frame); |
| 50 |
|
| 51 return 0; |
|
| 52 } |
50 } |
| 53 |
51 |
| 54 void |
52 void |
| 55 aim_genericreq_n_snacid(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) |
53 aim_genericreq_n_snacid(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype) |
| 56 { |
54 { |
| 63 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
61 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
| 64 |
62 |
| 65 flap_connection_send(conn, frame); |
63 flap_connection_send(conn, frame); |
| 66 } |
64 } |
| 67 |
65 |
| 68 int |
66 void |
| 69 aim_genericreq_l(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint32 *longdata) |
67 aim_genericreq_l(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint32 *longdata) |
| 70 { |
68 { |
| 71 FlapFrame *frame; |
69 FlapFrame *frame; |
| 72 aim_snacid_t snacid; |
70 aim_snacid_t snacid; |
| 73 |
71 |
| 80 |
78 |
| 81 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
79 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
| 82 byte_stream_put32(&frame->data, *longdata); |
80 byte_stream_put32(&frame->data, *longdata); |
| 83 |
81 |
| 84 flap_connection_send(conn, frame); |
82 flap_connection_send(conn, frame); |
| 85 |
|
| 86 return 0; |
|
| 87 } |
83 } |
| 88 |
84 |
| 89 int |
85 void |
| 90 aim_genericreq_s(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint16 *shortdata) |
86 aim_genericreq_s(OscarData *od, FlapConnection *conn, guint16 family, guint16 subtype, guint16 *shortdata) |
| 91 { |
87 { |
| 92 FlapFrame *frame; |
88 FlapFrame *frame; |
| 93 aim_snacid_t snacid; |
89 aim_snacid_t snacid; |
| 94 |
90 |
| 101 |
97 |
| 102 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
98 aim_putsnac(&frame->data, family, subtype, 0x0000, snacid); |
| 103 byte_stream_put16(&frame->data, *shortdata); |
99 byte_stream_put16(&frame->data, *shortdata); |
| 104 |
100 |
| 105 flap_connection_send(conn, frame); |
101 flap_connection_send(conn, frame); |
| 106 |
|
| 107 return 0; |
|
| 108 } |
102 } |
| 109 |
103 |
| 110 /* |
104 /* |
| 111 * Should be generic enough to handle the errors for all groups. |
105 * Should be generic enough to handle the errors for all groups. |
| 112 * |
106 * |