/*----------------------------------------------------------------------------*/
/* async_forms.h                                                              */
/* copyright (c) innovaphone 2013                                             */
/*                                                                            */
/*----------------------------------------------------------------------------*/

NAMESPACE_BEGIN

/*----------------------------------------------------------------------------*/

#define ENUM_FORMS_ASYNC_HANDLER\
    FORMS_ASYNC_ADD_LOCALIZED_TEXT,\
    FORMS_ASYNC_CREATE,\
    FORMS_ASYNC_CHANGE_LOCALIZED_TEXT,\
    FORMS_ASYNC_SET_FORMS_PROPERTY,\
    FORMS_ASYNC_WEBSERVER_STARTED,\
    FORMS_ASYNC_ADD_LOCAL_NOTIFICATION,\
    FORMS_ASYNC_REMOVE_LOCAL_NOTIFICATION,\
    FORMS_ASYNC_SET_BADGE_COUNT,\
    FORMS_ASYNC_DETECT_WEBCAMS,\
    FORMS_ASYNC_START_WEBCAM,\
\
    FORMS_ASYNC_STOP_WEBCAM,\
    FORMS_ASYNC_WEBCAM_FULL_INTRA_REQUEST,\
    FORMS_ASYNC_VIDEO_TRANSCODE,\
    FORMS_ASYNC_CONTACTS_SEARCH,\
    FORMS_ASYNC_CONTACTS_SEARCH_MORE,\
    FORMS_ASYNC_CONTACTS_LOOKUP,\
    FORMS_ASYNC_WEBSERVER_GET,\
    FORMS_ASYNC_WEBSERVER_GET_SENT,\
    FORMS_ASYNC_CX_USE,\
    FORMS_ASYNC_CX_REPORT_NEW_INCOMING_CALL,\
\
    FORMS_ASYNC_CX_REPORT_OUTGOING_CALL_CONNECTING,\
    FORMS_ASYNC_CX_REPORT_OUTGOING_CALL_CONNECTED,\
    FORMS_ASYNC_CX_REPORT_CALL_UPDATED,\
    FORMS_ASYNC_CX_REPORT_CALL_ENDED,\
    FORMS_ASYNC_CX_REQUEST_START_CALL,\
    FORMS_ASYNC_CX_REQUEST_END_CALL,\
    FORMS_ASYNC_CX_REQUEST_SET_HELD_CALL,\
    FORMS_ASYNC_CX_REQUEST_SET_MUTED_CALL,\
    FORMS_ASYNC_CX_REQUEST_SET_GROUP_CALL,\
    FORMS_ASYNC_CX_REQUEST_PLAY_DTMF,\
\
    FORMS_ASYNC_PHONELIST_IMPORT,\
    FORMS_ASYNC_PHONELIST_EXPORT,\
    FORMS_ASYNC_PHONELIST_LOOP,\
    FORMS_ASYNC_PHONELIST_DELETE,\
    FORMS_ASYNC_PHONELIST_DELETE_LIST,\
    FORMS_ASYNC_SET_FOCUS,\
    FORMS_ASYNC_SET_AUTOSTART,\
    FORMS_ASYNC_SET_OFFLINE,\
    FORMS_ASYNC_SET_HOTKEY,\
    FORMS_ASYNC_SET_DESKTOP_NOTIFICATIONS,\
\
    FORMS_ASYNC_START_EXTERNAL_APP,\
    FORMS_ASYNC_SET_DOCKING,\
    FORMS_ASYNC_APP_WINDOW_OPENED,\
    FORMS_ASYNC_SET_RESIZE,\
    FORMS_ASYNC_KEYBOARD_EVENT,\
    FORMS_ASYNC_MOUSE_EVENT,\
    FORMS_ASYNC_MOUSE_WHEEL_EVENT,\
    FORMS_ASYNC_START_SCREEN_CAPTURE,\
    FORMS_ASYNC_STOP_SCREEN_CAPTURE,\
    FORMS_ASYNC_SET_CONN_INFO,\
\
    FORMS_ASYNC_DESTROY_OBJECT,\
    FORMS_ASYNC_DELETE_OBJECT,\

#define ENUM_FORMS_ASYNC_JNI_DESC   ENUM_FORMS_ASYNC_HANDLER

