1 /*
2  *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16 
17 /*
18  *  ======== uuidutil.h ========
19  *  DSP-BIOS Bridge driver support functions for TI OMAP processors.
20  *  Description:
21  *      This file contains the specification of UUID helper functions.
22  *
23  *! Revision History
24  *! ================
25  *! 09-Nov-2000 kc: Modified description of UUID utility functions.
26  *! 29-Sep-2000 kc: Appended "UUID_" prefix to UUID helper functions.
27  *! 10-Aug-2000 kc: Created.
28  *!
29  */
30 
31 #ifndef UUIDUTIL_
32 #define UUIDUTIL_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #define MAXUUIDLEN  37
39 
40 /*
41  *  ======== UUID_UuidToString ========
42  *  Purpose:
43  *      Converts a DSP_UUID to an ANSI string.
44  *  Parameters:
45  *      pUuid:      Pointer to a DSP_UUID object.
46  *      pszUuid:    Pointer to a buffer to receive a NULL-terminated UUID
47  *                  string.
48  *      size:	    Maximum size of the pszUuid string.
49  *  Returns:
50  *  Requires:
51  *      pUuid & pszUuid are non-NULL values.
52  *  Ensures:
53  *      Lenghth of pszUuid is less than MAXUUIDLEN.
54  *  Details:
55  *      UUID string limit currently set at MAXUUIDLEN.
56  */
57 	VOID UUID_UuidToString(IN struct DSP_UUID * pUuid, OUT CHAR * pszUuid,
58 			       INT size);
59 
60 /*
61  *  ======== UUID_UuidFromString ========
62  *  Purpose:
63  *      Converts an ANSI string to a DSP_UUID.
64  *  Parameters:
65  *      pszUuid:    Pointer to a string that represents a DSP_UUID object.
66  *      pUuid:      Pointer to a DSP_UUID object.
67  *  Returns:
68  *  Requires:
69  *      pUuid & pszUuid are non-NULL values.
70  *  Ensures:
71  *  Details:
72  *      We assume the string representation of a UUID has the following format:
73  *      "12345678_1234_1234_1234_123456789abc".
74  */
75 	extern VOID UUID_UuidFromString(IN CHAR * pszUuid,
76 					OUT struct DSP_UUID * pUuid);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif				/* UUIDUTIL_ */
82