cpp-d1064d
[cross.git] / i686-linux-gnu-4.7 / usr / include / rpcsvc / nis_callback.h
1 /*
2  * Copyright (c) 2010, Oracle America, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  *       notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  *       copyright notice, this list of conditions and the following
12  *       disclaimer in the documentation and/or other materials
13  *       provided with the distribution.
14  *     * Neither the name of the "Oracle America, Inc." nor the names of its
15  *       contributors may be used to endorse or promote products derived
16  *       from this software without specific prior written permission.
17  *
18  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22  *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23  *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25  *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27  *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28  *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 #ifndef _RPCSVC_NIS_CALLBACK_H
32 #define _RPCSVC_NIS_CALLBACK_H 1
33
34 #include <rpc/rpc.h>
35 #include <rpcsvc/nis.h>
36
37 __BEGIN_DECLS
38
39 typedef nis_object *obj_p;
40
41 struct cback_data {
42         struct {
43                 u_int entries_len;
44                 obj_p *entries_val;
45         } entries;
46 };
47 typedef struct cback_data cback_data;
48
49 #define CB_PROG 100302
50 #define CB_VERS 1
51
52 #define CBPROC_RECEIVE 1
53 extern  bool_t * cbproc_receive_1 (cback_data *, CLIENT *) __THROW;
54 extern  bool_t * cbproc_receive_1_svc (cback_data *, struct svc_req *) __THROW;
55
56 #define CBPROC_FINISH 2
57 extern  void * cbproc_finish_1 (void *, CLIENT *) __THROW;
58 extern  void * cbproc_finish_1_svc (void *, struct svc_req *) __THROW;
59
60 #define CBPROC_ERROR 3
61 extern  void * cbproc_error_1 (nis_error *, CLIENT *) __THROW;
62 extern  void * cbproc_error_1_svc (nis_error *, struct svc_req *) __THROW;
63 extern int cb_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t) __THROW;
64
65 /* the xdr functions */
66
67 extern  bool_t xdr_obj_p (XDR *, obj_p*) __THROW;
68 extern  bool_t xdr_cback_data (XDR *, cback_data*) __THROW;
69
70 __END_DECLS
71
72 #endif /* !_RPCVSC_NIS_CALLBACK_H */