#define DEFINE_FORMS_ASYNC_HANDLER\
    { "forms_add_localized_text",       "IA",     0 },\
    { "forms_create",                   "I",      0 },\
    { "forms_change_localized_text",    "IA",     0 },\
    { "forms_set_forms_property",       "IAA",    0 },\
    { "forms_webserver_started",        "IAAAA",  0 },\
    { "forms_add_local_notification",   "IAIAAAAAAAAA", 0 },\
    { "forms_remove_local_notification","IA",     0 },\
    { "forms_set_badge_count",          "IAIA",   0 },\
    { "forms_detect_webcams",           "IA",     0 },\
    { "forms_start_webcam",             "IAAIIZ", 0 },\
\
    { "forms_stop_webcam",              "IA",     0 },\
    { "forms_webcam_full_intra_request", "IA",    0 },\
    { "forms_video_transcode",          "IIIIIBIIIIII", 0 },\
    { "forms_contacts_search",          "IAA",    0 },\
    { "forms_contacts_search_more",     "I",      0 },\
    { "forms_contacts_lookup",          "IAAAAAAA", 0 },\
    { "forms_webserver_get",            "IAA",    0 },\
    { "forms_webserver_get_sent",       "IA",     0 },\
    { "forms_cx_use",                   "IZAZII", 0 },\
    { "forms_cx_report_new_incoming_call", "IAAAAAI", 0 },\
\
    { "forms_cx_report_outgoing_call_connecting", "IA", 0 },\
    { "forms_cx_report_outgoing_call_connected", "IA", 0 },\
    { "forms_cx_report_call_updated",   "IAAAAAI",  0 },\
    { "forms_cx_report_call_ended",     "IAI",    0 },\
    { "forms_cx_request_start_call",    "IAAAZ",  0 },\
    { "forms_cx_request_end_call",      "IA",     0 },\
    { "forms_cx_request_set_held_call", "IAZ",    0 },\
    { "forms_cx_request_set_muted_call", "IAZ",   0 },\
    { "forms_cx_request_set_group_call", "IAA",   0 },\
    { "forms_cx_request_play_dtmf",     "IAA",    0 },\
\
    { "forms_phonelist_import",         "IZ",     0 },\
    { "forms_phonelist_export",         "IIIAIAZ", 0 },\
    { "forms_phonelist_loop",           "I",      0 },\
    { "forms_phonelist_delete",         "IIIA",   0 },\
    { "forms_phonelist_delete_list",    "IIIAI",  0 },\
    { "forms_set_focus",                "IAA",    0 },\
    { "forms_set_autostart",            "IZ" ,    0 },\
    { "forms_set_offline",              "II",     0 },\
    { "forms_set_hotkey",               "IIA",    0 },\
    { "forms_set_desktop_notifications","IZ",     0 },\
\
    { "forms_start_external_app",       "IAA",    0 },\
    { "forms_set_docking",              "II",     0 },\
    { "forms_app_window_opened",        "IAA",    0 },\
    { "forms_set_resize",               "IAII",   0 },\
    { "forms_keyboard_event",           "IIZ",    0 },\
    { "forms_mouse_event",              "IIIZZ",  0 },\
    { "forms_mouse_wheel_event",        "IZ",     0 },\
    { "forms_start_screen_capture",     "I",      0 },\
    { "forms_stop_screen_capture",      "I",      0 },\
    { "forms_set_conn_info",            "IZZAAAA", 0 },\
\
    { "forms_destroy_object",           "I",      0 },\
    { "forms_delete_object",            "I",      0 },\

#define DEFINE_FORMS_ASYNC_JNI_DESC DEFINE_FORMS_ASYNC_HANDLER

#define ENUM_FORMS_EVENT_HANDLER\
    FORMS_EVENT_TRACE,\
    FORMS_EVENT_SET_PROPERTY,\
    FORMS_EVENT_LOCAL_NOTIFICATION_CLICKED,\
    FORMS_EVENT_LOCAL_NOTIFICATION_ACCEPT,\
    FORMS_EVENT_LOCAL_NOTIFICATION_REJECT,\
    FORMS_EVENT_LOCAL_NOTIFICATION_REPLY,\
    FORMS_EVENT_WEBCAM_ADDED,\
    FORMS_EVENT_WEBCAM_REMOVED,\
    FORMS_EVENT_WEBCAM_QUERY_RESULT,\
    FORMS_EVENT_WEBCAM_FAILED,\
