Initial support for RQUOTA protocol
[deb_libnfs.git] / include / libnfs-raw.h
index b141e6156c9250a1b1b1e3310acb96e056b8f58e..8ba8e9803a6a3a1a41320c6817829d630ce501e9 100644 (file)
@@ -551,3 +551,41 @@ int rpc_nfs_link_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *file,
 
 
 
+
+/* 
+ * RQUOTA FUNCTIONS
+ */
+char *rquotastat_to_str(int error);
+int rquotastat_to_errno(int error);
+
+/*
+ * Call RQUOTA1/NULL
+ * Function returns
+ *  0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
+ *                      data is NULL.
+ * RPC_STATUS_ERROR   : An error occured when trying to contact the rquota daemon.
+ *                      data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ *                     data is NULL.
+ */
+int rpc_rquota1_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data);
+
+/*
+ * Call RQUOTA1/GETQUOTA
+ * Function returns
+ *  0 : The call was initiated. The callback will be invoked when the call completes.
+ * <0 : An error occured when trying to set up the call. The callback will not be invoked.
+ *
+ * When the callback is invoked, status indicates the result:
+ * RPC_STATUS_SUCCESS : We got a successful response from the rquota daemon.
+ *                      data is a RQUOTA1res structure.
+ * RPC_STATUS_ERROR   : An error occured when trying to contact the rquota daemon.
+ *                      data is the error string.
+ * RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
+ *                     data is NULL.
+ */
+int rpc_rquota1_getquota_async(struct rpc_context *rpc, rpc_cb cb, char *export, int uid, void *private_data);