Annotation of embedaddon/strongswan/src/libimcv/swima/swima_record.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (C) 2017 Andreas Steffen
! 3: * HSR Hochschule fuer Technik Rapperswil
! 4: *
! 5: * This program is free software; you can redistribute it and/or modify it
! 6: * under the terms of the GNU General Public License as published by the
! 7: * Free Software Foundation; either version 2 of the License, or (at your
! 8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
! 9: *
! 10: * This program is distributed in the hope that it will be useful, but
! 11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! 13: * for more details.
! 14: */
! 15:
! 16: /**
! 17: * @defgroup swima_record swima_record
! 18: * @{ @ingroup libimcv_swima
! 19: */
! 20:
! 21: #ifndef SWIMA_RECORD_H_
! 22: #define SWIMA_RECORD_H_
! 23:
! 24: #include <library.h>
! 25: #include <pen/pen.h>
! 26:
! 27: typedef struct swima_record_t swima_record_t;
! 28:
! 29: /**
! 30: * Class storing a Software Inventory Evidence Collection record
! 31: */
! 32: struct swima_record_t {
! 33:
! 34: /**
! 35: * Get Software Identifier and optional Software Location
! 36: *
! 37: * @return Record ID
! 38: */
! 39: uint32_t (*get_record_id)(swima_record_t *this);
! 40:
! 41: /**
! 42: * Get Software Identifier and optional Software Location
! 43: *
! 44: * @param sw_locator Optional Software Locator
! 45: * @return Software Identifier
! 46: */
! 47: chunk_t (*get_sw_id)(swima_record_t *this, chunk_t *sw_locator);
! 48:
! 49: /**
! 50: * Set Data Model
! 51: *
! 52: * @param Data model type in PEN namespace
! 53: */
! 54: void (*set_data_model)(swima_record_t *this, pen_type_t data_model);
! 55:
! 56: /**
! 57: * Get Data Model
! 58: *
! 59: * @return Data model type in PEN namespace
! 60: */
! 61: pen_type_t (*get_data_model)(swima_record_t *this);
! 62:
! 63: /**
! 64: * Set Source ID
! 65: *
! 66: * @param Source ID
! 67: */
! 68: void (*set_source_id)(swima_record_t *this, uint8_t source_id);
! 69:
! 70: /**
! 71: * Get Source ID
! 72: *
! 73: * @return Source ID
! 74: */
! 75: uint8_t (*get_source_id)(swima_record_t *this);
! 76:
! 77: /**
! 78: * Set Software Inventory Evidence Record
! 79: *
! 80: * @param Software Inventory Evidence Record
! 81: */
! 82: void (*set_record)(swima_record_t *this, chunk_t record);
! 83:
! 84: /**
! 85: * Get Software Inventory Evidence Record
! 86: *
! 87: * @return Software Inventory Evidence Record
! 88: */
! 89: chunk_t (*get_record)(swima_record_t *this);
! 90:
! 91: /**
! 92: * Get a new reference to a swima_record object
! 93: *
! 94: * @return this, with an increased refcount
! 95: */
! 96: swima_record_t* (*get_ref)(swima_record_t *this);
! 97:
! 98: /**
! 99: * Destroys a swima_record_t object.
! 100: */
! 101: void (*destroy)(swima_record_t *this);
! 102:
! 103: };
! 104:
! 105: /**
! 106: * Creates a swima_record_t object
! 107: *
! 108: * @param record_id Record ID
! 109: * @param sw_id Software Identifier
! 110: * @param sw_locator Software Locator or empty chunk
! 111: */
! 112: swima_record_t* swima_record_create(uint32_t record_id, chunk_t sw_id,
! 113: chunk_t sw_locator);
! 114:
! 115: #endif /** SWIMA_RECORD_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>