]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
caclients: fix/improve item grouping
authorJaroslav Kysela <perex@perex.cz>
Wed, 3 Jan 2018 08:45:53 +0000 (09:45 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 4 Jan 2018 14:03:22 +0000 (15:03 +0100)
src/descrambler/caclient.c
src/descrambler/cccam.c
src/descrambler/cclient.c
src/descrambler/constcw.c
src/descrambler/cwc.c
src/descrambler/dvbcam.c

index e5c9b775c1d76a80699abfc89d364cf05c393f51..2120b58afda096966c28662f7b7c3c158a22c921 100644 (file)
@@ -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,
     },
     { }
   }
index e17c287f3b2dd91ff0e60e5079577a7b1c9f286f..75c47cb368afcc72da3a4d982f1af0a0017b452c 100644 (file)
@@ -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,
     },
     { }
   }
index 737a05502919cdf474a111519080a70dfe2901c9..ea546cb9c0dfa1f73467c606b4dd7ea1fee19821 100644 (file)
@@ -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,
     },
     { }
   }
index 7f3c6004c36d8d6b9fc2c0f845b5d75530c4a820..dcd448975aa291dfc600e07dc74e2b97105b041f 100644 (file)
@@ -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,
     },
     { }
   }
index 7ffecba3c559ca72e36cda02e5381fa4c19f118a..e80dd99fc4f70d10f487a8783cd062304a74ef50 100644 (file)
@@ -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,
     },
     { }
   }
index b886703e950fc7b15a68acb83add7094ddd313b7..2338ea3b0c3637ade72b1d124ed3dead3a2c8b7b 100644 (file)
@@ -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,
     },
     {}
   }