X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Flibnfs.h;h=bbca07e1f809192a34138929640689ef361bbdc1;hb=7f0242ca9a109c6825646609b8eda0ce0b866b67;hp=e95cdbe589ccf81e4f209af8fe5c5ff0c56372bc;hpb=440a7dfced274c078b61fdb87301d26a4177fc70;p=deb_libnfs.git diff --git a/include/libnfs.h b/include/libnfs.h index e95cdbe..bbca07e 100644 --- a/include/libnfs.h +++ b/include/libnfs.h @@ -20,6 +20,7 @@ #include struct nfs_context; +struct rpc_context; /* * Used for interfacing the async version of the api into an external eventsystem @@ -46,6 +47,10 @@ char *nfs_get_error(struct nfs_context *nfs); */ typedef void (*nfs_cb)(int err, struct nfs_context *nfs, void *data, void *private_data); +/* + * Callback for all ASYNC rpc functions + */ +typedef void (*rpc_cb)(struct rpc_context *rpc, int status, void *data, void *private_data); @@ -910,6 +915,30 @@ int nfs_link_async(struct nfs_context *nfs, const char *oldpath, const char *new int nfs_link(struct nfs_context *nfs, const char *oldpath, const char *newpath); +/* + * GETEXPORTS() + */ +/* + * Async getexports() + * NOTE: You must include 'libnfs-raw-mount.h' to get the definitions of the + * returned structures. + * + * This function will return the list of exports from an NFS server. + * + * Function returns + * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. + * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * + * When the callback is invoked, status indicates the result: + * 0 : Success. + * data is a pointer to an exports pointer: + * exports export = *(exports *)data; + * -errno : An error occured. + * data is the error string. + */ +int mount_getexports_async(struct rpc_context *rpc, const char *server, rpc_cb cb, void *private_data); + + //qqq replace later with lseek(cur, 0) off_t nfs_get_current_offset(struct nfsfh *nfsfh);