This file is indexed.

/usr/include/ccnet/job-mgr.h is in libccnet-dev 6.1.5-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
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/**
 * Job Manager manages long term jobs. These jobs are run in their
 * own threads.
 */

#ifndef JOB_MGR_H
#define JOB_MGR_H

#include <glib.h>

struct _CcnetSession;

typedef struct _CcnetJob CcnetJob;
typedef struct _CcnetJobManager CcnetJobManager;

/*
  The thread func should return the result back by
     return (void *)result;
  The result will be passed to JobDoneCallback.
 */
typedef void* (*JobThreadFunc)(void *data);
typedef void (*JobDoneCallback)(void *result);


struct _CcnetJobManager {
    GHashTable      *jobs;

    GThreadPool     *thread_pool;

    int              next_job_id;
};

void
ccnet_job_cancel (CcnetJob *job);

CcnetJobManager *
ccnet_job_manager_new (int max_threads);

void
ccnet_job_manager_free (CcnetJobManager *mgr);

int
ccnet_job_manager_schedule_job (CcnetJobManager *mgr,
                                JobThreadFunc func,
                                JobDoneCallback done_func,
                                void *data);

/** 
 * Wait a specific job to be done.
 */
void
ccnet_job_manager_wait_job (CcnetJobManager *mgr, int job_id);


#endif