  
    
main.htmlMain Page     
classes.htmlData Structures     
files.htmlFiles     
dirs.htmlDirectories   
  
    
files.htmlFile List     
globals.htmlGlobals   
dir_20715630405f3b63e7ab7a5c713843d9.htmllibexif exif-mnote-data.c
exif-mnote-data_8c.htmlGo 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.htmllibexif/exif-mnote-data.h > 00024 #include < exif-mnote-data-priv_8h.htmllibexif/exif-mnote-data-priv.h > 00025 
00026 #include <stdlib.h> 00027 #include <string.h> 00028 
struct__ExifMnoteDataPriv.html00029  struct struct__ExifMnoteDataPriv.html_ExifMnoteDataPriv 00030 {
struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b900031          unsigned int struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count ;
00032 };
00033 
00034 void exif-mnote-data_8c.html#1dc83fc443e1445f95ab049a60f554b200035  exif-mnote-data-priv_8h.html#4851f7dbe71b3c0faec2970bcd39e284exif_mnote_data_construct  ( struct__ExifMnoteData.htmlExifMnoteData  *d, struct__ExifMem.htmlExifMem  *mem)
00036 {
00037         if (!d || !mem) return;
00038         if (d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv ) return;
00039         d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv  = exif-mem_8c.html#28065115ce31c8c9c7701df5b3f4ada5exif_mem_alloc  (mem, sizeof ( struct__ExifMnoteDataPriv.htmlExifMnoteDataPriv ));
00040         if (!d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv ) return;
00041 
00042         d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv -> struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count  = 1;
00043 
00044         d-> struct__ExifMnoteData.html#5af61de00f29058de1d06484f96145fcmem  = mem;
00045         exif-mem_8c.html#5e444d744fdb19c0c8d4438d9aad2b0bexif_mem_ref  (mem);
00046 }
00047 
00048 void exif-mnote-data_8h.html#4a6e666ba330730bba2c0d879de8371000049  exif-mnote-data_8c.html#d707d4e68384edd82c1d00cd795f9cc6exif_mnote_data_ref  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00050 {
00051         if (d && d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv ) d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv -> struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count ++;
00052 }
00053 
00054 static void exif-mnote-data_8c.html#b127c871dc7d97235c62694ead4a511a00055  exif-mnote-data_8c.html#b127c871dc7d97235c62694ead4a511aexif_mnote_data_free  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00056 {
00057         struct__ExifMem.htmlExifMem  *mem = d ? d-> struct__ExifMnoteData.html#5af61de00f29058de1d06484f96145fcmem  : NULL;
00058 
00059         if (!d) return;
00060         if (d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv ) {
00061                 if (d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#235b911b5e76cad1172c5551e6edd609free ) d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#235b911b5e76cad1172c5551e6edd609free  (d);
00062                 exif-mem_8c.html#c18517acd3216e21942966d3dfab5f53exif_mem_free  (mem, d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv );
00063                 d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv  = NULL;
00064         }
00065         exif-log_8c.html#a4f16b2e2aa992cd5d1598fbf68d2fb7exif_log_unref  (d-> struct__ExifMnoteData.html#84321b0981574521dcae4fcba760c787log );
00066         exif-mem_8c.html#c18517acd3216e21942966d3dfab5f53exif_mem_free  (mem, d);
00067         exif-mem_8c.html#fd6959367336c1459125c43e3f16fec8exif_mem_unref  (mem);
00068 }
00069 
00070 void exif-mnote-data_8h.html#2a5c8191793e7d6bb81604ea6321d7ee00071  exif-mnote-data_8c.html#ee4bc15f166486917b7401fb36a609f7exif_mnote_data_unref  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00072 {
00073         if (!d || !d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv ) return;
00074         if (d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv -> struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count  > 0) d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv -> struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count --;
00075         if (!d-> struct__ExifMnoteData.html#c3d56d81088c1a3fb9b6e1f0c6455aaapriv -> struct__ExifMnoteDataPriv.html#972a2c5830270468d4070a11195803b9ref_count )
00076                 exif-mnote-data_8c.html#b127c871dc7d97235c62694ead4a511aexif_mnote_data_free  (d);
00077 }
00078 
00079 void exif-mnote-data_8h.html#e5b16667b74bfbe079064ac6dfab52de00080  exif-mnote-data_8c.html#c720f234ab333f18dd36b3b5320dd350exif_mnote_data_load  ( struct__ExifMnoteData.htmlExifMnoteData  *d, const unsigned char *buf,
00081                       unsigned int buf_size)
00082 {
00083         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#70dd60ad580375fe7533eaea4bf36386load ) return;
00084         d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#70dd60ad580375fe7533eaea4bf36386load  (d, buf, buf_size);
00085 }
00086 
00087 void exif-mnote-data_8h.html#3c245c13150711b1b7745365a9ad086b00088  exif-mnote-data_8c.html#60a15ada14fb5f82818feb65d1a63029exif_mnote_data_save  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned char **buf,
00089                       unsigned int *buf_size)
00090 {
00091         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#bd9b0c209efcccfd92be7b3f16f1ff2dsave ) return;
00092         d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#bd9b0c209efcccfd92be7b3f16f1ff2dsave  (d, buf, buf_size);
00093 }
00094 
00095 void exif-mnote-data_8c.html#5c6ca8a7704ef587c73d14a859e3ba2800096  exif-mnote-data-priv_8h.html#97ad703423084ddc95e573fe891905dfexif_mnote_data_set_byte_order  ( struct__ExifMnoteData.htmlExifMnoteData  *d, exif-byte-order_8h.html#de4a9c512c9cd4723485181c5679f1d5ExifByteOrder  o)
00097 {
00098         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#d841cedf65defa767e26d59479dbe59bset_byte_order ) return;
00099         d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#d841cedf65defa767e26d59479dbe59bset_byte_order  (d, o);
00100 }
00101 
00102 void exif-mnote-data_8c.html#55892db9d860167365a9461d6e5b19f100103  exif-mnote-data-priv_8h.html#cd453a059a4cf3fb6ff1fd87cb85db5cexif_mnote_data_set_offset  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int o)
00104 {
00105         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#23a49245e91ceeb7b8693da10544e84eset_offset ) return;
00106         d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#23a49245e91ceeb7b8693da10544e84eset_offset  (d, o);
00107 }
00108 
00109 unsigned int exif-mnote-data_8h.html#bc2d5bb8c6dd58ced8cf0f61ddd0ce1c00110  exif-mnote-data_8c.html#6822d896423076813b0e623b0d43a40dexif_mnote_data_count  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00111 {
00112         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#8c5c9588e9360c9d98362e52563cfdcdcount ) return 0;
00113         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#8c5c9588e9360c9d98362e52563cfdcdcount  (d);
00114 }
00115 
00116 unsigned int exif-mnote-data_8h.html#ad3d0838f4e762af040f7e97de2740ad00117  exif-mnote-data_8c.html#148ab0ec4b122749c3443620d6b5fc6bexif_mnote_data_get_id  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00118 {
00119         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#6f13f4a3b196ae98e0c8e52011e25f1eget_id ) return 0;
00120         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#6f13f4a3b196ae98e0c8e52011e25f1eget_id  (d, n);
00121 }
00122 
00123 const char *
exif-mnote-data_8h.html#9f28c19e8f60375c575be28575fcb5a500124  exif-mnote-data_8c.html#8c590e141921e651a797f41d41f849b6exif_mnote_data_get_name  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00125 {
00126         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#d5578f1f1352a9d4f0d5ebcd15ee6347get_name ) return NULL;
00127         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#d5578f1f1352a9d4f0d5ebcd15ee6347get_name  (d, n);
00128 }
00129 
00130 const char *
exif-mnote-data_8h.html#f314532ac8a279d2e93394a5af2fda9a00131  exif-mnote-data_8c.html#357257658cadbada595c97f9584d905dexif_mnote_data_get_title  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00132 {
00133         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#dcec364c97ceb5ebb9620a51aef6bebcget_title ) return NULL;
00134         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#dcec364c97ceb5ebb9620a51aef6bebcget_title  (d, n);
00135 }
00136         
00137 const char *
exif-mnote-data_8h.html#2eeea9c5c528d78944fdd5ebb2d98da800138  exif-mnote-data_8c.html#187791b3c8f6bb0eeea1e35203807342exif_mnote_data_get_description  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00139 {
00140         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#53535571495924097f7c882cab4eb848get_description ) return NULL;
00141         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#53535571495924097f7c882cab4eb848get_description  (d, n);
00142 }
00143         
00144 char *
exif-mnote-data_8h.html#626975779cca5f3501d36057cecdee9400145  exif-mnote-data_8c.html#74931f8f096f469b505fa1d255f2df45exif_mnote_data_get_value  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n, char *val, unsigned int maxlen)
00146 {
00147         if (!d || !d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#68d48f72ec7505897fdd344781af5e6bget_value ) return NULL;
00148         return d-> struct__ExifMnoteData.html#8aa4201e4ba43f3b45356ae8d9bb4bc5methods . struct__ExifMnoteDataMethods.html#68d48f72ec7505897fdd344781af5e6bget_value  (d, n, val, maxlen);
00149 }
00150 
00151 void exif-mnote-data_8h.html#c3b63c800906cfa6b26ba0c8c487472100152  exif-mnote-data_8c.html#287e1c41b51b5abe79a51c80e7f9983fexif_mnote_data_log  ( struct__ExifMnoteData.htmlExifMnoteData  *d, struct__ExifLog.htmlExifLog  *log)
00153 {
00154         if (!d) return;
00155         exif-log_8c.html#a4f16b2e2aa992cd5d1598fbf68d2fb7exif_log_unref  (d-> struct__ExifMnoteData.html#84321b0981574521dcae4fcba760c787log );
00156         d-> struct__ExifMnoteData.html#84321b0981574521dcae4fcba760c787log  = log;
00157         exif-log_8c.html#926f0e50e2afab52db87acfbf76ff878exif_log_ref  (log);
00158 }
Generated on Sun Apr 23 01:22:39 2006 for EXIF library (libexif) Internals by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 