libnfs-private.h: wrap in extern "C" for C++ compatibility
[deb_libnfs.git] / include / libnfs-private.h
index 6b64033c6af13c1046ca90f45374e152680687cc..b22d9b6e89ac7d0bc6d1aa731ce6ca1f2cecdb05 100644 (file)
    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
+
+#ifndef _LIBNFS_PRIVATE_H_
+#define _LIBNFS_PRIVATE_H_
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"  /* HAVE_SOCKADDR_STORAGE ? */
 #endif
@@ -24,6 +28,9 @@
 
 #include "libnfs-zdr.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #if !defined(HAVE_SOCKADDR_STORAGE) && !defined(WIN32)
 /*
@@ -94,9 +101,11 @@ struct rpc_context {
 
        /* fragment reassembly */
        struct rpc_fragment *fragments;
-       
+
        /* parameters passable via URL */
        int tcp_syncnt;
+       int uid;
+       int gid;
 };
 
 struct rpc_pdu {
@@ -140,8 +149,16 @@ void rpc_set_autoreconnect(struct rpc_context *rpc);
 void rpc_unset_autoreconnect(struct rpc_context *rpc);
 
 void rpc_set_tcp_syncnt(struct rpc_context *rpc, int v);
+void rpc_set_uid(struct rpc_context *rpc, int uid);
+void rpc_set_gid(struct rpc_context *rpc, int gid);
 
 int rpc_add_fragment(struct rpc_context *rpc, char *data, uint64_t size);
 void rpc_free_all_fragments(struct rpc_context *rpc);
 
 const struct nfs_fh3 *nfs_get_rootfh(struct nfs_context *nfs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_LIBNFS_PRIVATE_H_ */