xref: /onnv-gate/usr/src/lib/libstmf/common/store.h (revision 9585:bf09620212ab)
17836SJohn.Forte@Sun.COM /*
27836SJohn.Forte@Sun.COM  * CDDL HEADER START
37836SJohn.Forte@Sun.COM  *
47836SJohn.Forte@Sun.COM  * The contents of this file are subject to the terms of the
57836SJohn.Forte@Sun.COM  * Common Development and Distribution License (the "License").
67836SJohn.Forte@Sun.COM  * You may not use this file except in compliance with the License.
77836SJohn.Forte@Sun.COM  *
87836SJohn.Forte@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97836SJohn.Forte@Sun.COM  * or http://www.opensolaris.org/os/licensing.
107836SJohn.Forte@Sun.COM  * See the License for the specific language governing permissions
117836SJohn.Forte@Sun.COM  * and limitations under the License.
127836SJohn.Forte@Sun.COM  *
137836SJohn.Forte@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
147836SJohn.Forte@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157836SJohn.Forte@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
167836SJohn.Forte@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
177836SJohn.Forte@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
187836SJohn.Forte@Sun.COM  *
197836SJohn.Forte@Sun.COM  * CDDL HEADER END
207836SJohn.Forte@Sun.COM  */
217836SJohn.Forte@Sun.COM /*
22*9585STim.Szeto@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237836SJohn.Forte@Sun.COM  * Use is subject to license terms.
247836SJohn.Forte@Sun.COM  */
257836SJohn.Forte@Sun.COM #ifndef	_STORE_H
267836SJohn.Forte@Sun.COM #define	_STORE_H
277836SJohn.Forte@Sun.COM 
287836SJohn.Forte@Sun.COM #ifdef	__cplusplus
297836SJohn.Forte@Sun.COM extern "C" {
307836SJohn.Forte@Sun.COM #endif
317836SJohn.Forte@Sun.COM 
327836SJohn.Forte@Sun.COM #include <libnvpair.h>
337836SJohn.Forte@Sun.COM 
347836SJohn.Forte@Sun.COM /*
357836SJohn.Forte@Sun.COM  * Error defines
367836SJohn.Forte@Sun.COM  */
377836SJohn.Forte@Sun.COM #define	STMF_PS_SUCCESS			0
387836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR			1
397836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_MEMBER_NOT_FOUND	2
407836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_GROUP_NOT_FOUND	3
417836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_NOT_FOUND		4
427836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_EXISTS		5
437836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_NOMEM		6
447836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_RETRY		7
457836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_BUSY		8
467836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_SERVICE_NOT_FOUND 9
477836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_INVALID_ARG	10
487836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_VERSION_MISMATCH	11
497836SJohn.Forte@Sun.COM #define	STMF_PS_ERROR_PROV_DATA_STALE	12
507836SJohn.Forte@Sun.COM 
517836SJohn.Forte@Sun.COM int psAddHostGroupMember(char *groupName, char *memberName);
527836SJohn.Forte@Sun.COM int psAddTargetGroupMember(char *groupName, char *memberName);
537836SJohn.Forte@Sun.COM int psAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry);
547836SJohn.Forte@Sun.COM int psCreateHostGroup(char *groupName);
557836SJohn.Forte@Sun.COM int psDeleteHostGroup(char *groupName);
567836SJohn.Forte@Sun.COM int psCreateTargetGroup(char *groupName);
577836SJohn.Forte@Sun.COM int psDeleteTargetGroup(char *groupName);
587836SJohn.Forte@Sun.COM int psGetViewEntry(stmfGuid *lu, uint32_t viewEntryIndex, stmfViewEntry *ve);
597836SJohn.Forte@Sun.COM int psGetLogicalUnitList(stmfGuidList **guidList);
607836SJohn.Forte@Sun.COM int psRemoveHostGroupMember(char *groupName, char *memberName);
617836SJohn.Forte@Sun.COM int psRemoveTargetGroupMember(char *groupName, char *memberName);
627836SJohn.Forte@Sun.COM int psRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex);
637836SJohn.Forte@Sun.COM int psGetHostGroupList(stmfGroupList **groupList);
647836SJohn.Forte@Sun.COM int psGetTargetGroupList(stmfGroupList **groupList);
657836SJohn.Forte@Sun.COM int psGetHostGroupMemberList(char *groupName, stmfGroupProperties **groupList);
667836SJohn.Forte@Sun.COM int psGetTargetGroupMemberList(char *groupName,
677836SJohn.Forte@Sun.COM     stmfGroupProperties **groupList);
687836SJohn.Forte@Sun.COM int psGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList);
697836SJohn.Forte@Sun.COM int psCheckService();
707836SJohn.Forte@Sun.COM int psSetProviderData(char *providerName, nvlist_t *nvl, int providerType,
717836SJohn.Forte@Sun.COM     uint64_t *setHandle);
727836SJohn.Forte@Sun.COM int psGetProviderData(char *providerName, nvlist_t **nvl, int providerType,
737836SJohn.Forte@Sun.COM     uint64_t *setHandle);
747836SJohn.Forte@Sun.COM int psGetProviderDataList(stmfProviderList **providerList);
757836SJohn.Forte@Sun.COM int psClearProviderData(char *providerName, int providerType);
76*9585STim.Szeto@Sun.COM int psSetServicePersist(uint8_t persistType);
77*9585STim.Szeto@Sun.COM int psGetServicePersist(uint8_t *persistType);
787836SJohn.Forte@Sun.COM 
797836SJohn.Forte@Sun.COM #ifdef	__cplusplus
807836SJohn.Forte@Sun.COM }
817836SJohn.Forte@Sun.COM #endif
827836SJohn.Forte@Sun.COM 
837836SJohn.Forte@Sun.COM #endif	/* _STORE_H */
84