Constness changes
[melted] / src / framework / mlt_properties.h
1 /**
2 * \file mlt_properties.h
3 * \brief Properties class declaration
4 * \see mlt_properties_s
5 *
6 * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
7 * \author Charles Yates <charles.yates@pandora.be>
8 * \author Dan Dennedy <dan@dennedy.org>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25 #ifndef _MLT_PROPERTIES_H_
26 #define _MLT_PROPERTIES_H_
27
28 #include "mlt_types.h"
29 #include "mlt_events.h"
30 #include <stdio.h>
31
32 /** \brief Properties class
33 *
34 * Properties is a combination list/dictionary of name/::mlt_property pairs.
35 * It is also a base class for many of the other MLT classes.
36 */
37
38 struct mlt_properties_s
39 {
40 void *child; /**< \private the object of a subclass */
41 void *local; /**< \private instance object */
42
43 /** the destructor virtual function */
44 mlt_destructor close;
45 void *close_object; /**< the object supplied to the close virtual function */
46 };
47
48 extern int mlt_properties_init( mlt_properties, void *child );
49 extern mlt_properties mlt_properties_new( );
50 extern mlt_properties mlt_properties_load( const char *file );
51 extern int mlt_properties_inc_ref( mlt_properties self );
52 extern int mlt_properties_dec_ref( mlt_properties self );
53 extern int mlt_properties_ref_count( mlt_properties self );
54 extern void mlt_properties_mirror( mlt_properties self, mlt_properties that );
55 extern int mlt_properties_inherit( mlt_properties self, mlt_properties that );
56 extern int mlt_properties_pass( mlt_properties self, mlt_properties that, const char *prefix );
57 extern void mlt_properties_pass_property( mlt_properties self, mlt_properties that, const char *name );
58 extern int mlt_properties_pass_list( mlt_properties self, mlt_properties that, const char *list );
59 extern int mlt_properties_set( mlt_properties self, const char *name, const char *value );
60 extern int mlt_properties_set_or_default( mlt_properties self, const char *name, const char *value, const char *def );
61 extern int mlt_properties_parse( mlt_properties self, const char *namevalue );
62 extern char *mlt_properties_get( mlt_properties self, const char *name );
63 extern char *mlt_properties_get_name( mlt_properties self, int index );
64 extern char *mlt_properties_get_value( mlt_properties self, int index );
65 extern void *mlt_properties_get_data_at( mlt_properties self, int index, int *size );
66 extern int mlt_properties_get_int( mlt_properties self, const char *name );
67 extern int mlt_properties_set_int( mlt_properties self, const char *name, int value );
68 extern int64_t mlt_properties_get_int64( mlt_properties self, const char *name );
69 extern int mlt_properties_set_int64( mlt_properties self, const char *name, int64_t value );
70 extern double mlt_properties_get_double( mlt_properties self, const char *name );
71 extern int mlt_properties_set_double( mlt_properties self, const char *name, double value );
72 extern mlt_position mlt_properties_get_position( mlt_properties self, const char *name );
73 extern int mlt_properties_set_position( mlt_properties self, const char *name, mlt_position value );
74 extern int mlt_properties_set_data( mlt_properties self, const char *name, void *value, int length, mlt_destructor, mlt_serialiser );
75 extern void *mlt_properties_get_data( mlt_properties self, const char *name, int *length );
76 extern int mlt_properties_rename( mlt_properties self, const char *source, const char *dest );
77 extern int mlt_properties_count( mlt_properties self );
78 extern void mlt_properties_dump( mlt_properties self, FILE *output );
79 extern void mlt_properties_debug( mlt_properties self, const char *title, FILE *output );
80 extern int mlt_properties_save( mlt_properties, const char * );
81 extern int mlt_properties_dir_list( mlt_properties, const char *, const char *, int );
82 extern void mlt_properties_close( mlt_properties self );
83 extern int mlt_properties_is_sequence( mlt_properties self );
84 extern mlt_properties mlt_properties_parse_yaml( const char *file );
85 extern char *mlt_properties_serialise_yaml( mlt_properties self );
86
87 #endif