| 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_sr.h |
| 34 |
* |
| 35 |
* PURPOSE: static registry (SR) inteface declarations |
| 36 |
* |
| 37 |
* $Id: dat_sr.h,v 1.12 2005/03/24 05:58:28 jlentini Exp $ |
| 38 |
**********************************************************************/ |
| 39 |
|
| 40 |
#ifndef _DAT_SR_H_ |
| 41 |
#define _DAT_SR_H_ |
| 42 |
|
| 43 |
|
| 44 |
#include <dat2/udat.h> |
| 45 |
#include <dat2/dat_registry.h> |
| 46 |
|
| 47 |
#include "dat_osd.h" |
| 48 |
#include "dat_dictionary.h" |
| 49 |
|
| 50 |
/********************************************************************* |
| 51 |
* * |
| 52 |
* Strucutres * |
| 53 |
* * |
| 54 |
*********************************************************************/ |
| 55 |
|
| 56 |
typedef struct DAT_SR_ENTRY |
| 57 |
{ |
| 58 |
DAT_PROVIDER_INFO info; |
| 59 |
char * lib_path; |
| 60 |
char * ia_params; |
| 61 |
DAT_OS_SIZE lib_path_size; |
| 62 |
DAT_OS_SIZE ia_params_size; |
| 63 |
DAT_OS_LIBRARY_HANDLE lib_handle; |
| 64 |
DAT_PROVIDER_INIT_FUNC init_func; |
| 65 |
DAT_PROVIDER_FINI_FUNC fini_func; |
| 66 |
DAT_COUNT ref_count; |
| 67 |
struct DAT_SR_ENTRY *next; |
| 68 |
} DAT_SR_ENTRY; |
| 69 |
|
| 70 |
|
| 71 |
/********************************************************************* |
| 72 |
* * |
| 73 |
* Function Declarations * |
| 74 |
* * |
| 75 |
*********************************************************************/ |
| 76 |
|
| 77 |
extern DAT_RETURN |
| 78 |
dat_sr_init ( void ); |
| 79 |
|
| 80 |
extern DAT_RETURN |
| 81 |
dat_sr_fini ( void ); |
| 82 |
|
| 83 |
extern DAT_RETURN |
| 84 |
dat_sr_insert ( |
| 85 |
IN const DAT_PROVIDER_INFO *info, |
| 86 |
IN DAT_SR_ENTRY *entry ); |
| 87 |
|
| 88 |
extern DAT_RETURN dat_sr_remove( |
| 89 |
IN const DAT_PROVIDER_INFO *info); |
| 90 |
|
| 91 |
extern DAT_RETURN |
| 92 |
dat_sr_size ( |
| 93 |
OUT DAT_COUNT *size); |
| 94 |
|
| 95 |
extern DAT_RETURN |
| 96 |
dat_sr_list ( |
| 97 |
IN DAT_COUNT max_to_return, |
| 98 |
OUT DAT_COUNT *entries_returned, |
| 99 |
OUT DAT_PROVIDER_INFO * (dat_provider_list[]) ); |
| 100 |
|
| 101 |
extern DAT_RETURN |
| 102 |
dat_sr_remove_all( |
| 103 |
IN DAT_DICTIONARY *p_dictionary); |
| 104 |
|
| 105 |
extern DAT_RETURN |
| 106 |
dat_sr_provider_open ( |
| 107 |
IN const DAT_PROVIDER_INFO *info ); |
| 108 |
|
| 109 |
extern DAT_RETURN |
| 110 |
dat_sr_provider_close ( |
| 111 |
IN const DAT_PROVIDER_INFO *info ); |
| 112 |
|
| 113 |
|
| 114 |
#endif |