3 Routines for handling Flash2 AVM2 ABC contantpool entries.
5 Extension module for the rfxswf library.
6 Part of the swftools package.
8 Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
28 #include "../rfxswf.h"
33 DECLARE(namespace_set);
34 DECLARE_LIST(multiname);
35 DECLARE_LIST(namespace);
38 /* abc file constant pool */
45 array_t*namespace_sets;
49 typedef enum multiname_type
62 char* access2str(int type);
68 struct _namespace_set {
69 namespace_list_t*namespaces;
72 multiname_type_t type;
74 namespace_set_t*namespace_set;
78 /* object -> string */
79 char* namespace_set_to_string(namespace_set_t*set);
80 char* multiname_to_string(multiname_t*m);
81 char* namespace_to_string(namespace_t*ns);
83 /* integer -> object */
84 multiname_t*pool_lookup_multiname(pool_t*pool, int i);
86 /* object -> integer (lookup) */
87 int pool_find_namespace(pool_t*pool, namespace_t*ns);
88 int pool_find_namespace_set(pool_t*pool, namespace_set_t*set);
89 int pool_find_string(pool_t*pool, const char*s);
90 int pool_find_multiname(pool_t*pool, multiname_t*name);
92 /* object -> integer (lookup/creation) */
93 int pool_register_string(pool_t*pool, const char*s);
94 int pool_register_namespace(pool_t*pool, namespace_t*ns);
95 int pool_register_namespace_set(pool_t*pool, namespace_set_t*set);
96 int pool_register_multiname(pool_t*pool, multiname_t*n);
97 int pool_register_multiname2(pool_t*pool, char*name);
100 multiname_t* multiname_fromstring(const char*name);
103 void pool_read(pool_t*pool, TAG*tag);
104 void pool_destroy(pool_t*pool);