main.html
Main Page
|
classes.html
Alphabetical List
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
functions.html
Data Fields
|
globals.html
Globals
dir_000000.html
libexif
exif-mnote-data.c
exif-mnote-data_8c.html
Go to the documentation of this file.
00001
/* exif-mnote-data.c
00002
*
00003
* Copyright (C) 2003 Lutz M?ller <lutz@users.sourceforge.net>
00004
*
00005
* This library is free software; you can redistribute it and/or
00006
* modify it under the terms of the GNU Lesser General Public
00007
* License as published by the Free Software Foundation; either
00008
* version 2.1 of the License, or (at your option) any later version.
00009
*
00010
* This library is distributed in the hope that it will be useful,
00011
* but WITHOUT ANY WARRANTY; without even the implied warranty of
00012
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013
* Lesser General Public License for more details.
00014
*
00015
* You should have received a copy of the GNU Lesser General Public
00016
* License along with this library; if not, write to the
00017
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018
* Boston, MA 02111-1307, USA.
00019
*/
00020
00021
#include <config.h>
00022
00023
#include <
exif-mnote-data_8h.html
libexif/exif-mnote-data.h
>
00024
#include <
exif-mnote-data-priv_8h.html
libexif/exif-mnote-data-priv.h
>
00025
00026
#include <stdlib.h>
00027
#include <string.h>
00028
struct__ExifMnoteDataPriv.html
00029
struct
struct__ExifMnoteDataPriv.html
_ExifMnoteDataPriv
00030 {
struct__ExifMnoteDataPriv.html#o0
00031
unsigned
int
struct__ExifMnoteDataPriv.html#o0
ref_count
;
00032 };
00033
00034
void
exif-mnote-data_8c.html#a0
00035
exif-mnote-data-priv_8h.html#a2
exif_mnote_data_construct
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
struct__ExifMem.html
ExifMem
*mem)
00036 {
00037
if
(!d || !mem)
return
;
00038
if
(d->
struct__ExifMnoteData.html#o0
priv
)
return
;
00039         d->
struct__ExifMnoteData.html#o0
priv
=
exif-mem_8c.html#a7
exif_mem_alloc
(mem,
sizeof
(
struct__ExifMnoteDataPriv.html
ExifMnoteDataPriv
));
00040
if
(!d->
struct__ExifMnoteData.html#o0
priv
)
return
;
00041
00042         d->
struct__ExifMnoteData.html#o0
priv
->
struct__ExifMnoteDataPriv.html#o0
ref_count
= 1;
00043
00044         d->
struct__ExifMnoteData.html#o3
mem
= mem;
00045
exif-mem_8c.html#a4
exif_mem_ref
(mem);
00046 }
00047
00048
void
exif-mnote-data_8h.html#a1
00049
exif-mnote-data_8c.html#a1
exif_mnote_data_ref
(
struct__ExifMnoteData.html
ExifMnoteData
*d)
00050 {
00051
if
(d && d->
struct__ExifMnoteData.html#o0
priv
) d->
struct__ExifMnoteData.html#o0
priv
->
struct__ExifMnoteDataPriv.html#o0
ref_count
++;
00052 }
00053
00054
static
void
exif-mnote-data_8c.html#a2
00055
exif-mnote-data_8c.html#a2
exif_mnote_data_free
(
struct__ExifMnoteData.html
ExifMnoteData
*d)
00056 {
00057
struct__ExifMem.html
ExifMem
*mem = d ? d->
struct__ExifMnoteData.html#o3
mem
: NULL;
00058
00059
if
(!d)
return
;
00060
if
(d->
struct__ExifMnoteData.html#o0
priv
) {
00061
if
(d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o0
free
) d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o0
free
(d);
00062
exif-mem_8c.html#a6
exif_mem_free
(mem, d->
struct__ExifMnoteData.html#o0
priv
);
00063                 d->
struct__ExifMnoteData.html#o0
priv
= NULL;
00064         }
00065
exif-log_8c.html#a9
exif_log_unref
(d->
struct__ExifMnoteData.html#o2
log
);
00066
exif-mem_8c.html#a6
exif_mem_free
(mem, d);
00067
exif-mem_8c.html#a5
exif_mem_unref
(mem);
00068 }
00069
00070
void
exif-mnote-data_8h.html#a2
00071
exif-mnote-data_8c.html#a3
exif_mnote_data_unref
(
struct__ExifMnoteData.html
ExifMnoteData
*d)
00072 {
00073
if
(!d || !d->
struct__ExifMnoteData.html#o0
priv
)
return
;
00074
if
(d->
struct__ExifMnoteData.html#o0
priv
->
struct__ExifMnoteDataPriv.html#o0
ref_count
> 0) d->
struct__ExifMnoteData.html#o0
priv
->
struct__ExifMnoteDataPriv.html#o0
ref_count
--;
00075
if
(!d->
struct__ExifMnoteData.html#o0
priv
->
struct__ExifMnoteDataPriv.html#o0
ref_count
)
00076
exif-mnote-data_8c.html#a2
exif_mnote_data_free
(d);
00077 }
00078
00079
void
exif-mnote-data_8h.html#a3
00080
exif-mnote-data_8c.html#a4
exif_mnote_data_load
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
const
unsigned
char
*buf,
00081
unsigned
int
buf_size)
00082 {
00083
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o2
load
)
return
;
00084         d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o2
load
(d, buf, buf_size);
00085 }
00086
00087
void
exif-mnote-data_8h.html#a4
00088
exif-mnote-data_8c.html#a5
exif_mnote_data_save
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
char
**buf,
00089
unsigned
int
*buf_size)
00090 {
00091
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o1
save
)
return
;
00092         d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o1
save
(d, buf, buf_size);
00093 }
00094
00095
void
exif-mnote-data_8c.html#a6
00096
exif-mnote-data-priv_8h.html#a3
exif_mnote_data_set_byte_order
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
exif-byte-order_8h.html#a3
ExifByteOrder
o)
00097 {
00098
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o4
set_byte_order
)
return
;
00099         d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o4
set_byte_order
(d, o);
00100 }
00101
00102
void
exif-mnote-data_8c.html#a7
00103
exif-mnote-data-priv_8h.html#a4
exif_mnote_data_set_offset
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
o)
00104 {
00105
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o3
set_offset
)
return
;
00106         d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o3
set_offset
(d, o);
00107 }
00108
00109
unsigned
int
exif-mnote-data_8h.html#a5
00110
exif-mnote-data_8c.html#a8
exif_mnote_data_count
(
struct__ExifMnoteData.html
ExifMnoteData
*d)
00111 {
00112
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o5
count
)
return
0;
00113
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o5
count
(d);
00114 }
00115
00116
unsigned
int
exif-mnote-data_8h.html#a6
00117
exif-mnote-data_8c.html#a9
exif_mnote_data_get_id
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
n)
00118 {
00119
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o6
get_id
)
return
0;
00120
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o6
get_id
(d, n);
00121 }
00122
00123
const
char
*
exif-mnote-data_8h.html#a7
00124
exif-mnote-data_8c.html#a10
exif_mnote_data_get_name
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
n)
00125 {
00126
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o7
get_name
)
return
NULL;
00127
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o7
get_name
(d, n);
00128 }
00129
00130
const
char
*
exif-mnote-data_8h.html#a8
00131
exif-mnote-data_8c.html#a11
exif_mnote_data_get_title
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
n)
00132 {
00133
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o8
get_title
)
return
NULL;
00134
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o8
get_title
(d, n);
00135 }
00136
00137
const
char
*
exif-mnote-data_8h.html#a9
00138
exif-mnote-data_8c.html#a12
exif_mnote_data_get_description
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
n)
00139 {
00140
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o9
get_description
)
return
NULL;
00141
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o9
get_description
(d, n);
00142 }
00143
00144
char
*
exif-mnote-data_8h.html#a10
00145
exif-mnote-data_8c.html#a13
exif_mnote_data_get_value
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
unsigned
int
n,
char
*val,
unsigned
int
maxlen)
00146 {
00147
if
(!d || !d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o10
get_value
)
return
NULL;
00148
return
d->
struct__ExifMnoteData.html#o1
methods
.
struct__ExifMnoteDataMethods.html#o10
get_value
(d, n, val, maxlen);
00149 }
00150
00151
void
exif-mnote-data_8h.html#a11
00152
exif-mnote-data_8c.html#a14
exif_mnote_data_log
(
struct__ExifMnoteData.html
ExifMnoteData
*d,
struct__ExifLog.html
ExifLog
*log)
00153 {
00154
if
(!d)
return
;
00155
exif-log_8c.html#a9
exif_log_unref
(d->
struct__ExifMnoteData.html#o2
log
);
00156         d->
struct__ExifMnoteData.html#o2
log
= log;
00157
exif-log_8c.html#a8
exif_log_ref
(log);
00158 }
Generated on Fri Sep 9 16:28:11 2005 for EXIF library (libexif) Internals by
http://www.doxygen.org/index.html
doxygen
1.4.4
