summaryrefslogtreecommitdiff
path: root/swfdec/swfdec_amf.h
blob: 06dde8a556e476f9edaaf620123f6c01a67844a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* Swfdec
 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifndef __SWFDEC_AMF_H__
#define __SWFDEC_AMF_H__

#include <swfdec/swfdec_as_context.h>
#include <swfdec/swfdec_bits.h>

G_BEGIN_DECLS

typedef enum {
  SWFDEC_AMF_NUMBER = 0,
  SWFDEC_AMF_BOOLEAN = 1,
  SWFDEC_AMF_STRING = 2,
  SWFDEC_AMF_OBJECT = 3,
  SWFDEC_AMF_MOVIECLIP = 4,
  SWFDEC_AMF_NULL = 5,
  SWFDEC_AMF_UNDEFINED = 6,
  SWFDEC_AMF_REFERENCE = 7,
  SWFDEC_AMF_MIXED_ARRAY = 8,
  SWFDEC_AMF_END_OBJECT = 9,
  SWFDEC_AMF_ARRAY = 10,
  SWFDEC_AMF_DATE = 11,
  SWFDEC_AMF_BIG_STRING = 12,
  /* what is 13? */
  SWFDEC_AMF_RECORDSET = 14,
  SWFDEC_AMF_XML = 15,
  SWFDEC_AMF_CLASS = 16,
  SWFDEC_AMF_FLASH9 = 17,
  /* add more items here */
  SWFDEC_AMF_N_TYPES
} SwfdecAmfType;

gboolean	swfdec_amf_parse_one		(SwfdecAsContext *	context, 
						 SwfdecBits *		bits,
						 SwfdecAmfType		expected_type,
						 SwfdecAsValue *	rval);
guint		swfdec_amf_parse		(SwfdecAsContext *	context, 
						 SwfdecBits *		bits,
						 guint			n_items,
						 ...);


G_END_DECLS

#endif