#include <stdio.h>
#include <stdint.h>
#include <sys/types.h>
Go to the source code of this file.
◆ CLSYNC_API_VERSION
| #define CLSYNC_API_VERSION 2 |
◆ api_eventinfo_t
◆ api_funct_deinit
| typedef int(* api_funct_deinit) () |
◆ api_funct_init
| typedef int(* api_funct_init) (struct ctx *, struct indexes *) |
◆ api_funct_rsync
| typedef int(* api_funct_rsync) (const char *inclist, const char *exclist) |
◆ api_funct_sync
◆ eventinfo_flags_t
◆ eventobjtype_t
◆ eventinfo_flags
| Enumerator |
|---|
| EVIF_NONE | |
| EVIF_RECURSIVELY | |
| EVIF_CONTENTRECURSIVELY | |
Definition at line 56 of file clsync.h.
◆ eventobjtype
| Enumerator |
|---|
| EOT_UNKNOWN | |
| EOT_DOESNTEXIST | |
| EOT_FILE | |
| EOT_DIR | |
Definition at line 29 of file clsync.h.
◆ apievinfo2rsynclist()
Writes the list to list-file for "--include-from" option of rsync using array of api_eventinfo_t.
- Parameters
-
| [in] | indexes_p | Pointer to "indexes" |
| [in] | listfile | File identifier to write to |
| [in] | n | Number of records in apievinfo |
| [in] | apievinfo | Pointer to api_eventinfo_t records |
- Return values
-
| zero | Successful |
| non-zero | If got error while deleting the message. The error-code is placed into returned value. |
Definition at line 3171 of file sync.c.
◆ clsyncapi_fork()
| pid_t clsyncapi_fork |
( |
struct ctx * | ctx_p | ) |
|
|
extern |
clsync's wrapper for function "fork()". Should be used instead of "fork()" directly, to notify clsync about child's pid.
- Parameters
-
| [in] | ctx_p | Pointer to "ctx" |
- Return values
-
| -1 | If error (see "man 2 fork", added error code "ECANCELED" if too many children) |
| 0 | If child |
| pid | Pid of child of parent. (see "man 2 fork") |
Definition at line 1060 of file sync.c.
◆ clsyncapi_getapiversion()
| int clsyncapi_getapiversion |
( |
| ) |
|
|
extern |
Returns currect API version.
- Return values
-
| api_version | Version of clsync's API |
Definition at line 550 of file main.c.