1 /* 2 * Copyright (C) 2012 Intel Corporation. 3 * 4 * Authors: Krzesimir Nowak <krnowak@openismus.com> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library 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 GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GUPNP_DLNA_AUDIO_INFORMATION_H__ 23 #define __GUPNP_DLNA_AUDIO_INFORMATION_H__ 24 25 #include <glib-object.h> 26 #include <libgupnp-dlna/gupnp-dlna-values.h> 27 28 G_BEGIN_DECLS 29 30 #define GUPNP_TYPE_DLNA_AUDIO_INFORMATION \ 31 (gupnp_dlna_audio_information_get_type()) 32 33 #define GUPNP_DLNA_AUDIO_INFORMATION(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ 35 GUPNP_TYPE_DLNA_AUDIO_INFORMATION, \ 36 GUPnPDLNAAudioInformation)) 37 38 #define GUPNP_DLNA_AUDIO_INFORMATION_CLASS(klass) \ 39 (G_TYPE_CHECK_CLASS_CAST ((klass), \ 40 GUPNP_TYPE_DLNA_AUDIO_INFORMATION, \ 41 GUPnPDLNAAudioInformationClass)) 42 43 #define GUPNP_IS_DLNA_AUDIO_INFORMATION(obj) \ 44 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ 45 GUPNP_TYPE_DLNA_AUDIO_INFORMATION)) 46 47 #define GUPNP_IS_DLNA_AUDIO_INFORMATION_CLASS(klass) \ 48 (G_TYPE_CHECK_CLASS_TYPE ((klass), \ 49 GUPNP_TYPE_DLNA_AUDIO_INFORMATION)) 50 51 #define GUPNP_DLNA_AUDIO_INFORMATION_GET_CLASS(obj) \ 52 (G_TYPE_INSTANCE_GET_CLASS ((obj), \ 53 GUPNP_TYPE_DLNA_AUDIO_INFORMATION, \ 54 GUPnPDLNAAudioInformationClass)) 55 56 typedef struct _GUPnPDLNAAudioInformationPrivate 57 GUPnPDLNAAudioInformationPrivate; 58 59 typedef struct { 60 GObject parent; 61 62 GUPnPDLNAAudioInformationPrivate *priv; 63 } GUPnPDLNAAudioInformation; 64 65 /** 66 * GUPnPDLNAAudioInformationClass: 67 * @parent_class: Parent class. 68 * @get_bitrate: This is called by #GUPnPDLNAProfileGuesser to get a 69 * bitrate. 70 * @get_channels: This is called by #GUPnPDLNAProfileGuesser to get a 71 * channels count. 72 * @get_depth: This is called by #GUPnPDLNAProfileGuesser to get a 73 * depth. 74 * @get_layer: This is called by #GUPnPDLNAProfileGuesser to get a 75 * layer. 76 * @get_level: This is called by #GUPnPDLNAProfileGuesser to get a 77 * level. 78 * @get_mpeg_audio_version: This is called by #GUPnPDLNAProfileGuesser 79 * to get an MPEG audio version. 80 * @get_mpeg_version: This is called by #GUPnPDLNAProfileGuesser to 81 * get an MPEG version. 82 * @get_profile: This is called by #GUPnPDLNAProfileGuesser to get a 83 * profile. 84 * @get_rate: This is called by #GUPnPDLNAProfileGuesser to get a 85 * sample rate. 86 * @get_stream_format: This is called by #GUPnPDLNAProfileGuesser to 87 * get a stream format. 88 * @get_wma_version: This is called by #GUPnPDLNAProfileGuesser to get 89 * a WMA version. 90 * @get_mime: This is called by #GUPnPDLNAProfileGuesser to get a MIME 91 * type. 92 * @_reserved: Padding. Ignore it. 93 */ 94 typedef struct { 95 GObjectClass parent_class; 96 97 GUPnPDLNAIntValue 98 (* get_bitrate) (GUPnPDLNAAudioInformation *info); 99 100 GUPnPDLNAIntValue 101 (* get_channels) (GUPnPDLNAAudioInformation *info); 102 103 GUPnPDLNAIntValue 104 (* get_depth) (GUPnPDLNAAudioInformation *info); 105 106 GUPnPDLNAIntValue 107 (* get_layer) (GUPnPDLNAAudioInformation *info); 108 109 GUPnPDLNAStringValue 110 (* get_level) (GUPnPDLNAAudioInformation *info); 111 112 GUPnPDLNAIntValue 113 (* get_mpeg_audio_version) (GUPnPDLNAAudioInformation *info); 114 115 GUPnPDLNAIntValue 116 (* get_mpeg_version) (GUPnPDLNAAudioInformation *info); 117 118 GUPnPDLNAStringValue 119 (* get_profile) (GUPnPDLNAAudioInformation *info); 120 121 GUPnPDLNAIntValue 122 (* get_rate) (GUPnPDLNAAudioInformation *info); 123 124 GUPnPDLNAStringValue 125 (* get_stream_format) (GUPnPDLNAAudioInformation *info); 126 127 GUPnPDLNAIntValue 128 (* get_wma_version) (GUPnPDLNAAudioInformation *info); 129 130 GUPnPDLNAStringValue 131 (* get_mime) (GUPnPDLNAAudioInformation *info); 132 133 gpointer _reserved[12]; 134 } GUPnPDLNAAudioInformationClass; 135 136 GType 137 gupnp_dlna_audio_information_get_type (void); 138 139 GUPnPDLNAIntValue 140 gupnp_dlna_audio_information_get_bitrate (GUPnPDLNAAudioInformation *info); 141 142 GUPnPDLNAIntValue 143 gupnp_dlna_audio_information_get_channels (GUPnPDLNAAudioInformation *info); 144 145 GUPnPDLNAIntValue 146 gupnp_dlna_audio_information_get_depth (GUPnPDLNAAudioInformation *info); 147 148 GUPnPDLNAIntValue 149 gupnp_dlna_audio_information_get_layer (GUPnPDLNAAudioInformation *info); 150 151 GUPnPDLNAStringValue 152 gupnp_dlna_audio_information_get_level (GUPnPDLNAAudioInformation *info); 153 154 GUPnPDLNAIntValue 155 gupnp_dlna_audio_information_get_mpeg_audio_version 156 (GUPnPDLNAAudioInformation *info); 157 158 GUPnPDLNAIntValue 159 gupnp_dlna_audio_information_get_mpeg_version (GUPnPDLNAAudioInformation *info); 160 161 GUPnPDLNAStringValue 162 gupnp_dlna_audio_information_get_profile (GUPnPDLNAAudioInformation *info); 163 164 GUPnPDLNAIntValue 165 gupnp_dlna_audio_information_get_rate (GUPnPDLNAAudioInformation *info); 166 167 GUPnPDLNAStringValue 168 gupnp_dlna_audio_information_get_stream_format 169 (GUPnPDLNAAudioInformation *info); 170 171 GUPnPDLNAIntValue 172 gupnp_dlna_audio_information_get_wma_version (GUPnPDLNAAudioInformation *info); 173 174 GUPnPDLNAStringValue 175 gupnp_dlna_audio_information_get_mime (GUPnPDLNAAudioInformation *info); 176 177 G_END_DECLS 178 179 #endif /* __GUPNP_DLNA_AUDIO_INFORMATION_H__ */ 180