include: add various missing extern C decls.
This commit is contained in:
parent
7089b8dcae
commit
aac76c16c4
@ -22,6 +22,14 @@
|
||||
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void freerdp_bitmap_write(char* filename, void* data, int width, int height, int bpp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_BITMAP_H */
|
||||
|
@ -69,9 +69,17 @@ struct _FREERDP_DSP_CONTEXT
|
||||
const BYTE* src, int size, int channels, int block_size);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(void);
|
||||
FREERDP_API void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context);
|
||||
#define freerdp_dsp_context_reset_adpcm(_c) memset(&_c->adpcm, 0, sizeof(ADPCM))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_DSP_H */
|
||||
|
||||
|
@ -23,8 +23,16 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
|
||||
RDP_EVENT_CALLBACK on_event_free_callback, void* user_data);
|
||||
FREERDP_API void freerdp_event_free(RDP_EVENT* event);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_EVENT_H */
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/settings.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void freerdp_mkdir(char* path);
|
||||
FREERDP_API BOOL freerdp_check_file_exists(char* file);
|
||||
FREERDP_API char* freerdp_get_home_path(rdpSettings* settings);
|
||||
@ -35,4 +39,8 @@ FREERDP_API char* freerdp_get_parent_path(char* base_path, int depth);
|
||||
FREERDP_API BOOL freerdp_path_contains_separator(char* path);
|
||||
FREERDP_API void freerdp_detect_paths(rdpSettings* settings);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_FILE_H */
|
||||
|
@ -40,6 +40,10 @@ struct _LIST
|
||||
LIST_ITEM* tail;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API LIST* list_new(void);
|
||||
FREERDP_API void list_free(LIST* list);
|
||||
FREERDP_API void list_enqueue(LIST* list, void* data);
|
||||
@ -50,4 +54,8 @@ FREERDP_API void* list_next(LIST* list, void* data);
|
||||
FREERDP_API void* list_remove(LIST* list, void* data);
|
||||
FREERDP_API int list_size(LIST* list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_LIST_H */
|
||||
|
@ -120,6 +120,10 @@ struct _MSUSB_CONFIG_DESCRIPTOR
|
||||
int MsOutSize;
|
||||
} __attribute__((packed));
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* MSUSB_PIPE exported functions */
|
||||
FREERDP_API void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, UINT32 NewNumberOfPipes);
|
||||
|
||||
@ -135,4 +139,8 @@ FREERDP_API MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, UINT32 data
|
||||
FREERDP_API int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset);
|
||||
FREERDP_API void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_MSCONFIG_H */
|
||||
|
@ -23,6 +23,14 @@
|
||||
#include <stdlib.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API char* freerdp_passphrase_read(const char* prompt, char* buf, size_t bufsiz, int from_stdin);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_PASSPHRASE_H */
|
||||
|
@ -68,6 +68,10 @@ struct rdp_pcap
|
||||
};
|
||||
typedef struct rdp_pcap rdpPcap;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpPcap* pcap_open(char* name, BOOL write);
|
||||
FREERDP_API void pcap_close(rdpPcap* pcap);
|
||||
|
||||
@ -78,4 +82,8 @@ FREERDP_API BOOL pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record)
|
||||
FREERDP_API BOOL pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record);
|
||||
FREERDP_API void pcap_flush(rdpPcap* pcap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_PCAP_H */
|
||||
|
@ -30,6 +30,10 @@ struct _PROFILER
|
||||
};
|
||||
typedef struct _PROFILER PROFILER;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API PROFILER* profiler_create(char* name);
|
||||
FREERDP_API void profiler_free(PROFILER* profiler);
|
||||
|
||||
@ -40,6 +44,10 @@ FREERDP_API void profiler_print_header();
|
||||
FREERDP_API void profiler_print(PROFILER* profiler);
|
||||
FREERDP_API void profiler_print_footer();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PROFILER
|
||||
#define IF_PROFILER(then) then
|
||||
#define PROFILER_DEFINE(prof) PROFILER* prof
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include <freerdp/rail.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString);
|
||||
FREERDP_API void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string);
|
||||
FREERDP_API BOOL rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
|
||||
@ -32,4 +36,8 @@ FREERDP_API void rail_write_unicode_string_value(STREAM* s, RAIL_UNICODE_STRING*
|
||||
FREERDP_API void* rail_clone_order(UINT32 event_type, void* order);
|
||||
FREERDP_API void rail_free_cloned_order(UINT32 event_type, void* order);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_RAIL_H */
|
||||
|
@ -31,6 +31,14 @@ extern struct termios orig_flags;
|
||||
extern struct termios new_flags;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API int freerdp_handle_signals(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_SIGNAL_H */
|
||||
|
@ -34,6 +34,10 @@ struct _STOPWATCH
|
||||
};
|
||||
typedef struct _STOPWATCH STOPWATCH;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API STOPWATCH* stopwatch_create();
|
||||
FREERDP_API void stopwatch_free(STOPWATCH* stopwatch);
|
||||
|
||||
@ -44,4 +48,8 @@ FREERDP_API void stopwatch_reset(STOPWATCH* stopwatch);
|
||||
FREERDP_API double stopwatch_get_elapsed_time_in_seconds(STOPWATCH* stopwatch);
|
||||
FREERDP_API void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, UINT32* sec, UINT32* usec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_STOPWATCH_H */
|
||||
|
@ -33,6 +33,10 @@ struct _STREAM
|
||||
};
|
||||
typedef struct _STREAM STREAM;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API STREAM* stream_new(int size);
|
||||
FREERDP_API void stream_free(STREAM* stream);
|
||||
|
||||
@ -178,5 +182,10 @@ static INLINE BOOL stream_skip(STREAM* s, int sz) {
|
||||
stream_seek(s, sz);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_STREAM_H */
|
||||
|
||||
|
@ -32,7 +32,15 @@ struct rdp_string
|
||||
};
|
||||
typedef struct rdp_string rdpString;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API BOOL freerdp_string_read_length32(STREAM* s, rdpString* string);
|
||||
FREERDP_API void freerdp_string_free(rdpString* string);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_STRING_H */
|
||||
|
@ -50,10 +50,18 @@ struct rdp_svc_plugin
|
||||
rdpSvcPluginPrivate* priv;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints);
|
||||
FREERDP_API int svc_plugin_send(rdpSvcPlugin* plugin, STREAM* data_out);
|
||||
FREERDP_API int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_DEBUG_SVC
|
||||
#define DEBUG_SVC(fmt, ...) DEBUG_CLASS(SVC, fmt, ## __VA_ARGS__)
|
||||
#else
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API int freerdp_tcp_connect(const char* hostname, int port);
|
||||
FREERDP_API int freerdp_tcp_read(int sockfd, BYTE* data, int length);
|
||||
FREERDP_API int freerdp_tcp_write(int sockfd, BYTE* data, int length);
|
||||
@ -35,4 +39,8 @@ FREERDP_API int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay);
|
||||
FREERDP_API int freerdp_wsa_startup();
|
||||
FREERDP_API int freerdp_wsa_cleanup();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_TCP_UTILS_H */
|
||||
|
@ -41,11 +41,19 @@ struct _freerdp_thread
|
||||
int status;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API freerdp_thread* freerdp_thread_new(void);
|
||||
FREERDP_API void freerdp_thread_start(freerdp_thread* thread, void* func, void* arg);
|
||||
FREERDP_API void freerdp_thread_stop(freerdp_thread* thread);
|
||||
FREERDP_API void freerdp_thread_free(freerdp_thread* thread);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define freerdp_thread_wait(_t) ((WaitForMultipleObjects(_t->num_signals, _t->signals, FALSE, INFINITE) == WAIT_FAILED) ? -1 : 0)
|
||||
#define freerdp_thread_wait_timeout(_t, _timeout) ((WaitForMultipleObjects(_t->num_signals, _t->signals, FALSE, _timeout) == WAIT_FAILED) ? -1 : 0)
|
||||
#define freerdp_thread_is_stopped(_t) (WaitForSingleObject(_t->signals[0], 0) == WAIT_OBJECT_0)
|
||||
|
@ -30,8 +30,16 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API UINT64 freerdp_windows_gmtime();
|
||||
FREERDP_API UINT64 freerdp_get_windows_time_from_unix_time(time_t unix_time);
|
||||
FREERDP_API time_t freerdp_get_unix_time_from_windows_time(UINT64 windows_time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_TIME_UTILS_H */
|
||||
|
@ -23,6 +23,14 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API int freerdp_uds_connect(const char* path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_UTILS_UDS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user