This file is indexed.

/usr/include/searpc-server.h is in libsearpc-dev 3.0.8-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
#ifndef SEARPC_SERVER_H
#define SEARPC_SERVER_H

#include <glib.h>
#include <glib-object.h>
#include <jansson.h>

#ifndef DFT_DOMAIN
#define DFT_DOMAIN g_quark_from_string(G_LOG_DOMAIN)
#endif

typedef gchar* (*SearpcMarshalFunc) (void *func, json_t *param_array,
    gsize *ret_len);
typedef void (*RegisterMarshalFunc) (void);

void searpc_set_string_to_ret_object (json_t *object, char *ret);
void searpc_set_int_to_ret_object (json_t *object, json_int_t ret);
void searpc_set_object_to_ret_object (json_t *object, GObject *ret);
void searpc_set_objlist_to_ret_object (json_t *object, GList *ret);
void searpc_set_json_to_ret_object (json_t *object, json_t *ret);
char *searpc_marshal_set_ret_common (json_t *object, gsize *len, GError *error);

/**
 * searpc_server_init:
 *
 * Inititalize searpc server.
 */
void searpc_server_init (RegisterMarshalFunc register_func);

/**
 * searpc_server_final:
 * 
 * Free the server structure.
 */
void searpc_server_final ();

/**
 * searpc_create_service:
 *
 * Create a new service. Service is a set of functions.
 * The new service will be registered to the server.
 *
 * @svc_name: Service name.
 */
int searpc_create_service (const char *svc_name);

/**
 * searpc_remove_service:
 *
 * Remove the service from the server.
 */
void searpc_remove_service (const char *svc_name);

/**
 * searpc_server_register_marshal:
 *
 * For user to extend marshal functions.
 *
 * @signature: the signature of the marshal, register_marshal() will take
 * owner of this string.
 */
gboolean searpc_server_register_marshal (gchar *signature,
                                         SearpcMarshalFunc marshal);

/**
 * searpc_server_register_function:
 *
 * Register a rpc function with given signature to a service.
 *
 * @signature: the signature of the function, register_function() will take
 * owner of this string.
 */
gboolean searpc_server_register_function (const char *service,
                                          void* func,
                                          const gchar *fname,
                                          gchar *signature);

/**
 * searpc_server_call_function:
 * @service: service name.
 * @func: the serialized representation of the function to call.
 * @len: length of @func.
 * @ret_len: the length of the returned string.
 *
 * Call a registered function @func of a service.
 *
 * Returns the serialized representatio of the returned value.
 */
gchar *searpc_server_call_function (const char *service,
                                    gchar *func, gsize len, gsize *ret_len);

/**
 * searpc_compute_signature:
 * @ret_type: the return type of the function.
 * @pnum: number of parameters of the function.
 *
 * Compute function signature.
 */
char* searpc_compute_signature (gchar *ret_type, int pnum, ...);

#endif