1 /* libjclass - Library for reading java class files
2  * Copyright (C) 2003  Nicos Panayides
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  *
18  * $Id: manifest.h,v 1.2 2004/03/20 14:21:45 anarxia Exp $
19  */
20 #ifndef __JCLASS_MANIFEST_H__
21 #define __JCLASS_MANIFEST_H__
22 
23 #ifdef _cplusplus
24  extern "C" {
25 #endif
26 
27 #include <jclassconfig.h>
28 #include <jclass/types.h>
29 
30 typedef struct {
31 	char *key;
32 	char *value;
33 } ManifestEntry;
34 
35 typedef struct {
36 	char *name;
37 	int entry_count;
38 	ManifestEntry *entries;
39 } ManifestSection;
40 
41 typedef struct {
42 	int section_count;
43 	ManifestSection *sections;
44 } Manifest;
45 
46 Manifest *jclass_manifest_new_from_buffer(const char* buf, uint32_t length);
47 void jclass_manifest_free(Manifest *manifest);
48 const char *jclass_manifest_get_entry(Manifest *manifest, const char *section_name, const char *key);
49 
50 #ifdef _cplusplus
51  }
52 #endif
53 
54 #endif
55