[xiph-cvs] cvs commit: libshout/include/shout shout.h

Brendan brendan at xiph.org
Sun Jan 12 01:02:15 PST 2003



brendan     03/01/12 04:02:15

  Modified:    include/shout shout.h
  Log:
  Introduce shout_(get)|(set)_(connected)|(public)
  Some additional commenting.

Revision  Changes    Path
1.12      +19 -5     libshout/include/shout/shout.h

Index: shout.h
===================================================================
RCS file: /usr/local/cvsroot/libshout/include/shout/shout.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- shout.h	3 Oct 2002 13:53:25 -0000	1.11
+++ shout.h	12 Jan 2003 09:02:14 -0000	1.12
@@ -17,7 +17,7 @@
 #define SHOUTERR_CONNECTED	(7)
 #define SHOUTERR_UNCONNECTED	(8)
 #define SHOUTERR_UNSUPPORTED	(9)
-#define SHOUTERR_REFUSED    (10)
+#define SHOUTERR_REFUSED	(10)
 
 #define SHOUT_FORMAT_VORBIS	(0)
 #define SHOUT_FORMAT_MP3	(1)
@@ -25,7 +25,7 @@
 #define SHOUT_PROTOCOL_ICE		(0)
 #define SHOUT_PROTOCOL_XAUDIOCAST	(1)
 #define SHOUT_PROTOCOL_ICY		(2)
-#define SHOUT_PROTOCOL_HTTP	    (3)
+#define SHOUT_PROTOCOL_HTTP		(3)
 
 typedef struct shout shout_t;
 typedef struct shout_metadata shout_metadata_t;
@@ -52,6 +52,9 @@
 /* Return the error code (e.g. SHOUTERR_SOCKET) for this shout instance */
 int shout_get_errno(shout_t *self);
 
+/* returns SHOUTERR_CONNECTED or SHOUTERR_UNCONNECTED */
+int shout_get_connected(shout_t *self);
+
 /* Parameter manipulation functions.  libshout makes copies of all parameters,
  * the caller may free its copies after giving them to libshout.  May return
  * SHOUTERR_MALLOC */
@@ -90,6 +93,9 @@
 int shout_set_bitrate(shout_t *self, unsigned int bitrate);
 unsigned int shout_get_bitrate(shout_t *self);
 
+int shout_set_public(shout_t *self, unsigned int public);
+unsigned int shout_get_public(shout_t *self);
+
 /* takes a SHOUT_FORMAT_xxxx argument */
 int shout_set_format(shout_t *self, unsigned int format);
 unsigned int shout_get_format(shout_t *self);
@@ -116,16 +122,24 @@
 /* Puts caller to sleep until it is time to send more data to the server */
 void shout_sync(shout_t *self);
 
-/* Sets MP3 metadata */
+/* Sets MP3 metadata.
+ * Returns:
+ *   SHOUTERR_SUCCESS on success
+ *   SHOUTERR_UNSUPPORTED if protocol isn't Icy or X-Audiocast
+ */
 int shout_set_metadata(shout_t *self, shout_metadata_t *metadata);
 
-/* Allocates a new metadata structure.  Must be freed by shout_metadata_free */
+/* Allocates a new metadata structure.  Must be freed by shout_metadata_free. */
 shout_metadata_t *shout_metadata_new(void);
 
 /* Free resources allocated by shout_metadata_t */
 void shout_metadata_free(shout_metadata_t *self);
 
-/* Add a parameter to the metadata structure */
+/* Add a parameter to the metadata structure.
+ * Returns:
+ *   SHOUTERR_SUCCESS on success
+ *   SHOUTERR_INSANE if self isn't a valid shout_metadata_t* or name is null
+ *   SHOUTERR_MALLOC if memory can't be allocated */
 int shout_metadata_add(shout_metadata_t *self, const char *name, const char *value);
 
 #ifdef __cplusplus

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list