mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-10 23:50:21 -04:00
Including C headers inside of `extern "C"` breaks use from C++. Hoist the includes of standard C headers above the block so we don't try to mangle the stdlib. I initially tried to scope this with a targeted change but it's too hard to do correctly that way. This way, we avoid whack-a-mole. Firefox is working around this in their e21461b7b8b39cc31ba53c47d4f6f310c673ff2f commit. Bug: https://bugzilla.mozilla.org/1953080
72 lines
2.1 KiB
C
72 lines
2.1 KiB
C
/* PipeWire */
|
|
/* SPDX-FileCopyrightText: Copyright © 2021 Wim Taymans */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef PIPEWIRE_RTSP_CLIENT_H
|
|
#define PIPEWIRE_RTSP_CLIENT_H
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <pipewire/pipewire.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct pw_rtsp_client;
|
|
|
|
struct pw_rtsp_client_events {
|
|
#define PW_VERSION_RTSP_CLIENT_EVENTS 0
|
|
uint32_t version;
|
|
|
|
void (*destroy) (void *data);
|
|
|
|
void (*connected) (void *data);
|
|
void (*error) (void *data, int res);
|
|
void (*disconnected) (void *data);
|
|
|
|
void (*message) (void *data, int status,
|
|
const struct spa_dict *headers);
|
|
|
|
};
|
|
|
|
struct pw_rtsp_client * pw_rtsp_client_new(struct pw_loop *main_loop,
|
|
struct pw_properties *props,
|
|
size_t user_data_size);
|
|
|
|
void pw_rtsp_client_destroy(struct pw_rtsp_client *client);
|
|
|
|
void *pw_rtsp_client_get_user_data(struct pw_rtsp_client *client);
|
|
const char *pw_rtsp_client_get_url(struct pw_rtsp_client *client);
|
|
|
|
void pw_rtsp_client_add_listener(struct pw_rtsp_client *client,
|
|
struct spa_hook *listener,
|
|
const struct pw_rtsp_client_events *events, void *data);
|
|
|
|
const struct pw_properties *pw_rtsp_client_get_properties(struct pw_rtsp_client *client);
|
|
|
|
int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
|
const char *hostname, uint16_t port, const char *session_id);
|
|
int pw_rtsp_client_disconnect(struct pw_rtsp_client *client);
|
|
|
|
int pw_rtsp_client_get_local_ip(struct pw_rtsp_client *client,
|
|
int *version, char *ip, size_t len);
|
|
|
|
int pw_rtsp_client_url_send(struct pw_rtsp_client *client, const char *url,
|
|
const char *cmd, const struct spa_dict *headers,
|
|
const char *content_type, const void *content, size_t content_length,
|
|
int (*reply) (void *user_data, int status, const struct spa_dict *headers, const struct pw_array *content),
|
|
void *user_data);
|
|
|
|
int pw_rtsp_client_send(struct pw_rtsp_client *client,
|
|
const char *cmd, const struct spa_dict *headers,
|
|
const char *content_type, const char *content,
|
|
int (*reply) (void *user_data, int status, const struct spa_dict *headers, const struct pw_array *content),
|
|
void *user_data);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PIPEWIRE_RTSP_CLIENT_H */
|