\
    FORMS_EVENT_WEBCAM_DATA,\
    FORMS_EVENT_WEBCAM_SAMPLE,\
    FORMS_EVENT_VIDEO_TRANSCODE,\
    FORMS_EVENT_CONTACTS_SEARCH,\
    FORMS_EVENT_CONTACTS_SEARCH_MORE,\
    FORMS_EVENT_CONTACTS_LOOKUP,\
    FORMS_EVENT_WEBSERVER_GET,\
    FORMS_EVENT_CX_SUPPORTED,\
    FORMS_EVENT_CX_START_CALL_ACTION,\
    FORMS_EVENT_CX_ANSWER_CALL_ACTION,\
\
    FORMS_EVENT_CX_END_CALL_ACTION,\
    FORMS_EVENT_CX_SET_HELD_CALL_ACTION,\
    FORMS_EVENT_CX_SET_MUTED_CALL_ACTION,\
    FORMS_EVENT_CX_SET_GROUP_CALL_ACTION,\
    FORMS_EVENT_CX_PLAY_DTMF_CALL_ACTION,\
    FORMS_EVENT_CX_CALL_ERROR,\
    FORMS_EVENT_CX_SHOW_INCOMING_CALL_UI,\
    FORMS_EVENT_WAKE_PHONE,\
    FORMS_EVENT_PHONELIST_IMPORT,\
    FORMS_EVENT_PHONELIST_MORE,\
\
    FORMS_EVENT_PHONELIST_LOOPED,\
    FORMS_EVENT_PHONELIST_DELETE,\
    FORMS_EVENT_PHONELIST_CHANGE,\
    FORMS_EVENT_SET_OFFLINE,\
    FORMS_EVENT_SET_HOTKEY_ACTION,\
    FORMS_EVENT_SCREEN_CAPTURE_SAMPLE,\
    FORMS_EVENT_CX_AUDIO_ROUTE_CHANGED,\
    FORMS_EVENT_CX_CHECK_INCOMING_CALL,\
    FORMS_EVENT_OPEN_PERMALINK,\
    FORMS_EVENT_DELETE_OBJECT,\

/*---------------------------------------------------------------------------*/
#if defined(__cplusplus)

void forms_event_trace              (class async_event *async_event);
void forms_event_set_property       (class async_event *async_event);
void forms_event_local_notification_clicked(class async_event *async_event);
void forms_event_local_notification_accept(class async_event *async_event);
void forms_event_local_notification_reject(class async_event *async_event);
void forms_event_local_notification_reply(class async_event *async_event);
void forms_event_webcam_added       (class async_event *async_event);
void forms_event_webcam_removed     (class async_event *async_event);
void forms_event_webcam_query_result(class async_event *async_event);
void forms_event_webcam_failed      (class async_event *async_event);

void forms_event_webcam_data        (class async_event *async_event);
void forms_event_webcam_sample      (class async_event *async_event);
void forms_event_video_transcode    (class async_event *async_event);
void forms_event_contacts_search    (class async_event *async_event);
void forms_event_contacts_search_more(class async_event *async_event);
void forms_event_contacts_lookup    (class async_event *async_event);
void forms_event_webserver_get      (class async_event *async_event);
void forms_event_cx_supported       (class async_event *async_event);
void forms_event_cx_start_call_action(class async_event *async_event);
void forms_event_cx_answer_call_action(class async_event *async_event);

void forms_event_cx_end_call_action (class async_event *async_event);
void forms_event_cx_set_held_call_action(class async_event *async_event);
void forms_event_cx_set_muted_call_action(class async_event *async_event);
void forms_event_cx_set_group_call_action(class async_event *async_event);
void forms_event_cx_play_dtmf_call_action(class async_event *async_event);
void forms_event_cx_call_error      (class async_event *async_event);
void forms_event_cx_show_incoming_call_ui(class async_event *async_event);
void forms_event_wake_phone         (class async_event *async_event);
void forms_event_phonelist_import   (class async_event *async_event);
void forms_event_phonelist_more     (class async_event *async_event);

void forms_event_phonelist_looped   (class async_event *async_event);
void forms_event_phonelist_delete   (class async_event *async_event);
void forms_event_phonelist_change   (class async_event *async_event);
void forms_event_set_offline        (class async_event *async_event);
void forms_event_set_hotkey_action  (class async_event *async_event);
void forms_event_screen_capture_sample(class async_event *async_event);
void forms_event_cx_audio_route_changed(class async_event *async_event);
void forms_event_cx_check_incoming_call(class async_event *async_event);
void forms_event_open_permalink     (class async_event *async_event);
void forms_event_delete_object      (class async_event *async_event);

