mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[gcc,clang] add support for attribute(malloc)
Mark all malloc like functions and add their appropriate free function to let the compiler complain on mismatches
This commit is contained in:
@@ -55,9 +55,11 @@ extern "C"
|
||||
FREERDP_API BOOL freerdp_assistance_get_encrypted_pass_stub(rdpAssistanceFile* file,
|
||||
const char** pwd, size_t* size);
|
||||
|
||||
FREERDP_API rdpAssistanceFile* freerdp_assistance_file_new(void);
|
||||
FREERDP_API void freerdp_assistance_file_free(rdpAssistanceFile* file);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_assistance_file_free, 1)
|
||||
FREERDP_API rdpAssistanceFile* freerdp_assistance_file_new(void);
|
||||
|
||||
FREERDP_API void freerdp_assistance_print_file(rdpAssistanceFile* file, wLog* log, DWORD level);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
4
include/freerdp/cache/persistent.h
vendored
4
include/freerdp/cache/persistent.h
vendored
@@ -88,9 +88,11 @@ extern "C"
|
||||
BOOL write, UINT32 version);
|
||||
FREERDP_API int persistent_cache_close(rdpPersistentCache* persistent);
|
||||
|
||||
FREERDP_API rdpPersistentCache* persistent_cache_new(void);
|
||||
FREERDP_API void persistent_cache_free(rdpPersistentCache* persistent);
|
||||
|
||||
WINPR_ATTR_MALLOC(persistent_cache_free, 1)
|
||||
FREERDP_API rdpPersistentCache* persistent_cache_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -138,9 +138,11 @@ extern "C"
|
||||
|
||||
/* Common client functions */
|
||||
|
||||
FREERDP_API rdpContext* freerdp_client_context_new(const RDP_CLIENT_ENTRY_POINTS* pEntryPoints);
|
||||
FREERDP_API void freerdp_client_context_free(rdpContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_client_context_free, 1)
|
||||
FREERDP_API rdpContext* freerdp_client_context_new(const RDP_CLIENT_ENTRY_POINTS* pEntryPoints);
|
||||
|
||||
FREERDP_API int freerdp_client_start(rdpContext* context);
|
||||
FREERDP_API int freerdp_client_stop(rdpContext* context);
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ extern "C"
|
||||
|
||||
typedef struct cliprdr_file_context CliprdrFileContext;
|
||||
|
||||
FREERDP_API CliprdrFileContext* cliprdr_file_context_new(void* context);
|
||||
FREERDP_API void cliprdr_file_context_free(CliprdrFileContext* file);
|
||||
|
||||
WINPR_ATTR_MALLOC(cliprdr_file_context_free, 1)
|
||||
FREERDP_API CliprdrFileContext* cliprdr_file_context_new(void* context);
|
||||
|
||||
/**! \brief returns if the implementation supports pasting files in a client file browser.
|
||||
*
|
||||
* \param file the file context to query
|
||||
|
||||
@@ -67,10 +67,14 @@ extern "C"
|
||||
FREERDP_API int freerdp_client_rdp_file_get_integer_option(const rdpFile* file,
|
||||
const char* name);
|
||||
|
||||
FREERDP_API rdpFile* freerdp_client_rdp_file_new(void);
|
||||
FREERDP_API rdpFile* freerdp_client_rdp_file_new_ex(DWORD flags);
|
||||
FREERDP_API void freerdp_client_rdp_file_free(rdpFile* file);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
|
||||
FREERDP_API rdpFile* freerdp_client_rdp_file_new(void);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_client_rdp_file_free, 1)
|
||||
FREERDP_API rdpFile* freerdp_client_rdp_file_new_ex(DWORD flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -177,9 +177,11 @@ extern "C"
|
||||
PROFILER_DEFINE(SurfaceProfiler)
|
||||
};
|
||||
|
||||
FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context);
|
||||
FREERDP_API void rdpgfx_client_context_free(RdpgfxClientContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rdpgfx_client_context_free, 1)
|
||||
FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -212,12 +212,16 @@ extern "C"
|
||||
FREERDP_API BOOL audio_format_copy(const AUDIO_FORMAT* srcFormat, AUDIO_FORMAT* dstFormat);
|
||||
FREERDP_API BOOL audio_format_compatible(const AUDIO_FORMAT* with, const AUDIO_FORMAT* what);
|
||||
|
||||
FREERDP_API AUDIO_FORMAT* audio_format_new(void);
|
||||
FREERDP_API AUDIO_FORMAT* audio_formats_new(size_t count);
|
||||
|
||||
FREERDP_API void audio_format_free(AUDIO_FORMAT* format);
|
||||
|
||||
WINPR_ATTR_MALLOC(audio_format_free, 1)
|
||||
FREERDP_API AUDIO_FORMAT* audio_format_new(void);
|
||||
|
||||
FREERDP_API void audio_formats_free(AUDIO_FORMAT* formats, size_t count);
|
||||
|
||||
WINPR_ATTR_MALLOC(audio_formats_free, 1)
|
||||
FREERDP_API AUDIO_FORMAT* audio_formats_new(size_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -44,9 +44,11 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL clear_context_reset(CLEAR_CONTEXT* clear);
|
||||
|
||||
FREERDP_API CLEAR_CONTEXT* clear_context_new(BOOL Compressor);
|
||||
FREERDP_API void clear_context_free(CLEAR_CONTEXT* clear);
|
||||
|
||||
WINPR_ATTR_MALLOC(clear_context_free, 1)
|
||||
FREERDP_API CLEAR_CONTEXT* clear_context_new(BOOL Compressor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -32,13 +32,17 @@ extern "C"
|
||||
|
||||
typedef struct S_FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT;
|
||||
|
||||
FREERDP_API void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_dsp_context_free, 1)
|
||||
FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(BOOL encoder);
|
||||
|
||||
FREERDP_API BOOL freerdp_dsp_supports_format(const AUDIO_FORMAT* format, BOOL encode);
|
||||
FREERDP_API BOOL freerdp_dsp_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* srcFormat,
|
||||
const BYTE* data, size_t length, wStream* out);
|
||||
FREERDP_API BOOL freerdp_dsp_decode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* srcFormat,
|
||||
const BYTE* data, size_t length, wStream* out);
|
||||
FREERDP_API void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context);
|
||||
|
||||
FREERDP_API BOOL freerdp_dsp_context_reset(FREERDP_DSP_CONTEXT* context,
|
||||
const AUDIO_FORMAT* targetFormat,
|
||||
UINT32 FramesPerPacket);
|
||||
|
||||
@@ -82,9 +82,11 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL h264_context_reset(H264_CONTEXT* h264, UINT32 width, UINT32 height);
|
||||
|
||||
FREERDP_API H264_CONTEXT* h264_context_new(BOOL Compressor);
|
||||
FREERDP_API void h264_context_free(H264_CONTEXT* h264);
|
||||
|
||||
WINPR_ATTR_MALLOC(h264_context_free, 1)
|
||||
FREERDP_API H264_CONTEXT* h264_context_new(BOOL Compressor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -48,9 +48,11 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL bitmap_interleaved_context_reset(BITMAP_INTERLEAVED_CONTEXT* interleaved);
|
||||
|
||||
FREERDP_API BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor);
|
||||
FREERDP_API void bitmap_interleaved_context_free(BITMAP_INTERLEAVED_CONTEXT* interleaved);
|
||||
|
||||
WINPR_ATTR_MALLOC(bitmap_interleaved_context_free, 1)
|
||||
FREERDP_API BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -66,9 +66,11 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL nsc_context_reset(NSC_CONTEXT* context, UINT32 width, UINT32 height);
|
||||
|
||||
FREERDP_API NSC_CONTEXT* nsc_context_new(void);
|
||||
FREERDP_API void nsc_context_free(NSC_CONTEXT* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(nsc_context_free, 1)
|
||||
FREERDP_API NSC_CONTEXT* nsc_context_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -53,9 +53,11 @@ extern "C"
|
||||
FREERDP_API BOOL freerdp_bitmap_planar_context_reset(BITMAP_PLANAR_CONTEXT* context,
|
||||
UINT32 width, UINT32 height);
|
||||
|
||||
FREERDP_API void freerdp_bitmap_planar_context_free(BITMAP_PLANAR_CONTEXT* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_bitmap_planar_context_free, 1)
|
||||
FREERDP_API BITMAP_PLANAR_CONTEXT* freerdp_bitmap_planar_context_new(DWORD flags, UINT32 width,
|
||||
UINT32 height);
|
||||
FREERDP_API void freerdp_bitmap_planar_context_free(BITMAP_PLANAR_CONTEXT* context);
|
||||
|
||||
FREERDP_API void freerdp_planar_switch_bgr(BITMAP_PLANAR_CONTEXT* planar, BOOL bgr);
|
||||
FREERDP_API void freerdp_planar_topdown_image(BITMAP_PLANAR_CONTEXT* planar, BOOL topdown);
|
||||
|
||||
@@ -57,10 +57,14 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL progressive_context_reset(PROGRESSIVE_CONTEXT* progressive);
|
||||
|
||||
FREERDP_API void progressive_context_free(PROGRESSIVE_CONTEXT* progressive);
|
||||
|
||||
WINPR_ATTR_MALLOC(progressive_context_free, 1)
|
||||
FREERDP_API PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor);
|
||||
|
||||
WINPR_ATTR_MALLOC(progressive_context_free, 1)
|
||||
FREERDP_API PROGRESSIVE_CONTEXT* progressive_context_new_ex(BOOL Compressor,
|
||||
UINT32 ThreadingFlags);
|
||||
FREERDP_API void progressive_context_free(PROGRESSIVE_CONTEXT* progressive);
|
||||
|
||||
FREERDP_API BOOL progressive_rfx_write_message_progressive_simple(
|
||||
PROGRESSIVE_CONTEXT* progressive, wStream* s, const RFX_MESSAGE* msg);
|
||||
|
||||
@@ -113,10 +113,14 @@ extern "C"
|
||||
FREERDP_API BOOL rfx_write_message(RFX_CONTEXT* context, wStream* s,
|
||||
const RFX_MESSAGE* message);
|
||||
|
||||
FREERDP_API RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags);
|
||||
FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder);
|
||||
FREERDP_API void rfx_context_free(RFX_CONTEXT* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rfx_context_free, 1)
|
||||
FREERDP_API RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags);
|
||||
|
||||
WINPR_ATTR_MALLOC(rfx_context_free, 1)
|
||||
FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder);
|
||||
|
||||
FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* context, UINT32 width, UINT32 height);
|
||||
|
||||
FREERDP_API BOOL rfx_context_set_mode(RFX_CONTEXT* context, RLGR_MODE mode);
|
||||
|
||||
@@ -53,9 +53,11 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL yuv_context_reset(YUV_CONTEXT* context, UINT32 width, UINT32 height);
|
||||
|
||||
FREERDP_API YUV_CONTEXT* yuv_context_new(BOOL encoder, UINT32 ThreadingFlags);
|
||||
FREERDP_API void yuv_context_free(YUV_CONTEXT* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(yuv_context_free, 1)
|
||||
FREERDP_API YUV_CONTEXT* yuv_context_new(BOOL encoder, UINT32 ThreadingFlags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -49,9 +49,11 @@ extern "C"
|
||||
|
||||
FREERDP_API void zgfx_context_reset(ZGFX_CONTEXT* zgfx, BOOL flush);
|
||||
|
||||
FREERDP_API ZGFX_CONTEXT* zgfx_context_new(BOOL Compressor);
|
||||
FREERDP_API void zgfx_context_free(ZGFX_CONTEXT* zgfx);
|
||||
|
||||
WINPR_ATTR_MALLOC(zgfx_context_free, 1)
|
||||
FREERDP_API ZGFX_CONTEXT* zgfx_context_new(BOOL Compressor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -71,9 +71,11 @@ extern "C"
|
||||
FREERDP_API BOOL freerdp_client_codecs_reset(rdpCodecs* codecs, UINT32 flags, UINT32 width,
|
||||
UINT32 height);
|
||||
|
||||
FREERDP_API rdpCodecs* codecs_new(rdpContext* context);
|
||||
FREERDP_API void codecs_free(rdpCodecs* codecs);
|
||||
|
||||
WINPR_ATTR_MALLOC(codecs_free, 1)
|
||||
FREERDP_API rdpCodecs* codecs_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -38,13 +38,20 @@ extern "C"
|
||||
|
||||
typedef struct rdp_certificate rdpCertificate;
|
||||
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new(void);
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_file(const char* file);
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_pem(const char* pem);
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_der(const BYTE* data, size_t length);
|
||||
|
||||
FREERDP_API void freerdp_certificate_free(rdpCertificate* certificate);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_free, 1)
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new(void);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_free, 1)
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_file(const char* file);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_free, 1)
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_pem(const char* pem);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_free, 1)
|
||||
FREERDP_API rdpCertificate* freerdp_certificate_new_from_der(const BYTE* data, size_t length);
|
||||
|
||||
FREERDP_API BOOL freerdp_certificate_is_rsa(const rdpCertificate* certificate);
|
||||
|
||||
FREERDP_API char* freerdp_certificate_get_hash(const rdpCertificate* certificate,
|
||||
|
||||
@@ -35,17 +35,22 @@ extern "C"
|
||||
|
||||
FREERDP_API char* freerdp_certificate_data_hash(const char* hostname, UINT16 port);
|
||||
|
||||
FREERDP_API void freerdp_certificate_data_free(rdpCertificateData* data);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_data_free, 1)
|
||||
FREERDP_API rdpCertificateData* freerdp_certificate_data_new(const char* hostname, UINT16 port,
|
||||
const rdpCertificate* xcert);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_data_free, 1)
|
||||
FREERDP_API rdpCertificateData* freerdp_certificate_data_new_from_pem(const char* hostname,
|
||||
UINT16 port,
|
||||
const char* pem,
|
||||
size_t length);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_data_free, 1)
|
||||
FREERDP_API rdpCertificateData*
|
||||
freerdp_certificate_data_new_from_file(const char* hostname, UINT16 port, const char* file);
|
||||
|
||||
FREERDP_API void freerdp_certificate_data_free(rdpCertificateData* data);
|
||||
|
||||
FREERDP_API BOOL freerdp_certificate_data_equal(const rdpCertificateData* a,
|
||||
const rdpCertificateData* b);
|
||||
|
||||
|
||||
@@ -40,13 +40,18 @@ extern "C"
|
||||
CERT_STORE_MISMATCH = -1
|
||||
} freerdp_certificate_store_result;
|
||||
|
||||
FREERDP_API rdpCertificateStore* freerdp_certificate_store_new(const rdpSettings* settings);
|
||||
FREERDP_API void freerdp_certificate_store_free(rdpCertificateStore* store);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_store_free, 1)
|
||||
FREERDP_API rdpCertificateStore* freerdp_certificate_store_new(const rdpSettings* settings);
|
||||
|
||||
FREERDP_API freerdp_certificate_store_result freerdp_certificate_store_contains_data(
|
||||
rdpCertificateStore* store, const rdpCertificateData* data);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_certificate_store_free, 1)
|
||||
FREERDP_API rdpCertificateData*
|
||||
freerdp_certificate_store_load_data(rdpCertificateStore* store, const char* host, UINT16 port);
|
||||
|
||||
FREERDP_API BOOL freerdp_certificate_store_save_data(rdpCertificateStore* store,
|
||||
const rdpCertificateData* data);
|
||||
FREERDP_API BOOL freerdp_certificate_store_remove_data(rdpCertificateStore* store,
|
||||
|
||||
@@ -30,11 +30,17 @@ extern "C"
|
||||
|
||||
typedef struct rdp_private_key rdpPrivateKey;
|
||||
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new(void);
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new_from_file(const char* keyfile);
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new_from_pem(const char* pem);
|
||||
FREERDP_API void freerdp_key_free(rdpPrivateKey* key);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new(void);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new_from_file(const char* keyfile);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
||||
FREERDP_API rdpPrivateKey* freerdp_key_new_from_pem(const char* pem);
|
||||
|
||||
FREERDP_API BOOL freerdp_key_is_rsa(const rdpPrivateKey* key);
|
||||
|
||||
FREERDP_API size_t freerdp_key_get_bits(const rdpPrivateKey* key);
|
||||
|
||||
@@ -34,9 +34,11 @@ extern "C"
|
||||
|
||||
typedef struct smartcard_emulation_context SmartcardEmulationContext;
|
||||
|
||||
FREERDP_API SmartcardEmulationContext* Emulate_New(const rdpSettings* settings);
|
||||
FREERDP_API void Emulate_Free(SmartcardEmulationContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(Emulate_Free, 1)
|
||||
FREERDP_API SmartcardEmulationContext* Emulate_New(const rdpSettings* settings);
|
||||
|
||||
FREERDP_API BOOL Emulate_IsConfigured(SmartcardEmulationContext* context);
|
||||
|
||||
FREERDP_API LONG WINAPI Emulate_SCardEstablishContext(SmartcardEmulationContext* smartcard,
|
||||
|
||||
@@ -557,10 +557,12 @@ owned by rdpRdp */
|
||||
};
|
||||
typedef struct rdp_channel_handles rdpChannelHandles;
|
||||
|
||||
FREERDP_API void freerdp_context_free(freerdp* instance);
|
||||
|
||||
FREERDP_API BOOL freerdp_context_new(freerdp* instance);
|
||||
FREERDP_API BOOL freerdp_context_new_ex(freerdp* instance, rdpSettings* settings);
|
||||
|
||||
FREERDP_API BOOL freerdp_context_reset(freerdp* instance);
|
||||
FREERDP_API void freerdp_context_free(freerdp* instance);
|
||||
|
||||
FREERDP_API BOOL freerdp_connect(freerdp* instance);
|
||||
|
||||
@@ -613,9 +615,11 @@ owned by rdpRdp */
|
||||
FREERDP_API const char* freerdp_get_build_revision(void);
|
||||
FREERDP_API const char* freerdp_get_build_config(void);
|
||||
|
||||
FREERDP_API freerdp* freerdp_new(void);
|
||||
FREERDP_API void freerdp_free(freerdp* instance);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_free, 1)
|
||||
FREERDP_API freerdp* freerdp_new(void);
|
||||
|
||||
FREERDP_API BOOL freerdp_focus_required(freerdp* instance);
|
||||
FREERDP_API void freerdp_set_focus(freerdp* instance);
|
||||
|
||||
|
||||
@@ -41,9 +41,11 @@ extern "C"
|
||||
FREERDP_API void gdi_video_data_init(rdpGdi* gdi, VideoClientContext* video);
|
||||
FREERDP_API void gdi_video_data_uninit(rdpGdi* gdi, VideoClientContext* context);
|
||||
|
||||
FREERDP_API gdiVideoContext* gdi_video_new(rdpGdi* gdi);
|
||||
FREERDP_API void gdi_video_free(gdiVideoContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(gdi_video_free, 1)
|
||||
FREERDP_API gdiVideoContext* gdi_video_new(rdpGdi* gdi);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -163,9 +163,11 @@ extern "C"
|
||||
FREERDP_API void graphics_register_pointer(rdpGraphics* graphics, const rdpPointer* pointer);
|
||||
FREERDP_API void graphics_register_glyph(rdpGraphics* graphics, const rdpGlyph* glyph);
|
||||
|
||||
FREERDP_API rdpGraphics* graphics_new(rdpContext* context);
|
||||
FREERDP_API void graphics_free(rdpGraphics* graphics);
|
||||
|
||||
WINPR_ATTR_MALLOC(graphics_free, 1)
|
||||
FREERDP_API rdpGraphics* graphics_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -74,9 +74,11 @@ extern "C"
|
||||
psListenerCheckFileDescriptor CheckPeerAcceptRestrictions;
|
||||
};
|
||||
|
||||
FREERDP_API freerdp_listener* freerdp_listener_new(void);
|
||||
FREERDP_API void freerdp_listener_free(freerdp_listener* instance);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_listener_free, 1)
|
||||
FREERDP_API freerdp_listener* freerdp_listener_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -40,9 +40,11 @@ extern "C"
|
||||
FREERDP_API double metrics_write_bytes(rdpMetrics* metrics, UINT32 UncompressedBytes,
|
||||
UINT32 CompressedBytes);
|
||||
|
||||
FREERDP_API rdpMetrics* metrics_new(rdpContext* context);
|
||||
FREERDP_API void metrics_free(rdpMetrics* metrics);
|
||||
|
||||
WINPR_ATTR_MALLOC(metrics_free, 1)
|
||||
FREERDP_API rdpMetrics* metrics_new(rdpContext* context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -195,15 +195,19 @@ extern "C"
|
||||
ALIGN64 psPeerRemoteCredentials RemoteCredentials;
|
||||
};
|
||||
|
||||
FREERDP_API void freerdp_peer_context_free(freerdp_peer* client);
|
||||
|
||||
FREERDP_API BOOL freerdp_peer_context_new(freerdp_peer* client);
|
||||
FREERDP_API BOOL freerdp_peer_context_new_ex(freerdp_peer* client, const rdpSettings* settings);
|
||||
FREERDP_API void freerdp_peer_context_free(freerdp_peer* client);
|
||||
|
||||
FREERDP_API const char* freerdp_peer_os_major_type_string(freerdp_peer* client);
|
||||
FREERDP_API const char* freerdp_peer_os_minor_type_string(freerdp_peer* client);
|
||||
|
||||
FREERDP_API freerdp_peer* freerdp_peer_new(int sockfd);
|
||||
FREERDP_API void freerdp_peer_free(freerdp_peer* client);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_peer_free, 1)
|
||||
FREERDP_API freerdp_peer* freerdp_peer_new(int sockfd);
|
||||
|
||||
FREERDP_API BOOL freerdp_peer_set_local_and_hostname(freerdp_peer* client,
|
||||
const struct sockaddr_storage* peer_addr);
|
||||
|
||||
|
||||
@@ -52,9 +52,11 @@ extern "C"
|
||||
|
||||
typedef struct rdp_redirection rdpRedirection;
|
||||
|
||||
FREERDP_API rdpRedirection* redirection_new(void);
|
||||
FREERDP_API void redirection_free(rdpRedirection* redirection);
|
||||
|
||||
WINPR_ATTR_MALLOC(redirection_free, 1)
|
||||
FREERDP_API rdpRedirection* redirection_new(void);
|
||||
|
||||
/** \brief This function checks if all necessary settings for a given \b rdpRedirection are
|
||||
* available.
|
||||
*
|
||||
|
||||
@@ -112,9 +112,11 @@ extern "C"
|
||||
psAInputChannelIdAssigned ChannelIdAssigned;
|
||||
};
|
||||
|
||||
FREERDP_API ainput_server_context* ainput_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void ainput_server_context_free(ainput_server_context* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(ainput_server_context_free, 1)
|
||||
FREERDP_API ainput_server_context* ainput_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -153,9 +153,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API audin_server_context* audin_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void audin_server_context_free(audin_server_context* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(audin_server_context_free, 1)
|
||||
FREERDP_API audin_server_context* audin_server_context_new(HANDLE vcm);
|
||||
|
||||
/** \brief sets the supported audio formats for AUDIN server channel context.
|
||||
*
|
||||
* \param context The context to set the formats for
|
||||
|
||||
@@ -134,9 +134,11 @@ extern "C"
|
||||
BOOL hasHugeFileSupport;
|
||||
};
|
||||
|
||||
FREERDP_API CliprdrServerContext* cliprdr_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void cliprdr_server_context_free(CliprdrServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(cliprdr_server_context_free, 1)
|
||||
FREERDP_API CliprdrServerContext* cliprdr_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -66,9 +66,11 @@ extern "C"
|
||||
psDispChannelIdAssigned ChannelIdAssigned;
|
||||
};
|
||||
|
||||
FREERDP_API DispServerContext* disp_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void disp_server_context_free(DispServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(disp_server_context_free, 1)
|
||||
FREERDP_API DispServerContext* disp_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -51,9 +51,11 @@ extern "C"
|
||||
DrdynvcServerPrivate* priv;
|
||||
};
|
||||
|
||||
FREERDP_API DrdynvcServerContext* drdynvc_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void drdynvc_server_context_free(DrdynvcServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(drdynvc_server_context_free, 1)
|
||||
FREERDP_API DrdynvcServerContext* drdynvc_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -90,9 +90,11 @@ extern "C"
|
||||
psEchoServerChannelIdAssigned ChannelIdAssigned;
|
||||
};
|
||||
|
||||
FREERDP_API echo_server_context* echo_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void echo_server_context_free(echo_server_context* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(echo_server_context_free, 1)
|
||||
FREERDP_API echo_server_context* echo_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -92,9 +92,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API EncomspServerContext* encomsp_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void encomsp_server_context_free(EncomspServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(encomsp_server_context_free, 1)
|
||||
FREERDP_API EncomspServerContext* encomsp_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -92,6 +92,7 @@ extern "C"
|
||||
UINT32 confirmedCapsVersion;
|
||||
};
|
||||
|
||||
WINPR_ATTR_MALLOC(gfxredir_server_context_free, 1)
|
||||
FREERDP_API GfxRedirServerContext* gfxredir_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void gfxredir_server_context_free(GfxRedirServerContext* context);
|
||||
|
||||
|
||||
@@ -130,9 +130,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API LocationServerContext* location_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void location_server_context_free(LocationServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(location_server_context_free, 1)
|
||||
FREERDP_API LocationServerContext* location_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -89,6 +89,7 @@ extern "C"
|
||||
};
|
||||
typedef struct p_server_context pServerContext;
|
||||
|
||||
WINPR_ATTR_MALLOC(StaticChannelContext_free, 1)
|
||||
pServerStaticChannelContext* StaticChannelContext_new(pServerContext* ps, const char* name,
|
||||
UINT32 id);
|
||||
|
||||
@@ -164,12 +165,16 @@ extern "C"
|
||||
|
||||
FREERDP_API BOOL pf_context_copy_settings(rdpSettings* dst, const rdpSettings* src);
|
||||
FREERDP_API BOOL pf_context_init_server_context(freerdp_peer* client);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_client_context_free, 1)
|
||||
FREERDP_API pClientContext* pf_context_create_client_context(const rdpSettings* clientSettings);
|
||||
|
||||
FREERDP_API void proxy_data_free(proxyData* pdata);
|
||||
|
||||
WINPR_ATTR_MALLOC(proxy_data_free, 1)
|
||||
FREERDP_API proxyData* proxy_data_new(void);
|
||||
FREERDP_API void proxy_data_set_client_context(proxyData* pdata, pClientContext* context);
|
||||
FREERDP_API void proxy_data_set_server_context(proxyData* pdata, pServerContext* context);
|
||||
FREERDP_API void proxy_data_free(proxyData* pdata);
|
||||
|
||||
FREERDP_API BOOL proxy_data_shall_disconnect(proxyData* pdata);
|
||||
FREERDP_API void proxy_data_abort_connect(proxyData* pdata);
|
||||
|
||||
@@ -31,6 +31,13 @@ extern "C"
|
||||
|
||||
typedef struct proxy_server proxyServer;
|
||||
|
||||
/**
|
||||
* @brief pf_server_free Cleans up a (stopped) proxy server instance.
|
||||
*
|
||||
* @param server The proxy server to clean up. Might be NULL.
|
||||
*/
|
||||
FREERDP_API void pf_server_free(proxyServer* server);
|
||||
|
||||
/**
|
||||
* @brief pf_server_new Creates a new proxy server instance
|
||||
*
|
||||
@@ -38,15 +45,9 @@ extern "C"
|
||||
*
|
||||
* @return A new proxy server instance or NULL on failure.
|
||||
*/
|
||||
WINPR_ATTR_MALLOC(pf_server_free, 1)
|
||||
FREERDP_API proxyServer* pf_server_new(const proxyConfig* config);
|
||||
|
||||
/**
|
||||
* @brief pf_server_free Cleans up a (stopped) proxy server instance.
|
||||
*
|
||||
* @param server The proxy server to clean up. Might be NULL.
|
||||
*/
|
||||
FREERDP_API void pf_server_free(proxyServer* server);
|
||||
|
||||
/**
|
||||
* @brief pf_server_add_module Allows registering proxy modules that are
|
||||
* build-in instead of shipped as separate
|
||||
|
||||
@@ -142,8 +142,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void rail_server_context_free(RailServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rail_server_context_free, 1)
|
||||
FREERDP_API RailServerContext* rail_server_context_new(HANDLE vcm);
|
||||
|
||||
FREERDP_API UINT rail_server_handle_messages(RailServerContext* context);
|
||||
FREERDP_API void rail_server_set_handshake_ex_flags(RailServerContext* context, DWORD flags);
|
||||
|
||||
|
||||
@@ -215,8 +215,10 @@ struct s_rdpdr_server_context
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API RdpdrServerContext* rdpdr_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void rdpdr_server_context_free(RdpdrServerContext* context);
|
||||
FREERDP_API void rdpdr_server_context_free(RdpdrServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rdpdr_server_context_free, 1)
|
||||
FREERDP_API RdpdrServerContext* rdpdr_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -125,9 +125,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API CamDevEnumServerContext* cam_dev_enum_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void cam_dev_enum_server_context_free(CamDevEnumServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(cam_dev_enum_server_context_free, 1)
|
||||
FREERDP_API CamDevEnumServerContext* cam_dev_enum_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -272,9 +272,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API CameraDeviceServerContext* camera_device_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void camera_device_server_context_free(CameraDeviceServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(camera_device_server_context_free, 1)
|
||||
FREERDP_API CameraDeviceServerContext* camera_device_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -58,9 +58,13 @@ extern "C"
|
||||
BOOL (*onChannelIdAssigned)(RdpeiServerContext* context, UINT32 channelId);
|
||||
};
|
||||
|
||||
FREERDP_API RdpeiServerContext* rdpei_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void rdpei_server_context_reset(RdpeiServerContext* context);
|
||||
FREERDP_API void rdpei_server_context_free(RdpeiServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rdpei_server_context_free, 1)
|
||||
FREERDP_API RdpeiServerContext* rdpei_server_context_new(HANDLE vcm);
|
||||
|
||||
FREERDP_API void rdpei_server_context_reset(RdpeiServerContext* context);
|
||||
|
||||
FREERDP_API HANDLE rdpei_server_get_event_handle(RdpeiServerContext* context);
|
||||
FREERDP_API UINT rdpei_server_init(RdpeiServerContext* context);
|
||||
FREERDP_API UINT rdpei_server_handle_messages(RdpeiServerContext* context);
|
||||
|
||||
@@ -120,9 +120,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API MouseCursorServerContext* mouse_cursor_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void mouse_cursor_server_context_free(MouseCursorServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(mouse_cursor_server_context_free, 1)
|
||||
FREERDP_API MouseCursorServerContext* mouse_cursor_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -139,8 +139,11 @@ extern "C"
|
||||
psRdpgfxServerInitialize Initialize;
|
||||
};
|
||||
|
||||
FREERDP_API RdpgfxServerContext* rdpgfx_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void rdpgfx_server_context_free(RdpgfxServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rdpgfx_server_context_free, 1)
|
||||
FREERDP_API RdpgfxServerContext* rdpgfx_server_context_new(HANDLE vcm);
|
||||
|
||||
FREERDP_API BOOL rdpgfx_server_set_own_thread(RdpgfxServerContext* context,
|
||||
BOOL internalThread);
|
||||
FREERDP_API HANDLE rdpgfx_server_get_event_handle(RdpgfxServerContext* context);
|
||||
|
||||
@@ -179,9 +179,13 @@ extern "C"
|
||||
psRdpsndChannelIdAssigned ChannelIdAssigned;
|
||||
};
|
||||
|
||||
FREERDP_API RdpsndServerContext* rdpsnd_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext*);
|
||||
FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(rdpsnd_server_context_free, 1)
|
||||
FREERDP_API RdpsndServerContext* rdpsnd_server_context_new(HANDLE vcm);
|
||||
|
||||
FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext*);
|
||||
|
||||
FREERDP_API HANDLE rdpsnd_server_get_event_handle(RdpsndServerContext* context);
|
||||
FREERDP_API UINT rdpsnd_server_handle_messages(RdpsndServerContext* context);
|
||||
|
||||
|
||||
@@ -55,9 +55,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API RemdeskServerContext* remdesk_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void remdesk_server_context_free(RemdeskServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(remdesk_server_context_free, 1)
|
||||
FREERDP_API RemdeskServerContext* remdesk_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -320,9 +320,11 @@ extern "C"
|
||||
|
||||
FREERDP_API UINT32 shadow_enum_monitors(MONITOR_DEF* monitors, UINT32 maxMonitors);
|
||||
|
||||
FREERDP_API rdpShadowServer* shadow_server_new(void);
|
||||
FREERDP_API void shadow_server_free(rdpShadowServer* server);
|
||||
|
||||
WINPR_ATTR_MALLOC(shadow_server_free, 1)
|
||||
FREERDP_API rdpShadowServer* shadow_server_new(void);
|
||||
|
||||
FREERDP_API int shadow_capture_align_clip_rect(RECTANGLE_16* rect, RECTANGLE_16* clip);
|
||||
FREERDP_API int shadow_capture_compare(BYTE* pData1, UINT32 nStep1, UINT32 nWidth,
|
||||
UINT32 nHeight, BYTE* pData2, UINT32 nStep2,
|
||||
|
||||
@@ -99,9 +99,11 @@ extern "C"
|
||||
rdpContext* rdpcontext;
|
||||
};
|
||||
|
||||
FREERDP_API TelemetryServerContext* telemetry_server_context_new(HANDLE vcm);
|
||||
FREERDP_API void telemetry_server_context_free(TelemetryServerContext* context);
|
||||
|
||||
WINPR_ATTR_MALLOC(telemetry_server_context_free, 1)
|
||||
FREERDP_API TelemetryServerContext* telemetry_server_context_new(HANDLE vcm);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -169,9 +169,14 @@ typedef struct rdp_settings rdpSettings;
|
||||
FREERDP_API RDPDR_DEVICE* freerdp_device_collection_find_type(rdpSettings* settings,
|
||||
UINT32 type);
|
||||
|
||||
FREERDP_API RDPDR_DEVICE* freerdp_device_new(UINT32 Type, size_t count, const char* args[]);
|
||||
FREERDP_API RDPDR_DEVICE* freerdp_device_clone(const RDPDR_DEVICE* device);
|
||||
FREERDP_API void freerdp_device_free(RDPDR_DEVICE* device);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_device_free, 1)
|
||||
FREERDP_API RDPDR_DEVICE* freerdp_device_new(UINT32 Type, size_t count, const char* args[]);
|
||||
|
||||
WINPR_ATTR_MALLOC(freerdp_device_free, 1)
|
||||
FREERDP_API RDPDR_DEVICE* freerdp_device_clone(const RDPDR_DEVICE* device);
|
||||
|
||||
FREERDP_API BOOL freerdp_device_equal(const RDPDR_DEVICE* one, const RDPDR_DEVICE* other);
|
||||
|
||||
FREERDP_API void freerdp_device_collection_free(rdpSettings* settings);
|
||||
|
||||
@@ -48,9 +48,11 @@ extern "C"
|
||||
FREERDP_API BOOL stream_dump_register_handlers(rdpContext* context, CONNECTION_STATE state,
|
||||
BOOL isServer);
|
||||
|
||||
FREERDP_API rdpStreamDumpContext* stream_dump_new(void);
|
||||
FREERDP_API void stream_dump_free(rdpStreamDumpContext* dump);
|
||||
|
||||
WINPR_ATTR_MALLOC(stream_dump_free, 1)
|
||||
FREERDP_API rdpStreamDumpContext* stream_dump_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -38,8 +38,11 @@ extern "C"
|
||||
|
||||
typedef struct s_scard_call_context scard_call_context;
|
||||
|
||||
FREERDP_API scard_call_context* smartcard_call_context_new(const rdpSettings* settings);
|
||||
FREERDP_API void smartcard_call_context_free(scard_call_context* ctx);
|
||||
|
||||
WINPR_ATTR_MALLOC(smartcard_call_context_free, 1)
|
||||
FREERDP_API scard_call_context* smartcard_call_context_new(const rdpSettings* settings);
|
||||
|
||||
FREERDP_API BOOL smartcard_call_context_signal_stop(scard_call_context* ctx, BOOL reset);
|
||||
FREERDP_API BOOL smartcard_call_context_add(scard_call_context* ctx, const char* name);
|
||||
FREERDP_API BOOL smartcard_call_cancel_context(scard_call_context* ctx, SCARDCONTEXT context);
|
||||
|
||||
Reference in New Issue
Block a user