147 |
gift_register_call(msg.xid, callback, user_data); |
gift_register_call(msg.xid, callback, user_data); |
148 |
} |
} |
149 |
|
|
150 |
|
void GIFTSRV_DownloadStart(RPCfunc callback, gpointer user_data, |
151 |
|
GString *searchobj, GString *resultobj) |
152 |
|
{ |
153 |
|
struct rpc_msg msg; |
154 |
|
gc_xdr_data *data_out = gc_xdr_new(); |
155 |
|
|
156 |
|
gc_rpc_init_call(&msg, GIFTSRV_PROGNUM, GIFTSRV_VERSION, 64); |
157 |
|
gc_rpc_process(&msg, data_out, XDR_ENCODE); |
158 |
|
gc_xdr_vopaque(data_out, (gpointer*) &searchobj->str, &searchobj->len, -1); |
159 |
|
gc_xdr_vopaque(data_out, (gpointer*) &resultobj->str, &resultobj->len, -1); |
160 |
|
if (gift_write(data_out) < 0) |
161 |
|
callback(NULL, NULL, user_data); |
162 |
|
gc_xdr_free(data_out); |
163 |
|
|
164 |
|
gift_register_call(msg.xid, callback, user_data); |
165 |
|
} |
166 |
|
|
167 |
/***** Functions to translate giFT specific data structures to/from XDR *****/ |
/***** Functions to translate giFT specific data structures to/from XDR *****/ |
168 |
|
|
169 |
static void GIFT_hash_encode(gc_xdr_data *blob, struct GIFT_hash_t *hash) |
static void GIFT_hash_encode(gc_xdr_data *blob, struct GIFT_hash_t *hash) |