#define DEFINE_FORMS_EVENT_HANDLER\
    { forms_event_trace,              "A"      },\
    { forms_event_set_property,       "AA"     },\
    { forms_event_local_notification_clicked, "A"      },\
    { forms_event_local_notification_accept, "A"      },\
    { forms_event_local_notification_reject, "A"      },\
    { forms_event_local_notification_reply, "AA"      },\
    { forms_event_webcam_added,       "AZIAA"  },\
    { forms_event_webcam_removed,     "A"      },\
    { forms_event_webcam_query_result,"A"      },\
    { forms_event_webcam_failed,      "AA"     },\
\
    { forms_event_webcam_data,        "AIIIBIIB" },\
    { forms_event_webcam_sample,      "AIIIMIIII" },\
    { forms_event_video_transcode,    "IIIIIIBIIII" },\
    { forms_event_contacts_search,    "AA"     },\
    { forms_event_contacts_search_more,""       },\
    { forms_event_contacts_lookup,    "AA"     },\
    { forms_event_webserver_get,      "AZIIB"  },\
    { forms_event_cx_supported,       "Z"      },\
    { forms_event_cx_start_call_action, "AAAZ"   },\
    { forms_event_cx_answer_call_action, "A"      },\
\
    { forms_event_cx_end_call_action, "AI"     },\
    { forms_event_cx_set_held_call_action, "AZ"     },\
    { forms_event_cx_set_muted_call_action, "AZ"     },\
    { forms_event_cx_set_group_call_action, "AA"     },\
    { forms_event_cx_play_dtmf_call_action, "AA"     },\
    { forms_event_cx_call_error,      "AI"     },\
    { forms_event_cx_show_incoming_call_ui, "A"      },\
    { forms_event_wake_phone,         ""       },\
    { forms_event_phonelist_import,   "IIIAIAZ" },\
    { forms_event_phonelist_more,     "II"     },\
\
    { forms_event_phonelist_looped,   "I"      },\
    { forms_event_phonelist_delete,   "IIIA"   },\
    { forms_event_phonelist_change,   "I"      },\
    { forms_event_set_offline,        "Z"      },\
    { forms_event_set_hotkey_action,  "IA"     },\
    { forms_event_screen_capture_sample, "IIIMIIII" },\
    { forms_event_cx_audio_route_changed, "AA"},\
    { forms_event_cx_check_incoming_call, "A"},\
    { forms_event_open_permalink,     "A"},\
    { forms_event_delete_object,      "I"},\

#define DEFINE_FORMS_EVENT_JNI_DESC\
    { &FORMS_EVENT_TRACE,              forms_event_trace,              "A"      },\
    { &FORMS_EVENT_SET_PROPERTY,       forms_event_set_property,       "AA"     },\
    { &FORMS_EVENT_LOCAL_NOTIFICATION_CLICKED, forms_event_local_notification_clicked, "A"      },\
    { &FORMS_EVENT_LOCAL_NOTIFICATION_ACCEPT, forms_event_local_notification_accept, "A"      },\
    { &FORMS_EVENT_LOCAL_NOTIFICATION_REJECT, forms_event_local_notification_reject, "A"      },\
    { &FORMS_EVENT_LOCAL_NOTIFICATION_REPLY, forms_event_local_notification_reply, "AA"      },\
    { &FORMS_EVENT_WEBCAM_ADDED,       forms_event_webcam_added,       "AZIAA"  },\
    { &FORMS_EVENT_WEBCAM_REMOVED,     forms_event_webcam_removed,     "A"      },\
    { &FORMS_EVENT_WEBCAM_QUERY_RESULT,forms_event_webcam_query_result,"A"      },\
    { &FORMS_EVENT_WEBCAM_FAILED,      forms_event_webcam_failed,      "AA"     },\
\
    { &FORMS_EVENT_WEBCAM_DATA,        forms_event_webcam_data,        "AIIIBIIB" },\
    { &FORMS_EVENT_WEBCAM_SAMPLE,      forms_event_webcam_sample,      "AIIIMIIII" },\
    { &FORMS_EVENT_VIDEO_TRANSCODE,    forms_event_video_transcode,    "IIIIIIBIIII" },\
    { &FORMS_EVENT_CONTACTS_SEARCH,    forms_event_contacts_search,    "AA"     },\
    { &FORMS_EVENT_CONTACTS_SEARCH_MORE,forms_event_contacts_search_more,""       },\
    { &FORMS_EVENT_CONTACTS_LOOKUP,    forms_event_contacts_lookup,    "AA"     },\
    { &FORMS_EVENT_WEBSERVER_GET,      forms_event_webserver_get,      "AZIIB"  },\
    { &FORMS_EVENT_CX_SUPPORTED,       forms_event_cx_supported,       "Z"      },\
    { &FORMS_EVENT_CX_START_CALL_ACTION, forms_event_cx_start_call_action, "AAAZ"   },\
    { &FORMS_EVENT_CX_ANSWER_CALL_ACTION, forms_event_cx_answer_call_action, "A"      },\
