  
    
main.htmlMain Page     
classes.htmlData Structures     
files.htmlFiles     
dirs.htmlDirectories   
  
    
files.htmlFile List     
globals.htmlGlobals   
dir_3c4fde49625df9344590fff295c7c38d.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#4aeea75af716c95ad556e80e00049c9600031          unsigned int struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count ;
00032 };
00033 
00034 void exif-mnote-data_8c.html#504fc0507df0413e6356f9ab2a4e258400035  exif-mnote-data-priv_8h.html#06db5604f65a97b1c5ea3fcc4bfec7dcexif_mnote_data_construct  ( struct__ExifMnoteData.htmlExifMnoteData  *d, struct__ExifMem.htmlExifMem  *mem)
00036 {
00037         if (!d || !mem) return;
00038         if (d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv ) return;
00039         d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv  = exif-mem_8c.html#e8c09cfbcb95e435c4c4b7ec3bbd79e4exif_mem_alloc  (mem, sizeof ( struct__ExifMnoteDataPriv.htmlExifMnoteDataPriv ));
00040         if (!d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv ) return;
00041 
00042         d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv -> struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count  = 1;
00043 
00044         d-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem  = mem;
00045         exif-mem_8c.html#f28c61972f529be46907956e0b3e7a60exif_mem_ref  (mem);
00046 }
00047 
00048 void exif-mnote-data_8h.html#6e4fab705cb33adde53dfff211dcd03c00049  exif-mnote-data_8c.html#4a0d8d4bdca32c58f181913e6e262d77exif_mnote_data_ref  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00050 {
00051         if (d && d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv ) d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv -> struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count ++;
00052 }
00053 
00054 static void exif-mnote-data_8c.html#2f715582f27a9821560931aeaa139abd00055  exif-mnote-data_8c.html#2f715582f27a9821560931aeaa139abdexif_mnote_data_free  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00056 {
00057         struct__ExifMem.htmlExifMem  *mem = d ? d-> struct__ExifMnoteData.html#f4e3979d486789a2005b01100bc48c4bmem  : NULL;
00058 
00059         if (!d) return;
00060         if (d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv ) {
00061                 if (d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#a63698879f7a67e6b17c112b1bd5bad8free ) d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#a63698879f7a67e6b17c112b1bd5bad8free  (d);
00062                 exif-mem_8c.html#43190b81b4b4bdb4ffb89bfb612051b1exif_mem_free  (mem, d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv );
00063                 d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv  = NULL;
00064         }
00065         exif-log_8c.html#7a9b738a7429197d68c80ffedac7d8fbexif_log_unref  (d-> struct__ExifMnoteData.html#cc3a8f10ea19d9f5b91a695d0c788d1clog );
00066         exif-mem_8c.html#43190b81b4b4bdb4ffb89bfb612051b1exif_mem_free  (mem, d);
00067         exif-mem_8c.html#66744e0987af08c443df247ce55f7d87exif_mem_unref  (mem);
00068 }
00069 
00070 void exif-mnote-data_8h.html#c51e0514ec846838697a460a24bb73fb00071  exif-mnote-data_8c.html#f910e5c862e5aba351b84b2142d98192exif_mnote_data_unref  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00072 {
00073         if (!d || !d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv ) return;
00074         if (d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv -> struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count  > 0) d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv -> struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count --;
00075         if (!d-> struct__ExifMnoteData.html#2ae504353208ea00d72906607df65cd1priv -> struct__ExifMnoteDataPriv.html#4aeea75af716c95ad556e80e00049c96ref_count )
00076                 exif-mnote-data_8c.html#2f715582f27a9821560931aeaa139abdexif_mnote_data_free  (d);
00077 }
00078 
00079 void exif-mnote-data_8h.html#1b7917ee3739ef7e0384644048dcc01f00080  exif-mnote-data_8c.html#263d51ca6b59fecb34199113b033f63fexif_mnote_data_load  ( struct__ExifMnoteData.htmlExifMnoteData  *d, const unsigned char *buf,
00081                       unsigned int buf_size)
00082 {
00083         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#351860e435018eb6f20a1a80cc848058load ) return;
00084         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#351860e435018eb6f20a1a80cc848058load  (d, buf, buf_size);
00085 }
00086 
00087 void exif-mnote-data_8h.html#204a680542af1e34f1318aba4a24648a00088  exif-mnote-data_8c.html#704500ea880e6727d8b4a98ff38c0a25exif_mnote_data_save  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned char **buf,
00089                       unsigned int *buf_size)
00090 {
00091         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#885058f650d7e6dfbac29f391f1c3be1save ) return;
00092         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#885058f650d7e6dfbac29f391f1c3be1save  (d, buf, buf_size);
00093 }
00094 
00095 void exif-mnote-data_8c.html#4970c2abd01866c4b366064c171cf52400096  exif-mnote-data-priv_8h.html#1b67aad2ff49340ac3f0f15b3a726ce3exif_mnote_data_set_byte_order  ( struct__ExifMnoteData.htmlExifMnoteData  *d, exif-byte-order_8h.html#f966227d69ff74eea7ecd69ca645155bExifByteOrder  o)
00097 {
00098         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#2e6037a3070fa6b0f2a66b16c5ce70aeset_byte_order ) return;
00099         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#2e6037a3070fa6b0f2a66b16c5ce70aeset_byte_order  (d, o);
00100 }
00101 
00102 void exif-mnote-data_8c.html#c965af14567723ab062e11910e7bc6f200103  exif-mnote-data-priv_8h.html#17548c880619140855af60b037a8c730exif_mnote_data_set_offset  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int o)
00104 {
00105         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#bb617ca9aecebc6a4bdea49aec2bc8b0set_offset ) return;
00106         d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#bb617ca9aecebc6a4bdea49aec2bc8b0set_offset  (d, o);
00107 }
00108 
00109 unsigned int exif-mnote-data_8h.html#eefb49f94e1cf44013dedd504f62faa100110  exif-mnote-data_8c.html#f61fbda7c717e86991b0eccf6976a5f4exif_mnote_data_count  ( struct__ExifMnoteData.htmlExifMnoteData  *d)
00111 {
00112         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#aad86617351c2ee737b392f94040cccbcount ) return 0;
00113         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#aad86617351c2ee737b392f94040cccbcount  (d);
00114 }
00115 
00116 unsigned int exif-mnote-data_8h.html#37388b7f7da71a15536d23f7b405aa5e00117  exif-mnote-data_8c.html#981bab235db2e156216d5cc43f48cac7exif_mnote_data_get_id  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00118 {
00119         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#453d479929b42b3db130e4853ca1f0c5get_id ) return 0;
00120         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#453d479929b42b3db130e4853ca1f0c5get_id  (d, n);
00121 }
00122 
00123 const char *
exif-mnote-data_8h.html#07f2421adda0f9a3f5f71575e479249300124  exif-mnote-data_8c.html#921ea2f4583325653d2207c6f1d98742exif_mnote_data_get_name  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00125 {
00126         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#478e4e150437d70bdfdb6ceb274603ebget_name ) return NULL;
00127         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#478e4e150437d70bdfdb6ceb274603ebget_name  (d, n);
00128 }
00129 
00130 const char *
exif-mnote-data_8h.html#22101c04c29522dff7eb785dd86c094300131  exif-mnote-data_8c.html#bdf581cdc7ce672b44978ef993f22b78exif_mnote_data_get_title  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00132 {
00133         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#c14c8b9a7a9a282b94fc2c7476110d25get_title ) return NULL;
00134         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#c14c8b9a7a9a282b94fc2c7476110d25get_title  (d, n);
00135 }
00136         
00137 const char *
exif-mnote-data_8h.html#04e1b597a00ead5d189c7c3e40666be500138  exif-mnote-data_8c.html#a21ac7dd1784e892ec482fe037fc646bexif_mnote_data_get_description  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n)
00139 {
00140         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#4ca7e0ab9aed5703a2038699e9bcc486get_description ) return NULL;
00141         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#4ca7e0ab9aed5703a2038699e9bcc486get_description  (d, n);
00142 }
00143         
00144 char *
exif-mnote-data_8h.html#9873553a52e96b278e6e1aad0bea7e6900145  exif-mnote-data_8c.html#56299b268a29ea7fa1301952cfe32ca4exif_mnote_data_get_value  ( struct__ExifMnoteData.htmlExifMnoteData  *d, unsigned int n, char *val, unsigned int maxlen)
00146 {
00147         if (!d || !d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#35e308b7ffbdc5dcd6681eab820ba444get_value ) return NULL;
00148         return d-> struct__ExifMnoteData.html#431955e099ce8f160de45644f2bddaebmethods . struct__ExifMnoteDataMethods.html#35e308b7ffbdc5dcd6681eab820ba444get_value  (d, n, val, maxlen);
00149 }
00150 
00151 void exif-mnote-data_8h.html#9a6093f4cd64a11919f254851e54d92c00152  exif-mnote-data_8c.html#f117ac759e75a7145d53847dfa8b4892exif_mnote_data_log  ( struct__ExifMnoteData.htmlExifMnoteData  *d, struct__ExifLog.htmlExifLog  *log)
00153 {
00154         if (!d) return;
00155         exif-log_8c.html#7a9b738a7429197d68c80ffedac7d8fbexif_log_unref  (d-> struct__ExifMnoteData.html#cc3a8f10ea19d9f5b91a695d0c788d1clog );
00156         d-> struct__ExifMnoteData.html#cc3a8f10ea19d9f5b91a695d0c788d1clog  = log;
00157         exif-log_8c.html#afd7e5d40ca73440976a3b684bfa1059exif_log_ref  (log);
00158 }
Generated on Sun Apr 23 02:19:18 2006 for EXIF library (libexif) Internals by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 