Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / uss / uss_vol.h
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 /*
11 * Interface to the volume operations used by the AFS user
12 * account facility.
13 */
14
15 #ifndef _USS_VOL_H_
16 #define _USS_VOL_H_ 1
17
18 /*
19 * ------------------------ Exported functions -----------------------
20 */
21 extern afs_int32 uss_vol_GetServer(char *a_name);
22 /*
23 * Summary:
24 * Given the string name of a desired host, find its address.
25 *
26 * Args:
27 * a_name : String name of desired host.
28 *
29 * Returns:
30 * Host address in network byte order.
31 */
32
33 extern afs_int32 uss_vol_GetPartitionID(char *a_name);
34 /*
35 * Summary:
36 * Get partition id from a name.
37 *
38 * Args:
39 * a_name : Name of the partition ID.
40 *
41 * Returns:
42 * Numeric partition name, or -1 on failure.
43 */
44
45 extern afs_int32 uss_vol_CreateVol(char *a_volname, char *a_server,
46 char *a_partition, char *a_quota,
47 char *a_mpoint, char *a_owner,
48 char *a_acl);
49 /*
50 * Summary:
51 * Create a volume, set its disk quota, and mount it at the
52 * given place. Also, set the mountpoint's ACL.
53 *
54 * Args:
55 * char *a_volname : Volume name to mount.
56 * char *a_server : FileServer housing the volume
57 * char *a_partition : Partition housing the volume
58 * char *a_quota : Initial quota
59 * char *a_mpoint : Mountpoint to assign it
60 * char *a_owner : Name of mountpoint's owner
61 * char *a_acl : ACL for mountpoint.
62 *
63 * Returns:
64 * 0 if everything went well,
65 * 1 if there was a problem in the routine itself, or
66 * Other error code if problem occurred in lower-level call.
67 */
68
69 extern afs_int32 uss_vol_DeleteVol(char *a_volName, afs_int32 a_volID,
70 char *a_servName, afs_int32 a_servID,
71 char *a_partName, afs_int32 a_partID);
72 /*
73 * Summary:
74 * Delete the given volume.
75 *
76 * Args:
77 * char *a_volName : Name of the volume to delete.
78 * afs_int32 a_volID : Numerical volume ID.
79 * char *a_servName : Name of the server hosting the volume.
80 * afs_int32 a_servID : Numerical server ID.
81 * char *a_partName : Name of the home server partition.
82 * afs_int32 a_volID : Numerical partition ID.
83 *
84 * Returns:
85 * 0 if everything went well,
86 * 1 if there was a problem in the routine itself, or
87 * Other error code if problem occurred in lower-level call.
88 */
89
90 extern afs_int32 uss_vol_GetVolInfoFromMountPoint(char *a_mountpoint);
91 /*
92 * Summary:
93 * Given a mountpoint, pull out the name of the volume mounted
94 * there, along with the name of the FileServer and partition
95 * hosting it, putting them all in common locations.
96 *
97 * Args:
98 * char *a_mountpoint : Name of the mountpoint.
99 *
100 * Returns:
101 * 0 if everything went well,
102 * 1 if there was a problem in the routine itself, or
103 * Other error code if problem occurred in lower-level call.
104 */
105
106 #if 0
107 extern afs_int32 uss_vol_DeleteMountPoint();
108 /*
109 * Summary:
110 * Given a mountpoint, nuke it.
111 *
112 * Args:
113 * char *a_mountpoint : Name of the mountpoint.
114 *
115 * Returns:
116 * 0 if everything went well,
117 * 1 if there was a problem in the routine itself, or
118 * Other error code if problem occurred in lower-level call.
119 */
120 #endif
121 #endif /* _USS_VOL_H_ */