00001 /* 00002 Copyright (C) 2010 Mark Gordon 00003 00004 This program is free software; you can redistribute it and/or modify it under 00005 the terms of the GNU General Public License as published by the Free Software 00006 Foundation; either version 2 of the License, or (at your option) any later 00007 version. 00008 00009 This program is distributed in the hope that it will be useful, but WITHOUT ANY 00010 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 00011 PARTICULAR PURPOSE. See the GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License along with 00014 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00015 Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00025 #ifndef __DXCUT_ANNOTATION_H 00026 #define __DXCUT_ANNOTATION_H 00027 #include <dxcut/dex.h> 00028 #include <dxcut/value.h> 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 typedef enum DexAnnotationVisibility { 00035 VISIBILITY_BUILD = 0x00, 00037 VISIBILITY_RUNTIME = 0x01, 00039 VISIBILITY_SYSTEM = 0x02, 00042 VISIBILITY_NONE = 0xFF 00043 } DexAnnotationVisibility; 00044 00045 00046 typedef struct { 00049 ref_str* name; 00051 DexValue value; 00052 } DexNameValuePair; 00053 00054 struct dex_annotation_t { 00056 DexAnnotationVisibility visibility; 00057 00059 ref_str* type; 00060 00063 DexNameValuePair* parameters; 00064 }; 00065 00066 typedef struct dex_annotation_t DexAnnotation; 00067 00072 extern 00073 void dxc_free_annotation(DexAnnotation* annotation); 00074 00078 extern 00079 int dxc_is_sentinel_annotation(DexAnnotation* annotation); 00080 00084 extern 00085 void dxc_make_sentinel_annotation(DexAnnotation* annotation); 00086 00091 extern 00092 void dxc_free_parameter(DexNameValuePair* parameter); 00093 00098 extern 00099 int dxc_is_sentinel_parameter(DexNameValuePair* parameter); 00100 00104 extern 00105 void dxc_make_sentinel_parameter(DexNameValuePair* parameter); 00106 00107 #ifdef __cplusplus 00108 } 00109 #endif 00110 #endif // __DXCUT_ANNOTATION_H