1#ifndef __SHARE_H__
2#define __SHARE_H__
3
4#include "constant.h"
5#include "group.h"
6
7typedef struct sh_info{
8	char	name[FSH_MaxShareLen+1];		// name of share
9	char	comment[FSH_MaxCommentLen+1];	// comment of share
10	unsigned char dir[FSH_MaxDirLen+1];	// folder of share
11	int		hard_index;
12	int 	conflict;					// 0 - no conflict, 1- conflict
13}sh_info;
14
15typedef struct sh_list{
16	sh_info		sh;
17	grp_list	*pGroup;			// groups that can access the share
18#ifdef SHARE_USER
19	u_list	*pUser;			// users that can access the share
20#endif
21	struct 		sh_list *pNext;		// pNext share
22}sh_list;
23
24typedef struct shname_list{
25    char		name[FSH_MaxShareLen+1];		// name of share
26    struct		shname_list *pNext;
27}shname_list;
28// share routins
29int AddShare (sh_info * sh);
30int DelShare (char *name);
31int DelAllShare (int deldir);
32int ShareExist (char *name);
33int UpdateShare (char *name, sh_info * sh);
34int GetAllShare (sh_list **ppList);
35void FreeShareList (sh_list * pList);
36void FreeShGrpList (grp_list * gl);
37int GetShareInfo (sh_info * pSh);
38int AddShareWithGroup (sh_list * pSh);
39int GetShareWithGroup (sh_list * pList);
40int GetShareNameList(shname_list **ppList);
41void FreeShareNameList(shname_list *pList);
42int GetNumOfShares(void);
43char * GetPublicSh(int hard_index);
44int AddWinShares(char *sh_name, int dev_no);
45int DelWinShares(char *share_name, int dev_no, int mounts);
46#endif
47