1/** 2 * @addtogroup MC_UUID mcUuid - Universally Unique Identifier. 3 * 4 * <!-- Copyright Giesecke & Devrient GmbH 2011-2012 --> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. The name of the author may not be used to endorse or promote 15 * products derived from this software without specific prior 16 * written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 24 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 * @ingroup MC_DATA_TYPES 31 * @{ 32 */ 33 34#ifndef MC_UUID_H_ 35#define MC_UUID_H_ 36 37#define UUID_TYPE 38 39/** Universally Unique Identifier (UUID) according to ISO/IEC 11578. */ 40typedef struct { 41 uint8_t value[16]; /**< Value of the UUID. */ 42} mcUuid_t, *mcUuid_ptr; 43 44/** UUID value used as free marker in service provider containers. */ 45#define MC_UUID_FREE_DEFINE \ 46 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ 47 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } 48 49static const mcUuid_t MC_UUID_FREE = { 50 MC_UUID_FREE_DEFINE 51}; 52 53/** Reserved UUID. */ 54#define MC_UUID_RESERVED_DEFINE \ 55 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 56 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } 57 58static const mcUuid_t MC_UUID_RESERVED = { 59 MC_UUID_RESERVED_DEFINE 60}; 61 62/** UUID for system applications. */ 63#define MC_UUID_SYSTEM_DEFINE \ 64 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ 65 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE } 66 67static const mcUuid_t MC_UUID_SYSTEM = { 68 MC_UUID_SYSTEM_DEFINE 69}; 70 71#endif // MC_UUID_H_ 72 73/** @} */ 74 75