/* * ui_file.h -- the local file dialogs * * License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. */ #ifndef _Dtchat_ui_file_h #define _Dtchat_ui_file_h #include #include "dc_internal.h" typedef struct DtFileOfferDialog DtFileOfferDialog; typedef void (*DtFileOfferAnswerFn)(int accepted, void *arg); typedef void (*DtFileSendFn)(const char *peer_id, const char *path, void *arg); /* "PEER offers NAME (SIZE bytes)" with Accept and Reject. */ DtFileOfferDialog *dtchat_file_offer_dialog(Widget parent, const char *peer, const char *name, long long size, DtFileOfferAnswerFn answer, void *arg); void dtchat_file_offer_dialog_destroy(DtFileOfferDialog *dialog); Widget dtchat_file_offer_dialog_shell(const DtFileOfferDialog *dialog); /* A file selection box; on OK FN(PEER_ID, PATH) runs and the box closes. */ void dtchat_file_send_dialog(Widget parent, const char *peer_id, const char *peer_name, DtFileSendFn fn, void *arg); #endif /* _Dtchat_ui_file_h */