| 1 |
/* |
| 2 |
* Copyright (C) 2016 Jens Georg <[email protected]> |
| 3 |
* |
| 4 |
* Authors: Jens Georg <[email protected]> |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
| 9 |
* (at your option) any later version. |
| 10 |
* |
| 11 |
* This program is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License along |
| 17 |
* with this program; if not, write to the Free Software Foundation, |
| 18 |
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef MEDIA_SERVER_H |
| 22 |
#define MEDIA_SERVER_H |
| 23 |
|
| 24 |
#ifdef HAVE_CONFIG_H |
| 25 |
#include <config.h> |
| 26 |
#endif |
| 27 |
|
| 28 |
#include <libgupnp/gupnp.h> |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
GType |
| 33 |
av_cp_media_server_get_type (void); |
| 34 |
|
| 35 |
#define AV_CP_TYPE_MEDIA_SERVER (av_cp_media_server_get_type ()) |
| 36 |
#define AV_CP_MEDIA_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ |
| 37 |
AV_CP_TYPE_MEDIA_SERVER, \ |
| 38 |
AVCPMediaServer)) |
| 39 |
#define AV_CP_MEDIA_SERVER_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), \ |
| 40 |
AV_CP_TYPE_MEDIA_SERVER, \ |
| 41 |
AVCPMediaServerClass)) |
| 42 |
#define AV_CP_IS_MEDIA_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ |
| 43 |
AV_CP_TYPE_MEDIA_SERVER)) |
| 44 |
#define AV_CP_IS_MEDIA_SERVER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), \ |
| 45 |
AV_CP_TYPE_MEDIA_SERVER)) |
| 46 |
#define AV_CP_MEDIA_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ |
| 47 |
AV_CP_TYPE_MEDIA_SERVER, \ |
| 48 |
AVCPMediaServerDeviceClass)) |
| 49 |
|
| 50 |
typedef struct _AVCPMediaServer AVCPMediaServer; |
| 51 |
typedef struct _AVCPMediaServerClass AVCPMediaServerClass; |
| 52 |
typedef struct _AVCPMediaServerPrivate AVCPMediaServerPrivate; |
| 53 |
|
| 54 |
struct _AVCPMediaServer { |
| 55 |
GUPnPDeviceProxy parent; |
| 56 |
}; |
| 57 |
|
| 58 |
struct _AVCPMediaServerClass { |
| 59 |
GUPnPDeviceProxyClass parent_class; |
| 60 |
}; |
| 61 |
|
| 62 |
|
| 63 |
GUPnPServiceProxy * |
| 64 |
av_cp_media_server_get_content_directory (AVCPMediaServer *self); |
| 65 |
|
| 66 |
void |
| 67 |
av_cp_media_server_browse_async (AVCPMediaServer *self, |
| 68 |
GCancellable *cancellable, |
| 69 |
GAsyncReadyCallback callback, |
| 70 |
const char *container_id, |
| 71 |
guint32 starting_index, |
| 72 |
guint32 requested_count, |
| 73 |
gpointer user_data); |
| 74 |
|
| 75 |
gboolean |
| 76 |
av_cp_media_server_browse_finish (AVCPMediaServer *self, |
| 77 |
GAsyncResult *result, |
| 78 |
char **didl_xml, |
| 79 |
guint32 *total_matches, |
| 80 |
guint32 *number_returned, |
| 81 |
GError **error); |
| 82 |
|
| 83 |
void |
| 84 |
av_cp_media_server_browse_metadata_async (AVCPMediaServer *self, |
| 85 |
GCancellable *cancellable, |
| 86 |
GAsyncReadyCallback callback, |
| 87 |
const char *container_id, |
| 88 |
gpointer user_data); |
| 89 |
|
| 90 |
gboolean |
| 91 |
av_cp_media_server_browse_metadata_finish (AVCPMediaServer *self, |
| 92 |
GAsyncResult *result, |
| 93 |
char **didl_xml, |
| 94 |
GError **error); |
| 95 |
|
| 96 |
void |
| 97 |
av_cp_media_server_search_async (AVCPMediaServer *self, |
| 98 |
GCancellable *cancellable, |
| 99 |
GAsyncReadyCallback callback, |
| 100 |
const char *container_id, |
| 101 |
const char *search_criteria, |
| 102 |
const char *filter, |
| 103 |
guint32 starting_index, |
| 104 |
guint32 requested_count, |
| 105 |
gpointer user_data); |
| 106 |
gboolean |
| 107 |
av_cp_media_server_search_finish (AVCPMediaServer *self, |
| 108 |
GAsyncResult *result, |
| 109 |
char **didl_xml, |
| 110 |
guint32 *total_matches, |
| 111 |
guint32 *number_returned, |
| 112 |
GError **error); |
| 113 |
|
| 114 |
char const * const * |
| 115 |
av_cp_media_server_get_search_caps (AVCPMediaServer *self); |
| 116 |
|
| 117 |
G_END_DECLS |
| 118 |
|
| 119 |
#endif /* MEDIA_SERVER_H */ |