diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-05-15 13:27:34 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-05-15 13:27:34 +0200 |
commit | fe0013a8551a788d8999f5e88c923d9ee3ebc2fb (patch) | |
tree | 213a41877f9caae15452e9f5a7c4f3473a7abdf1 /src/twister/twister_api.c | |
parent | d8deed297a0cfc340b23ffa2115c078a7312e385 (diff) | |
download | twister-fe0013a8551a788d8999f5e88c923d9ee3ebc2fb.tar.gz twister-fe0013a8551a788d8999f5e88c923d9ee3ebc2fb.tar.bz2 twister-fe0013a8551a788d8999f5e88c923d9ee3ebc2fb.zip |
export "flippers" to the internal API.
Diffstat (limited to 'src/twister/twister_api.c')
-rw-r--r-- | src/twister/twister_api.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/twister/twister_api.c b/src/twister/twister_api.c index 16bd71c..c59e37a 100644 --- a/src/twister/twister_api.c +++ b/src/twister/twister_api.c @@ -287,7 +287,7 @@ TALER_TWISTER_malform * @return operation handle (to possibly abort) */ struct TALER_TWISTER_Operation * -TALER_TWISTER_flip_path +TALER_TWISTER_flip_download (struct TALER_TWISTER_Handle *h, const char *path, GNUNET_SCHEDULER_TaskCallback cb, @@ -314,6 +314,33 @@ TALER_TWISTER_flip_path return op; } +struct TALER_TWISTER_Operation * +TALER_TWISTER_flip_upload + (struct TALER_TWISTER_Handle *h, + const char *path, + GNUNET_SCHEDULER_TaskCallback cb, + void *cb_cls) +{ + struct TALER_TWISTER_Operation *op; + struct GNUNET_MQ_Envelope *env; + struct TWISTER_FlipPath *src; //FIXME 'src' right name? + + op = GNUNET_new (struct TALER_TWISTER_Operation); + op->h = h; + op->cb = cb; + op->cb_cls = cb_cls; + GNUNET_CONTAINER_DLL_insert_tail (h->op_head, + h->op_tail, + op); + /* Prepare *env*elope. */ + env = GNUNET_MQ_msg + (src, TWISTER_MESSAGE_TYPE_FLIP_PATH_UL); + /* Put data into the envelope. */ + strcpy (src->path, path); + /* Send message. */ + GNUNET_MQ_send (h->mq, env); + return op; +} /** * Delete the object pointed to by @a path. |