Main Page | Modules | Data Structures | Directories | File List | Globals | Related Pages

anx_types.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2003 Commonwealth Scientific and Industrial Research
00003    Organisation (CSIRO) Australia
00004 
00005    Redistribution and use in source and binary forms, with or without
00006    modification, are permitted provided that the following conditions
00007    are met:
00008 
00009    - Redistributions of source code must retain the above copyright
00010    notice, this list of conditions and the following disclaimer.
00011 
00012    - Redistributions in binary form must reproduce the above copyright
00013    notice, this list of conditions and the following disclaimer in the
00014    documentation and/or other materials provided with the distribution.
00015 
00016    - Neither the name of CSIRO Australia nor the names of its
00017    contributors may be used to endorse or promote products derived from
00018    this software without specific prior written permission.
00019 
00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00023    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
00024    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00027    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00028    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00029    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00037 #ifndef __ANX_TYPES_H__
00038 #define __ANX_TYPES_H__
00039 
00040 #include <stdio.h>
00041 #include <annodex/anx_list.h>
00042 
00043 /* On GNU systems, anx_int64.h is autogenerated during configure. On
00044  * non-GNU Win32 systems, we instead include a static definition. */
00045 #if defined(_WIN32) && !defined(__GNUC__)
00046 #  include <annodex/anx_int64_w32.h>
00047 #else
00048 #  include <annodex/anx_int64.h>
00049 #endif
00050 
00051 #ifndef _ANX_PRIVATE
00052 
00055 typedef void ANNODEX;
00056 #endif
00057 
00058 /* Annotation elements */
00059 typedef struct _AnxHead AnxHead;
00060 typedef struct _AnxClip AnxClip;
00061 typedef struct _AnxMetaElement AnxMetaElement;
00062 typedef struct _AnxLinkElement AnxLinkElement;
00063 
00064 struct _AnxMetaElement {
00065   const char *id;      
00066   const char *lang;    
00067   const char *dir;     
00068   const char *name;    
00069   const char *content; 
00070   const char *scheme;  
00071 };
00072 
00073 struct _AnxLinkElement {
00074   char *id;      
00075   char *class;   
00076   char *title;   
00077   char *lang;    
00078   char *dir;     
00079   char *href;    
00080   char *type;    
00081   char *rel;     
00082   char *rev;     
00083   char *media;   
00084 };
00085 
00086 
00087 struct _AnxHead {
00088   const char *head_id;    
00089   const char *lang;       
00090   const char *dir;        
00091   const char *profile;    
00092   const char *title;      
00093   const char *title_id;   
00094   const char *title_lang; 
00095   const char *title_dir;  
00096   const char *base_id;    
00097   const char *base_href;  
00098   AnxList * meta;   
00099   AnxList *link;    
00100 };
00101 
00102 struct _AnxClip {
00103   const char *clip_id;         
00104   const char *class;           
00105   const char *title;           
00106   const char *lang;            
00107   const char *dir;             
00108   const char *track;           
00109   const char *anchor_id;       
00110   const char *anchor_class;    
00111   const char *anchor_title;    
00112   const char *anchor_lang;     
00113   const char *anchor_dir;      
00114   const char *anchor_href;     
00115   const char *anchor_text;     
00116   const char *img_id;          
00117   const char *img_class;       
00118   const char *img_title;       
00119   const char *img_lang;        
00120   const char *img_dir;         
00121   const char *img_src;         
00122   const char *img_alt;         
00123   const char *desc_id;         
00124   const char *desc_class;      
00125   const char *desc_title;      
00126   const char *desc_lang;       
00127   const char *desc_dir;        
00128   const char *desc_text;       
00129   AnxList * meta;      
00130 };
00131 
00132 /* Importer Callbacks */
00133 
00134 typedef int (*AnxImportStream) (double presentation_time, double basetime,
00135                                 char * utc, void * user_data);
00136 typedef int (*AnxImportHead) (AnxHead * head, void * user_data);
00137 typedef int (*AnxImportClip) (AnxClip * clip,
00138                               double time_offset, void * user_data);
00139 typedef int (*AnxImportCMML) (const char * cmml, long n,
00140                               double time_offset, void * user_data);
00141 
00142 typedef int (*AnxImportImport) (double start_time, char * filename,
00143                                 char * id, char * content_type,
00144                                 double seek_offset, double seek_end,
00145                                 void * user_data);
00146 
00147 typedef struct _AnxImportCallbacks AnxImportCallbacks;
00148 
00149 struct _AnxImportCallbacks {
00150   AnxImportStream import_stream;
00151   AnxImportHead import_head;
00152   AnxImportClip import_clip;
00153   AnxImportCMML import_cmml;
00154   void * import_user_data;
00155   AnxImportImport import_import;
00156   void * import_import_user_data;
00157 };
00158 
00159 #endif /* __ANX_TYPES_H__ */

Generated on Tue Feb 7 13:35:30 2006 for libannodex by  doxygen 1.4.4