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 */ 00019 #ifndef __DXCUT_CLASS_H 00020 #define __DXCUT_CLASS_H 00021 #include <dxcut/access_flags.h> 00022 #include <dxcut/annotation.h> 00023 #include <dxcut/field.h> 00024 #include <dxcut/method.h> 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 typedef struct { 00031 ref_str* name; 00032 00035 DexAccessFlags access_flags; 00036 00039 ref_str* super_class; 00040 00042 ref_strstr* interfaces; 00043 00046 ref_str* source_file; 00047 00050 DexAnnotation* annotations; 00051 00055 DexValue* static_values; 00056 00059 DexField* static_fields; 00060 00063 DexField* instance_fields; 00064 00067 DexMethod* direct_methods; 00068 00070 DexMethod* virtual_methods; 00071 } DexClass; 00072 00077 extern 00078 const char* dxc_type_nice(const char* type); 00079 00084 extern 00085 const char* dxc_type_name(const char* nice_type); 00086 00091 extern 00092 void dxc_free_class(DexClass* cl); 00093 00097 extern 00098 int dxc_is_sentinel_class(DexClass* cl); 00099 00103 extern 00104 void dxc_make_sentinel_class(DexClass* cl); 00105 00106 #ifdef __cplusplus 00107 } 00108 #endif 00109 #endif // __DXCUT_CLASS_H