This file is indexed.

/usr/include/libgearman-1.0/constants.h is in libgearman-dev 1.0.6-9.

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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 * 
 *  Gearmand client and server library.
 *
 *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
 *  Copyright (C) 2008 Brian Aker, Eric Day
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are
 *  met:
 *
 *      * Redistributions of source code must retain the above copyright
 *  notice, this list of conditions and the following disclaimer.
 *
 *      * Redistributions in binary form must reproduce the above
 *  copyright notice, this list of conditions and the following disclaimer
 *  in the documentation and/or other materials provided with the
 *  distribution.
 *
 *      * The names of its contributors may not be used to endorse or
 *  promote products derived from this software without specific prior
 *  written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */



#pragma once

#include <libgearman-1.0/priority.h>
#include <libgearman-1.0/protocol.h>
#include <libgearman-1.0/return.h>
#include <libgearman-1.0/limits.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @addtogroup gearman_constants Constants
 * @ingroup gearman_universal
 * @ingroup gearman_client
 * @ingroup gearman_worker
 * @{
 */

/**
 * Verbosity levels.
 */
typedef enum
{
  GEARMAN_VERBOSE_NEVER,
  GEARMAN_VERBOSE_FATAL,
  GEARMAN_VERBOSE_ERROR,
  GEARMAN_VERBOSE_INFO,
  GEARMAN_VERBOSE_DEBUG,
  GEARMAN_VERBOSE_CRAZY,
  GEARMAN_VERBOSE_MAX
} gearman_verbose_t;

/** @} */

/**
 * @ingroup gearman_universal
 * Options for gearman_universal_st.
 */
typedef enum
{
  GEARMAN_NON_BLOCKING,
  GEARMAN_DONT_TRACK_PACKETS,
  GEARMAN_MAX
} gearman_universal_options_t;

/**
 * @ingroup gearman_con
 * Options for gearman_connection_st.
 */
typedef enum
{
  GEARMAN_CON_READY,
  GEARMAN_CON_PACKET_IN_USE,
  GEARMAN_CON_EXTERNAL_FD,
  GEARMAN_CON_IGNORE_LOST_CONNECTION,
  GEARMAN_CON_CLOSE_AFTER_FLUSH,
  GEARMAN_CON_MAX
} gearman_connection_options_t;

/**
 * @ingroup gearman_client
 * Options for gearman_client_st.
 */
typedef enum
{
  GEARMAN_CLIENT_ALLOCATED=         (1 << 0),
  GEARMAN_CLIENT_NON_BLOCKING=      (1 << 1),
  GEARMAN_CLIENT_TASK_IN_USE=       (1 << 2),
  GEARMAN_CLIENT_UNBUFFERED_RESULT= (1 << 3),
  GEARMAN_CLIENT_NO_NEW=            (1 << 4),
  GEARMAN_CLIENT_FREE_TASKS=        (1 << 5),
  GEARMAN_CLIENT_GENERATE_UNIQUE=   (1 << 6),
  GEARMAN_CLIENT_MAX=               (1 << 7)
} gearman_client_options_t;

/**
 * @ingroup gearman_worker
 * Options for gearman_worker_st.
 */
typedef enum
{
  GEARMAN_WORKER_ALLOCATED=        (1 << 0),
  GEARMAN_WORKER_NON_BLOCKING=     (1 << 1),
  GEARMAN_WORKER_PACKET_INIT=      (1 << 2),
  GEARMAN_WORKER_GRAB_JOB_IN_USE=  (1 << 3),
  GEARMAN_WORKER_PRE_SLEEP_IN_USE= (1 << 4),
  GEARMAN_WORKER_WORK_JOB_IN_USE=  (1 << 5),
  GEARMAN_WORKER_CHANGE=           (1 << 6),
  GEARMAN_WORKER_GRAB_UNIQ=        (1 << 7),
  GEARMAN_WORKER_TIMEOUT_RETURN=   (1 << 8),
  GEARMAN_WORKER_GRAB_ALL=   (1 << 9),
  GEARMAN_WORKER_MAX=   (1 << 10)
} gearman_worker_options_t;

/* Types. */
typedef struct gearman_packet_st gearman_packet_st;
typedef struct gearman_task_st gearman_task_st;
typedef struct gearman_client_st gearman_client_st;
typedef struct gearman_job_st gearman_job_st;
typedef struct gearman_worker_st gearman_worker_st;
typedef struct gearman_allocator_t gearman_allocator_t;
typedef struct gearman_task_attr_t gearman_task_attr_t;
typedef struct gearman_result_st gearman_result_st;
typedef struct gearman_string_t gearman_string_t;
typedef struct gearman_argument_t gearman_argument_t;
typedef struct gearman_status_t gearman_status_t;

// Custom allocators
typedef void* (gearman_malloc_fn)(size_t size, void *context);
typedef void* (gearman_realloc_fn)(void *ptr, size_t size, void *context);
typedef void* (gearman_calloc_fn)(size_t nelm, size_t size, void *context);
typedef void (gearman_free_fn)(void *ptr, void *context);


typedef gearman_return_t (gearman_parse_server_fn)(const char *host, in_port_t port, void *context);

typedef void (gearman_task_context_free_fn)(gearman_task_st *task, void *context);

typedef void (gearman_log_fn)(const char *line, gearman_verbose_t verbose, void *context);


// Worker types

typedef void* (gearman_worker_fn)(gearman_job_st *job, void *context,
                                  size_t *result_size,
                                  gearman_return_t *ret_ptr);

typedef gearman_return_t (gearman_function_fn)(gearman_job_st *job, void *worker_context);

typedef struct gearman_aggregator_st gearman_aggregator_st;
typedef gearman_return_t (gearman_aggregator_fn)(gearman_aggregator_st *, gearman_task_st *, gearman_result_st *);

/** @} */

#ifdef __cplusplus
}
#endif