This file is indexed.

/usr/include/synce.h is in libsynce0-dev 0.15-1.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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/* $Id: synce.h.in 3815 2009-07-26 18:22:53Z mark_ellis $ */
#ifndef __synce_h__
#define __synce_h__

/*
 * Include some files
 */
#include <sys/types.h>
#include <time.h>
#include <stdint.h>

#ifndef __cplusplus
#include <stdbool.h>
#endif

#ifndef NULL
#include <stdlib.h>
#endif


/*
 * Get data types for compatibility with Microsoft Windows
 */
#include "synce_types.h"


/*
 * Functions provided by libsynce
 */

#ifdef __cplusplus
extern "C"
{
namespace synce
{
#endif

/*
 * TIME_FIELDS, FILETIME and DATE conversion
 */

void time_fields_from_filetime(const FILETIME* filetime, TIME_FIELDS* timeFields);
bool time_fields_to_filetime(const TIME_FIELDS* timeFields, FILETIME* filetime);

void filetime_from_unix_time(time_t unix_time, FILETIME *filetime);
time_t filetime_to_unix_time(const FILETIME *filetime); /* deprecated! use time_fields_from_filetime() */

#define DATE_TIMEVALUEONLY   1
#define DATE_DATEVALUEONLY   2

bool date_from_tm(struct tm* pTm, DATE *pDateOut);
bool date_to_tm(DATE dateIn, DWORD dwFlags, struct tm* pTm);


/*
 * Wide string handling
 */

char* wstr_to_ascii(LPCWSTR unicode);

char* wstr_to_utf8(LPCWSTR unicode);

char* wstr_to_current(LPCWSTR unicode);

LPWSTR wstr_from_ascii(const char* ascii);

LPWSTR wstr_from_utf8(const char* utf8);

LPWSTR wstr_from_current(const char* utf8);

void wstr_free_string(void* str);

size_t wstrlen(LPCWSTR unicode);

LPWSTR wstrcpy(LPWSTR dest, LPCWSTR src);

bool wstr_append(LPWSTR dest, LPCWSTR src, size_t max_dest_length);

bool wstr_equal(LPWSTR a, LPWSTR b);

LPWSTR wstrdup(LPCWSTR string);

/*
 * Old function names
 */

#define wstr_strlen(a)    wstrlen(a)
#define wstr_strcpy(a,b)  wstrcpy(a,b)


/*
 * Endian conversions
 */

#if !defined(htole32) || !defined(htole16) || !defined(letoh16) || !defined(letoh32) || !defined(htobe32) || !defined(htobe16) || !defined(betoh16) || !defined(betoh32)
#undef htole16
#undef htole32
#undef letoh16
#undef letoh32
#undef htobe16
#undef htobe32
#undef betoh16
#undef betoh32

#define SYNCE_HOST_BIGENDIAN 0
#define HAVE_BYTESWAP_HEADER 1

/* byte swapping functions */

#if HAVE_BYTESWAP_HEADER
#include <byteswap.h>
#else
uint16_t bswap_16(uint16_t x);
uint32_t bswap_32(uint32_t x);
#endif /* HAVE_BYTESWAP_HEADER */


/* define host-to-little-endian and little-endian-to-host macros */

#if SYNCE_HOST_BIGENDIAN

#define htole16(x)    bswap_16(x)
#define htole32(x)    bswap_32(x)
#define letoh16(x)    bswap_16(x)
#define letoh32(x)    bswap_32(x)

#define htobe16(x)    (x)
#define htobe32(x)    (x)
#define betoh16(x)    (x)
#define betoh32(x)    (x)

#else /* HOST_LITTLE_ENDIAN */

#define htole16(x)    (x)
#define htole32(x)    (x)
#define letoh16(x)    (x)
#define letoh32(x)    (x)

#define htobe16(x)    bswap_16(x)
#define htobe32(x)    bswap_32(x)
#define betoh16(x)    bswap_16(x)
#define betoh32(x)    bswap_32(x)

#endif /* SYNCE_HOST_BIGENDIAN */

#endif


/*
 * Configuration directory and file name stuff
 */

bool synce_get_directory(char** path);
bool synce_get_subdirectory(const char* name, char** directory);
bool synce_get_connection_filename(char** filename);
bool synce_set_connection_filename(const char* filename);
bool synce_set_default_connection_filename();
bool synce_get_script_directory(char** directory);

/*
 * Error handling
 */

const char* synce_strerror(DWORD error);


/*
 * Info from the ~/.synce/active_connection file
 * written by (v)dccm, or obtained over dbus from odccm or hal-dccm
 */

typedef struct _SynceInfo SynceInfo;

typedef enum _SynceInfoIdField
{
        INFO_NAME,
        INFO_OBJECT_PATH
} SynceInfoIdField;

SynceInfo* synce_info_new(const char* device_name);
SynceInfo* synce_info_new_by_field(SynceInfoIdField field, const char* data);
void synce_info_destroy(SynceInfo* info);

const char *synce_info_get_name(SynceInfo *info);
bool synce_info_get_os_version(SynceInfo *info, int *os_major, int *os_minor);
int synce_info_get_build_number(SynceInfo *info);
int synce_info_get_processor_type(SynceInfo *info);
const char *synce_info_get_os_name(SynceInfo *info);
const char *synce_info_get_model(SynceInfo *info);

const char *synce_info_get_device_ip(SynceInfo *info);
const char *synce_info_get_local_ip(SynceInfo *info);

int synce_info_get_partner_id_1(SynceInfo *info);
int synce_info_get_partner_id_2(SynceInfo *info);

const char *synce_info_get_object_path(SynceInfo *info);
pid_t synce_info_get_dccm_pid(SynceInfo *info);
const char *synce_info_get_transport(SynceInfo *info);
const char *synce_info_get_password(SynceInfo *info);
int synce_info_get_key(SynceInfo *info);

#ifdef __cplusplus
}
}
#endif


#endif