created PTS Functional Component Name header file
[strongswan.git] / src / libimcv / tcg / tcg_pts_attr_req_funct_comp_evid.h
index 223d267..e41b3ab 100644 (file)
 
 typedef struct tcg_pts_attr_req_funct_comp_evid_t tcg_pts_attr_req_funct_comp_evid_t;
 typedef enum pts_attr_req_funct_comp_evid_flag_t pts_attr_req_funct_comp_evid_flag_t;
-typedef enum pts_attr_req_funct_comp_type_t pts_attr_req_funct_comp_type_t;
-typedef enum pts_attr_req_funct_comp_name_bin_enum_t pts_attr_req_funct_comp_name_bin_enum_t;
-typedef struct tcg_pts_qualifier_t tcg_pts_qualifier_t;
 
 #include "tcg_attr.h"
+#include "tcg_pts_funct_comp_name.h"
 #include "pa_tnc/pa_tnc_attr.h"
 
 /**
@@ -45,59 +43,6 @@ enum pts_attr_req_funct_comp_evid_flag_t {
 };
 
 /**
- * PTS Component Functional Type for Qualifier field
- */
-enum pts_attr_req_funct_comp_type_t {
-       /** Unknown */
-       PTS_FUNC_COMP_TYPE_UNKNOWN =                    0x0,
-       /** Trusted Platform */
-       PTS_FUNC_COMP_TYPE_TRUSTED =                    0x1,
-       /** Operating System */
-       PTS_FUNC_COMP_TYPE_OS =                                 0x2,
-       /** Graphical User Interface */
-       PTS_FUNC_COMP_TYPE_GUI =                                0x3,
-       /** Application */
-       PTS_FUNC_COMP_TYPE_APP =                                0x4,
-       /** Networking */
-       PTS_FUNC_COMP_TYPE_NET =                                0x5,
-       /** Library */
-       PTS_FUNC_COMP_TYPE_LIB =                                0x6,
-       /** TNC Defined Component */
-       PTS_FUNC_COMP_TYPE_TNC =                                0x7,
-       /** All matching Components */
-       PTS_FUNC_COMP_TYPE_ALL =                                0xF,
-};
-
-/**
- * PTS Component Functional Name Binary Enumeration
- */
-enum pts_attr_req_funct_comp_name_bin_enum_t {
-       /** Ignore */
-       PTS_FUNC_COMP_NAME_IGNORE =                             0x0000,
-       /** CRTM */
-       PTS_FUNC_COMP_NAME_CRTM =                               0x0001,
-       /** BIOS */
-       PTS_FUNC_COMP_NAME_BIOS =                               0x0002,
-       /** Platform Extensions */
-       PTS_FUNC_COMP_NAME_PLAT_EXT =                   0x0003,
-       /** Motherboard firmware */
-       PTS_FUNC_COMP_NAME_BOARD =                              0x0004,
-       /** Initial Program Loader */
-       PTS_FUNC_COMP_NAME_INIT_LOADER =                0x0005,
-       /** Option ROMs */
-       PTS_FUNC_COMP_NAME_OPT_ROMS =                   0x0006,
-};
-
-/**
- * Qualifier for Functional Component
- */
-struct tcg_pts_qualifier_t {
-       bool      kernel;
-       bool      sub_component;
-       pts_attr_req_funct_comp_type_t  type;
-};
-
-/**
  * Class implementing the TCG PTS Request Functional Component Evidence attribute
  *
  */
@@ -118,7 +63,7 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
        /**
         * Set flags for PTS Request Functional Component Evidence
         *
-        * @param flags                         Set of flags
+        * @param flags                 Set of flags
         */
        void (*set_flags)(tcg_pts_attr_req_funct_comp_evid_t *this, 
                                          pts_attr_req_funct_comp_evid_flag_t flags);
@@ -149,31 +94,31 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
         *
         * @return                              Functional Name Category Qualifier
         */
-       tcg_pts_qualifier_t (*get_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this);
+       pts_qualifier_t (*get_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this);
        
        /**
         * Set qualifier for Component Functional Name
         *
-        * @param qualifier                     Functional Name Category Qualifier
+        * @param qualifier             Functional Name Category Qualifier
         */
        void (*set_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this,
-                                                 tcg_pts_qualifier_t qualifier);
+                                                 pts_qualifier_t qualifier);
        
        /**
         * Get Component Functional Name
         *
         * @return                              Component Functional Name
         */
-       pts_attr_req_funct_comp_name_bin_enum_t (*get_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this);
+       pts_funct_comp_name_t (*get_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this);
        
        
        /**
         * Set Component Functional Name
         *
-        * @param name                          Component Functional Name
+        * @param name                  Component Functional Name
         */
        void (*set_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this,
-                               pts_attr_req_funct_comp_name_bin_enum_t name);
+                                                               pts_funct_comp_name_t name);
        
        
 };
@@ -188,15 +133,14 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
  * @param name                         Component Functional Name
  */
 pa_tnc_attr_t* tcg_pts_attr_req_funct_comp_evid_create(pts_attr_req_funct_comp_evid_flag_t flags,
-                                                       u_int32_t depth, 
-                                                       u_int32_t vendor_id,
-                                                       tcg_pts_qualifier_t qualifier,
-                                                       pts_attr_req_funct_comp_name_bin_enum_t name);
+                                                       u_int32_t depth, u_int32_t vendor_id,
+                                                       pts_qualifier_t qualifier,
+                                                       pts_funct_comp_name_t name);
 
 /**
  * Creates an tcg_pts_attr_req_funct_comp_evid_t object from received data
  *
- * @param value                                unparsed attribute value
+ * @param value                                Unparsed attribute value
  */
 pa_tnc_attr_t* tcg_pts_attr_req_funct_comp_evid_create_from_data(chunk_t value);