From 8381a4f3cf941aba8d2ba8b031ad9774ad05096f Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Sat, 4 Sep 2010 00:09:06 +0200 Subject: [PATCH] Skinny: adding tables for soft_key_events --- src/mod/endpoints/mod_skinny/skinny_tables.c | 26 ++++++++++++++++++++ src/mod/endpoints/mod_skinny/skinny_tables.h | 4 +++ 2 files changed, 30 insertions(+) diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.c b/src/mod/endpoints/mod_skinny/skinny_tables.c index f76e84320e..07be7c454c 100644 --- a/src/mod/endpoints/mod_skinny/skinny_tables.c +++ b/src/mod/endpoints/mod_skinny/skinny_tables.c @@ -152,6 +152,32 @@ struct skinny_table SKINNY_BUTTONS[] = { SKINNY_DECLARE_ID2STR(skinny_button2str, SKINNY_BUTTONS, "Unknown") SKINNY_DECLARE_STR2ID(skinny_str2button, SKINNY_BUTTONS, -1) +struct skinny_table SKINNY_SOFT_KEY_EVENTS[] = { + {"SoftkeyRedial", SOFTKEY_REDIAL}, + {"SoftkeyNewcall", SOFTKEY_NEWCALL}, + {"SoftkeyHold", SOFTKEY_HOLD}, + {"SoftkeyTransfer", SOFTKEY_TRANSFER}, + {"SoftkeyCfwdall", SOFTKEY_CFWDALL}, + {"SoftkeyCfwdbusy", SOFTKEY_CFWDBUSY}, + {"SoftkeyCfwdnoanswer", SOFTKEY_CFWDNOANSWER}, + {"SoftkeyBackspace", SOFTKEY_BACKSPACE}, + {"SoftkeyEndcall", SOFTKEY_ENDCALL}, + {"SoftkeyResume", SOFTKEY_RESUME}, + {"SoftkeyAnswer", SOFTKEY_ANSWER }, + {"SoftkeyInfo", SOFTKEY_INFO}, + {"SoftkeyConfrm", SOFTKEY_CONFRM}, + {"SoftkeyPark", SOFTKEY_PARK}, + {"SoftkeyJoin", SOFTKEY_JOIN}, + {"SoftkeyMeetmeconfrm", SOFTKEY_MEETMECONFRM}, + {"SoftkeyCallpickup", SOFTKEY_CALLPICKUP}, + {"SoftkeyGrpcallpickup", SOFTKEY_GRPCALLPICKUP}, + {"SoftkeyDnd", SOFTKEY_DND}, + {"SoftkeyIdivert", SOFTKEY_IDIVERT}, + {NULL, 0} +}; +SKINNY_DECLARE_ID2STR(skinny_soft_key_event2str, SKINNY_SOFT_KEY_EVENTS, "SoftkeyUnknown") +SKINNY_DECLARE_STR2ID(skinny_str2soft_key_event, SKINNY_SOFT_KEY_EVENTS, -1) + struct skinny_table SKINNY_LAMP_MODES[] = { {"Off", SKINNY_LAMP_OFF}, {"On", SKINNY_LAMP_ON}, diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.h b/src/mod/endpoints/mod_skinny/skinny_tables.h index 6c9182516e..1747360264 100644 --- a/src/mod/endpoints/mod_skinny/skinny_tables.h +++ b/src/mod/endpoints/mod_skinny/skinny_tables.h @@ -194,6 +194,10 @@ enum skinny_soft_key_event { SOFTKEY_DND = 0x13, SOFTKEY_IDIVERT = 0x14, }; +extern struct skinny_table SKINNY_SOFT_KEY_EVENTS[21]; +const char *skinny_soft_key_event2str(uint32_t id); +uint32_t skinny_str2soft_key_event(const char *str); +#define SKINNY_PUSH_SOFT_KEY_EVENTS SKINNY_DECLARE_PUSH_MATCH(SOFT_KEY_EVENTS) enum skinny_key_set { SKINNY_KEY_SET_ON_HOOK = 0,