comments.h
Go to the documentation of this file.
/*
Copyright (C) 2003 Commonwealth Scientific and Industrial Research
Organisation (CSIRO) Australia
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of CSIRO Australia nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __FISH_SOUND_COMMENT_H__
#define __FISH_SOUND_COMMENT_H__
#include <fishsound/fishsound.h>
typedef struct {
char * name;
char * value;
} FishSoundComment;
#ifdef __cplusplus
extern "C" {
#endif
const char *
fish_sound_comment_get_vendor (FishSound * fsound);
const FishSoundComment *
fish_sound_comment_first (FishSound * fsound);
const FishSoundComment *
fish_sound_comment_next (FishSound * fsound, const FishSoundComment * comment);
const FishSoundComment *
fish_sound_comment_first_byname (FishSound * fsound, char * name);
const FishSoundComment *
fish_sound_comment_next_byname (FishSound * fsound,
const FishSoundComment * comment);
int
fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment);
int
fish_sound_comment_add_byname (FishSound * fsound, const char * name,
const char * value);
int
fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment);
int
fish_sound_comment_remove_byname (FishSound * fsound, char * name);
#ifdef __cplusplus
}
#endif
#endif /* __FISH_SOUND_COMMENTS_H__ */
fish_sound_comment_first
const FishSoundComment * fish_sound_comment_first(FishSound *fsound)
Retrieve the first comment.
fish_sound_comment_first_byname
const FishSoundComment * fish_sound_comment_first_byname(FishSound *fsound, char *name)
Retrieve the first comment with a given name.
fish_sound_comment_next_byname
const FishSoundComment * fish_sound_comment_next_byname(FishSound *fsound, const FishSoundComment *comment)
Retrieve the next comment following and with the same name as a given comment.
fish_sound_comment_remove_byname
int fish_sound_comment_remove_byname(FishSound *fsound, char *name)
Remove all comments with a given name.
fish_sound_comment_add
int fish_sound_comment_add(FishSound *fsound, FishSoundComment *comment)
Add a comment.
fish_sound_comment_get_vendor
const char * fish_sound_comment_get_vendor(FishSound *fsound)
Retrieve the vendor string.
fish_sound_comment_next
const FishSoundComment * fish_sound_comment_next(FishSound *fsound, const FishSoundComment *comment)
Retrieve the next comment.
fish_sound_comment_remove
int fish_sound_comment_remove(FishSound *fsound, FishSoundComment *comment)
Remove a comment.
fish_sound_comment_add_byname
int fish_sound_comment_add_byname(FishSound *fsound, const char *name, const char *value)
Add a comment by name and value.
fishsound.h
The libfishsound C API.
FishSound
void * FishSound
An opaque handle to a FishSound.
Definition fishsound.h:433
FishSoundComment
A comment.
Definition comments.h:92
FishSoundComment::value
char * value
The value of the comment, as UTF-8.
Definition comments.h:97
FishSoundComment::name
char * name
The name of the comment, eg.
Definition comments.h:94