| 1 |
/* |
| 2 |
* Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. |
| 3 |
* |
| 4 |
* This Software is licensed under one of the following licenses: |
| 5 |
* |
| 6 |
* 1) under the terms of the "Common Public License 1.0" a copy of which is |
| 7 |
* in the file LICENSE.txt in the root directory. The license is also |
| 8 |
* available from the Open Source Initiative, see |
| 9 |
* http://www.opensource.org/licenses/cpl.php. |
| 10 |
* |
| 11 |
* 2) under the terms of the "The BSD License" a copy of which is in the file |
| 12 |
* LICENSE2.txt in the root directory. The license is also available from |
| 13 |
* the Open Source Initiative, see |
| 14 |
* http://www.opensource.org/licenses/bsd-license.php. |
| 15 |
* |
| 16 |
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a |
| 17 |
* copy of which is in the file LICENSE3.txt in the root directory. The |
| 18 |
* license is also available from the Open Source Initiative, see |
| 19 |
* http://www.opensource.org/licenses/gpl-license.php. |
| 20 |
* |
| 21 |
* Licensee has the right to choose one of the above licenses. |
| 22 |
* |
| 23 |
* Redistributions of source code must retain the above copyright |
| 24 |
* notice and one of the license notices. |
| 25 |
* |
| 26 |
* Redistributions in binary form must reproduce both the above copyright |
| 27 |
* notice, one of the license notices in the documentation |
| 28 |
* and/or other materials provided with the distribution. |
| 29 |
*/ |
| 30 |
|
| 31 |
/********************************************************************** |
| 32 |
* |
| 33 |
* HEADER: dat_dictionary.h |
| 34 |
* |
| 35 |
* PURPOSE: dictionary data structure |
| 36 |
* |
| 37 |
* $Id: dat_dictionary.h,v 1.10 2005/03/24 05:58:27 jlentini Exp $ |
| 38 |
**********************************************************************/ |
| 39 |
|
| 40 |
#ifndef _DAT_DICTIONARY_H_ |
| 41 |
#define _DAT_DICTIONARY_H_ |
| 42 |
|
| 43 |
|
| 44 |
#include "dat_osd.h" |
| 45 |
|
| 46 |
|
| 47 |
/********************************************************************* |
| 48 |
* * |
| 49 |
* Typedefs * |
| 50 |
* * |
| 51 |
*********************************************************************/ |
| 52 |
|
| 53 |
typedef struct DAT_DICTIONARY DAT_DICTIONARY; |
| 54 |
typedef void * DAT_DICTIONARY_DATA; |
| 55 |
typedef void * DAT_DICTIONARY_ENTRY; |
| 56 |
|
| 57 |
|
| 58 |
/********************************************************************* |
| 59 |
* * |
| 60 |
* Function Prototypes * |
| 61 |
* * |
| 62 |
*********************************************************************/ |
| 63 |
|
| 64 |
extern DAT_RETURN |
| 65 |
dat_dictionary_create ( |
| 66 |
OUT DAT_DICTIONARY **pp_dictionary); |
| 67 |
|
| 68 |
extern DAT_RETURN |
| 69 |
dat_dictionary_destroy ( |
| 70 |
IN DAT_DICTIONARY *p_dictionary); |
| 71 |
|
| 72 |
extern DAT_RETURN |
| 73 |
dat_dictionary_size ( |
| 74 |
IN DAT_DICTIONARY *p_dictionary, |
| 75 |
OUT DAT_COUNT *p_size); |
| 76 |
|
| 77 |
extern DAT_RETURN |
| 78 |
dat_dictionary_entry_create ( |
| 79 |
OUT DAT_DICTIONARY_ENTRY *p_entry); |
| 80 |
|
| 81 |
extern DAT_RETURN |
| 82 |
dat_dictionary_entry_destroy ( |
| 83 |
IN DAT_DICTIONARY_ENTRY entry); |
| 84 |
|
| 85 |
extern DAT_RETURN |
| 86 |
dat_dictionary_insert ( |
| 87 |
IN DAT_DICTIONARY *p_dictionary, |
| 88 |
IN DAT_DICTIONARY_ENTRY entry, |
| 89 |
IN const DAT_PROVIDER_INFO *key, |
| 90 |
IN DAT_DICTIONARY_DATA data); |
| 91 |
|
| 92 |
extern DAT_RETURN |
| 93 |
dat_dictionary_search ( |
| 94 |
IN DAT_DICTIONARY *p_dictionary, |
| 95 |
IN const DAT_PROVIDER_INFO *key, |
| 96 |
OUT DAT_DICTIONARY_DATA *p_data); |
| 97 |
|
| 98 |
extern DAT_RETURN |
| 99 |
dat_dictionary_enumerate ( |
| 100 |
IN DAT_DICTIONARY *p_dictionary, |
| 101 |
IN DAT_DICTIONARY_DATA array[], |
| 102 |
IN DAT_COUNT array_size); |
| 103 |
|
| 104 |
|
| 105 |
extern DAT_RETURN |
| 106 |
dat_dictionary_remove ( |
| 107 |
IN DAT_DICTIONARY *p_dictionary, |
| 108 |
IN DAT_DICTIONARY_ENTRY *p_entry, |
| 109 |
IN const DAT_PROVIDER_INFO *key, |
| 110 |
OUT DAT_DICTIONARY_DATA *p_data); |
| 111 |
|
| 112 |
#endif |