\
    { &FORMS_EVENT_CX_END_CALL_ACTION, forms_event_cx_end_call_action, "AI"     },\
    { &FORMS_EVENT_CX_SET_HELD_CALL_ACTION, forms_event_cx_set_held_call_action, "AZ"     },\
    { &FORMS_EVENT_CX_SET_MUTED_CALL_ACTION, forms_event_cx_set_muted_call_action, "AZ"     },\
    { &FORMS_EVENT_CX_SET_GROUP_CALL_ACTION, forms_event_cx_set_group_call_action, "AA"     },\
    { &FORMS_EVENT_CX_PLAY_DTMF_CALL_ACTION, forms_event_cx_play_dtmf_call_action, "AA"     },\
    { &FORMS_EVENT_CX_CALL_ERROR,      forms_event_cx_call_error,      "AI"     },\
    { &FORMS_EVENT_CX_SHOW_INCOMING_CALL_UI, forms_event_cx_show_incoming_call_ui, "A"      },\
    { &FORMS_EVENT_WAKE_PHONE,         forms_event_wake_phone,         ""       },\
    { &FORMS_EVENT_PHONELIST_IMPORT,   forms_event_phonelist_import,   "IIIAIAZ" },\
    { &FORMS_EVENT_PHONELIST_MORE,     forms_event_phonelist_more,     "II"     },\
\
    { &FORMS_EVENT_PHONELIST_LOOPED,   forms_event_phonelist_looped,   "I"      },\
    { &FORMS_EVENT_PHONELIST_DELETE,   forms_event_phonelist_delete,   "IIIA"   },\
    { &FORMS_EVENT_PHONELIST_CHANGE,   forms_event_phonelist_change,   "I"      },\
    { &FORMS_EVENT_SET_OFFLINE,        forms_event_set_offline,        "Z"      },\
    { &FORMS_EVENT_SET_HOTKEY_ACTION,  forms_event_set_hotkey_action,  "IA"      },\
    { &FORMS_EVENT_SCREEN_CAPTURE_SAMPLE,forms_event_screen_capture_sample, "IIIMIIII" },\
    { &FORMS_EVENT_CX_AUDIO_ROUTE_CHANGED, forms_event_cx_audio_route_changed, "AA"},\
    { &FORMS_EVENT_CX_CHECK_INCOMING_CALL, forms_event_cx_check_incoming_call, "A"},\
    { &FORMS_EVENT_OPEN_PERMALINK,     forms_event_open_permalink,     "A"},\
    { &FORMS_EVENT_DELETE_OBJECT,      forms_event_delete_object,      "I"},\

class async_forms : public forms_object {
public:
    class forms_object **obj_table;
    class forms_object **id_free;
    int allocated_ids;
    class forms_async *forms_async;
    class forms_object **id_obj_table;
    int allocated_obj_ids;

    void new_id_resize();
    int new_id(forms_object *obj)
    {
        if(!id_free) new_id_resize();
        class forms_object **id_new = id_free;
        id_free = (forms_object **)(*id_free);
        *id_new = obj;
        int i = (int)(id_new - obj_table);
        return (i);
    }
    void free_id(int obj_id)
    {
        obj_table[obj_id] = (forms_object *) id_free;
        id_free = &(obj_table[obj_id]);
    }
    forms_object *id_obj(int obj_id)  { return(obj_table[obj_id]); }

    void obj_id_resize(int size);
    void set_id_obj(int obj_id, forms_object *obj)
    {
        if(~obj_id >= allocated_obj_ids) obj_id_resize(~obj_id + 1);
        id_obj_table[~obj_id] = obj;
    }
    forms_object *get_id_obj(int obj_id) { return(id_obj_table[~obj_id]); }

    int obj_id;
    async_forms(class forms_async *forms_async);
};

