f2fc7c89fca42c42f172cd56dc80e69138040516
[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();
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();
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();
46     /*
47      * Summary:
48      *    Create a volume, set its disk quota, and mount it at the
49      *    given place.  Also, set the mountpoint's ACL.
50      *
51      * Args:
52      *    char *a_volname   : Volume name to mount.
53      *    char *a_server    : FileServer housing the volume
54      *    char *a_partition : Partition housing the volume
55      *    char *a_quota     : Initial quota
56      *    char *a_mpoint    : Mountpoint to assign it
57      *    char *a_owner     : Name of mountpoint's owner
58      *    char *a_acl       : ACL for mountpoint.
59      *
60      * Returns:
61      *    0 if everything went well,
62      *    1 if there was a problem in the routine itself, or
63      *    Other error code if problem occurred in lower-level call.
64      */
65
66 extern afs_int32 uss_vol_DeleteVol();
67     /*
68      * Summary:
69      *    Delete the given volume.
70      *
71      * Args:
72      *    char *a_volName  : Name of the volume to delete.
73      *    afs_int32 a_volID     : Numerical volume ID.
74      *    char *a_servName : Name of the server hosting the volume.
75      *    afs_int32 a_servID    : Numerical server ID.
76      *    char *a_partName : Name of the home server partition.
77      *    afs_int32 a_volID     : Numerical partition ID.
78      *
79      * Returns:
80      *    0 if everything went well,
81      *    1 if there was a problem in the routine itself, or
82      *    Other error code if problem occurred in lower-level call.
83      */
84
85 extern afs_int32 uss_vol_GetVolInfoFromMountPoint();
86     /*
87      * Summary:
88      *    Given a mountpoint, pull out the name of the volume mounted
89      *    there, along with the name of the FileServer and partition
90      *    hosting it, putting them all in common locations.
91      *
92      * Args:
93      *    char *a_mountpoint : Name of the mountpoint.
94      *
95      * Returns:
96      *    0 if everything went well,
97      *    1 if there was a problem in the routine itself, or
98      *    Other error code if problem occurred in lower-level call.
99      */
100
101 extern afs_int32 uss_vol_DeleteMountPoint();
102     /*
103      * Summary:
104      *    Given a mountpoint, nuke it.
105      *
106      * Args:
107      *    char *a_mountpoint : Name of the mountpoint.
108      *
109      * Returns:
110      *    0 if everything went well,
111      *    1 if there was a problem in the routine itself, or
112      *    Other error code if problem occurred in lower-level call.
113      */
114
115 #endif /* _USS_VOL_H_ */