liboggz: oggz_comments.h Source File

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# oggz_comments.h

Go to the documentation of this file.

    00001 /*
    00002    Copyright (C) 2003 Commonwealth Scientific and Industrial Research
    00003    Organisation (CSIRO) Australia
    00004
    00005    Redistribution and use in source and binary forms, with or without
    00006    modification, are permitted provided that the following conditions
    00007    are met:
    00008
    00009    - Redistributions of source code must retain the above copyright
    00010    notice, this list of conditions and the following disclaimer.
    00011
    00012    - Redistributions in binary form must reproduce the above copyright
    00013    notice, this list of conditions and the following disclaimer in the
    00014    documentation and/or other materials provided with the distribution.
    00015
    00016    - Neither the name of CSIRO Australia nor the names of its
    00017    contributors may be used to endorse or promote products derived from
    00018    this software without specific prior written permission.
    00019
    00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    00021    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    00022    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    00023    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
    00024    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    00025    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    00026    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    00027    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    00028    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    00029    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00030    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00031 */
    00032
    00033 #ifndef __OGGZ_COMMENT_H__
    00034 #define __OGGZ_COMMENT_H__
    00035
    00086 #include <oggz/oggz.h>
    00087
    00091 typedef struct {
    00093   char * name;
    00094
    00096   char * value;
    00097 } OggzComment;
    00098
    00099 #ifdef __cplusplus
    00100 extern "C" {
    00101 #endif
    00102
    00112 const char *
    00113 oggz_comment_get_vendor (OGGZ * oggz, long serialno);
    00114
    00128 int
    00129 oggz_comment_set_vendor (OGGZ * oggz, long serialno,
    00130                          const char * vendor_string);
    00131
    00140 const OggzComment *
    00141 oggz_comment_first (OGGZ * oggz, long serialno);
    00142
    00153 const OggzComment *
    00154 oggz_comment_next (OGGZ * oggz, long serialno, const OggzComment * comment);
    00155
    00167 const OggzComment *
    00168 oggz_comment_first_byname (OGGZ * oggz, long serialno, char * name);
    00169
    00182 const OggzComment *
    00183 oggz_comment_next_byname (OGGZ * oggz, long serialno,
    00184                           const OggzComment * comment);
    00185
    00196 int
    00197 oggz_comment_add (OGGZ * oggz, long serialno, OggzComment * comment);
    00198
    00210 int
    00211 oggz_comment_add_byname (OGGZ * oggz, long serialno,
    00212                          const char * name, const char * value);
    00213
    00226 int
    00227 oggz_comment_remove (OGGZ * oggz, long serialno, OggzComment * comment);
    00228
    00240 int
    00241 oggz_comment_remove_byname (OGGZ * oggz, long serialno, char * name);
    00242
    00265 ogg_packet *
    00266 oggz_comments_generate(OGGZ * oggz, long serialno,
    00267                        int FLAC_final_metadata_block);
    00268
    00269 /*
    00270  * Copy comments between two streams.
    00271  * \param src A OGGZ* handle
    00272  * \param src_serialno Identify a logical bitstream within \a src
    00273  * \param dest A OGGZ* handle (created with OGGZ_WRITE)
    00274  * \param dest_serialno Identify a logical bitstream within \a dest
    00275  * \retval OGGZ_ERR_BAD \a oggz is not a valid OGGZ* handle
    00276  * \retval OGGZ_ERR_INVALID Operation not suitable for \a dest
    00277  */
    00278 int
    00279 oggz_comments_copy (OGGZ * src, long src_serialno,
    00280                     OGGZ * dest, long dest_serialno);
    00281
    00287 void oggz_packet_destroy (ogg_packet *packet);
    00288
    00289 #ifdef __cplusplus
    00290 }
    00291 #endif
    00292
    00293 #endif /* __OGGZ_COMMENTS_H__ */