void forms_create(class forms_async *forms_async);
void forms_set_language(class forms_async *forms_async, int language);
bool set_forms_property(class forms_async *forms_async, const char *name, const char *value);
void forms_webserver_started(class forms_async *forms_async, const char *url_to_load, const char *user_agent, const char *webserver_url, const char *start_fix_cert_url);
void forms_set_focus(class forms_async *forms_async, const char *app, const char *title);
void forms_app_window_opened(class forms_async *forms_async, const char *app, const char *title);
void forms_set_autostart(class forms_async *forms_async, bool autostart);
void forms_set_offline(class forms_async *forms_async, int offline);
void forms_set_hotkey(class forms_async *forms_async, int type, const char *hotkey);
void forms_set_desktop_notifications(class forms_async *forms_async, bool show);
void forms_start_external_app(class forms_async *forms_async, const char *app, const char *param);
void forms_set_docking(class forms_async *forms_async, int docking);
void forms_set_resize(class forms_async *forms_async, const char *app, int width, int height);
void forms_keyboard_event(class forms_async *forms_async, int code, bool keyDown);
void forms_mouse_event(class forms_async *forms_async, int x, int y, bool right, bool keyDown);
void forms_mouse_wheel_event(class forms_async *forms_async, bool direction);
void forms_add_local_notification(class forms_async *forms_async, const char * ref, int type, const char * title, const char * text, const char * smallIcon, const char * largeIcon,
    const char * soundUrl, const char * buttonTitle, const char * acceptTitle, const char * rejectTitle, const char * link);
void forms_remove_local_notification(class forms_async *forms_async, const char * ref);
void forms_set_badge_count(class forms_async *forms_async, const char * ref, unsigned count, const char * text);
void forms_detect_webcams(class forms_async *forms_async, const char *context);
void forms_start_webcam(class forms_async *forms_async, const char *id, const char *context, int width, int height, bool hdVideo);
void forms_stop_webcam(class forms_async *forms_async, const char *id);
void forms_webcam_full_intra_request(class forms_async *forms_async, const char *id);
void forms_video_transcode(class forms_async *forms_async, int id, dword timestamp, dword duration, short sequenceDiff, const void * buf, int len, int width, int height, int stride, dword flags, int from, int to);
void forms_contacts_search(class forms_async *forms_async, const char *ref, const char *pattern);
void forms_contacts_search_more(class forms_async *forms_async);
void forms_contacts_lookup(class forms_async *forms_async, const char *ref, const char *number, const char *prefixIntl, const char *prefixNtl, const char *prefixSubs, const char *areaCode, const char *countryCode);
void forms_webserver_get(class forms_async *forms_async, const char *context, const char *resourceName);
void forms_webserver_get_sent(class forms_async *forms_async, const char *context);
void forms_cx_use(class forms_async *forms_async, bool use, const char *ringtone, bool supportsVideo, int maximumCallGroups, int maximumCallsPerCallGroup);
void forms_cx_report_new_incoming_call(class forms_async *forms_async, const char *uuid, const char *number, const char *name, const char *transfer, const char *called,
    bool hasVideo, bool supportsDTMF, bool supportsHolding, bool supportsGrouping, bool supportsUngrouping);
void forms_cx_report_outgoing_call_connecting(class forms_async *forms_async, const char *uuid);
void forms_cx_report_outgoing_call_connected(class forms_async *forms_async, const char *uuid);
void forms_cx_report_call_updated(class forms_async *forms_async, const char *uuid, const char *number, const char *name, const char *transfer, const char *called,
    bool hasVideo, bool supportsDTMF, bool supportsHolding, bool supportsGrouping, bool supportsUngrouping);
void forms_cx_report_call_ended(class forms_async *forms_async, const char *uuid, int reason);
void forms_cx_request_start_call(class forms_async *forms_async, const char *uuid, const char *number, const char *name, bool video);
void forms_cx_request_end_call(class forms_async *forms_async, const char *uuid);
void forms_cx_request_set_held_call(class forms_async *forms_async, const char *uuid, bool held);
void forms_cx_request_set_muted_call(class forms_async *forms_async, const char *uuid, bool muted);
void forms_cx_request_set_group_call(class forms_async *forms_async, const char *uuid, const char *with);
void forms_cx_request_play_dtmf(class forms_async *forms_async, const char *uuid, const char *digits);
void forms_start_screen_capture(class forms_async *forms_async);
void forms_stop_screen_capture(class forms_async *forms_async);
void forms_set_conn_info(class forms_async *forms_async, bool up, bool standby, const char * cur, const char * pri, const char * sec, const char * master);

#endif /* defined(__cplusplus) */
/*---------------------------------------------------------------------------*/

NAMESPACE_END
