From: Jaroslav Kysela Date: Wed, 3 Jan 2018 08:45:53 +0000 (+0100) Subject: caclients: fix/improve item grouping X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca82a4fbb4722557f1842228c336298a4b62e06e;p=thirdparty%2Ftvheadend.git caclients: fix/improve item grouping --- diff --git a/src/descrambler/caclient.c b/src/descrambler/caclient.c index e5c9b775c..2120b58af 100644 --- a/src/descrambler/caclient.c +++ b/src/descrambler/caclient.c @@ -270,6 +270,13 @@ const idclass_t caclient_class = .ic_delete = caclient_class_delete, .ic_moveup = caclient_class_moveup, .ic_movedown = caclient_class_movedown, + .ic_groups = (const property_group_t[]) { + { + .name = N_("Client"), + .number = 1, + }, + {} + }, .ic_properties = (const property_t[]){ { .type = PT_STR, @@ -278,6 +285,7 @@ const idclass_t caclient_class = .opts = PO_RDONLY | PO_HIDDEN | PO_NOUI, .get = caclient_class_class_get, .set = caclient_class_class_set, + .group = 1, }, { .type = PT_INT, @@ -285,6 +293,7 @@ const idclass_t caclient_class = .name = N_("Index"), .opts = PO_RDONLY | PO_HIDDEN | PO_NOUI, .off = offsetof(caclient_t, cac_index), + .group = 1, }, { .type = PT_BOOL, @@ -292,6 +301,7 @@ const idclass_t caclient_class = .name = N_("Enabled"), .desc = N_("Enable/Disable CA client."), .off = offsetof(caclient_t, cac_enabled), + .group = 1, }, { .type = PT_STR, @@ -300,6 +310,7 @@ const idclass_t caclient_class = .desc = N_("Name of the client."), .off = offsetof(caclient_t, cac_name), .notify = idnode_notify_title_changed_lang, + .group = 1, }, { .type = PT_STR, @@ -307,6 +318,7 @@ const idclass_t caclient_class = .name = N_("Comment"), .desc = N_("Free-form text field, enter whatever you like."), .off = offsetof(caclient_t, cac_comment), + .group = 1, }, { .type = PT_STR, @@ -314,6 +326,7 @@ const idclass_t caclient_class = .name = N_("Status"), .get = caclient_class_status_get, .opts = PO_RDONLY | PO_HIDDEN | PO_NOSAVE | PO_NOUI, + .group = 1, }, { } } diff --git a/src/descrambler/cccam.c b/src/descrambler/cccam.c index e17c287f3..75c47cb36 100644 --- a/src/descrambler/cccam.c +++ b/src/descrambler/cccam.c @@ -775,7 +775,7 @@ const idclass_t caclient_cccam_class = .desc = N_("Client node ID. Leave field empty to generate a random ID."), .set = caclient_cccam_nodeid_set, .get = caclient_cccam_nodeid_get, - .group = 1, + .group = 2, }, { .type = PT_INT, @@ -786,7 +786,7 @@ const idclass_t caclient_cccam_class = .list = caclient_cccam_class_cccam_version_list, .def.i = CCCAM_VERSION_2_3_0, .opts = PO_DOC_NLIST, - .group = 1, + .group = 2, }, { .type = PT_INT, @@ -795,7 +795,7 @@ const idclass_t caclient_cccam_class = .desc = N_("Keepalive interval in seconds"), .off = offsetof(cccam_t, cc_keepalive_interval), .def.i = CCCAM_KEEPALIVE_INTERVAL, - .group = 3, + .group = 4, }, { } } diff --git a/src/descrambler/cclient.c b/src/descrambler/cclient.c index 737a05502..ea546cb9c 100644 --- a/src/descrambler/cclient.c +++ b/src/descrambler/cclient.c @@ -1063,17 +1063,21 @@ const idclass_t caclient_cc_class = .ic_caption = N_("Card client"), .ic_groups = (const property_group_t[]) { { - .name = N_("Login information"), + .name = N_("Client"), .number = 1, }, { - .name = N_("EMM"), + .name = N_("Login information"), .number = 2, }, { - .name = N_("Connection"), + .name = N_("EMM"), .number = 3, }, + { + .name = N_("Connection"), + .number = 4, + }, {} }, .ic_properties = (const property_t[]){ @@ -1084,7 +1088,7 @@ const idclass_t caclient_cc_class = .desc = N_("Login username."), .off = offsetof(cclient_t, cc_username), .opts = PO_TRIM, - .group = 1, + .group = 2, }, { .type = PT_STR, @@ -1093,7 +1097,7 @@ const idclass_t caclient_cc_class = .desc = N_("Login password."), .off = offsetof(cclient_t, cc_password), .opts = PO_PASSWORD, - .group = 1, + .group = 2, }, { .type = PT_STR, @@ -1103,7 +1107,7 @@ const idclass_t caclient_cc_class = .off = offsetof(cclient_t, cc_hostname), .def.s = "localhost", .opts = PO_TRIM, - .group = 1, + .group = 2, }, { .type = PT_INT, @@ -1111,7 +1115,7 @@ const idclass_t caclient_cc_class = .name = N_("Port"), .desc = N_("Port to connect to."), .off = offsetof(cclient_t, cc_port), - .group = 1, + .group = 2, }, { .type = PT_BOOL, @@ -1120,7 +1124,7 @@ const idclass_t caclient_cc_class = .desc = N_("Enable/disable offering of Entitlement Management Message updates."), .off = offsetof(cclient_t, cc_emm), .def.i = 1, - .group = 2, + .group = 3, }, { .type = PT_BOOL, @@ -1129,7 +1133,7 @@ const idclass_t caclient_cc_class = .desc = N_("Update Entitlement Management Messages from one mux only."), .off = offsetof(cclient_t, cc_emmex), .def.i = 1, - .group = 2, + .group = 3, }, { .type = PT_INT, @@ -1138,7 +1142,7 @@ const idclass_t caclient_cc_class = .desc = N_("Keepalive interval in seconds"), .off = offsetof(cclient_t, cc_keepalive_interval), .def.i = CC_KEEPALIVE_INTERVAL, - .group = 3, + .group = 4, }, { } } diff --git a/src/descrambler/constcw.c b/src/descrambler/constcw.c index 7f3c6004c..dcd448975 100644 --- a/src/descrambler/constcw.c +++ b/src/descrambler/constcw.c @@ -295,6 +295,22 @@ constcw_class_key_odd_get(void *o) return constcw_class_key_get(o, ccw->ccw_key_odd); } +static property_group_t caclient_ic_groups[] = { + { + .name = N_("Client"), + .number = 1, + }, + { + .name = N_("Filter"), + .number = 2, + }, + { + .name = N_("Keys"), + .number = 3, + }, + {} +}; + const idclass_t caclient_ccw_csa_cbc_class = { .ic_super = &caclient_class, @@ -308,7 +324,8 @@ const idclass_t caclient_ccw_csa_cbc_class = .desc = N_("Conditional Access Identification."), .off = offsetof(constcw_t, ccw_caid), .opts = PO_HEXA, - .def.u16 = 0x2600 + .def.u16 = 0x2600, + .group = 2, }, { .type = PT_U32, @@ -317,7 +334,8 @@ const idclass_t caclient_ccw_csa_cbc_class = .desc = N_("The provider's ID."), .off = offsetof(constcw_t, ccw_providerid), .opts = PO_HEXA, - .def.u32 = 0 + .def.u32 = 0, + .group = 2, }, { .type = PT_U16, @@ -327,6 +345,7 @@ const idclass_t caclient_ccw_csa_cbc_class = .off = offsetof(constcw_t, ccw_tsid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_U16, @@ -336,6 +355,7 @@ const idclass_t caclient_ccw_csa_cbc_class = .off = offsetof(constcw_t, ccw_sid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_STR, @@ -346,6 +366,7 @@ const idclass_t caclient_ccw_csa_cbc_class = .get = constcw_class_key_even_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { .type = PT_STR, @@ -356,6 +377,7 @@ const idclass_t caclient_ccw_csa_cbc_class = .get = constcw_class_key_odd_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { } } @@ -366,6 +388,7 @@ const idclass_t caclient_ccw_des_ncb_class = .ic_super = &caclient_class, .ic_class = "caclient_ccw_des_ncb", .ic_caption = N_("DES NCB Constant Code Word"), + .ic_groups = caclient_ic_groups, .ic_properties = (const property_t[]){ { .type = PT_U16, @@ -374,7 +397,8 @@ const idclass_t caclient_ccw_des_ncb_class = .desc = N_("Conditional Access Identification."), .off = offsetof(constcw_t, ccw_caid), .opts = PO_HEXA, - .def.u16 = 0x2600 + .def.u16 = 0x2600, + .group = 2, }, { .type = PT_U32, @@ -383,7 +407,8 @@ const idclass_t caclient_ccw_des_ncb_class = .desc = N_("The provider's ID."), .off = offsetof(constcw_t, ccw_providerid), .opts = PO_HEXA, - .def.u32 = 0 + .def.u32 = 0, + .group = 2, }, { .type = PT_U16, @@ -393,6 +418,7 @@ const idclass_t caclient_ccw_des_ncb_class = .off = offsetof(constcw_t, ccw_tsid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_U16, @@ -402,6 +428,7 @@ const idclass_t caclient_ccw_des_ncb_class = .off = offsetof(constcw_t, ccw_sid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_STR, @@ -412,6 +439,7 @@ const idclass_t caclient_ccw_des_ncb_class = .get = constcw_class_key_even_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { .type = PT_STR, @@ -422,6 +450,7 @@ const idclass_t caclient_ccw_des_ncb_class = .get = constcw_class_key_odd_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { } } @@ -432,6 +461,7 @@ const idclass_t caclient_ccw_aes_ecb_class = .ic_super = &caclient_class, .ic_class = "caclient_ccw_aes_ecb", .ic_caption = N_("AES ECB Constant Code Word"), + .ic_groups = caclient_ic_groups, .ic_properties = (const property_t[]){ { .type = PT_U16, @@ -440,7 +470,8 @@ const idclass_t caclient_ccw_aes_ecb_class = .desc = N_("Conditional Access Identification."), .off = offsetof(constcw_t, ccw_caid), .opts = PO_HEXA, - .def.u16 = 0x2600 + .def.u16 = 0x2600, + .group = 2, }, { .type = PT_U32, @@ -449,7 +480,8 @@ const idclass_t caclient_ccw_aes_ecb_class = .desc = N_("The provider's ID."), .off = offsetof(constcw_t, ccw_providerid), .opts = PO_HEXA, - .def.u32 = 0 + .def.u32 = 0, + .group = 2, }, { .type = PT_U16, @@ -459,6 +491,7 @@ const idclass_t caclient_ccw_aes_ecb_class = .off = offsetof(constcw_t, ccw_tsid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_U16, @@ -468,6 +501,7 @@ const idclass_t caclient_ccw_aes_ecb_class = .off = offsetof(constcw_t, ccw_sid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_STR, @@ -478,6 +512,7 @@ const idclass_t caclient_ccw_aes_ecb_class = .get = constcw_class_key_even_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { .type = PT_STR, @@ -488,6 +523,7 @@ const idclass_t caclient_ccw_aes_ecb_class = .get = constcw_class_key_odd_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00", + .group = 3, }, { } } @@ -498,6 +534,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .ic_super = &caclient_class, .ic_class = "caclient_ccw_aes128_ecb", .ic_caption = N_("AES128 ECB Constant Code Word"), + .ic_groups = caclient_ic_groups, .ic_properties = (const property_t[]){ { .type = PT_U16, @@ -507,6 +544,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .off = offsetof(constcw_t, ccw_caid), .opts = PO_HEXA, .def.u16 = 0x2600, + .group = 2, }, { .type = PT_U32, @@ -515,7 +553,8 @@ const idclass_t caclient_ccw_aes128_ecb_class = .desc = N_("The provider's ID."), .off = offsetof(constcw_t, ccw_providerid), .opts = PO_HEXA, - .def.u32 = 0 + .def.u32 = 0, + .group = 2, }, { .type = PT_U16, @@ -525,6 +564,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .off = offsetof(constcw_t, ccw_tsid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_U16, @@ -534,6 +574,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .off = offsetof(constcw_t, ccw_sid), .opts = PO_HEXA, .def.u16 = 1, + .group = 2, }, { .type = PT_STR, @@ -544,6 +585,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .get = constcw_class_key_even_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + .group = 3, }, { .type = PT_STR, @@ -554,6 +596,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = .get = constcw_class_key_odd_get, .opts = PO_PASSWORD, .def.s = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + .group = 3, }, { } } diff --git a/src/descrambler/cwc.c b/src/descrambler/cwc.c index 7ffecba3c..e80dd99fc 100644 --- a/src/descrambler/cwc.c +++ b/src/descrambler/cwc.c @@ -773,7 +773,7 @@ const idclass_t caclient_cwc_class = .get = caclient_cwc_class_deskey_get, .opts = PO_PASSWORD, .def.s = "00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d", - .group = 1, + .group = 2, }, { } } diff --git a/src/descrambler/dvbcam.c b/src/descrambler/dvbcam.c index b886703e9..2338ea3b0 100644 --- a/src/descrambler/dvbcam.c +++ b/src/descrambler/dvbcam.c @@ -834,6 +834,17 @@ const idclass_t caclient_dvbcam_class = .ic_super = &caclient_class, .ic_class = "caclient_dvbcam", .ic_caption = N_("Linux DVB CAM Client"), + .ic_groups = (const property_group_t[]) { + { + .name = N_("Client"), + .number = 1, + }, + { + .name = N_("Common Interface"), + .number = 2, + }, + {} + }, .ic_properties = (const property_t[]){ { .type = PT_INT, @@ -841,6 +852,7 @@ const idclass_t caclient_dvbcam_class = .name = N_("Service limit"), .desc = N_("Limit of concurrent descrambled services (per one CAM)."), .off = offsetof(dvbcam_t, limit), + .group = 2, }, { .type = PT_INT, @@ -850,6 +862,7 @@ const idclass_t caclient_dvbcam_class = .list = caclient_dvbcam_class_caid_selection_list, .off = offsetof(dvbcam_t, caid_select), .opts = PO_DOC_NLIST, + .group = 2, }, { .type = PT_STR, @@ -859,6 +872,7 @@ const idclass_t caclient_dvbcam_class = "E.g. '0D00,0F00,0100'."), .set = caclient_dvbcam_class_caid_list_set, .get = caclient_dvbcam_class_caid_list_get, + .group = 2, }, {} }