diff options
355 files changed, 12932 insertions, 12810 deletions
@@ -1,4 +1,17 @@ + 0.9.2 ("Bloxorz") + +Yes, we are breaking things again. The first unstable release leading to +Swfdec 0.10 contains: +- rewrite the script interpreter for performance and correctness +- add a new Movie script value that looks up the correct movie +- remove most of Vivified and the test suite's HTTP handling as it was unused +- implement Blur and ColorMatrix filter +- improve various policy file checks, so files actually load +- initial support for new video/audio codecs (AAC audio is still missing) +- lots of memory leaks plugged +- vast amount of other bugfixes + 0.8.2 ("Gametrailers") Here's the first stable release. diff --git a/configure.ac b/configure.ac index 20e04e63..9705baba 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.58]) m4_define(swfdec_major, 0) -m4_define(swfdec_minor, 8) +m4_define(swfdec_minor, 9) m4_define(swfdec_micro, 3) AC_INIT(swfdec,[swfdec_major.swfdec_minor.swfdec_micro]) @@ -49,7 +49,7 @@ dnl http://lists.freedesktop.org/archives/swfdec/2008-January/001131.html dnl If this ever changes (like when Swfdec gets a stable API), don't forget to dnl change this if test x"$SWFDEC_SNAPSHOT" = xyes ; then - SWFDEC_LIBVERSION="$SWFDEC_MICRO:0:0" + SWFDEC_LIBVERSION="$SWFDEC_VERSION_MICRO:0:0" else SWFDEC_LIBVERSION="0:0:0" fi @@ -278,7 +278,7 @@ SWFDEC_GTK_LIBS="\$(top_builddir)/swfdec-gtk/libswfdec-gtk-$SWFDEC_MAJORMINOR.la AC_SUBST(SWFDEC_GTK_LIBS) AC_SUBST(SWFDEC_GTK_CFLAGS) -GTK_DOC_CHECK([1.6]) +GTK_DOC_CHECK([1.10]) if test "x${prefix}" = "xNONE"; then PACKAGE_PREFIX=${ac_default_prefix} @@ -323,9 +323,6 @@ vivified/code/Makefile vivified/code/test/Makefile vivified/code/test/compiler/Makefile vivified/code/test/decompiler/Makefile -vivified/core/Makefile -vivified/dock/Makefile -vivified/ui/Makefile ) AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am index 4e9a69ff..7e2f9e8a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -56,9 +56,11 @@ IGNORE_HFILES= \ swfdec_as_boolean.h \ swfdec_as_date.h \ swfdec_as_frame_internal.h \ + swfdec_as_gcable.h \ swfdec_as_internal.h \ swfdec_as_interpret.h \ swfdec_as_math.h \ + swfdec_as_movie_value.h \ swfdec_as_number.h \ swfdec_as_scope.h \ swfdec_as_script_function.h \ @@ -82,6 +84,7 @@ IGNORE_HFILES= \ swfdec_bitmap_movie.h \ swfdec_bitmap_pattern.h \ swfdec_bits.h \ + swfdec_blur_filter.h \ swfdec_bots.h \ swfdec_button.h \ swfdec_button_movie.h \ @@ -93,12 +96,17 @@ IGNORE_HFILES= \ swfdec_codec_gst.h \ swfdec_color.h \ swfdec_color_as.h \ + swfdec_color_matrix_filter.h \ swfdec_color_transform_as.h \ + swfdec_convolution_matrix.h \ swfdec_constant_pool.h \ swfdec_debug.h \ swfdec_debugger.h \ swfdec_decoder.h \ + swfdec_display_object.h \ + swfdec_display_object_container.h \ swfdec_draw.h \ + swfdec_event_dispatcher.h \ swfdec_text_field.h \ swfdec_text_field_movie.h \ swfdec_enums.h \ @@ -112,6 +120,7 @@ IGNORE_HFILES= \ swfdec_graphic_movie.h \ swfdec_image.h \ swfdec_image_decoder.h \ + swfdec_interactive_object.h \ swfdec_internal.h \ swfdec_interval.h \ swfdec_js.h \ @@ -214,4 +223,7 @@ include $(top_srcdir)/gtk-doc.make EXTRA_DIST += # Comment this out if you want your docs-status tested during 'make check' -#TESTS = $(GTKDOC_CHECK) +check-local: + (cd $(srcdir) \ + && $(GTKDOC_CHECK)) + diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml index 4b5de7e6..7e707b42 100644 --- a/doc/swfdec-docs.sgml +++ b/doc/swfdec-docs.sgml @@ -37,7 +37,8 @@ <xi:include href="xml/SwfdecAsValue.xml"/> <xi:include href="xml/SwfdecAsContext.xml"/> <xi:include href="xml/SwfdecAsObject.xml"/> - <xi:include href="xml/SwfdecAsArray.xml"/> + <xi:include href="xml/SwfdecAsRelay.xml"/> + <xi:include href="xml/Arrays.xml"/> <xi:include href="xml/SwfdecAsFunction.xml"/> <xi:include href="xml/SwfdecAsFrame.xml"/> <xi:include href="xml/SwfdecAsDebugger.xml"/> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index 67c6336e..a7f9bf62 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -391,6 +391,7 @@ SwfdecGcObject SwfdecGcObjectClass swfdec_gc_object_get_context swfdec_gc_object_mark +swfdec_as_object_mark swfdec_as_string_mark swfdec_as_value_mark <SUBSECTION Standard> @@ -408,37 +409,50 @@ SWFDEC_TYPE_GC_OBJECT <TITLE>SwfdecAsValue</TITLE> SwfdecAsValueType SwfdecAsValue +SWFDEC_AS_VALUE_GET_TYPE +SWFDEC_AS_VALUE_UNDEFINED SWFDEC_AS_VALUE_SET_UNDEFINED +SWFDEC_AS_VALUE_FALSE +SWFDEC_AS_VALUE_TRUE +SWFDEC_AS_VALUE_FROM_BOOLEAN SWFDEC_AS_VALUE_GET_BOOLEAN swfdec_as_value_to_boolean SWFDEC_AS_VALUE_SET_BOOLEAN SWFDEC_AS_VALUE_GET_NUMBER +swfdec_as_value_from_number swfdec_as_value_to_number +swfdec_as_value_from_integer swfdec_as_value_to_integer -SWFDEC_AS_VALUE_SET_INT -SWFDEC_AS_VALUE_SET_NUMBER +SWFDEC_AS_VALUE_FROM_STRING SWFDEC_AS_VALUE_GET_STRING swfdec_as_value_to_string SWFDEC_AS_VALUE_SET_STRING +SWFDEC_AS_VALUE_NULL SWFDEC_AS_VALUE_SET_NULL +SWFDEC_AS_VALUE_FROM_OBJECT SWFDEC_AS_VALUE_GET_OBJECT swfdec_as_value_to_object SWFDEC_AS_VALUE_SET_OBJECT swfdec_as_value_to_primitive -swfdec_as_value_to_debug +swfdec_as_value_get_variable swfdec_as_double_to_integer swfdec_as_double_to_string swfdec_as_integer_to_string swfdec_as_str_concat <SUBSECTION Standard> -SWFDEC_IS_AS_VALUE SWFDEC_AS_VALUE_IS_UNDEFINED SWFDEC_AS_VALUE_IS_BOOLEAN SWFDEC_AS_VALUE_IS_NUMBER SWFDEC_AS_VALUE_IS_STRING SWFDEC_AS_VALUE_IS_NULL SWFDEC_AS_VALUE_IS_OBJECT -swfdec_as_value_get_object +SWFDEC_AS_VALUE_COMBINE +SWFDEC_AS_VALUE_TYPE_BITS +SWFDEC_AS_VALUE_TYPE_MASK +SWFDEC_AS_VALUE_VALUE_MASK +SWFDEC_AS_VALUE_GET_VALUE +SwfdecAsDoubleValue +SwfdecAsStringValue </SECTION> <SECTION> @@ -494,25 +508,33 @@ SwfdecAsVariableForeach swfdec_as_object_foreach swfdec_as_object_run swfdec_as_object_call +swfdec_as_object_set_constructor_by_name +swfdec_as_object_set_constructor_by_namev +swfdec_as_object_set_relay swfdec_as_object_add_function -swfdec_as_object_add_constructor -swfdec_as_object_get_debug swfdec_as_object_resolve +</SECTION> + +<SECTION> +<FILE>SwfdecAsRelay</FILE> +<TITLE>SwfdecAsRelay</TITLE> +SwfdecAsRelay +SwfdecAsRelayClass +swfdec_as_relay_call +swfdec_as_relay_get_as_object <SUBSECTION Standard> -swfdec_as_object_get_type -SwfdecAsObjectClass -SWFDEC_AS_OBJECT -SWFDEC_AS_OBJECT_CLASS -SWFDEC_AS_OBJECT_GET_CLASS -SWFDEC_IS_AS_OBJECT -SWFDEC_IS_AS_OBJECT_CLASS -SWFDEC_TYPE_AS_OBJECT +swfdec_as_relay_get_type +SWFDEC_AS_RELAY +SWFDEC_AS_RELAY_CLASS +SWFDEC_AS_RELAY_GET_CLASS +SWFDEC_IS_AS_RELAY +SWFDEC_IS_AS_RELAY_CLASS +SWFDEC_TYPE_AS_RELAY </SECTION> <SECTION> -<FILE>SwfdecAsArray</FILE> -<TITLE>SwfdecAsArray</TITLE> -SwfdecAsArray +<FILE>Arrays</FILE> +<TITLE>Arrays</TITLE> swfdec_as_array_new swfdec_as_array_append swfdec_as_array_append_with_flags @@ -525,15 +547,6 @@ swfdec_as_array_set_length swfdec_as_array_get_value swfdec_as_array_set_value swfdec_as_array_remove -<SUBSECTION Standard> -swfdec_as_array_get_type -SwfdecAsArrayClass -SWFDEC_AS_ARRAY -SWFDEC_AS_ARRAY_CLASS -SWFDEC_AS_ARRAY_GET_CLASS -SWFDEC_IS_AS_ARRAY -SWFDEC_IS_AS_ARRAY_CLASS -SWFDEC_TYPE_AS_ARRAY </SECTION> <SECTION> @@ -545,7 +558,6 @@ SwfdecAsNativeFunction swfdec_as_function_call swfdec_as_function_call_full swfdec_as_native_function_new -swfdec_as_native_function_set_construct_type swfdec_as_native_function_check swfdec_as_native_function_checkv SWFDEC_AS_CHECK @@ -574,7 +586,6 @@ SWFDEC_TYPE_AS_NATIVE_FUNCTION SwfdecAsFrame swfdec_as_frame_get_next swfdec_as_frame_get_script -swfdec_as_frame_get_this SwfdecAsStackIterator swfdec_as_stack_iterator_init swfdec_as_stack_iterator_init_arguments diff --git a/doc/swfdec.types b/doc/swfdec.types index 2bbfe83b..4dce4cd4 100644 --- a/doc/swfdec.types +++ b/doc/swfdec.types @@ -1,12 +1,11 @@ #include <swfdec/swfdec.h> #include <swfdec-gtk/swfdec-gtk.h> -swfdec_as_array_get_type swfdec_as_context_get_type swfdec_as_debugger_get_type swfdec_as_function_get_type swfdec_as_native_function_get_type -swfdec_as_object_get_type +swfdec_as_relay_get_type swfdec_audio_get_type swfdec_file_loader_get_type swfdec_gc_object_get_type diff --git a/swfdec-gtk/swfdec_gtk_widget.c b/swfdec-gtk/swfdec_gtk_widget.c index 41acca1c..cde877fb 100644 --- a/swfdec-gtk/swfdec_gtk_widget.c +++ b/swfdec-gtk/swfdec_gtk_widget.c @@ -580,9 +580,7 @@ swfdec_gtk_widget_unrealize (GtkWidget *widget) static void swfdec_gtk_widget_map (GtkWidget *gtkwidget) { - SwfdecGtkWidgetPrivate *priv = SWFDEC_GTK_WIDGET (gtkwidget)->priv; - - g_assert (gdk_region_empty (priv->invalid)); + g_assert (gdk_region_empty (SWFDEC_GTK_WIDGET (gtkwidget)->priv->invalid)); GTK_WIDGET_CLASS (swfdec_gtk_widget_parent_class)->map (gtkwidget); } diff --git a/swfdec/Makefile.am b/swfdec/Makefile.am index 4f1e9577..f384cdd5 100644 --- a/swfdec/Makefile.am +++ b/swfdec/Makefile.am @@ -21,11 +21,14 @@ libswfdec_source_files = \ swfdec_as_debugger.c \ swfdec_as_frame.c \ swfdec_as_function.c \ + swfdec_as_gcable.c \ swfdec_as_interpret.c \ swfdec_as_math.c \ + swfdec_as_movie_value.c \ swfdec_as_native_function.c \ swfdec_as_number.c \ swfdec_as_object.c \ + swfdec_as_relay.c \ swfdec_as_script_function.c \ swfdec_as_stack.c \ swfdec_as_string.c \ @@ -50,6 +53,7 @@ libswfdec_source_files = \ swfdec_bitmap_pattern.c \ swfdec_bits.c \ swfdec_blur_filter.c \ + swfdec_blur_filter_as.c \ swfdec_bots.c \ swfdec_buffer.c \ swfdec_button.c \ @@ -64,15 +68,20 @@ libswfdec_source_files = \ swfdec_color.c \ swfdec_color_as.c \ swfdec_color_matrix_filter.c \ + swfdec_color_matrix_filter_as.c \ swfdec_color_transform_as.c \ swfdec_constant_pool.c \ swfdec_convolution_filter.c \ + swfdec_convolution_matrix.c \ swfdec_debug.c \ swfdec_decoder.c \ swfdec_displacement_map_filter.c \ + swfdec_display_object.c \ + swfdec_display_object_container.c \ swfdec_draw.c \ swfdec_drop_shadow_filter.c \ swfdec_event.c \ + swfdec_event_dispatcher.c \ swfdec_external_interface.c \ swfdec_file_loader.c \ swfdec_file_reference.c \ @@ -90,6 +99,7 @@ libswfdec_source_files = \ swfdec_graphic_movie.c \ swfdec_image.c \ swfdec_image_decoder.c \ + swfdec_interactive_object.c \ swfdec_init.c \ swfdec_interval.c \ swfdec_key_as.c \ @@ -182,15 +192,14 @@ libswfdec_@SWFDEC_MAJORMINOR@_la_SOURCES = \ libswfdec_@SWFDEC_MAJORMINOR@_la_CFLAGS = \ $(GLOBAL_CFLAGS) $(CAIRO_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) \ - -I$(top_srcdir) -I$(srcdir)/jpeg/ $(LIBOIL_CFLAGS) \ - $(GST_CFLAGS) $(FFMPEG_CFLAGS) $(MAD_CFLAGS) \ + -I$(top_srcdir) -I$(srcdir)/jpeg/ $(LIBOIL_CFLAGS) $(GST_CFLAGS) \ -DG_LOG_DOMAIN=\"Swfdec\" libswfdec_@SWFDEC_MAJORMINOR@_la_LDFLAGS = \ $(SYMBOLIC_LDFLAGS) \ -version-info $(SWFDEC_LIBVERSION) \ -export-symbols-regex '^(swfdec_.*)' \ - $(CAIRO_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) $(LIBOIL_LIBS) -lz \ - $(MAD_LIBS) $(FFMPEG_LIBS) $(GST_LIBS) + $(CAIRO_LIBS) $(GLIB_LIBS) $(PANGO_LIBS) \ + $(LIBOIL_LIBS) -lz $(GST_LIBS) public_headers = \ swfdec.h \ @@ -201,6 +210,8 @@ public_headers = \ swfdec_as_function.h \ swfdec_as_native_function.h \ swfdec_as_object.h \ + swfdec_as_relay.h \ + swfdec_as_string_value.h \ swfdec_as_types.h \ swfdec_audio.h \ swfdec_buffer.h \ @@ -233,7 +244,9 @@ noinst_HEADERS = \ swfdec_as_initialize.h \ swfdec_as_internal.h \ swfdec_as_date.h \ + swfdec_as_gcable.h \ swfdec_as_interpret.h \ + swfdec_as_movie_value.h \ swfdec_as_number.h \ swfdec_as_script_function.h \ swfdec_as_stack.h \ @@ -255,6 +268,7 @@ noinst_HEADERS = \ swfdec_bitmap_movie.h \ swfdec_bitmap_pattern.h \ swfdec_bits.h \ + swfdec_blur_filter.h \ swfdec_bots.h \ swfdec_button.h \ swfdec_button_movie.h \ @@ -266,13 +280,18 @@ noinst_HEADERS = \ swfdec_codec_gst.h \ swfdec_color.h \ swfdec_color_transform_as.h \ + swfdec_color_matrix_filter.h \ swfdec_constant_pool.h \ + swfdec_convolution_matrix.h \ swfdec_debug.h \ swfdec_decoder.h \ + swfdec_display_object.h \ + swfdec_display_object_container.h \ swfdec_draw.h \ swfdec_text_field.h \ swfdec_text_field_movie.h \ swfdec_event.h \ + swfdec_event_dispatcher.h \ swfdec_filter.h \ swfdec_flv_decoder.h \ swfdec_font.h \ @@ -283,6 +302,7 @@ noinst_HEADERS = \ swfdec_image.h \ swfdec_image_decoder.h \ swfdec_initialize.h \ + swfdec_interactive_object.h \ swfdec_internal.h \ swfdec_interval.h \ swfdec_load_object.h \ @@ -363,19 +383,13 @@ swfdec_asnative.c: $(libswfdec_source_files) && echo "#include \"swfdec_as_types.h\"" \ && echo "#define SWFDEC_AS_NATIVE(x,y,func) void func (SwfdecAsContext *cx, \\" \ && echo " SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret);" \ - && echo "#define SWFDEC_AS_CONSTRUCTOR(x,y,func,type) SWFDEC_AS_NATIVE(x,y,func) GType type (void);" \ - && grep -he "^SWFDEC_AS_CONSTRUCTOR" $(libswfdec_source_files) \ && grep -he "^SWFDEC_AS_NATIVE" $(libswfdec_source_files) \ - && echo "#undef SWFDEC_AS_CONSTRUCTOR" \ && echo "#undef SWFDEC_AS_NATIVE" \ - && echo "#define SWFDEC_AS_NATIVE(x,y,func) SWFDEC_AS_CONSTRUCTOR(x,y,func,NULL)" \ - && echo "#define SWFDEC_AS_CONSTRUCTOR(x,y,func,type) { x, y, func, G_STRINGIFY (func), type }," \ - && echo "const struct { guint x, y; SwfdecAsNative func; const char *name; GType (* get_type) (void); } native_funcs[] = {" \ - && grep -he "^SWFDEC_AS_CONSTRUCTOR" $(libswfdec_source_files) \ + && echo "#define SWFDEC_AS_NATIVE(x,y,func) { x, y, func, G_STRINGIFY (func) }," \ + && echo "const struct { guint x, y; SwfdecAsNative func; const char *name; } native_funcs[] = {" \ && grep -he "^SWFDEC_AS_NATIVE" $(libswfdec_source_files) \ && echo " { 0, 0, NULL }" \ && echo "};" \ - && echo "#undef SWFDEC_AS_CONSTRUCTOR" \ && echo "#undef SWFDEC_AS_NATIVE" \ ) >> xgen-san \ && (cmp -s xgen-san swfdec_asnative.c || cp xgen-san swfdec_asnative.c) \ @@ -417,11 +431,18 @@ swfdec_as_strings.h: swfdec_as_strings.c ( cd $(srcdir) && echo "/* This is a generated file. See swfdec_as_strings.c for details. */" \ && echo "#ifndef _SWFDEC_AS_STRINGS_H_" \ && echo "#define _SWFDEC_AS_STRINGS_H_" \ + && echo "#include <swfdec/swfdec_as_types.h>" \ && echo "G_BEGIN_DECLS" \ - && echo "extern const char swfdec_as_strings[];" \ + && echo "#define SWFDEC_AS_CONSTANT_STRING_LENGTH_MAX 40" \ + && echo "typedef struct {" \ + && echo " SwfdecAsStringValue * next;" \ + && echo " gsize length;" \ + && echo " char string[SWFDEC_AS_CONSTANT_STRING_LENGTH_MAX];" \ + && echo "} SwfdecAsConstantStringValue;" \ + && echo "extern const SwfdecAsConstantStringValue swfdec_as_strings[];" \ && grep " SWFDEC_AS_CONSTANT_STRING" swfdec_as_strings.c \ | sed "s/.*(\"\(.*\)\").*/\1/" \ - | LC_ALL="C" $(AWK) '{ if ($$0 == "") name = "EMPTY"; else if ($$0 == ",") name = "COMMA"; else if ($$0 == "/") name = "SLASH"; else name = $$0; gsub("[^a-zA-Z0-9]","_",name); print "#define SWFDEC_AS_STR_" name " &swfdec_as_strings[" x + 1 "]"; x = x + length ($$0) + 2 }' \ + | LC_ALL="C" $(AWK) '{ if ($$0 == "") name = "EMPTY"; else if ($$0 == ",") name = "COMMA"; else if ($$0 == "/") name = "SLASH"; else name = $$0; gsub("[^a-zA-Z0-9]","_",name); print "#define SWFDEC_AS_STR_" name " (((SwfdecAsStringValue *) &swfdec_as_strings[" (x + 0) "])->string)"; x = x + 1; }' \ && echo "G_END_DECLS" \ && echo "#endif" ) > xgen-sas \ && (cmp -s xgen-sas swfdec_as_strings.h || cp xgen-sas swfdec_as_strings.h ) \ diff --git a/swfdec/swfdec.h b/swfdec/swfdec.h index 32b55d8d..eff395f6 100644 --- a/swfdec/swfdec.h +++ b/swfdec/swfdec.h @@ -1,7 +1,7 @@ /* Swfdec * Copyright (C) 2003-2006 David Schleef <ds@schleef.org> * 2005-2006 Eric Anholt <eric@anholt.net> - * 2006-2007 Benjamin Otte <otte@gnome.org> + * 2006-2008 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 @@ -29,6 +29,7 @@ #include <swfdec/swfdec_as_function.h> #include <swfdec/swfdec_as_native_function.h> #include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_as_types.h> #include <swfdec/swfdec_script.h> diff --git a/swfdec/swfdec_actor.c b/swfdec/swfdec_actor.c index 1832f648..cafaa7c5 100644 --- a/swfdec/swfdec_actor.c +++ b/swfdec/swfdec_actor.c @@ -22,11 +22,13 @@ #endif #include "swfdec_actor.h" +#include "swfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" #include "swfdec_button_movie.h" #include "swfdec_player_internal.h" #include "swfdec_resource.h" +#include "swfdec_sandbox.h" #include "swfdec_sprite_movie.h" @@ -66,7 +68,7 @@ swfdec_actor_mouse_events (SwfdecActor *actor) if (actor->events && swfdec_event_list_has_mouse_events (actor->events)) return TRUE; /* otherwise, require at least one of the custom script handlers */ - object = SWFDEC_AS_OBJECT (actor); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (actor)); if (swfdec_as_object_has_variable (object, SWFDEC_AS_STR_onRollOver) || swfdec_as_object_has_variable (object, SWFDEC_AS_STR_onRollOut) || swfdec_as_object_has_variable (object, SWFDEC_AS_STR_onDragOver) || @@ -182,12 +184,13 @@ swfdec_actor_init (SwfdecActor *actor) swfdec_sound_matrix_init_identity (&actor->sound_matrix); } -static void +static gboolean swfdec_sprite_movie_set_constructor (SwfdecSpriteMovie *movie) { SwfdecMovie *mov = SWFDEC_MOVIE (movie); SwfdecAsContext *context = swfdec_gc_object_get_context (movie); SwfdecAsObject *constructor = NULL; + SwfdecAsObject *object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); g_assert (mov->resource != NULL); @@ -202,19 +205,26 @@ swfdec_sprite_movie_set_constructor (SwfdecSpriteMovie *movie) name); } } - if (constructor == NULL) - constructor = mov->resource->sandbox->MovieClip; - - swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (movie), constructor); + if (constructor == NULL) { + swfdec_sandbox_use (SWFDEC_MOVIE (movie)->resource->sandbox); + swfdec_as_object_set_constructor_by_name (object, + SWFDEC_AS_STR_MovieClip, NULL); + swfdec_sandbox_unuse (SWFDEC_MOVIE (movie)->resource->sandbox); + return FALSE; + } else { + swfdec_as_object_set_constructor (object, constructor); + return TRUE; + } } void swfdec_actor_execute (SwfdecActor *actor, SwfdecEventType condition, guint8 key) { - SwfdecAsObject *thisp; + SwfdecMovie *thisp; const char *name; guint version; + gboolean need_constructor = FALSE; g_return_if_fail (SWFDEC_IS_ACTOR (actor)); @@ -224,51 +234,53 @@ swfdec_actor_execute (SwfdecActor *actor, SwfdecEventType condition, /* these conditions don't exist for buttons */ if (condition == SWFDEC_EVENT_CONSTRUCT || condition < SWFDEC_EVENT_PRESS) return; - thisp = SWFDEC_AS_OBJECT (SWFDEC_MOVIE (actor)->parent); + thisp = SWFDEC_MOVIE (actor)->parent; if (version <= 5) { while (!SWFDEC_IS_SPRITE_MOVIE (thisp)) - thisp = SWFDEC_AS_OBJECT (SWFDEC_MOVIE (thisp)->parent); + thisp = SWFDEC_MOVIE (thisp)->parent; } g_assert (thisp); } else { - thisp = SWFDEC_AS_OBJECT (actor); + thisp = SWFDEC_MOVIE (actor); } /* special cases */ if (condition == SWFDEC_EVENT_CONSTRUCT) { if (version <= 5) return; - swfdec_sprite_movie_set_constructor (SWFDEC_SPRITE_MOVIE (actor)); + need_constructor = swfdec_sprite_movie_set_constructor (SWFDEC_SPRITE_MOVIE (actor)); } else if (condition == SWFDEC_EVENT_ENTER) { if (SWFDEC_MOVIE (actor)->state >= SWFDEC_MOVIE_STATE_REMOVED) return; } else if (condition == SWFDEC_EVENT_SCROLL || condition == SWFDEC_EVENT_CHANGED) { SwfdecAsValue argv[2]; + SwfdecMovie *movie = SWFDEC_MOVIE (actor); if (condition == SWFDEC_EVENT_SCROLL) SWFDEC_AS_VALUE_SET_STRING (&argv[0], SWFDEC_AS_STR_onScroller); else SWFDEC_AS_VALUE_SET_STRING (&argv[0], SWFDEC_AS_STR_onChanged); - SWFDEC_AS_VALUE_SET_OBJECT (&argv[1], SWFDEC_AS_OBJECT (actor)); - swfdec_sandbox_use (SWFDEC_MOVIE (actor)->resource->sandbox); - swfdec_as_object_call (SWFDEC_AS_OBJECT (actor), + SWFDEC_AS_VALUE_SET_MOVIE (&argv[1], movie); + swfdec_sandbox_use (movie->resource->sandbox); + swfdec_as_relay_call (SWFDEC_AS_RELAY (actor), SWFDEC_AS_STR_broadcastMessage, 2, argv, NULL); - swfdec_sandbox_unuse (SWFDEC_MOVIE (actor)->resource->sandbox); + swfdec_sandbox_unuse (movie->resource->sandbox); return; } swfdec_sandbox_use (SWFDEC_MOVIE (actor)->resource->sandbox); if (actor->events) { - swfdec_event_list_execute (actor->events, thisp, condition, key); + swfdec_event_list_execute (actor->events, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (thisp)), + condition, key); } /* FIXME: how do we compute the version correctly here? */ if (version > 5) { name = swfdec_event_type_get_name (condition); if (name != NULL) { - swfdec_as_object_call (SWFDEC_AS_OBJECT (actor), name, 0, NULL, NULL); + swfdec_as_relay_call (SWFDEC_AS_RELAY (actor), name, 0, NULL, NULL); } - if (condition == SWFDEC_EVENT_CONSTRUCT) - swfdec_as_object_call (thisp, SWFDEC_AS_STR_constructor, 0, NULL, NULL); + if (condition == SWFDEC_EVENT_CONSTRUCT && need_constructor) + swfdec_as_relay_call (SWFDEC_AS_RELAY (thisp), SWFDEC_AS_STR_constructor, 0, NULL, NULL); } swfdec_sandbox_unuse (SWFDEC_MOVIE (actor)->resource->sandbox); } diff --git a/swfdec/swfdec_amf.c b/swfdec/swfdec_amf.c index 251a7641..fceba82a 100644 --- a/swfdec/swfdec_amf.c +++ b/swfdec/swfdec_amf.c @@ -24,6 +24,7 @@ #include "swfdec_amf.h" #include "swfdec_as_array.h" #include "swfdec_as_date.h" +#include "swfdec_as_strings.h" #include "swfdec_debug.h" typedef gboolean (* SwfdecAmfParseFunc) (SwfdecAsContext *cx, SwfdecBits *bits, SwfdecAsValue *val); @@ -39,7 +40,7 @@ swfdec_amf_parse_boolean (SwfdecAsContext *context, SwfdecBits *bits, SwfdecAsVa static gboolean swfdec_amf_parse_number (SwfdecAsContext *context, SwfdecBits *bits, SwfdecAsValue *val) { - SWFDEC_AS_VALUE_SET_NUMBER (val, swfdec_bits_get_bdouble (bits)); + *val = swfdec_as_value_from_number (context, swfdec_bits_get_bdouble (bits)); return TRUE; } @@ -69,7 +70,7 @@ swfdec_amf_parse_properties (SwfdecAsContext *context, SwfdecBits *bits, SwfdecA if (!swfdec_amf_parse_string (context, bits, &val)) return FALSE; - name = SWFDEC_AS_VALUE_GET_STRING (&val); + name = SWFDEC_AS_VALUE_GET_STRING (val); type = swfdec_bits_get_u8 (bits); if (type == SWFDEC_AMF_END_OBJECT) break; @@ -96,7 +97,7 @@ swfdec_amf_parse_object (SwfdecAsContext *context, SwfdecBits *bits, SwfdecAsVal { SwfdecAsObject *object; - object = swfdec_as_object_new (context); + object = swfdec_as_object_new (context, SWFDEC_AS_STR_Object, NULL); if (!swfdec_amf_parse_properties (context, bits, object)) return FALSE; SWFDEC_AS_VALUE_SET_OBJECT (val, object); @@ -137,7 +138,7 @@ swfdec_amf_parse_array (SwfdecAsContext *context, SwfdecBits *bits, SwfdecAsValu } if (!func (context, bits, &tmp)) goto fail; - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &tmp); + swfdec_as_array_push (array, &tmp); } SWFDEC_AS_VALUE_SET_OBJECT (val, array); @@ -151,14 +152,17 @@ fail: static gboolean swfdec_amf_parse_date (SwfdecAsContext *context, SwfdecBits *bits, SwfdecAsValue *val) { - double milliseconds = swfdec_bits_get_bdouble (bits); - int utc_offset = swfdec_bits_get_bu16 (bits); + SwfdecAsDate *date; + SwfdecAsObject *object; - if (utc_offset > 12 * 60) - utc_offset -= 12 * 60; + object = swfdec_as_object_new (context, SWFDEC_AS_STR_Date, NULL); + date = SWFDEC_AS_DATE (object->relay); + date->milliseconds = swfdec_bits_get_bdouble (bits); + date->utc_offset = swfdec_bits_get_bu16 (bits); + if (date->utc_offset > 12 * 60) + date->utc_offset -= 12 * 60; + SWFDEC_AS_VALUE_SET_OBJECT (val, object); - SWFDEC_AS_VALUE_SET_OBJECT (val, - swfdec_as_date_new (context, milliseconds, utc_offset)); return TRUE; } @@ -192,7 +196,6 @@ swfdec_amf_parse_one (SwfdecAsContext *context, SwfdecBits *bits, guint type; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0); - g_return_val_if_fail (context->global != NULL, 0); g_return_val_if_fail (bits != NULL, FALSE); g_return_val_if_fail (rval != NULL, FALSE); g_return_val_if_fail (expected_type < SWFDEC_AMF_N_TYPES, FALSE); @@ -218,7 +221,6 @@ swfdec_amf_parse (SwfdecAsContext *context, SwfdecBits *bits, guint n_items, ... guint i; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0); - g_return_val_if_fail (context->global != NULL, 0); g_return_val_if_fail (bits != NULL, 0); va_start (args, n_items); diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c index 6926ebf2..62729e0b 100644 --- a/swfdec/swfdec_as_array.c +++ b/swfdec/swfdec_as_array.c @@ -37,23 +37,15 @@ #include "swfdec_utils.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsArray, swfdec_as_array, SWFDEC_TYPE_AS_OBJECT) - /** - * SECTION:SwfdecAsArray - * @title: SwfdecAsArray - * @short_description: the array object + * SECTION:Arrays + * @title: arrays + * @short_description: utility functions for treating objects as arrays * * The array object provides some convenience functions for creating and * modifying arrays. */ -/** - * SwfdecAsArray - * - * This is the type of the array object. - */ - /* * Internal helper functions */ @@ -84,74 +76,70 @@ swfdec_as_array_length_as_integer (SwfdecAsObject *object) g_return_val_if_fail (object != NULL, 0); swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val); - length = swfdec_as_value_to_integer (swfdec_gc_object_get_context (object), &val); - - return length; -} - -static gint32 -swfdec_as_array_length (SwfdecAsObject *object) -{ - gint32 length; - - length = swfdec_as_array_length_as_integer (object); - - if (length < 0) - return 0; + length = swfdec_as_value_to_integer (object->context, val); return length; } /** * swfdec_as_array_get_length: - * @array: a #SwfdecAsArray + * @array: the array * * Gets the current length of the @array. * * Returns: Current length of the @array, always >= 0 **/ gint32 -swfdec_as_array_get_length (SwfdecAsArray *array) +swfdec_as_array_get_length (SwfdecAsObject *array) { - return swfdec_as_array_length (SWFDEC_AS_OBJECT (array)); + gint32 length; + + g_return_val_if_fail (array != NULL, 0); + + length = swfdec_as_array_length_as_integer (array); + + if (length < 0) + return 0; + + return length; } static void swfdec_as_array_set_length_object (SwfdecAsObject *object, gint32 length) { SwfdecAsValue val; + gboolean was_array; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); - if (SWFDEC_IS_AS_ARRAY (object)) - SWFDEC_AS_ARRAY (object)->check_length = FALSE; + was_array = object->array; + object->array = FALSE; - SWFDEC_AS_VALUE_SET_INT (&val, length); + val = swfdec_as_value_from_integer (object->context, length); swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_length, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - if (SWFDEC_IS_AS_ARRAY (object)) - SWFDEC_AS_ARRAY (object)->check_length = TRUE; + object->array = was_array; } /** * swfdec_as_array_set_length: - * @array: a #SwfdecAsArray + * @array: the array * @length: the new length * * Sets the length of the @array. Values outside the new length will be * removed. **/ void -swfdec_as_array_set_length (SwfdecAsArray *array, gint32 length) +swfdec_as_array_set_length (SwfdecAsObject *array, gint32 length) { SwfdecAsValue val; - g_return_if_fail (SWFDEC_IS_AS_ARRAY (array)); + g_return_if_fail (array != NULL); g_return_if_fail (length >= 0); - SWFDEC_AS_VALUE_SET_INT (&val, length); - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (array), + val = swfdec_as_value_from_integer (array->context, length); + swfdec_as_object_set_variable_and_flags (array, SWFDEC_AS_STR_length, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } @@ -181,7 +169,7 @@ swfdec_as_array_foreach_remove_range (SwfdecAsObject *object, return FALSE; } -static void +void swfdec_as_array_remove_range (SwfdecAsObject *object, gint32 start_index, gint32 num) { @@ -193,8 +181,8 @@ swfdec_as_array_remove_range (SwfdecAsObject *object, gint32 start_index, // to avoid foreach loop, use special case when removing just one variable if (num == 1) { - swfdec_as_object_delete_variable (object, swfdec_as_integer_to_string ( - swfdec_gc_object_get_context (object), start_index)); + swfdec_as_object_delete_variable (object, + swfdec_as_integer_to_string (object->context, start_index)); } else { ForeachRemoveRangeData fdata = { start_index, num }; swfdec_as_object_foreach_remove (object, @@ -220,7 +208,7 @@ swfdec_as_array_foreach_move_range (SwfdecAsObject *object, return variable; if (idx >= fdata->start_index && idx < fdata->start_index + fdata->num) { - return swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), + return swfdec_as_integer_to_string (object->context, fdata->to_index + idx - fdata->start_index); } else if (idx >= fdata->to_index && idx < fdata->to_index + fdata->num) { return NULL; @@ -235,7 +223,7 @@ swfdec_as_array_move_range (SwfdecAsObject *object, gint32 from_index, { ForeachMoveRangeData fdata = { from_index, num, to_index }; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (from_index >= 0); g_return_if_fail (num >= 0); g_return_if_fail (to_index >= 0); @@ -247,7 +235,7 @@ swfdec_as_array_move_range (SwfdecAsObject *object, gint32 from_index, &fdata); // only changes length if it becomes bigger, not if it becomes smaller - if (to_index + num > swfdec_as_array_length (object)) + if (to_index + num > swfdec_as_array_get_length (object)) swfdec_as_array_set_length_object (object, to_index + num); } @@ -260,12 +248,12 @@ swfdec_as_array_set_range_with_flags (SwfdecAsObject *object, const char *var; // allow negative indexes - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (num >= 0); g_return_if_fail (num == 0 || value != NULL); for (i = 0; i < num; i++) { - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), start_index + i); + var = swfdec_as_integer_to_string (object->context, start_index + i); swfdec_as_object_set_variable_and_flags (object, var, &value[i], flags); } } @@ -288,7 +276,7 @@ swfdec_as_array_append_internal (SwfdecAsObject *object, guint n, /** * swfdec_as_array_push: - * @array: a #SwfdecAsArray + * @array: the array * @value: the value to add * * Adds the given @value to the @array. This is a macro that just calls @@ -297,7 +285,7 @@ swfdec_as_array_append_internal (SwfdecAsObject *object, guint n, /** * swfdec_as_array_push_with_flags: - * @array: a #SwfdecAsArray + * @array: the array * @value: the value to add * @flags: the #SwfdecAsVariableFlag flags to use * @@ -307,7 +295,7 @@ swfdec_as_array_append_internal (SwfdecAsObject *object, guint n, /** * swfdec_as_array_append: - * @array: a #SwfdecAsArray + * @array: the array * @n: number of values to add * @values: the values to add * @@ -317,7 +305,7 @@ swfdec_as_array_append_internal (SwfdecAsObject *object, guint n, /** * swfdec_as_array_append_with_flags: - * @array: a #SwfdecAsArray + * @array: the array * @n: number of values to add * @values: the values to add * @flags: the #SwfdecAsVariableFlag flags to use @@ -325,20 +313,20 @@ swfdec_as_array_append_internal (SwfdecAsObject *object, guint n, * Appends the given @values to the @array using the given @flags. **/ void -swfdec_as_array_append_with_flags (SwfdecAsArray *array, guint n, +swfdec_as_array_append_with_flags (SwfdecAsObject *array, guint n, const SwfdecAsValue *value, SwfdecAsVariableFlag flags) { - g_return_if_fail (SWFDEC_IS_AS_ARRAY (array)); + g_return_if_fail (array != NULL); g_return_if_fail (n == 0 || value != NULL); // don't allow negative length - swfdec_as_array_set_range_with_flags (SWFDEC_AS_OBJECT (array), - swfdec_as_array_length (SWFDEC_AS_OBJECT (array)), n, value, flags); + swfdec_as_array_set_range_with_flags (array, + swfdec_as_array_get_length (array), n, value, flags); } /** * swfdec_as_array_insert: - * @array: a #SwfdecAsArray + * @array: the array * @idx: index to insert the value to * @value: a #SwfdecAsValue * @@ -348,7 +336,7 @@ swfdec_as_array_append_with_flags (SwfdecAsArray *array, guint n, **/ /** * swfdec_as_array_insert_with_flags: - * @array: a #SwfdecAsArray + * @array: the array * @idx: index to insert the value to * @value: a #SwfdecAsValue * @flags: the #SwfdecAsVariableFlag flags to use @@ -357,54 +345,49 @@ swfdec_as_array_append_with_flags (SwfdecAsArray *array, guint n, * it by moving elements to bigger indexes if necessary. **/ void -swfdec_as_array_insert_with_flags (SwfdecAsArray *array, gint32 idx, +swfdec_as_array_insert_with_flags (SwfdecAsObject *array, gint32 idx, const SwfdecAsValue *value, SwfdecAsVariableFlag flags) { gint32 length; - SwfdecAsObject *object; - g_return_if_fail (SWFDEC_IS_AS_ARRAY (array)); + g_return_if_fail (array != NULL); g_return_if_fail (idx >= 0); - g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); - object = SWFDEC_AS_OBJECT (array); - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (array); if (idx < length) - swfdec_as_array_move_range (object, idx, length - idx, idx + 1); - swfdec_as_array_set_range_with_flags (object, idx, 1, value, flags); + swfdec_as_array_move_range (array, idx, length - idx, idx + 1); + swfdec_as_array_set_range_with_flags (array, idx, 1, value, flags); } /** * swfdec_as_array_remove: - * @array: a #SwfdecAsArray + * @array: the array * @idx: index of the value to remove * * Removes value at given index from the @array, elements with higher indexes * will be moved towards the start of the @array. **/ void -swfdec_as_array_remove (SwfdecAsArray *array, gint32 idx) +swfdec_as_array_remove (SwfdecAsObject *array, gint32 idx) { gint32 length; - SwfdecAsObject *object; - g_return_if_fail (SWFDEC_IS_AS_ARRAY (array)); + g_return_if_fail (array != NULL); g_return_if_fail (idx >= 0); - object = SWFDEC_AS_OBJECT (array); - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (array); if (idx >= length) return; - swfdec_as_array_move_range (object, idx + 1, length - (idx + 1), idx); + swfdec_as_array_move_range (array, idx + 1, length - (idx + 1), idx); swfdec_as_array_set_length (array, length - 1); } /** * swfdec_as_array_get_value: - * @array: a #SwfdecAsArray + * @array: the array * @idx: index of the value to get * @value: a pointer to #SwfdecAsValue that will be set * @@ -412,22 +395,22 @@ swfdec_as_array_remove (SwfdecAsArray *array, gint32 idx) * value is set. **/ void -swfdec_as_array_get_value (SwfdecAsArray *array, gint32 idx, +swfdec_as_array_get_value (SwfdecAsObject *array, gint32 idx, SwfdecAsValue *value) { const char *var; - g_assert (SWFDEC_IS_AS_ARRAY (array)); + g_assert (array != NULL); g_assert (idx >= 0); g_assert (value != NULL); - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (array), idx); - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (array), var, value); + var = swfdec_as_integer_to_string (array->context, idx); + swfdec_as_object_get_variable (array, var, value); } /** * swfdec_as_array_set_value: - * @array: a #SwfdecAsArray + * @array: the array * @idx: index of the value to set * @value: a pointer to #SwfdecAsValue * @@ -435,17 +418,16 @@ swfdec_as_array_get_value (SwfdecAsArray *array, gint32 idx, * necessary. **/ void -swfdec_as_array_set_value (SwfdecAsArray *array, gint32 idx, +swfdec_as_array_set_value (SwfdecAsObject *array, gint32 idx, SwfdecAsValue *value) { const char *var; - g_assert (SWFDEC_IS_AS_ARRAY (array)); + g_assert (array != NULL); g_assert (idx >= 0); - g_assert (SWFDEC_IS_AS_VALUE (value)); - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (array), idx); - swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (array), var, value); + var = swfdec_as_integer_to_string (array->context, idx); + swfdec_as_object_set_variable (array, var, value); } typedef struct { @@ -465,7 +447,7 @@ swfdec_as_array_foreach_append_array_range (SwfdecAsObject *object, idx = swfdec_as_array_to_index (variable); if (idx >= fdata->start_index && idx < fdata->start_index + fdata->num) { - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (fdata->object_to), + var = swfdec_as_integer_to_string (fdata->object_to->context, fdata->offset + (idx - fdata->start_index)); swfdec_as_object_set_variable (fdata->object_to, var, value); } @@ -474,20 +456,20 @@ swfdec_as_array_foreach_append_array_range (SwfdecAsObject *object, } static void -swfdec_as_array_append_array_range (SwfdecAsArray *array_to, +swfdec_as_array_append_array_range (SwfdecAsObject *array_to, SwfdecAsObject *object_from, gint32 start_index, gint32 num) { ForeachAppendArrayRangeData fdata; - g_return_if_fail (SWFDEC_IS_AS_ARRAY (array_to)); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object_from)); + g_return_if_fail (array_to != NULL); + g_return_if_fail (object_from != NULL); g_return_if_fail (start_index >= 0); if (num == 0) return; - fdata.object_to = SWFDEC_AS_OBJECT (array_to); - fdata.offset = swfdec_as_array_length (SWFDEC_AS_OBJECT (array_to)); + fdata.object_to = array_to; + fdata.offset = swfdec_as_array_get_length (array_to); fdata.start_index = start_index; fdata.num = num; @@ -498,64 +480,11 @@ swfdec_as_array_append_array_range (SwfdecAsArray *array_to, } static void -swfdec_as_array_append_array (SwfdecAsArray *array_to, +swfdec_as_array_append_array (SwfdecAsObject *array_to, SwfdecAsObject *object_from) { swfdec_as_array_append_array_range (array_to, object_from, 0, - swfdec_as_array_length (object_from)); -} - -/* - * Class functions - */ - -static void -swfdec_as_array_set (SwfdecAsObject *object, const char *variable, - const SwfdecAsValue *val, guint flags) -{ - gboolean indexvar; - char *end; - gint32 l; - - // we have to allow negative values here - l = strtoul (variable, &end, 10); - indexvar = (*end == 0); - - // if we changed to smaller length, destroy all values that are outside it - // - if (SWFDEC_AS_ARRAY (object)->check_length && - !swfdec_strcmp (swfdec_gc_object_get_context (object)->version, variable, - SWFDEC_AS_STR_length)) - { - gint32 length_old = swfdec_as_array_length (object); - gint32 length_new = swfdec_as_value_to_integer (swfdec_gc_object_get_context (object), val); - length_new = MAX (0, length_new); - if (length_old > length_new) { - swfdec_as_array_remove_range (object, length_new, - length_old - length_new); - } - } - - SWFDEC_AS_OBJECT_CLASS (swfdec_as_array_parent_class)->set (object, variable, - val, flags); - - // if we added new value outside the current length, set a bigger length - if (indexvar && ++l > swfdec_as_array_length_as_integer (object)) - swfdec_as_array_set_length_object (object, l); -} - -static void -swfdec_as_array_class_init (SwfdecAsArrayClass *klass) -{ - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); - - asobject_class->set = swfdec_as_array_set; -} - -static void -swfdec_as_array_init (SwfdecAsArray *array) -{ - array->check_length = TRUE; + swfdec_as_array_get_length (object_from)); } /* @@ -566,7 +495,7 @@ swfdec_as_array_init (SwfdecAsArray *array) * swfdec_as_array_new: * @context: a #SwfdecAsContext * - * Creates a new #SwfdecAsArray. + * Creates a new array. * * Returns: the new array **/ @@ -577,7 +506,8 @@ swfdec_as_array_new (SwfdecAsContext *context) g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - ret = g_object_new (SWFDEC_TYPE_AS_ARRAY, "context", context, NULL); + ret = swfdec_as_object_new (context, NULL); + ret->array = TRUE; swfdec_as_object_set_constructor_by_name (ret, SWFDEC_AS_STR_Array, NULL); swfdec_as_array_set_length_object (ret, 0); @@ -596,25 +526,25 @@ swfdec_as_array_join (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, const char *var, *str, *sep; SwfdecAsValue val; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; if (argc > 0) { - sep = swfdec_as_value_to_string (cx, &argv[0]); + sep = swfdec_as_value_to_string (cx, argv[0]); } else { sep = SWFDEC_AS_STR_COMMA; } // note: we don't cache length - if (swfdec_as_array_length (object) > 0) { + if (swfdec_as_array_get_length (object) > 0) { GString *string; swfdec_as_object_get_variable (object, SWFDEC_AS_STR_0, &val); - str = swfdec_as_value_to_string (cx, &val); + str = swfdec_as_value_to_string (cx, val); string = g_string_new (str); - for (i = 1; i < swfdec_as_array_length (object); i++) { + for (i = 1; i < swfdec_as_array_get_length (object); i++) { var = swfdec_as_integer_to_string (cx, i); swfdec_as_object_get_variable (object, var, &val); - var = swfdec_as_value_to_string (cx, &val); + var = swfdec_as_value_to_string (cx, val); g_string_append (string, sep); g_string_append (string, var); } @@ -631,7 +561,7 @@ void swfdec_as_array_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; swfdec_as_array_join (cx, object, 0, NULL, ret); @@ -642,7 +572,7 @@ void swfdec_as_array_do_push (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; // if 0 args, just return the length @@ -653,7 +583,7 @@ swfdec_as_array_do_push (SwfdecAsContext *cx, SwfdecAsObject *object, swfdec_as_array_set_length_object (object, length + argc); } - SWFDEC_AS_VALUE_SET_INT (ret, swfdec_as_array_length_as_integer (object)); + *ret = swfdec_as_value_from_integer (cx, swfdec_as_array_length_as_integer (object)); } SWFDEC_AS_NATIVE (252, 2, swfdec_as_array_do_pop) @@ -664,7 +594,7 @@ swfdec_as_array_do_pop (SwfdecAsContext *cx, SwfdecAsObject *object, gint32 length; const char *var; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; // we allow negative indexes here, but not 0 @@ -672,14 +602,14 @@ swfdec_as_array_do_pop (SwfdecAsContext *cx, SwfdecAsObject *object, if (length == 0) return; - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), length - 1); + var = swfdec_as_integer_to_string (object->context, length - 1); swfdec_as_object_get_variable (object, var, ret); swfdec_as_object_delete_variable (object, var); // if Array, the length is reduced by one // else the length is not reduced at all, but the variable is still deleted - if (SWFDEC_IS_AS_ARRAY (object)) + if (object->array) swfdec_as_array_set_length_object (object, length - 1); } @@ -690,20 +620,20 @@ swfdec_as_array_do_unshift (SwfdecAsContext *cx, SwfdecAsObject *object, { gint32 length; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; if (argc) { // don't allow negative length - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); swfdec_as_array_move_range (object, 0, length, argc); swfdec_as_array_set_range (object, 0, argc, argv); // if not Array, leave the length unchanged - if (!SWFDEC_IS_AS_ARRAY (object)) + if (!object->array) swfdec_as_array_set_length_object (object, length); } - SWFDEC_AS_VALUE_SET_INT (ret, swfdec_as_array_length (object)); + *ret = swfdec_as_value_from_integer (cx, swfdec_as_array_get_length (object)); } SWFDEC_AS_NATIVE (252, 4, swfdec_as_array_do_shift) @@ -714,11 +644,11 @@ swfdec_as_array_do_shift (SwfdecAsContext *cx, SwfdecAsObject *object, gint32 length; const char *var; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; // don't allow negative length - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); if (length <= 0) return; @@ -727,18 +657,18 @@ swfdec_as_array_do_shift (SwfdecAsContext *cx, SwfdecAsObject *object, swfdec_as_array_move_range (object, 1, length - 1, 0); // if not Array, leave the length unchanged, and don't remove the element - if (SWFDEC_IS_AS_ARRAY (object)) { + if (object->array) { swfdec_as_array_set_length_object (object, length - 1); } else { // we have to put the last element back, because we used move, not copy SwfdecAsValue val; if (length > 1) { - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), length - 2); + var = swfdec_as_integer_to_string (object->context, length - 2); swfdec_as_object_get_variable (object, var, &val); } else { val = *ret; } - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), length - 1); + var = swfdec_as_integer_to_string (object->context, length - 1); swfdec_as_object_set_variable (object, var, &val); } } @@ -754,7 +684,7 @@ swfdec_as_array_foreach_reverse (SwfdecAsObject *object, const char *variable, if (idx == -1 || idx >= *length) return variable; - return swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), *length - 1 - idx); + return swfdec_as_integer_to_string (object->context, *length - 1 - idx); } SWFDEC_AS_NATIVE (252, 11, swfdec_as_array_reverse) @@ -764,10 +694,10 @@ swfdec_as_array_reverse (SwfdecAsContext *cx, SwfdecAsObject *object, { gint32 length; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); swfdec_as_object_foreach_rename (object, swfdec_as_array_foreach_reverse, &length); @@ -780,36 +710,31 @@ swfdec_as_array_concat (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { guint j; - SwfdecAsObject *object_new; - SwfdecAsArray *array_new; + SwfdecAsObject *array_new; const char *var; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; - object_new = swfdec_as_array_new (cx); - if (object_new == NULL) - return; - array_new = SWFDEC_AS_ARRAY (object_new); + array_new = swfdec_as_array_new (cx); swfdec_as_array_append_array (array_new, object); for (j = 0; j < argc; j++) { - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[j]) && - SWFDEC_IS_AS_ARRAY (SWFDEC_AS_VALUE_GET_OBJECT (&argv[j]))) + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[j]) && + SWFDEC_AS_VALUE_GET_OBJECT (argv[j])->array) { swfdec_as_array_append_array (array_new, - SWFDEC_AS_VALUE_GET_OBJECT (&argv[j])); + SWFDEC_AS_VALUE_GET_OBJECT (argv[j])); } else { - var = swfdec_as_integer_to_string (swfdec_gc_object_get_context (object), - swfdec_as_array_length (object_new)); - swfdec_as_object_set_variable (object_new, var, &argv[j]); + var = swfdec_as_integer_to_string (cx, swfdec_as_array_get_length (array_new)); + swfdec_as_object_set_variable (array_new, var, &argv[j]); } } - SWFDEC_AS_VALUE_SET_OBJECT (ret, object_new); + SWFDEC_AS_VALUE_SET_OBJECT (ret, array_new); } SWFDEC_AS_NATIVE (252, 6, swfdec_as_array_slice) @@ -818,15 +743,15 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { gint32 length, start_index, num; - SwfdecAsArray *array_new; + SwfdecAsObject *array_new; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); if (argc > 0) { - start_index = swfdec_as_value_to_integer (cx, &argv[0]); + start_index = swfdec_as_value_to_integer (cx, argv[0]); if (start_index < 0) start_index = length + start_index; start_index = CLAMP (start_index, 0, length); @@ -835,7 +760,7 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, } if (argc > 1) { - gint32 endIndex = swfdec_as_value_to_integer (cx, &argv[1]); + gint32 endIndex = swfdec_as_value_to_integer (cx, argv[1]); if (endIndex < 0) endIndex = length + endIndex; endIndex = CLAMP (endIndex, start_index, length); @@ -844,13 +769,11 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, num = length - start_index; } - array_new = SWFDEC_AS_ARRAY (swfdec_as_array_new (cx)); - if (array_new == NULL) - return; + array_new = swfdec_as_array_new (cx); swfdec_as_array_append_array_range (array_new, object, start_index, num); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (array_new)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, array_new); } SWFDEC_AS_NATIVE (252, 8, swfdec_as_array_splice) @@ -859,20 +782,20 @@ swfdec_as_array_splice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { gint32 length, start_index, num_remove, num_add, at_end; - SwfdecAsArray *array_new; + SwfdecAsObject *array_new; - if (object == NULL || SWFDEC_IS_MOVIE (object) || argc == 0) + if (object == NULL || object->movie || argc == 0) return; - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); - start_index = swfdec_as_value_to_integer (cx, &argv[0]); + start_index = swfdec_as_value_to_integer (cx, argv[0]); if (start_index < 0) start_index = length + start_index; start_index = CLAMP (start_index, 0, length); if (argc > 1) { - int tmp = swfdec_as_value_to_integer (cx, &argv[1]); + int tmp = swfdec_as_value_to_integer (cx, argv[1]); if (tmp < 0) return; num_remove = MIN (tmp, length - start_index); @@ -884,10 +807,10 @@ swfdec_as_array_splice (SwfdecAsContext *cx, SwfdecAsObject *object, at_end = length - num_remove - start_index; /* create return value */ - array_new = SWFDEC_AS_ARRAY (swfdec_as_array_new (cx)); + array_new = swfdec_as_array_new (cx); swfdec_as_array_append_array_range (array_new, object, start_index, num_remove); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (array_new)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, array_new); /* move old data to the right spot */ swfdec_as_array_move_range (object, start_index + num_remove, @@ -929,8 +852,6 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx, int retval; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (cx), 0); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (a), 0); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (b), 0); g_return_val_if_fail (custom_function == NULL || SWFDEC_IS_AS_FUNCTION (custom_function), 0); @@ -938,23 +859,22 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx, { SwfdecAsValue argv[2] = { *a, *b }; SwfdecAsValue ret; - SwfdecAsContext *context = swfdec_gc_object_get_context (custom_function); swfdec_as_function_call (custom_function, NULL, 2, argv, &ret); - retval = swfdec_as_value_to_integer (context, &ret); + retval = swfdec_as_value_to_integer (cx, ret); } else if (options & SORT_OPTION_NUMERIC && - (SWFDEC_AS_VALUE_IS_NUMBER (a) || - SWFDEC_AS_VALUE_IS_NUMBER (b)) && - !SWFDEC_AS_VALUE_IS_UNDEFINED (a) && - !SWFDEC_AS_VALUE_IS_UNDEFINED (b)) + (SWFDEC_AS_VALUE_IS_NUMBER (*a) || + SWFDEC_AS_VALUE_IS_NUMBER (*b)) && + !SWFDEC_AS_VALUE_IS_UNDEFINED (*a) && + !SWFDEC_AS_VALUE_IS_UNDEFINED (*b)) { - if (!SWFDEC_AS_VALUE_IS_NUMBER (a)) { + if (!SWFDEC_AS_VALUE_IS_NUMBER (*a)) { retval = 1; - } else if (!SWFDEC_AS_VALUE_IS_NUMBER (b)) { + } else if (!SWFDEC_AS_VALUE_IS_NUMBER (*b)) { retval = -1; } else { - double an = swfdec_as_value_to_number (cx, a); - double bn = swfdec_as_value_to_number (cx, b); + double an = swfdec_as_value_to_number (cx, *a); + double bn = swfdec_as_value_to_number (cx, *b); retval = (an < bn ? -1 : (an > bn ? 1 : 0)); } } @@ -962,11 +882,11 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx, { // can't pass swfdec_as_value_to_string calls directly to compare // functions, since the order of these is important - const char *a_str = swfdec_as_value_to_string (cx, a); - const char *b_str = swfdec_as_value_to_string (cx, b); + const char *a_str = swfdec_as_value_to_string (cx, *a); + const char *b_str = swfdec_as_value_to_string (cx, *b); if (options & SORT_OPTION_CASEINSENSITIVE) { - retval = g_strcasecmp (a_str, b_str); + retval = g_ascii_strcasecmp (a_str, b_str); } else { retval = strcmp (a_str, b_str); } @@ -995,8 +915,6 @@ swfdec_as_array_sort_compare (gconstpointer a_ptr, gconstpointer b_ptr, SortCompareData *data = user_data; int retval; - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (a), 0); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (b), 0); g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (data->context), 0); g_return_val_if_fail (data->options != NULL, 0); g_return_val_if_fail (data->custom_function == NULL || @@ -1013,14 +931,14 @@ swfdec_as_array_sort_compare (gconstpointer a_ptr, gconstpointer b_ptr, i = 0; do { - object = swfdec_as_value_to_object (data->context, a); + object = swfdec_as_value_to_object (data->context, *a); if (object) { swfdec_as_object_get_variable (object, data->fields[i], &a_comp); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (&a_comp); } - object = swfdec_as_value_to_object (data->context, b); + object = swfdec_as_value_to_object (data->context, *b); if (object) { swfdec_as_object_get_variable (object, data->fields[i], &b_comp); } else { @@ -1106,7 +1024,7 @@ swfdec_as_array_foreach_sort_collect (SwfdecAsObject *object, if (index_ == -1 || index_ >= collect_data->length) return TRUE; - if (SWFDEC_AS_VALUE_IS_UNDEFINED (value)) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*value)) return TRUE; collect_data->array[index_].value = *value; @@ -1130,13 +1048,13 @@ swfdec_as_array_do_sort (SwfdecAsContext *cx, SwfdecAsObject *object, gboolean descending; g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (options != NULL); g_return_if_fail (custom_function == NULL || SWFDEC_IS_AS_FUNCTION (custom_function)); g_return_if_fail (fields == NULL || fields[0] != NULL); - length = swfdec_as_array_length (object); + length = swfdec_as_array_get_length (object); if (length == 0) { // special case for empty array, because g_try_new0 would return NULL SWFDEC_AS_VALUE_SET_OBJECT (ret, object); @@ -1201,19 +1119,17 @@ swfdec_as_array_do_sort (SwfdecAsContext *cx, SwfdecAsObject *object, break; } if (i < length - 1) { - SWFDEC_AS_VALUE_SET_INT (ret, 0); + *ret = swfdec_as_value_from_integer (cx, 0); goto done; } } else if (compare_data.equal_found) { - SWFDEC_AS_VALUE_SET_INT (ret, 0); + *ret = swfdec_as_value_from_integer (cx, 0); goto done; } } if (options[0] & SORT_OPTION_RETURNINDEXEDARRAY) { target = swfdec_as_array_new (cx); - if (!target) - goto done; } else { target = object; } @@ -1228,7 +1144,7 @@ swfdec_as_array_do_sort (SwfdecAsContext *cx, SwfdecAsObject *object, var = swfdec_as_integer_to_string (cx, (descending ? length - i - 1 : i)); if (options[0] & SORT_OPTION_RETURNINDEXEDARRAY) { - SWFDEC_AS_VALUE_SET_INT (&val, entry->index_); + val = swfdec_as_value_from_integer (cx, entry->index_); swfdec_as_object_set_variable (target, var, &val); } else { swfdec_as_object_set_variable (target, var, &entry->value); @@ -1251,16 +1167,16 @@ swfdec_as_array_sort (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SortOption options; SwfdecAsFunction *custom_function; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; pos = 0; - if (argc > pos && !SWFDEC_AS_VALUE_IS_NUMBER (&argv[pos])) { + if (argc > pos && !SWFDEC_AS_VALUE_IS_NUMBER (argv[pos])) { SwfdecAsFunction *fun; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[pos]) || + if (!SWFDEC_AS_VALUE_IS_OBJECT (argv[pos]) || !SWFDEC_IS_AS_FUNCTION ( - fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[pos]))) + fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (argv[pos])->relay)) return; custom_function = fun; pos++; @@ -1269,7 +1185,7 @@ swfdec_as_array_sort (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, } if (argc > pos) { - options = swfdec_as_value_to_integer (cx, &argv[pos]) & MASK_SORT_OPTION; + options = swfdec_as_value_to_integer (cx, argv[pos]) & MASK_SORT_OPTION; } else { options = 0; } @@ -1288,21 +1204,21 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecAsObject *array; SwfdecAsValue val; - if (object == NULL || SWFDEC_IS_MOVIE (object)) + if (object == NULL || object->movie) return; if (argc < 1) return; - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[0])) { - array = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - if (!SWFDEC_IS_AS_ARRAY (array)) { + array = SWFDEC_AS_VALUE_GET_OBJECT (argv[0]); + if (!array->array) { SWFDEC_AS_VALUE_SET_OBJECT (ret, object); return; } - num_fields = swfdec_as_array_get_length (SWFDEC_AS_ARRAY (array)); + num_fields = swfdec_as_array_get_length (array); if (num_fields <= 0) { SWFDEC_AS_VALUE_SET_OBJECT (ret, object); return; @@ -1310,41 +1226,38 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object, fields = g_new (const char *, num_fields + 1); for (i = 0; i < num_fields; i++) { - swfdec_as_array_get_value (SWFDEC_AS_ARRAY (array), i, &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val) && - SWFDEC_IS_AS_STRING (SWFDEC_AS_VALUE_GET_OBJECT (&val))) { - fields[i] = - SWFDEC_AS_STRING (SWFDEC_AS_VALUE_GET_OBJECT (&val))->string; - } else { - fields[i] = swfdec_as_value_to_string (cx, &val); - } + swfdec_as_array_get_value (array, i, &val); + fields[i] = swfdec_as_value_to_string (cx, val); } fields[i] = NULL; } else { + if (SWFDEC_AS_VALUE_IS_MOVIE (argv[0])) { + SWFDEC_FIXME ("how do we treat movies here?"); + } num_fields = 1; fields = g_new (const char *, num_fields + 1); - fields[0] = swfdec_as_value_to_string (cx, &argv[0]); + fields[0] = swfdec_as_value_to_string (cx, argv[0]); fields[1] = NULL; } options = g_new0 (SortOption, num_fields); if (argc > 1) { - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) { - array = SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]); + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[1])) { + array = SWFDEC_AS_VALUE_GET_OBJECT (argv[1]); - if (SWFDEC_IS_AS_ARRAY (array) && - swfdec_as_array_get_length (SWFDEC_AS_ARRAY (array)) == num_fields) { + if (array->array && + swfdec_as_array_get_length (array) == num_fields) { for (i = 0; i < num_fields; i++) { - swfdec_as_array_get_value (SWFDEC_AS_ARRAY (array), i, &val); + swfdec_as_array_get_value (array, i, &val); options[i] = - swfdec_as_value_to_integer (cx, &val) & MASK_SORT_OPTION; + swfdec_as_value_to_integer (cx, val) & MASK_SORT_OPTION; } } } else { options[0] = - swfdec_as_value_to_integer (cx, &argv[1]) & MASK_SORT_OPTION; + swfdec_as_value_to_integer (cx, argv[1]) & MASK_SORT_OPTION; for (i = 1; i < num_fields; i++) { options[i] = options[0]; } @@ -1359,26 +1272,25 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object, // Constructor -SWFDEC_AS_CONSTRUCTOR (252, 0, swfdec_as_array_construct, swfdec_as_array_get_type) +SWFDEC_AS_NATIVE (252, 0, swfdec_as_array_construct) void swfdec_as_array_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SwfdecAsArray *array; - - if (!cx->frame->construct) { - object = g_object_new (SWFDEC_TYPE_AS_ARRAY, "context", cx, NULL); + if (!swfdec_as_context_is_constructing (cx)) { + object = swfdec_as_object_new (cx, NULL); swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_Array, NULL); } + swfdec_as_object_set_relay (object, NULL); + object->array = TRUE; - array = SWFDEC_AS_ARRAY (object); - if (argc == 1 && SWFDEC_AS_VALUE_IS_NUMBER (&argv[0])) { - int l = swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_array_set_length (array, l < 0 ? 0 : l); + if (argc == 1 && SWFDEC_AS_VALUE_IS_NUMBER (argv[0])) { + int l = swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_array_set_length (object, l < 0 ? 0 : l); } else if (argc > 0) { - swfdec_as_array_append (array, argc, argv); + swfdec_as_array_append (object, argc, argv); } else { - swfdec_as_array_set_length (array, 0); + swfdec_as_array_set_length (object, 0); } SWFDEC_AS_VALUE_SET_OBJECT (ret, object); diff --git a/swfdec/swfdec_as_array.h b/swfdec/swfdec_as_array.h index 2d422d83..34f91ce8 100644 --- a/swfdec/swfdec_as_array.h +++ b/swfdec/swfdec_as_array.h @@ -26,29 +26,6 @@ G_BEGIN_DECLS -typedef struct _SwfdecAsArrayClass SwfdecAsArrayClass; - -#define SWFDEC_TYPE_AS_ARRAY (swfdec_as_array_get_type()) -#define SWFDEC_IS_AS_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_ARRAY)) -#define SWFDEC_IS_AS_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_AS_ARRAY)) -#define SWFDEC_AS_ARRAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_AS_ARRAY, SwfdecAsArray)) -#define SWFDEC_AS_ARRAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_ARRAY, SwfdecAsArrayClass)) -#define SWFDEC_AS_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_ARRAY, SwfdecAsArrayClass)) - -struct _SwfdecAsArray { - /*< private >*/ - SwfdecAsObject object; - - // whether to remove elements if length property is changed - // disabled internally sometimes to not create extra valueOf calls - gboolean check_length; -}; - -struct _SwfdecAsArrayClass { - SwfdecAsObjectClass object_class; -}; - -GType swfdec_as_array_get_type (void); SwfdecAsObject *swfdec_as_array_new (SwfdecAsContext * context); @@ -58,29 +35,29 @@ SwfdecAsObject *swfdec_as_array_new (SwfdecAsContext * context); swfdec_as_array_append_with_flags ((array), 1, (value), (flags)) #define swfdec_as_array_append(array,n,values) \ swfdec_as_array_append_with_flags ((array), (n), (values), 0) -void swfdec_as_array_append_with_flags (SwfdecAsArray * array, +void swfdec_as_array_append_with_flags (SwfdecAsObject * array, guint n, const SwfdecAsValue * values, SwfdecAsVariableFlag flags); -void swfdec_as_array_insert (SwfdecAsArray * array, +void swfdec_as_array_insert (SwfdecAsObject * array, gint32 idx, SwfdecAsValue * value); #define swfdec_as_array_insert(array,idx,value) \ swfdec_as_array_insert_with_flags ((array), (idx), (value), 0) -void swfdec_as_array_insert_with_flags (SwfdecAsArray * array, +void swfdec_as_array_insert_with_flags (SwfdecAsObject * array, gint32 idx, const SwfdecAsValue * value, SwfdecAsVariableFlag flags); -gint32 swfdec_as_array_get_length (SwfdecAsArray * array); -void swfdec_as_array_set_length (SwfdecAsArray * array, +gint32 swfdec_as_array_get_length (SwfdecAsObject * array); +void swfdec_as_array_set_length (SwfdecAsObject * array, gint32 length); -void swfdec_as_array_get_value (SwfdecAsArray * array, +void swfdec_as_array_get_value (SwfdecAsObject * array, gint32 idx, SwfdecAsValue * value); -void swfdec_as_array_set_value (SwfdecAsArray * array, +void swfdec_as_array_set_value (SwfdecAsObject * array, gint32 idx, SwfdecAsValue * value); -void swfdec_as_array_remove (SwfdecAsArray * array, +void swfdec_as_array_remove (SwfdecAsObject * array, gint32 idx); diff --git a/swfdec/swfdec_as_boolean.c b/swfdec/swfdec_as_boolean.c index 65a1ec71..e092e4a2 100644 --- a/swfdec/swfdec_as_boolean.c +++ b/swfdec/swfdec_as_boolean.c @@ -28,9 +28,10 @@ #include "swfdec_as_internal.h" #include "swfdec_as_native_function.h" #include "swfdec_as_strings.h" +#include "swfdec_as_types.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsBoolean, swfdec_as_boolean, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecAsBoolean, swfdec_as_boolean, SWFDEC_TYPE_AS_RELAY) static void swfdec_as_boolean_class_init (SwfdecAsBooleanClass *klass) @@ -44,25 +45,19 @@ swfdec_as_boolean_init (SwfdecAsBoolean *boolean) /*** AS CODE ***/ -SWFDEC_AS_CONSTRUCTOR (107, 2, swfdec_as_boolean_construct, swfdec_as_boolean_get_type) +SWFDEC_AS_NATIVE (107, 2, swfdec_as_boolean_construct) void swfdec_as_boolean_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - gboolean b; - - if (argc > 0) { - b = swfdec_as_value_to_boolean (swfdec_gc_object_get_context (object), &argv[0]); - } else { - if (!swfdec_as_context_is_constructing (cx)) - return; - b = FALSE; - } - if (swfdec_as_context_is_constructing (cx)) { - SWFDEC_AS_BOOLEAN (object)->boolean = b; + SwfdecAsBoolean *b = g_object_new (SWFDEC_TYPE_AS_BOOLEAN, "context", cx, NULL); + b->boolean = argc > 0 ? swfdec_as_value_to_boolean (cx, argv[0]) : FALSE; + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (b)); SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } else { + gboolean b; + SWFDEC_AS_CHECK (0, NULL, "b", &b); SWFDEC_AS_VALUE_SET_BOOLEAN (ret, b); } } @@ -74,10 +69,8 @@ swfdec_as_boolean_toString (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecAsBoolean *b; - if (!SWFDEC_IS_AS_BOOLEAN (object)) - return; - b = SWFDEC_AS_BOOLEAN (object); - + SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_BOOLEAN, &b, ""); + SWFDEC_AS_VALUE_SET_STRING (ret, b->boolean ? SWFDEC_AS_STR_true : SWFDEC_AS_STR_false); } @@ -88,9 +81,7 @@ swfdec_as_boolean_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecAsBoolean *b; - if (!SWFDEC_IS_AS_BOOLEAN (object)) - return; - b = SWFDEC_AS_BOOLEAN (object); + SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_BOOLEAN, &b, ""); SWFDEC_AS_VALUE_SET_BOOLEAN (ret, b->boolean); } diff --git a/swfdec/swfdec_as_boolean.h b/swfdec/swfdec_as_boolean.h index 7206da21..2fb3c0c2 100644 --- a/swfdec/swfdec_as_boolean.h +++ b/swfdec/swfdec_as_boolean.h @@ -20,8 +20,7 @@ #ifndef _SWFDEC_AS_BOOLEAN_H_ #define _SWFDEC_AS_BOOLEAN_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -36,13 +35,13 @@ typedef struct _SwfdecAsBooleanClass SwfdecAsBooleanClass; #define SWFDEC_AS_BOOLEAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_BOOLEAN, SwfdecAsBooleanClass)) struct _SwfdecAsBoolean { - SwfdecAsObject object; + SwfdecAsRelay relay; gboolean boolean; /* boolean represented by this boolean object */ }; struct _SwfdecAsBooleanClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_as_boolean_get_type (void); diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c index 0404735b..ce281887 100644 --- a/swfdec/swfdec_as_context.c +++ b/swfdec/swfdec_as_context.c @@ -28,9 +28,11 @@ #include "swfdec_as_array.h" #include "swfdec_as_frame_internal.h" #include "swfdec_as_function.h" +#include "swfdec_as_gcable.h" #include "swfdec_as_initialize.h" #include "swfdec_as_internal.h" #include "swfdec_as_interpret.h" +#include "swfdec_as_movie_value.h" #include "swfdec_as_native_function.h" #include "swfdec_as_object.h" #include "swfdec_as_stack.h" @@ -125,7 +127,7 @@ /** * SwfdecAsContext * - * This is the main object ued to hold the state of a script engine. All members + * This is the main object used to hold the state of a script engine. All members * are private and should not be accessed. * * Subclassing this structure to get scripting support in your own appliation is @@ -248,59 +250,84 @@ swfdec_as_context_unuse_mem (SwfdecAsContext *context, gsize bytes) /*** GC ***/ -static gboolean -swfdec_as_context_remove_strings (gpointer key, gpointer value, gpointer data) +static void +swfdec_as_context_remove_gc_objects (SwfdecAsContext *context) { - SwfdecAsContext *context = data; - char *string; + SwfdecGcObject *gc, *prev, *next; + + prev = NULL; + gc = context->gc_objects; + while (gc) { + next = gc->next; + /* we only check for mark here, not root, since this works on destroy, too */ + if (gc->flags & SWFDEC_AS_GC_MARK) { + gc->flags &= ~SWFDEC_AS_GC_MARK; + SWFDEC_LOG ("%s: %s %p", (gc->flags & SWFDEC_AS_GC_ROOT) ? "rooted" : "marked", + G_OBJECT_TYPE_NAME (gc), gc); + prev = gc; + } else { + SWFDEC_LOG ("deleted: %s %p", G_OBJECT_TYPE_NAME (gc), gc); + g_object_unref (gc); + if (prev) { + prev->next = next; + } else { + context->gc_objects = next; + } + } + gc = next; + } +} - string = (char *) value; - /* it doesn't matter that rooted strings aren't destroyed, they're constant */ - if (string[0] & SWFDEC_AS_GC_ROOT) { - SWFDEC_LOG ("rooted: %s", (char *) key); - return FALSE; - } else if (string[0] & SWFDEC_AS_GC_MARK) { - SWFDEC_LOG ("marked: %s", (char *) key); - string[0] &= ~SWFDEC_AS_GC_MARK; - return FALSE; - } else { - gsize len; - SWFDEC_LOG ("deleted: %s", (char *) key); - len = (strlen ((char *) key) + 2); - swfdec_as_context_unuse_mem (context, len); - g_slice_free1 (len, value); - return TRUE; +static void +swfdec_as_context_collect_string (SwfdecAsContext *context, gpointer gc) +{ + SwfdecAsStringValue *string; + + string = gc; + if (!g_hash_table_remove (context->interned_strings, string->string)) { + g_assert_not_reached (); } + swfdec_as_gcable_free (context, gc, sizeof (SwfdecAsStringValue) + string->length + 1); +} + +static void +swfdec_as_context_collect_double (SwfdecAsContext *context, gpointer gc) +{ + swfdec_as_gcable_free (context, gc, sizeof (SwfdecAsDoubleValue)); +} + +static void +swfdec_as_context_collect_movie (SwfdecAsContext *context, gpointer gc) +{ + swfdec_as_movie_value_free ((SwfdecAsMovieValue *) gc); } static gboolean -swfdec_as_context_remove_objects (gpointer key, gpointer value, gpointer debugger) +swfdec_as_context_collect_pools (gpointer mem, gpointer pool, gpointer cx) { - SwfdecGcObject *gc; - - gc = key; - /* we only check for mark here, not root, since this works on destroy, too */ - if (gc->flags & SWFDEC_AS_GC_MARK) { - gc->flags &= ~SWFDEC_AS_GC_MARK; - SWFDEC_LOG ("%s: %s %p", (gc->flags & SWFDEC_AS_GC_ROOT) ? "rooted" : "marked", - G_OBJECT_TYPE_NAME (gc), gc); - return FALSE; - } else { - SWFDEC_LOG ("deleted: %s %p", G_OBJECT_TYPE_NAME (gc), gc); - g_object_unref (gc); - return TRUE; - } + return swfdec_constant_pool_collect (pool); } static void swfdec_as_context_collect (SwfdecAsContext *context) { - SWFDEC_INFO (">> collecting garbage"); /* NB: This functions is called without GC from swfdec_as_context_dispose */ - g_hash_table_foreach_remove (context->strings, - swfdec_as_context_remove_strings, context); - g_hash_table_foreach_remove (context->objects, - swfdec_as_context_remove_objects, context->debugger); + SWFDEC_INFO (">> collecting garbage"); + + swfdec_as_context_remove_gc_objects (context); + + context->objects = swfdec_as_gcable_collect (context, context->objects, + (SwfdecAsGcableDestroyNotify) swfdec_as_object_free); + context->strings = swfdec_as_gcable_collect (context, context->strings, + swfdec_as_context_collect_string); + context->numbers = swfdec_as_gcable_collect (context, context->numbers, + swfdec_as_context_collect_double); + context->movies = swfdec_as_gcable_collect (context, context->movies, + swfdec_as_context_collect_movie); + + g_hash_table_foreach_remove (context->constant_pools, + swfdec_as_context_collect_pools, context); + SWFDEC_INFO (">> done collecting garbage"); } @@ -314,13 +341,13 @@ swfdec_as_context_collect (SwfdecAsContext *context) void swfdec_as_string_mark (const char *string) { - char *str; + SwfdecAsStringValue *value; g_return_if_fail (string != NULL); - str = (char *) string - 1; - if (*str == 0) - *str = SWFDEC_AS_GC_MARK; + value = (SwfdecAsStringValue *) (gpointer) ((guint8 *) string - G_STRUCT_OFFSET (SwfdecAsStringValue, string)); + if (!SWFDEC_AS_GCABLE_FLAG_IS_SET (value, SWFDEC_AS_GC_ROOT)) + SWFDEC_AS_GCABLE_SET_FLAG (value, SWFDEC_AS_GC_MARK); } /** @@ -334,22 +361,35 @@ swfdec_as_string_mark (const char *string) void swfdec_as_value_mark (SwfdecAsValue *value) { - g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); - - if (SWFDEC_AS_VALUE_IS_OBJECT (value)) { - swfdec_gc_object_mark (value->value.object); - } else if (SWFDEC_AS_VALUE_IS_STRING (value)) { - swfdec_as_string_mark (SWFDEC_AS_VALUE_GET_STRING (value)); - } -} + SwfdecAsGcable *gcable; + SwfdecAsValueType type = SWFDEC_AS_VALUE_GET_TYPE (*value); + + if (!SWFDEC_AS_TYPE_IS_GCABLE (type)) + return; -static void -swfdec_as_context_mark_roots (gpointer key, gpointer value, gpointer data) -{ - SwfdecGcObject *object = key; + gcable = SWFDEC_AS_VALUE_GET_VALUE (*value); + if (SWFDEC_AS_GCABLE_FLAG_IS_SET (gcable, SWFDEC_AS_GC_ROOT | SWFDEC_AS_GC_MARK)) + return; - if ((object->flags & (SWFDEC_AS_GC_MARK | SWFDEC_AS_GC_ROOT)) == SWFDEC_AS_GC_ROOT) - swfdec_gc_object_mark (object); + switch (type) { + case SWFDEC_AS_TYPE_STRING: + case SWFDEC_AS_TYPE_NUMBER: + SWFDEC_AS_GCABLE_SET_FLAG (gcable, SWFDEC_AS_GC_MARK); + break; + case SWFDEC_AS_TYPE_OBJECT: + swfdec_as_object_mark ((SwfdecAsObject *) gcable); + break; + case SWFDEC_AS_TYPE_MOVIE: + swfdec_as_movie_value_mark ((SwfdecAsMovieValue *) gcable); + break; + case SWFDEC_AS_TYPE_UNDEFINED: + case SWFDEC_AS_TYPE_NULL: + case SWFDEC_AS_TYPE_BOOLEAN: + case SWFDEC_AS_TYPE_INT: + default: + g_assert_not_reached (); + break; + } } /* FIXME: replace this with refcounted strings? */ @@ -370,16 +410,10 @@ static void swfdec_as_context_do_mark (SwfdecAsContext *context) { /* This if is needed for SwfdecPlayer */ - if (context->global) { - swfdec_gc_object_mark (context->global); - swfdec_gc_object_mark (context->Function); - swfdec_gc_object_mark (context->Function_prototype); - swfdec_gc_object_mark (context->Object); - swfdec_gc_object_mark (context->Object_prototype); - } + if (context->global) + swfdec_as_object_mark (context->global); if (context->exception) swfdec_as_value_mark (&context->exception_value); - g_hash_table_foreach (context->objects, swfdec_as_context_mark_roots, NULL); g_hash_table_foreach (context->constant_pools, swfdec_as_context_mark_constant_pools, NULL); } @@ -513,11 +547,12 @@ swfdec_as_context_dispose (GObject *object) if (context->memory != 0) { g_critical ("%zu bytes of memory left over\n", context->memory); } - g_assert (g_hash_table_size (context->objects) == 0); + g_assert (context->strings == NULL); + g_assert (context->numbers == NULL); g_assert (g_hash_table_size (context->constant_pools) == 0); + g_assert (context->gc_objects == 0); g_hash_table_destroy (context->constant_pools); - g_hash_table_destroy (context->objects); - g_hash_table_destroy (context->strings); + g_hash_table_destroy (context->interned_strings); g_rand_free (context->rand); if (context->debugger) { g_object_unref (context->debugger); @@ -569,18 +604,16 @@ swfdec_as_context_class_init (SwfdecAsContextClass *klass) static void swfdec_as_context_init (SwfdecAsContext *context) { - const char *s; + const SwfdecAsConstantStringValue *s; context->version = G_MAXUINT; - context->strings = g_hash_table_new (g_str_hash, g_str_equal); - context->objects = g_hash_table_new (g_direct_hash, g_direct_equal); + context->interned_strings = g_hash_table_new (g_str_hash, g_str_equal); context->constant_pools = g_hash_table_new (g_direct_hash, g_direct_equal); - for (s = swfdec_as_strings; *s == '\2'; s += strlen (s) + 1) { - g_hash_table_insert (context->strings, (char *) s + 1, (char *) s); + for (s = swfdec_as_strings; s->next; s++) { + g_hash_table_insert (context->interned_strings, (gpointer) s->string, (gpointer) s); } - g_assert (*s == 0); context->rand = g_rand_new (); g_get_current_time (&context->start_time); } @@ -590,20 +623,16 @@ swfdec_as_context_init (SwfdecAsContext *context) static const char * swfdec_as_context_create_string (SwfdecAsContext *context, const char *string, gsize len) { - char *new; - - if (!swfdec_as_context_try_use_mem (context, sizeof (char) * (2 + len))) { - swfdec_as_context_abort (context, "Out of memory"); - return SWFDEC_AS_STR_EMPTY; - } + SwfdecAsStringValue *new; - new = g_slice_alloc (2 + len); - memcpy (&new[1], string, len); - new[len + 1] = 0; - new[0] = 0; /* GC flags */ - g_hash_table_insert (context->strings, new + 1, new); + new = swfdec_as_gcable_alloc (context, sizeof (SwfdecAsStringValue) + len + 1); + new->length = len; + memcpy (new->string, string, new->length + 1); + g_hash_table_insert (context->interned_strings, new->string, new); + SWFDEC_AS_GCABLE_SET_NEXT (new, context->strings); + context->strings = new; - return new + 1; + return new->string; } /** @@ -620,14 +649,15 @@ swfdec_as_context_create_string (SwfdecAsContext *context, const char *string, g const char * swfdec_as_context_get_string (SwfdecAsContext *context, const char *string) { - const char *ret; + const SwfdecAsStringValue *ret; gsize len; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (string != NULL, NULL); - if (g_hash_table_lookup_extended (context->strings, string, (gpointer) &ret, NULL)) - return ret; + ret = g_hash_table_lookup (context->interned_strings, string); + if (ret) + return ret->string; len = strlen (string); return swfdec_as_context_create_string (context, string, len); @@ -682,14 +712,7 @@ swfdec_as_context_is_constructing (SwfdecAsContext *context) * @context: a #SwfdecAsContext * * This is a debugging function. It gets the topmost stack frame that is - * currently executing. If no function is executing, %NULL is returned. You can - * easily get a backtrace with code like this: - * |[for (frame = swfdec_as_context_get_frame (context); frame != NULL; - * frame = swfdec_as_frame_get_next (frame)) { - * char *s = swfdec_as_object_get_debug (SWFDEC_AS_OBJECT (frame)); - * g_print ("%s\n", s); - * g_free (s); - * }]| + * currently executing. If no function is executing, %NULL is returned. * * Returns: the currently executing frame or %NULL if none **/ @@ -713,7 +736,6 @@ void swfdec_as_context_throw (SwfdecAsContext *context, const SwfdecAsValue *value) { g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); - g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); g_return_if_fail (!context->exception); context->exception = TRUE; @@ -772,6 +794,84 @@ swfdec_as_context_get_time (SwfdecAsContext *context, GTimeVal *tv) } /** + * swfdec_as_context_return: + * @context: the context to return the topmost frame in + * @return_value: return value of the function or %NULL for none. An undefined + * value will be used in that case. + * + * Ends execution of the currently executing frame and continues execution with + * its parent frame. + **/ +void +swfdec_as_context_return (SwfdecAsContext *context, SwfdecAsValue *return_value) +{ + SwfdecAsValue retval; + SwfdecAsFrame *frame, *next; + + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); + g_return_if_fail (context->frame != NULL); + + frame = context->frame; + + /* save return value in case it was on the stack somewhere */ + if (frame->construct) { + retval = frame->thisp; + } else if (return_value) { + retval = *return_value; + } else { + SWFDEC_AS_VALUE_SET_UNDEFINED (&retval); + } + /* pop frame and leftover stack */ + next = frame->next; + context->frame = next; + g_assert (context->call_depth > 0); + context->call_depth--; + while (context->base > frame->stack_begin || + context->end < frame->stack_begin) + swfdec_as_stack_pop_segment (context); + context->cur = frame->stack_begin; + /* setup stack for previous frame */ + if (next) { + if (next->stack_begin >= &context->stack->elements[0] && + next->stack_begin <= context->cur) { + context->base = next->stack_begin; + } else { + context->base = &context->stack->elements[0]; + } + } else { + g_assert (context->stack->next == NULL); + context->base = &context->stack->elements[0]; + } + /* pop argv if on stack */ + if (frame->argv == NULL && frame->argc > 0) { + guint i = frame->argc; + while (TRUE) { + guint n = context->cur - context->base; + n = MIN (n, i); + swfdec_as_stack_pop_n (context, n); + i -= n; + if (i == 0) + break; + swfdec_as_stack_pop_segment (context); + } + } + if (context->debugger) { + SwfdecAsDebuggerClass *klass = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger); + + if (klass->leave_frame) + klass->leave_frame (context->debugger, context, frame, &retval); + } + /* set return value */ + if (frame->return_value) { + *frame->return_value = retval; + } else { + swfdec_as_stack_ensure_free (context, 1); + *swfdec_as_stack_push (context) = retval; + } + swfdec_as_frame_free (context, frame); +} + +/** * swfdec_as_context_run: * @context: a #SwfdecAsContext * @@ -826,7 +926,6 @@ swfdec_as_context_run (SwfdecAsContext *context) step = NULL; } - g_assert (frame->target); script = frame->script; context->version = script->version; startpc = script->buffer->data; @@ -837,14 +936,14 @@ swfdec_as_context_run (SwfdecAsContext *context) while (context->state < SWFDEC_AS_CONTEXT_ABORTED) { if (context->exception) { - swfdec_as_frame_handle_exception (frame); + swfdec_as_frame_handle_exception (context, frame); if (frame != context->frame) goto out; pc = frame->pc; continue; } if (pc == exitpc) { - swfdec_as_frame_return (frame, NULL); + swfdec_as_context_return (context, NULL); goto out; } if (pc < startpc || pc >= endpc) { @@ -951,7 +1050,7 @@ swfdec_as_context_run (SwfdecAsContext *context) error: if (context->frame == frame) - swfdec_as_frame_return (frame, NULL); + swfdec_as_context_return (context, NULL); out: context->version = original_version; return; @@ -992,11 +1091,11 @@ swfdec_as_context_ASSetPropFlags (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc < 3) return; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0])) return; - obj = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - flags[0] = swfdec_as_value_to_integer (cx, &argv[2]); - flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, &argv[3]) : 0; + obj = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0]); + flags[0] = swfdec_as_value_to_integer (cx, argv[2]); + flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, argv[3]) : 0; if (flags[0] == 0 && flags[1] == 0) { // we should add autosizing length attribute here @@ -1004,11 +1103,11 @@ swfdec_as_context_ASSetPropFlags (SwfdecAsContext *cx, SwfdecAsObject *object, return; } - if (SWFDEC_AS_VALUE_IS_NULL (&argv[1])) { + if (SWFDEC_AS_VALUE_IS_NULL (argv[1])) { swfdec_as_object_foreach (obj, swfdec_as_context_ASSetPropFlags_foreach, flags); } else { char **split = - g_strsplit (swfdec_as_value_to_string (cx, &argv[1]), ",", -1); + g_strsplit (swfdec_as_value_to_string (cx, argv[1]), ",", -1); guint i; for (i = 0; split[i]; i++) { swfdec_as_context_ASSetPropFlags_set_one_flag (obj, @@ -1028,7 +1127,7 @@ swfdec_as_context_isFinite (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc < 1) return; - d = swfdec_as_value_to_number (cx, &argv[0]); + d = swfdec_as_value_to_number (cx, argv[0]); SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isfinite (d) ? TRUE : FALSE); } @@ -1042,7 +1141,7 @@ swfdec_as_context_isNaN (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc < 1) return; - d = swfdec_as_value_to_number (cx, &argv[0]); + d = swfdec_as_value_to_number (cx, argv[0]); SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isnan (d) ? TRUE : FALSE); } @@ -1059,14 +1158,14 @@ swfdec_as_context_parseInt (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (0, NULL, "s|i", &s, &radix); if (argc >= 2 && (radix < 2 || radix > 36)) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, NAN); + *retval = swfdec_as_value_from_number (cx, NAN); return; } // special case, don't allow sign in front of the 0x if ((s[0] == '-' || s[0] == '+') && s[1] == '0' && (s[2] == 'x' || s[2] == 'X')) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, NAN); + *retval = swfdec_as_value_from_number (cx, NAN); return; } @@ -1092,7 +1191,7 @@ swfdec_as_context_parseInt (SwfdecAsContext *cx, SwfdecAsObject *object, if (skip != s && (skip[0] == '-' || skip[0] == '+')) skip++; if (skip != s && skip[0] == '0' && (skip[1] == 'x' || skip[1] == 'X')) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, 0); + *retval = swfdec_as_value_from_number (cx, 0); return; } } @@ -1100,14 +1199,14 @@ swfdec_as_context_parseInt (SwfdecAsContext *cx, SwfdecAsObject *object, i = g_ascii_strtoll (s, &tail, radix); if (tail == s) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, NAN); + *retval = swfdec_as_value_from_number (cx, NAN); return; } if (i > G_MAXINT32 || i < G_MININT32) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, i); + *retval = swfdec_as_value_from_number (cx, i); } else { - SWFDEC_AS_VALUE_SET_INT (retval, i); + *retval = swfdec_as_value_from_integer (cx, i); } } @@ -1124,7 +1223,7 @@ swfdec_as_context_parseFloat (SwfdecAsContext *cx, SwfdecAsObject *object, // we need to remove everything after x or I, since strtod parses hexadecimal // numbers and Infinity - s = g_strdup (swfdec_as_value_to_string (cx, &argv[0])); + s = g_strdup (swfdec_as_value_to_string (cx, argv[0])); if ((p = strpbrk (s, "xXiI")) != NULL) { *p = '\0'; } @@ -1132,9 +1231,9 @@ swfdec_as_context_parseFloat (SwfdecAsContext *cx, SwfdecAsObject *object, d = g_ascii_strtod (s, &tail); if (tail == s) { - SWFDEC_AS_VALUE_SET_NUMBER (retval, NAN); + *retval = swfdec_as_value_from_number (cx, NAN); } else { - SWFDEC_AS_VALUE_SET_NUMBER (retval, d); + *retval = swfdec_as_value_from_number (cx, d); } g_free (s); @@ -1145,9 +1244,9 @@ swfdec_as_context_init_global (SwfdecAsContext *context) { SwfdecAsValue val; - SWFDEC_AS_VALUE_SET_NUMBER (&val, NAN); + val = swfdec_as_value_from_number (context, NAN); swfdec_as_object_set_variable (context->global, SWFDEC_AS_STR_NaN, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, HUGE_VAL); + val = swfdec_as_value_from_number (context, HUGE_VAL); swfdec_as_object_set_variable (context->global, SWFDEC_AS_STR_Infinity, &val); } @@ -1197,7 +1296,6 @@ swfdec_as_context_startup (SwfdecAsContext *context) /* FIXME: remove them for normal contexts? */ swfdec_player_preinit_global (context); /* get the necessary objects up to define objects and functions sanely */ - swfdec_as_function_init_context (context); swfdec_as_object_init_context (context); /* define the global object and other important ones */ swfdec_as_context_init_global (context); diff --git a/swfdec/swfdec_as_context.h b/swfdec/swfdec_as_context.h index 41b56510..b3492f45 100644 --- a/swfdec/swfdec_as_context.h +++ b/swfdec/swfdec_as_context.h @@ -56,8 +56,12 @@ struct _SwfdecAsContext { /* bookkeeping for GC */ gsize memory; /* total memory currently in use */ gsize memory_since_gc;/* memory allocated since last GC run */ - GHashTable * strings; /* string => memory mapping the context manages */ - GHashTable * objects; /* all objects the context manages */ + GHashTable * interned_strings;/* string => memory mapping the context manages */ + gpointer gc_objects; /* all SwfdecGcObjects the context manages */ + gpointer objects; /* all objects the context manages */ + gpointer strings; /* all strings the context manages */ + gpointer numbers; /* all numbers the context manages */ + gpointer movies; /* all movies the context manages */ GHashTable * constant_pools; /* memory address => SwfdecConstantPool for all gc'ed pools */ /* execution state */ @@ -73,12 +77,6 @@ struct _SwfdecAsContext { SwfdecAsValue * cur; /* pointer to current top of stack */ SwfdecAsStack * stack; /* current stack */ - /* magic objects - initialized during swfdec_as_context_startup() */ - SwfdecAsObject * Function; /* Function */ - SwfdecAsObject * Function_prototype; /* Function.prototype */ - SwfdecAsObject * Object; /* Object */ - SwfdecAsObject * Object_prototype; /* Object.prototype */ - /* debugging */ SwfdecAsDebugger * debugger; /* debugger (or NULL if none) */ }; diff --git a/swfdec/swfdec_as_date.c b/swfdec/swfdec_as_date.c index b8b73d79..2e896197 100644 --- a/swfdec/swfdec_as_date.c +++ b/swfdec/swfdec_as_date.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org> * 2007 Pekka Lampila <pekka.lampila@iki.fi> * * This library is free software; you can redistribute it and/or @@ -38,7 +38,7 @@ #include "swfdec_player_internal.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsDate, swfdec_as_date, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecAsDate, swfdec_as_date, SWFDEC_TYPE_AS_RELAY) /* * Class functions @@ -250,7 +250,7 @@ static gboolean swfdec_as_date_value_to_number_and_integer_floor (SwfdecAsContext *context, const SwfdecAsValue *value, double *d, int *num) { - *d = swfdec_as_value_to_number (context, value); + *d = swfdec_as_value_to_number (context, *value); if (!isfinite (*d)) { *num = 0; return FALSE; @@ -269,10 +269,10 @@ swfdec_as_date_value_to_number_and_integer (SwfdecAsContext *context, g_assert (num != NULL); // undefined == NAN here, even in version < 7 - if (SWFDEC_AS_VALUE_IS_UNDEFINED (value)) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*value)) { *d = NAN; } else { - *d = swfdec_as_value_to_number (context, value); + *d = swfdec_as_value_to_number (context, *value); } if (!isfinite (*d)) { *num = 0; @@ -444,7 +444,7 @@ swfdec_as_date_set_field (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, ""); if (!swfdec_as_date_is_valid (date)) - swfdec_as_value_to_number (cx, &argv[0]); // calls valueOf + swfdec_as_value_to_number (cx, argv[0]); // calls valueOf if (swfdec_as_date_is_valid (date) && argc > 0) { @@ -508,7 +508,7 @@ swfdec_as_date_set_field (SwfdecAsContext *cx, SwfdecAsObject *object, } } - SWFDEC_AS_VALUE_SET_NUMBER (ret, date->milliseconds); + *ret = swfdec_as_value_from_number (cx, date->milliseconds); } static void @@ -522,7 +522,7 @@ swfdec_as_date_get_field (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, ""); if (!swfdec_as_date_is_valid (date)) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); return; } @@ -532,7 +532,7 @@ swfdec_as_date_get_field (SwfdecAsContext *cx, SwfdecAsObject *object, if (field == FIELD_FULL_YEAR) number += 1900; - SWFDEC_AS_VALUE_SET_INT (ret, number); + *ret = swfdec_as_value_from_integer (cx, number); } /*** AS CODE ***/ @@ -580,7 +580,7 @@ swfdec_as_date_getTime (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, date->milliseconds); + *ret = swfdec_as_value_from_number (cx, date->milliseconds); } SWFDEC_AS_NATIVE (103, 18, swfdec_as_date_getTimezoneOffset) @@ -593,7 +593,7 @@ swfdec_as_date_getTimezoneOffset (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, ""); // reverse of utc_offset - SWFDEC_AS_VALUE_SET_NUMBER (ret, -(date->utc_offset)); + *ret = swfdec_as_value_from_number (cx, -(date->utc_offset)); } // get* functions @@ -763,8 +763,8 @@ swfdec_as_date_setTime (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, ""); if (argc > 0 && - (cx->version > 6 || !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]))) { - d = swfdec_as_value_to_number (cx, &argv[0]); + (cx->version > 6 || !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]))) { + d = swfdec_as_value_to_number (cx, argv[0]); } else { d = NAN; } @@ -774,7 +774,7 @@ swfdec_as_date_setTime (SwfdecAsContext *cx, SwfdecAsObject *object, swfdec_as_date_set_milliseconds_utc (date, NAN); } - SWFDEC_AS_VALUE_SET_NUMBER (ret, date->milliseconds); + *ret = swfdec_as_value_from_number (cx, date->milliseconds); } SWFDEC_AS_NATIVE (103, 15, swfdec_as_date_setMilliseconds) @@ -950,7 +950,7 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, // special case: ignore undefined and everything after it for (i = 0; i < argc; i++) { - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[i])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[i])) { argc = i; break; } @@ -989,7 +989,7 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, &num)) { brokentime.day_of_month = num; } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); return; } } else { @@ -1001,7 +1001,7 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, &num)) { brokentime.hours = num; } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); return; } } @@ -1011,7 +1011,7 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, &num)) { brokentime.minutes = num; } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); return; } } @@ -1021,7 +1021,7 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, &num)) { brokentime.seconds = num; } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); return; } } @@ -1037,18 +1037,18 @@ swfdec_as_date_UTC (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, &num)) { brokentime.milliseconds = num; } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); return; } } - SWFDEC_AS_VALUE_SET_NUMBER (ret, + *ret = swfdec_as_value_from_number (cx, swfdec_as_date_brokentime_to_milliseconds (&brokentime)); } // Constructor -SWFDEC_AS_CONSTRUCTOR (103, 256, swfdec_as_date_construct, swfdec_as_date_get_type) +SWFDEC_AS_NATIVE (103, 256, swfdec_as_date_construct) void swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) @@ -1056,12 +1056,13 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint i; SwfdecAsDate *date; - if (!cx->frame->construct) { - object = g_object_new (SWFDEC_TYPE_AS_DATE, "context", cx, NULL); + if (!swfdec_as_context_is_constructing (cx)) { + object = swfdec_as_object_new_empty (cx); swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_Date, NULL); } - date = SWFDEC_AS_DATE (object); + date = g_object_new (SWFDEC_TYPE_AS_DATE, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (date)); /* FIXME: find a general solution here */ if (SWFDEC_IS_PLAYER (swfdec_gc_object_get_context (date))) { @@ -1075,7 +1076,7 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object, // special case: ignore undefined and everything after it for (i = 0; i < argc; i++) { - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[i])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[i])) { argc = i; break; } @@ -1095,7 +1096,7 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object, else if (argc == 1) // milliseconds from epoch, local { // need to save directly to keep fractions of a milliseconds - date->milliseconds = swfdec_as_value_to_number (cx, &argv[0]); + date->milliseconds = swfdec_as_value_to_number (cx, argv[0]); } else // year, month etc. local { @@ -1194,19 +1195,3 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } -SwfdecAsObject * -swfdec_as_date_new (SwfdecAsContext *context, double milliseconds, - int utc_offset) -{ - SwfdecAsObject *ret; - - g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - - ret = g_object_new (SWFDEC_TYPE_AS_DATE, "context", context, NULL); - swfdec_as_object_set_constructor_by_name (ret, SWFDEC_AS_STR_Date, NULL); - - SWFDEC_AS_DATE (ret)->milliseconds = milliseconds; - SWFDEC_AS_DATE (ret)->utc_offset = utc_offset; - - return ret; -} diff --git a/swfdec/swfdec_as_date.h b/swfdec/swfdec_as_date.h index ceacce0c..3cfabdec 100644 --- a/swfdec/swfdec_as_date.h +++ b/swfdec/swfdec_as_date.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org> * 2007 Pekka Lampila <pekka.lampila@iki.fi> * * This library is free software; you can redistribute it and/or @@ -21,9 +21,8 @@ #ifndef _SWFDEC_AS_DATE_H_ #define _SWFDEC_AS_DATE_H_ -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_as_types.h> -#include <swfdec/swfdec_script.h> G_BEGIN_DECLS @@ -38,7 +37,7 @@ typedef struct _SwfdecAsDateClass SwfdecAsDateClass; #define SWFDEC_AS_DATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_DATE, SwfdecAsDateClass)) struct _SwfdecAsDate { - SwfdecAsObject object; + SwfdecAsRelay relay; // time from epoch in UTC double milliseconds; @@ -48,15 +47,11 @@ struct _SwfdecAsDate { }; struct _SwfdecAsDateClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_as_date_get_type (void); -SwfdecAsObject *swfdec_as_date_new (SwfdecAsContext * context, - double milliseconds, - int utc_offset); - G_END_DECLS #endif diff --git a/swfdec/swfdec_as_frame.c b/swfdec/swfdec_as_frame.c index cca50a74..5af43691 100644 --- a/swfdec/swfdec_as_frame.c +++ b/swfdec/swfdec_as_frame.c @@ -25,6 +25,7 @@ #include "swfdec_as_frame.h" #include "swfdec_as_array.h" #include "swfdec_as_context.h" +#include "swfdec_as_internal.h" #include "swfdec_as_stack.h" #include "swfdec_as_strings.h" #include "swfdec_as_super.h" @@ -66,6 +67,7 @@ /** * swfdec_as_stack_iterator_init_arguments: * @iter: iterator to be initialized + * @context: context @frame belongs to * @frame: the frame to initialize from * * Initializes a stack iterator to walk the arguments passed to the given @frame. See @@ -74,11 +76,11 @@ * Returns: The value of the first argument **/ SwfdecAsValue * -swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter, SwfdecAsFrame *frame) +swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter, + SwfdecAsContext *context, SwfdecAsFrame *frame) { - SwfdecAsContext *context; - g_return_val_if_fail (iter != NULL, NULL); + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (frame != NULL, NULL); if (frame->argc == 0) { @@ -87,7 +89,6 @@ swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter, SwfdecAsFr iter->current = NULL; return NULL; } - context = swfdec_gc_object_get_context (frame->target); if (frame->argv) { iter->stack = NULL; iter->current = (SwfdecAsValue *) frame->argv; @@ -111,6 +112,7 @@ swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter, SwfdecAsFr /** * swfdec_as_stack_iterator_init: * @iter: a #SwfdecStackIterator + * @context: context @frame belongs to * @frame: the frame to initialize from * * Initializes @iter to walk the stack of @frame. The first value on the stack @@ -126,15 +128,13 @@ swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator *iter, SwfdecAsFr * Returns: the topmost value on the stack of @frame or %NULL if none **/ SwfdecAsValue * -swfdec_as_stack_iterator_init (SwfdecAsStackIterator *iter, SwfdecAsFrame *frame) +swfdec_as_stack_iterator_init (SwfdecAsStackIterator *iter, SwfdecAsContext *context, SwfdecAsFrame *frame) { - SwfdecAsContext *context; SwfdecAsStack *stack; g_return_val_if_fail (iter != NULL, NULL); g_return_val_if_fail (frame != NULL, NULL); - context = swfdec_gc_object_get_context (frame->target); iter->i = 0; stack = context->stack; if (context->frame == frame) { @@ -265,12 +265,12 @@ swfdec_as_frame_pop_block (SwfdecAsFrame *frame, SwfdecAsContext *cx) /*** FRAME ***/ -static void -swfdec_as_frame_free (SwfdecAsFrame *frame) +void +swfdec_as_frame_free (SwfdecAsContext *context, SwfdecAsFrame *frame) { /* pop blocks while state is intact */ while (frame->blocks->len > 0) - swfdec_as_frame_pop_block (frame, swfdec_gc_object_get_context (frame->target)); + swfdec_as_frame_pop_block (frame, context); /* clean up */ g_slice_free1 (sizeof (SwfdecAsValue) * frame->n_registers, frame->registers); @@ -319,90 +319,15 @@ swfdec_as_frame_init_native (SwfdecAsFrame *frame, SwfdecAsContext *context) frame->stack_begin = context->cur; context->base = frame->stack_begin; frame->next = context->frame; + if (frame->next) { + frame->original_target = frame->next->original_target; + frame->target = frame->original_target; + } context->frame = frame; context->call_depth++; } /** - * swfdec_as_frame_return: - * @frame: a #SwfdecAsFrame that is currently executing. - * @return_value: return value of the function or %NULL for none. An undefined - * value will be used in that case. - * - * Ends execution of the frame and instructs the frame's context to continue - * execution with its parent frame. This function may only be called on the - * currently executing frame. - **/ -void -swfdec_as_frame_return (SwfdecAsFrame *frame, SwfdecAsValue *return_value) -{ - SwfdecAsContext *context; - SwfdecAsValue retval; - SwfdecAsFrame *next; - - g_return_if_fail (frame != NULL); - context = swfdec_gc_object_get_context (frame->target ? (gpointer) frame->target : (gpointer) frame->function); - g_return_if_fail (frame == context->frame); - - /* save return value in case it was on the stack somewhere */ - if (frame->construct) { - SWFDEC_AS_VALUE_SET_OBJECT (&retval, frame->thisp); - } else if (return_value) { - retval = *return_value; - } else { - SWFDEC_AS_VALUE_SET_UNDEFINED (&retval); - } - /* pop frame and leftover stack */ - next = frame->next; - context->frame = next; - g_assert (context->call_depth > 0); - context->call_depth--; - while (context->base > frame->stack_begin || - context->end < frame->stack_begin) - swfdec_as_stack_pop_segment (context); - context->cur = frame->stack_begin; - /* setup stack for previous frame */ - if (next) { - if (next->stack_begin >= &context->stack->elements[0] && - next->stack_begin <= context->cur) { - context->base = next->stack_begin; - } else { - context->base = &context->stack->elements[0]; - } - } else { - g_assert (context->stack->next == NULL); - context->base = &context->stack->elements[0]; - } - /* pop argv if on stack */ - if (frame->argv == NULL && frame->argc > 0) { - guint i = frame->argc; - while (TRUE) { - guint n = context->cur - context->base; - n = MIN (n, i); - swfdec_as_stack_pop_n (context, n); - i -= n; - if (i == 0) - break; - swfdec_as_stack_pop_segment (context); - } - } - if (context->debugger) { - SwfdecAsDebuggerClass *klass = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger); - - if (klass->leave_frame) - klass->leave_frame (context->debugger, context, frame, &retval); - } - /* set return value */ - if (frame->return_value) { - *frame->return_value = retval; - } else { - swfdec_as_stack_ensure_free (context, 1); - *swfdec_as_stack_push (context) = retval; - } - swfdec_as_frame_free (frame); -} - -/** * swfdec_as_frame_set_this: * @frame: a #SwfdecAsFrame * @thisp: object to use as the this object @@ -416,15 +341,11 @@ void swfdec_as_frame_set_this (SwfdecAsFrame *frame, SwfdecAsObject *thisp) { g_return_if_fail (frame != NULL); - g_return_if_fail (frame->thisp == NULL); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (thisp)); + g_return_if_fail (SWFDEC_AS_VALUE_IS_UNDEFINED (frame->thisp)); + g_return_if_fail (thisp != NULL); g_assert (!SWFDEC_IS_AS_SUPER (thisp)); - frame->thisp = thisp; - if (frame->target == NULL) { - frame->target = thisp; - frame->original_target = thisp; - } + SWFDEC_AS_VALUE_SET_COMPOSITE (&frame->thisp, thisp); } /** @@ -444,36 +365,30 @@ swfdec_as_frame_set_this (SwfdecAsFrame *frame, SwfdecAsObject *thisp) * Returns: Object in scope chain that contained the variable. **/ SwfdecAsObject * -swfdec_as_frame_get_variable_and_flags (SwfdecAsFrame *frame, const char *variable, - SwfdecAsValue *value, guint *flags, SwfdecAsObject **pobject) +swfdec_as_frame_get_variable_and_flags (SwfdecAsContext *cx, SwfdecAsFrame *frame, + const char *variable, SwfdecAsValue *value, guint *flags, SwfdecAsObject **pobject) { + SwfdecMovie *target; GSList *walk; - SwfdecAsContext *cx; + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (cx), NULL); g_return_val_if_fail (frame != NULL, NULL); g_return_val_if_fail (variable != NULL, NULL); - cx = swfdec_gc_object_get_context (frame->target); - for (walk = frame->scope_chain; walk; walk = walk->next) { if (swfdec_as_object_get_variable_and_flags (walk->data, variable, value, flags, pobject)) return walk->data; } /* we've walked the scope chain down. Now look in the special objects. */ - /* 1) the target (if removed, use original target) */ - if (SWFDEC_IS_MOVIE (frame->target) && - SWFDEC_MOVIE(frame->target)->state < SWFDEC_MOVIE_STATE_DESTROYED) { - if (swfdec_as_object_get_variable_and_flags (frame->target, variable, - value, flags, pobject)) - return frame->target; - } else { - if (swfdec_as_object_get_variable_and_flags (frame->original_target, - variable, value, flags, pobject)) - return frame->original_target; + /* 1) the current target */ + target = swfdec_as_frame_get_target (frame); + if (target) { + SwfdecAsObject *object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (target)); + if (swfdec_as_object_get_variable_and_flags (object, variable, value, flags, pobject)) + return object; } /* 2) the global object */ - /* FIXME: ignored on version 4, but should it never be created instead? */ if (cx->version > 4 && swfdec_as_object_get_variable_and_flags (cx->global, variable, value, flags, pobject)) return cx->global; @@ -482,8 +397,9 @@ swfdec_as_frame_get_variable_and_flags (SwfdecAsFrame *frame, const char *variab } void -swfdec_as_frame_set_variable_and_flags (SwfdecAsFrame *frame, const char *variable, - const SwfdecAsValue *value, guint default_flags, gboolean overwrite, gboolean local) +swfdec_as_frame_set_variable_and_flags (SwfdecAsContext *context, SwfdecAsFrame *frame, + const char *variable, const SwfdecAsValue *value, guint default_flags, + gboolean overwrite, gboolean local) { SwfdecAsObject *pobject, *set; GSList *walk; @@ -502,11 +418,18 @@ swfdec_as_frame_set_variable_and_flags (SwfdecAsFrame *frame, const char *variab } } if (set == NULL) { - if (local && frame->activation) { + /* the !frame->original_target check is exclusively for init scripts */ + if (frame->activation && (local || !frame->original_target)) { set = frame->activation; } else { - set = frame->target; + SwfdecMovie *target = swfdec_as_frame_get_target (frame); + if (target) + set = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (target)); + else + set = NULL; } + if (set == NULL) + return; } if (!overwrite) { @@ -518,10 +441,11 @@ swfdec_as_frame_set_variable_and_flags (SwfdecAsFrame *frame, const char *variab } SwfdecAsDeleteReturn -swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable) +swfdec_as_frame_delete_variable (SwfdecAsContext *cx, SwfdecAsFrame *frame, const char *variable) { GSList *walk; SwfdecAsDeleteReturn ret; + SwfdecMovie *target; g_return_val_if_fail (frame != NULL, FALSE); g_return_val_if_fail (variable != NULL, FALSE); @@ -533,27 +457,31 @@ swfdec_as_frame_delete_variable (SwfdecAsFrame *frame, const char *variable) } /* we've walked the scope chain down. Now look in the special objects. */ /* 1) the target set via SetTarget */ - ret = swfdec_as_object_delete_variable (frame->target, variable); - if (ret) - return ret; + + target = swfdec_as_frame_get_target (frame); + if (target) { + ret = swfdec_as_object_delete_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (target)), variable); + if (ret) + return ret; + } /* 2) the global object */ - return swfdec_as_object_delete_variable (swfdec_gc_object_get_context (frame->target)->global, variable); + return swfdec_as_object_delete_variable (cx->global, variable); } /** * swfdec_as_frame_set_target: * @frame: a #SwfdecAsFrame - * @target: the new object to use as target or %NULL to unset + * @target: the movie to use as target or %NULL to unset * * Sets the new target to be used in this @frame. The target is a legacy * Actionscript concept that is similar to "with". If you don't have to, * you shouldn't use this function. **/ void -swfdec_as_frame_set_target (SwfdecAsFrame *frame, SwfdecAsObject *target) +swfdec_as_frame_set_target (SwfdecAsFrame *frame, SwfdecMovie *target) { g_return_if_fail (frame != NULL); - g_return_if_fail (target == NULL || SWFDEC_IS_AS_OBJECT (target)); + g_return_if_fail (target == NULL || SWFDEC_IS_MOVIE (target)); if (target) { frame->target = target; @@ -563,20 +491,19 @@ swfdec_as_frame_set_target (SwfdecAsFrame *frame, SwfdecAsObject *target) } void -swfdec_as_frame_preload (SwfdecAsFrame *frame) +swfdec_as_frame_preload (SwfdecAsContext *context, SwfdecAsFrame *frame) { SwfdecAsObject *object, *args; guint i, current_reg = 1; SwfdecScript *script; SwfdecAsValue val; const SwfdecAsValue *cur; - SwfdecAsContext *context; SwfdecAsStackIterator iter; + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); g_return_if_fail (frame != NULL); /* setup */ - context = swfdec_gc_object_get_context (frame->target ? (gpointer) frame->target : (gpointer) frame->function); script = frame->script; if (frame->script == NULL) goto out; @@ -588,9 +515,9 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) if ((script->flags & (SWFDEC_SCRIPT_PRELOAD_ARGS | SWFDEC_SCRIPT_SUPPRESS_ARGS)) != SWFDEC_SCRIPT_SUPPRESS_ARGS) { SwfdecAsFrame *next; args = swfdec_as_array_new (context); - for (cur = swfdec_as_stack_iterator_init_arguments (&iter, frame); cur != NULL; + for (cur = swfdec_as_stack_iterator_init_arguments (&iter, context, frame); cur != NULL; cur = swfdec_as_stack_iterator_next (&iter)) { - swfdec_as_array_push (SWFDEC_AS_ARRAY (args), cur); + swfdec_as_array_push (args, cur); } next = frame->next; @@ -599,7 +526,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) next = next->next; } if (next != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (next->function)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (next->function))); } else { SWFDEC_AS_VALUE_SET_NULL (&val); } @@ -607,7 +534,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); if (frame->function != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (frame->function)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (frame->function))); } else { SWFDEC_AS_VALUE_SET_NULL (&val); } @@ -620,12 +547,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) /* set the default variables (unless suppressed */ if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_THIS)) { - if (frame->thisp) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, frame->thisp); - } else { - SWFDEC_AS_VALUE_SET_UNDEFINED (&val); - } - swfdec_as_object_set_variable (object, SWFDEC_AS_STR_this, &val); + swfdec_as_object_set_variable (object, SWFDEC_AS_STR_this, &frame->thisp); } if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_ARGS)) { SWFDEC_AS_VALUE_SET_OBJECT (&val, args); @@ -633,7 +555,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) } if (!(script->flags & SWFDEC_SCRIPT_SUPPRESS_SUPER)) { if (frame->super) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, frame->super); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (frame->super))); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (&val); } @@ -642,7 +564,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) /* set and preload argument variables */ SWFDEC_AS_VALUE_SET_UNDEFINED (&val); - cur = swfdec_as_stack_iterator_init_arguments (&iter, frame); + cur = swfdec_as_stack_iterator_init_arguments (&iter, context, frame); for (i = 0; i < script->n_arguments; i++) { if (cur == NULL) cur = &val; @@ -665,30 +587,27 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) /* preload from flags */ if ((script->flags & (SWFDEC_SCRIPT_PRELOAD_THIS | SWFDEC_SCRIPT_SUPPRESS_THIS)) == SWFDEC_SCRIPT_PRELOAD_THIS && current_reg < script->n_registers) { - if (frame->thisp) { - SWFDEC_AS_VALUE_SET_OBJECT (&frame->registers[current_reg++], frame->thisp); - } else { - SWFDEC_AS_VALUE_SET_UNDEFINED (&frame->registers[current_reg++]); - } + frame->registers[current_reg++] = frame->thisp; } if (script->flags & SWFDEC_SCRIPT_PRELOAD_ARGS && current_reg < script->n_registers) { SWFDEC_AS_VALUE_SET_OBJECT (&frame->registers[current_reg++], args); } if (script->flags & SWFDEC_SCRIPT_PRELOAD_SUPER && current_reg < script->n_registers) { if (frame->super) { - SWFDEC_AS_VALUE_SET_OBJECT (&frame->registers[current_reg++], frame->super); + SWFDEC_AS_VALUE_SET_OBJECT (&frame->registers[current_reg++], + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (frame->super))); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (&frame->registers[current_reg++]); } } if (script->flags & SWFDEC_SCRIPT_PRELOAD_ROOT && current_reg < script->n_registers) { - if (!swfdec_as_frame_get_variable (frame, SWFDEC_AS_STR__root, &frame->registers[current_reg])) { + if (!swfdec_as_frame_get_variable (context, frame, SWFDEC_AS_STR__root, &frame->registers[current_reg])) { SWFDEC_WARNING ("no root to preload"); } current_reg++; } if (script->flags & SWFDEC_SCRIPT_PRELOAD_PARENT && current_reg < script->n_registers) { - if (!swfdec_as_frame_get_variable (frame, SWFDEC_AS_STR__parent, &frame->registers[current_reg])) { + if (!swfdec_as_frame_get_variable (context, frame, SWFDEC_AS_STR__parent, &frame->registers[current_reg])) { SWFDEC_WARNING ("no root to preload"); } current_reg++; @@ -702,7 +621,7 @@ swfdec_as_frame_preload (SwfdecAsFrame *frame) out: if (context->state == SWFDEC_AS_CONTEXT_ABORTED) { - swfdec_as_frame_return (frame, NULL); + swfdec_as_context_return (context, NULL); return; } if (context->debugger) { @@ -714,12 +633,9 @@ out: } void -swfdec_as_frame_handle_exception (SwfdecAsFrame *frame) +swfdec_as_frame_handle_exception (SwfdecAsContext *cx, SwfdecAsFrame *frame) { - SwfdecAsContext *cx; - g_return_if_fail (frame != NULL); - cx = swfdec_gc_object_get_context (frame->target); g_return_if_fail (cx->exception); /* pop blocks in the hope that we are inside a Try block */ @@ -728,10 +644,22 @@ swfdec_as_frame_handle_exception (SwfdecAsFrame *frame) } /* no Try blocks caught it, exit frame */ if (cx->exception) { - swfdec_as_frame_return (frame, NULL); + swfdec_as_context_return (cx, NULL); } } +SwfdecMovie * +swfdec_as_frame_get_target (SwfdecAsFrame *frame) +{ + if (SWFDEC_IS_MOVIE (frame->target) && + SWFDEC_MOVIE (frame->target)->state < SWFDEC_MOVIE_STATE_DESTROYED) + return SWFDEC_MOVIE (frame->target); + if (SWFDEC_IS_MOVIE (frame->original_target) && + SWFDEC_MOVIE (frame->original_target)->state < SWFDEC_MOVIE_STATE_DESTROYED) + return SWFDEC_MOVIE (frame->original_target); + return NULL; +} + /** * swfdec_as_frame_get_next: * @frame: a #SwfdecAsFrame @@ -766,20 +694,3 @@ swfdec_as_frame_get_script (SwfdecAsFrame *frame) return frame->script; } -/** - * swfdec_as_frame_get_this: - * @frame: a #SwfdecAsFrame - * - * Gets the this object of the given @frame. If the frame has no this object, - * %NULL is returned. - * - * Returns: The this object of the frame or %NULL if none. - **/ -SwfdecAsObject * -swfdec_as_frame_get_this (SwfdecAsFrame *frame) -{ - g_return_val_if_fail (frame != NULL, NULL); - - return frame->thisp; -} - diff --git a/swfdec/swfdec_as_frame.h b/swfdec/swfdec_as_frame.h index a24f81a8..33650d0b 100644 --- a/swfdec/swfdec_as_frame.h +++ b/swfdec/swfdec_as_frame.h @@ -38,12 +38,13 @@ struct _SwfdecAsStackIterator { SwfdecAsFrame * swfdec_as_frame_get_next (SwfdecAsFrame * frame); SwfdecScript * swfdec_as_frame_get_script (SwfdecAsFrame * frame); -SwfdecAsObject *swfdec_as_frame_get_this (SwfdecAsFrame * frame); SwfdecAsValue * swfdec_as_stack_iterator_init (SwfdecAsStackIterator * iter, + SwfdecAsContext * context, SwfdecAsFrame * frame); SwfdecAsValue * swfdec_as_stack_iterator_init_arguments (SwfdecAsStackIterator * iter, + SwfdecAsContext * context, SwfdecAsFrame * frame); SwfdecAsValue * swfdec_as_stack_iterator_next (SwfdecAsStackIterator * iter); diff --git a/swfdec/swfdec_as_frame_internal.h b/swfdec/swfdec_as_frame_internal.h index 61c09e9c..99af805d 100644 --- a/swfdec/swfdec_as_frame_internal.h +++ b/swfdec/swfdec_as_frame_internal.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -20,8 +20,10 @@ #ifndef _SWFDEC_AS_FRAME_INTERNAL_H_ #define _SWFDEC_AS_FRAME_INTERNAL_H_ +#include <swfdec/swfdec_as_super.h> #include <swfdec/swfdec_as_types.h> #include <swfdec/swfdec_script_internal.h> +#include <swfdec/swfdec_types.h> G_BEGIN_DECLS @@ -30,8 +32,8 @@ typedef void (* SwfdecAsFrameBlockFunc) (SwfdecAsContext *cx, SwfdecAsFrame *fra struct _SwfdecAsFrame { SwfdecAsFrame * next; /* next frame (FIXME: keep a list in the context instead?) */ SwfdecAsFunction * function; /* function we're executing or NULL if toplevel */ - SwfdecAsObject * thisp; /* this object in current frame or NULL if none */ - SwfdecAsObject * super; /* super object in current frame or NULL if none */ + SwfdecAsValue thisp; /* this object in current frame or undefined if none */ + SwfdecAsSuper * super; /* super object in current frame or NULL if none */ gboolean construct; /* TRUE if this is the constructor for thisp */ SwfdecAsValue * return_value; /* pointer to where to store the return value */ guint argc; /* number of arguments */ @@ -42,8 +44,8 @@ struct _SwfdecAsFrame { const guint8 * block_start; /* start of current block */ const guint8 * block_end; /* end of current block */ GArray * blocks; /* blocks we have entered (like With) */ - SwfdecAsObject * target; /* target to use as last object in scope chain or for SetVariable */ - SwfdecAsObject * original_target;/* original target (used when resetting target) */ + SwfdecMovie * target; /* target to use as last object in scope chain or for SetVariable */ + SwfdecMovie * original_target;/* original target (used when resetting target) */ SwfdecAsObject * activation; /* activation object or NULL if the frame takes no local variables */ SwfdecAsValue * registers; /* the registers */ guint n_registers; /* number of allocated registers */ @@ -58,36 +60,40 @@ void swfdec_as_frame_init (SwfdecAsFrame * frame, SwfdecScript * script); void swfdec_as_frame_init_native (SwfdecAsFrame * frame, SwfdecAsContext * context); -void swfdec_as_frame_return (SwfdecAsFrame * frame, - SwfdecAsValue * return_value); +void swfdec_as_frame_free (SwfdecAsContext * context, + SwfdecAsFrame * frame); void swfdec_as_frame_set_this (SwfdecAsFrame * frame, SwfdecAsObject * thisp); -void swfdec_as_frame_preload (SwfdecAsFrame * frame); +void swfdec_as_frame_preload (SwfdecAsContext * context, + SwfdecAsFrame * frame); -#define swfdec_as_frame_get_variable(frame, variable, value) \ - swfdec_as_frame_get_variable_and_flags (frame, variable, value, NULL, NULL) +#define swfdec_as_frame_get_variable(cx, frame, variable, value) \ + swfdec_as_frame_get_variable_and_flags (cx, frame, variable, value, NULL, NULL) SwfdecAsObject *swfdec_as_frame_get_variable_and_flags - (SwfdecAsFrame * frame, + (SwfdecAsContext * context, + SwfdecAsFrame * frame, const char * variable, SwfdecAsValue * value, guint * flags, SwfdecAsObject ** pobject); -#define swfdec_as_frame_set_variable(frame, variable, value, overwrite, local) \ - swfdec_as_frame_set_variable_and_flags (frame, variable, value, 0, overwrite, local) +#define swfdec_as_frame_set_variable(cx, frame, variable, value, overwrite, local) \ + swfdec_as_frame_set_variable_and_flags (cx, frame, variable, value, 0, overwrite, local) void swfdec_as_frame_set_variable_and_flags - (SwfdecAsFrame * frame, + (SwfdecAsContext * context, + SwfdecAsFrame * frame, const char * variable, const SwfdecAsValue * value, guint default_flags, gboolean overwrite, gboolean local); SwfdecAsDeleteReturn - swfdec_as_frame_delete_variable (SwfdecAsFrame * frame, + swfdec_as_frame_delete_variable (SwfdecAsContext * context, + SwfdecAsFrame * frame, const char * variable); void swfdec_as_frame_set_target (SwfdecAsFrame * frame, - SwfdecAsObject * target); + SwfdecMovie * target); void swfdec_as_frame_push_block (SwfdecAsFrame * frame, const guint8 * start, const guint8 * end, @@ -95,7 +101,9 @@ void swfdec_as_frame_push_block (SwfdecAsFrame * frame, gpointer data); void swfdec_as_frame_pop_block (SwfdecAsFrame * frame, SwfdecAsContext * context); -void swfdec_as_frame_handle_exception(SwfdecAsFrame * frame); +void swfdec_as_frame_handle_exception(SwfdecAsContext * context, + SwfdecAsFrame * frame); +SwfdecMovie * swfdec_as_frame_get_target (SwfdecAsFrame * frame); G_END_DECLS diff --git a/swfdec/swfdec_as_function.c b/swfdec/swfdec_as_function.c index 1cb573d0..e51f27c6 100644 --- a/swfdec/swfdec_as_function.c +++ b/swfdec/swfdec_as_function.c @@ -28,7 +28,7 @@ #include "swfdec_as_strings.h" #include "swfdec_debug.h" -G_DEFINE_ABSTRACT_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_ABSTRACT_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_RELAY) /** * SECTION:SwfdecAsFunction @@ -42,10 +42,6 @@ G_DEFINE_ABSTRACT_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_OBJ * If you want to create your own functions, you should create native functions. * The easiest way to do this is with swfdec_as_object_add_function() or * swfdec_as_native_function_new(). - * - * In Actionscript, every function can be used as a constructor. If you want to - * make a native function be used as a constructor for your own #SwfdecAsObject - * subclass, have a look at swfdec_as_native_function_set_construct_type(). */ /** @@ -66,37 +62,6 @@ swfdec_as_function_init (SwfdecAsFunction *function) } /** - * swfdec_as_function_set_constructor: - * @fun: a #SwfdecAsFunction - * - * Sets the constructor and prototype of @fun. This is a shortcut for calling - * swfdec_as_object_set_constructor() with the right arguments. - **/ -void -swfdec_as_function_set_constructor (SwfdecAsFunction *fun) -{ - SwfdecAsContext *context; - SwfdecAsObject *object; - SwfdecAsValue val; - - g_return_if_fail (SWFDEC_IS_AS_FUNCTION (fun)); - - object = SWFDEC_AS_OBJECT (fun); - context = swfdec_gc_object_get_context (fun); - if (context->Function == NULL) - return; - - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function); - swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function_prototype); - swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | - SWFDEC_AS_VARIABLE_VERSION_6_UP); -} - -/** * swfdec_as_function_call: * @function: the #SwfdecAsFunction to call * @thisp: this argument to use for the call or %NULL for none @@ -131,8 +96,6 @@ swfdec_as_function_call_full (SwfdecAsFunction *function, SwfdecAsObject *thisp, SwfdecAsFunctionClass *klass; g_return_if_fail (SWFDEC_IS_AS_FUNCTION (function)); - g_return_if_fail (thisp == NULL || SWFDEC_IS_AS_OBJECT (thisp)); - g_return_if_fail (super_reference == NULL || SWFDEC_IS_AS_OBJECT (super_reference)); klass = SWFDEC_AS_FUNCTION_GET_CLASS (function); klass->call (function, thisp, construct, super_reference, n_args, args, return_value); @@ -175,15 +138,15 @@ swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *object, if (thisp == NULL) thisp = swfdec_as_object_new_empty (cx); - if (argc > 1 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) { + if (argc > 1 && SWFDEC_AS_VALUE_IS_COMPOSITE (argv[1])) { int i; SwfdecAsObject *array; SwfdecAsValue val; - array = SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]); + array = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[1]); swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val); - length = swfdec_as_value_to_integer (cx, &val); + length = swfdec_as_value_to_integer (cx, val); if (length > 0) { /* FIXME: find a smarter way to do this, like providing argv not as an array */ @@ -210,31 +173,3 @@ swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *object, } } -void -swfdec_as_function_init_context (SwfdecAsContext *context) -{ - SwfdecAsObject *function, *proto; - SwfdecAsValue val; - - g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); - - function = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_Function, NULL)); - swfdec_as_object_set_variable_flags (context->global, SWFDEC_AS_STR_Function, SWFDEC_AS_VARIABLE_VERSION_6_UP); - context->Function = function; - SWFDEC_AS_VALUE_SET_OBJECT (&val, function); - swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - proto = swfdec_as_object_new_empty (context); - context->Function_prototype = proto; - SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_prototype, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | - SWFDEC_AS_VARIABLE_VERSION_6_UP); - SWFDEC_AS_VALUE_SET_OBJECT (&val, function); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); -} - diff --git a/swfdec/swfdec_as_function.h b/swfdec/swfdec_as_function.h index baf0b0e9..c1637cec 100644 --- a/swfdec/swfdec_as_function.h +++ b/swfdec/swfdec_as_function.h @@ -20,9 +20,8 @@ #ifndef _SWFDEC_AS_FUNCTION_H_ #define _SWFDEC_AS_FUNCTION_H_ -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_as_types.h> -#include <swfdec/swfdec_script.h> G_BEGIN_DECLS @@ -38,11 +37,11 @@ typedef struct _SwfdecAsFunctionClass SwfdecAsFunctionClass; /* FIXME: do two obejcts, one for scripts and one for native? */ struct _SwfdecAsFunction { /*< private >*/ - SwfdecAsObject object; + SwfdecAsRelay relay; }; struct _SwfdecAsFunctionClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; /* call this function - see swfdec_as_function_call_full() for meaning of arguments */ void (* call) (SwfdecAsFunction * function, @@ -66,7 +65,7 @@ void swfdec_as_function_call_full (SwfdecAsFunction * function, #define swfdec_as_function_call(function, thisp, n_args, args, return_value) G_STMT_START{ \ SwfdecAsObject *__thisp = (thisp); \ swfdec_as_function_call_full (function, __thisp, FALSE, \ - __thisp ? __thisp->prototype : SWFDEC_AS_OBJECT (function)->prototype, \ + __thisp ? __thisp->prototype : swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function))->prototype, \ n_args, args, return_value); \ }G_STMT_END diff --git a/swfdec/swfdec_as_gcable.c b/swfdec/swfdec_as_gcable.c new file mode 100644 index 00000000..3a02d7ce --- /dev/null +++ b/swfdec/swfdec_as_gcable.c @@ -0,0 +1,108 @@ +/* Swfdec + * Copyright (C) 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_as_gcable.h" + +#include "swfdec_as_context.h" + +gpointer +swfdec_as_gcable_alloc (SwfdecAsContext *context, gsize size) +{ + SwfdecAsGcable *mem; + guint8 diff; + + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (size > sizeof (SwfdecAsGcable), NULL); + + swfdec_as_context_use_mem (context, size); + mem = g_slice_alloc0 (size); + if (G_LIKELY ((GPOINTER_TO_SIZE (mem) & SWFDEC_AS_GC_FLAG_MASK) == 0)) + return mem; + + g_slice_free1 (size, mem); + mem = g_slice_alloc0 (size + SWFDEC_AS_GC_FLAG_MASK); + diff = GPOINTER_TO_SIZE (mem) & SWFDEC_AS_GC_FLAG_MASK; + if (diff == 0) + return mem; + + diff = SWFDEC_AS_GC_FLAG_MASK + 1 - diff; + mem += diff; + g_assert ((GPOINTER_TO_SIZE (mem) & SWFDEC_AS_GC_FLAG_MASK) == 0); + SWFDEC_AS_GCABLE_SET_FLAG (mem, SWFDEC_AS_GC_ALIGN); + ((guint8 *) mem)[-1] = diff; + + return mem; +} + +void +swfdec_as_gcable_free (SwfdecAsContext *context, gpointer mem, gsize size) +{ + SwfdecAsGcable *gc; + + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); + g_return_if_fail (mem != NULL); + g_return_if_fail (size > sizeof (SwfdecAsGcable)); + + gc = mem; + swfdec_as_context_unuse_mem (context, size); + if (G_UNLIKELY (SWFDEC_AS_GCABLE_FLAG_IS_SET (gc, SWFDEC_AS_GC_ALIGN))) { + mem = ((guint8 *) mem) - ((guint8 *) mem)[-1]; + size += SWFDEC_AS_GC_FLAG_MASK; + } + g_slice_free1 (size, mem); +} + +SwfdecAsGcable * +swfdec_as_gcable_collect (SwfdecAsContext *context, SwfdecAsGcable *gc, + SwfdecAsGcableDestroyNotify notify) +{ + SwfdecAsGcable *prev, *cur, *tmp; + + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + + prev = NULL; + cur = gc; + for (;;) { + while (cur) { + if (SWFDEC_AS_GCABLE_FLAG_IS_SET (cur, SWFDEC_AS_GC_MARK | SWFDEC_AS_GC_ROOT)) { + if (SWFDEC_AS_GCABLE_FLAG_IS_SET (cur, SWFDEC_AS_GC_MARK)) + SWFDEC_AS_GCABLE_UNSET_FLAG (cur, SWFDEC_AS_GC_MARK); + break; + } + tmp = SWFDEC_AS_GCABLE_NEXT (cur); + notify (context, cur); + cur = tmp; + } + if (prev) + SWFDEC_AS_GCABLE_SET_NEXT (prev, cur); + else + gc = cur; + prev = cur; + if (prev == NULL) + break; + cur = SWFDEC_AS_GCABLE_NEXT (cur); + } + + return gc; +} + diff --git a/swfdec/swfdec_as_gcable.h b/swfdec/swfdec_as_gcable.h new file mode 100644 index 00000000..b6c2ad9c --- /dev/null +++ b/swfdec/swfdec_as_gcable.h @@ -0,0 +1,60 @@ +/* Swfdec + * Copyright (C) 2008 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_AS_GCABLE_H_ +#define _SWFDEC_AS_GCABLE_H_ + +#include <swfdec/swfdec_as_types.h> + +G_BEGIN_DECLS + +#define SWFDEC_AS_GC_FLAG_MASK 7 + +#define SWFDEC_AS_GC_MARK (1 << 0) +#define SWFDEC_AS_GC_ROOT (1 << 1) +#define SWFDEC_AS_GC_ALIGN (1 << 2) + +typedef struct _SwfdecAsGcable SwfdecAsGcable; +struct _SwfdecAsGcable { + SwfdecAsGcable * next; +}; + +typedef void (* SwfdecAsGcableDestroyNotify) (SwfdecAsContext *context, gpointer mem); + +#define SWFDEC_AS_GCABLE_FLAG_IS_SET(gc,flag) (GPOINTER_TO_SIZE((gc)->next) & (flag)) +#define SWFDEC_AS_GCABLE_SET_FLAG(gc,flag) (gc)->next = GSIZE_TO_POINTER (GPOINTER_TO_SIZE((gc)->next) | (flag)) +#define SWFDEC_AS_GCABLE_UNSET_FLAG(gc,flag) (gc)->next = GSIZE_TO_POINTER (GPOINTER_TO_SIZE((gc)->next) & ~(flag)) + +#define SWFDEC_AS_GCABLE_NEXT(gc) ((SwfdecAsGcable *) GSIZE_TO_POINTER (GPOINTER_TO_SIZE((gc)->next) & ~7)) +#define SWFDEC_AS_GCABLE_SET_NEXT(gc, val) (gc)->next = GSIZE_TO_POINTER (GPOINTER_TO_SIZE (val) | (GPOINTER_TO_SIZE((gc)->next) & 7)) + +gpointer swfdec_as_gcable_alloc (SwfdecAsContext * context, + gsize size); +#define swfdec_as_gcable_new(cx,type) ((type *) swfdec_as_gcable_alloc (cx, sizeof (type))) +void swfdec_as_gcable_free (SwfdecAsContext * context, + gpointer mem, + gsize size); + +SwfdecAsGcable *swfdec_as_gcable_collect (SwfdecAsContext * context, + SwfdecAsGcable * gc, + SwfdecAsGcableDestroyNotify notify); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_as_internal.h b/swfdec/swfdec_as_internal.h index 04d88f3b..cf066d3f 100644 --- a/swfdec/swfdec_as_internal.h +++ b/swfdec/swfdec_as_internal.h @@ -20,39 +20,71 @@ #ifndef _SWFDEC_AS_INTERNAL_H_ #define _SWFDEC_AS_INTERNAL_H_ +#include <swfdec/swfdec_as_gcable.h> +#include <swfdec/swfdec_as_movie_value.h> #include <swfdec/swfdec_as_object.h> #include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_movie.h> G_BEGIN_DECLS /* This header contains all the non-exported symbols that can't go into * exported headers */ -#define SWFDEC_AS_NATIVE(x, y, func) SWFDEC_AS_CONSTRUCTOR (x, y, func, NULL) -#define SWFDEC_AS_CONSTRUCTOR(x, y, func, type) void func (SwfdecAsContext *cx, \ +#define SWFDEC_AS_NATIVE(x, y, func) void func (SwfdecAsContext *cx, \ SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret); #define SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT 256 -#define SWFDEC_AS_GC_MARK (1 << 0) /* only valid during GC */ -#define SWFDEC_AS_GC_ROOT (1 << 1) /* for objects: rooted, for strings: static */ +/* swfdec_as_types.h */ +#define SWFDEC_AS_TYPE_IS_GCABLE(type) ((type) & 4) -void swfdec_as_function_set_constructor (SwfdecAsFunction * fun); -void swfdec_as_function_init_context (SwfdecAsContext * context); +#define SWFDEC_AS_VALUE_IS_COMPOSITE(val) (SWFDEC_AS_VALUE_GET_TYPE (val) >= SWFDEC_AS_TYPE_OBJECT) +#define SWFDEC_AS_VALUE_IS_PRIMITIVE(val) (!SWFDEC_AS_VALUE_IS_COMPOSITE(val)) +/* FIXME: ugly macro */ +#define SWFDEC_AS_VALUE_GET_COMPOSITE(val) (SWFDEC_AS_VALUE_IS_OBJECT (val) ? \ + SWFDEC_AS_VALUE_GET_OBJECT (val) : (SWFDEC_AS_VALUE_GET_MOVIE (val) ? \ + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (SWFDEC_AS_VALUE_GET_MOVIE (val))) : NULL)) +#define SWFDEC_AS_VALUE_SET_COMPOSITE(val,o) G_STMT_START { \ + SwfdecAsObject *_o = (o); \ + if (_o->movie) { \ + SWFDEC_AS_VALUE_SET_MOVIE ((val), SWFDEC_MOVIE (_o->relay)); \ + } else { \ + SWFDEC_AS_VALUE_SET_OBJECT ((val), _o); \ + } \ +} G_STMT_END + +#define SWFDEC_AS_VALUE_IS_MOVIE(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_MOVIE) +#define SWFDEC_AS_VALUE_GET_MOVIE(val) (((SwfdecAsMovieValue *) SWFDEC_AS_VALUE_GET_VALUE (val))->movie ? \ + ((SwfdecAsMovieValue *) SWFDEC_AS_VALUE_GET_VALUE (val))->movie : swfdec_as_movie_value_get (SWFDEC_AS_VALUE_GET_VALUE (val))) +#define SWFDEC_AS_VALUE_FROM_MOVIE(m) SWFDEC_AS_VALUE_COMBINE (m->as_value, SWFDEC_AS_TYPE_MOVIE) +#define SWFDEC_AS_VALUE_SET_MOVIE(val,m) G_STMT_START { \ + SwfdecMovie *__m = (m); \ + g_assert (SWFDEC_IS_MOVIE (__m)); \ + g_assert (__m->as_value); \ + *(val) = SWFDEC_AS_VALUE_FROM_MOVIE (__m); \ +} G_STMT_END /* swfdec_as_context.c */ gboolean swfdec_as_context_check_continue (SwfdecAsContext * context); +void swfdec_as_context_return (SwfdecAsContext * context, + SwfdecAsValue * return_value); void swfdec_as_context_run (SwfdecAsContext * context); void swfdec_as_context_run_init_script (SwfdecAsContext * context, const guint8 * data, gsize length, guint version); +void swfdec_as_context_gc_alloc (SwfdecAsContext * context, + gsize size); +#define swfdec_as_context_gc_new(context,type) ((type *)swfdec_as_context_gc_alloc ((context), sizeof (type))) /* swfdec_as_object.c */ typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove; typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint flags, gpointer data); +void swfdec_as_object_free (SwfdecAsContext * context, + SwfdecAsObject * object); SwfdecAsValue * swfdec_as_object_peek_variable (SwfdecAsObject * object, const char * name); guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, @@ -70,10 +102,18 @@ void swfdec_as_object_add_native_variable (SwfdecAsObject * object, const char * variable, SwfdecAsNative get, SwfdecAsNative set); -void swfdec_as_object_set_constructor_by_name - (SwfdecAsObject * object, + +/* swfdec_as_native_function.h */ +SwfdecAsFunction * + swfdec_as_native_function_new_bare + (SwfdecAsContext * context, const char * name, - ...) G_GNUC_NULL_TERMINATED; + SwfdecAsNative native); + +/* swfdec_as_array.h */ +void swfdec_as_array_remove_range (SwfdecAsObject * object, + gint32 start_index, + gint32 num); G_END_DECLS diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c index b29ca507..525d824b 100644 --- a/swfdec/swfdec_as_interpret.c +++ b/swfdec/swfdec_as_interpret.c @@ -63,8 +63,9 @@ static void swfdec_action_stop (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) - SWFDEC_SPRITE_MOVIE (cx->frame->target)->playing = FALSE; + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) + SWFDEC_SPRITE_MOVIE (target)->playing = FALSE; else SWFDEC_ERROR ("no movie to stop"); } @@ -72,8 +73,9 @@ swfdec_action_stop (SwfdecAsContext *cx, guint action, const guint8 *data, guint static void swfdec_action_play (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) - SWFDEC_SPRITE_MOVIE (cx->frame->target)->playing = TRUE; + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE(target)) + SWFDEC_SPRITE_MOVIE (target)->playing = TRUE; else SWFDEC_ERROR ("no movie to play"); } @@ -81,8 +83,9 @@ swfdec_action_play (SwfdecAsContext *cx, guint action, const guint8 *data, guint static void swfdec_action_next_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) { + SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (target); if (movie->frame < movie->n_frames) { swfdec_sprite_movie_goto (movie, movie->frame + 1); movie->playing = FALSE; @@ -97,8 +100,9 @@ swfdec_action_next_frame (SwfdecAsContext *cx, guint action, const guint8 *data, static void swfdec_action_previous_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) { + SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (target); if (movie->frame > 1) { swfdec_sprite_movie_goto (movie, movie->frame - 1); movie->playing = FALSE; @@ -113,6 +117,7 @@ swfdec_action_previous_frame (SwfdecAsContext *cx, guint action, const guint8 *d static void swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecMovie *target; guint frame; if (len != 2) { @@ -120,8 +125,9 @@ swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, return; } frame = data[0] | (data[1] << 8); - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) { + SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (target); swfdec_sprite_movie_goto (movie, frame + 1); movie->playing = FALSE; } else { @@ -132,13 +138,15 @@ swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, static void swfdec_action_goto_label (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecMovie *target; if (!memchr (data, 0, len)) { SWFDEC_ERROR ("GotoLabel action does not specify a string"); return; } - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) { + SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (target); int frame; if (movie->sprite == NULL || (frame = swfdec_sprite_get_frame (movie->sprite, (const char *) data)) == -1) @@ -158,20 +166,20 @@ swfdec_value_to_frame (SwfdecAsContext *cx, SwfdecSpriteMovie *movie, SwfdecAsVa if (movie->sprite == NULL) return 0; - if (SWFDEC_AS_VALUE_IS_STRING (val)) { - const char *name = SWFDEC_AS_VALUE_GET_STRING (val); + if (SWFDEC_AS_VALUE_IS_STRING (*val)) { + const char *name = SWFDEC_AS_VALUE_GET_STRING (*val); double d; if (strchr (name, ':')) { SWFDEC_ERROR ("FIXME: handle targets"); } /* treat valid encoded numbers as numbers, otherwise assume it's a frame label */ - d = swfdec_as_value_to_number (cx, val); + d = swfdec_as_value_to_number (cx, *val); if (isnan (d)) frame = swfdec_sprite_get_frame (movie->sprite, name) + 1; else frame = d; - } else if (SWFDEC_AS_VALUE_IS_NUMBER (val)) { - frame = swfdec_as_value_to_integer (cx, val); + } else if (SWFDEC_AS_VALUE_IS_NUMBER (*val)) { + frame = swfdec_as_value_to_integer (cx, *val); } else { SWFDEC_WARNING ("cannot convert value to frame number"); /* FIXME: how do we treat undefined etc? */ @@ -187,6 +195,7 @@ swfdec_action_goto_frame2 (SwfdecAsContext *cx, guint action, const guint8 *data guint bias; gboolean play; SwfdecAsValue *val; + SwfdecMovie *target; swfdec_bits_init_data (&bits, data, len); if (swfdec_bits_getbits (&bits, 6)) { @@ -199,8 +208,9 @@ swfdec_action_goto_frame2 (SwfdecAsContext *cx, guint action, const guint8 *data } val = swfdec_as_stack_peek (cx, 1); /* now set it */ - if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + target = swfdec_as_frame_get_target (cx->frame); + if (SWFDEC_IS_SPRITE_MOVIE (target)) { + SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (target); guint frame = swfdec_value_to_frame (cx, movie, val); if (frame > 0) { frame += bias; @@ -240,18 +250,20 @@ static void swfdec_action_wait_for_frame2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecSpriteMovie *movie; + SwfdecMovie *target; int frame, loaded; if (len < 1) { SWFDEC_ERROR ("WaitForFrame2 needs a 1-byte data"); return; } - if (!SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { + target = swfdec_as_frame_get_target (cx->frame); + if (!SWFDEC_IS_SPRITE_MOVIE (target)) { SWFDEC_ERROR ("no movie for WaitForFrame"); return; } - movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + movie = SWFDEC_SPRITE_MOVIE (target); frame = swfdec_value_to_frame (cx, movie, swfdec_as_stack_pop (cx)); loaded = swfdec_sprite_movie_get_frames_loaded (movie); if (loaded < (int) movie->n_frames && @@ -263,6 +275,7 @@ static void swfdec_action_wait_for_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecSpriteMovie *movie; + SwfdecMovie *target; guint jump; int frame, loaded; @@ -270,12 +283,13 @@ swfdec_action_wait_for_frame (SwfdecAsContext *cx, guint action, const guint8 *d SWFDEC_ERROR ("WaitForFrame action length invalid (is %u, should be 3", len); return; } - if (!SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) { + target = swfdec_as_frame_get_target (cx->frame); + if (!SWFDEC_IS_SPRITE_MOVIE (target)) { SWFDEC_ERROR ("no movie for WaitForFrame"); return; } - movie = SWFDEC_SPRITE_MOVIE (cx->frame->target); + movie = SWFDEC_SPRITE_MOVIE (target); frame = data[0] | (data[1] << 8); jump = data[2]; loaded = swfdec_sprite_movie_get_frames_loaded (movie); @@ -328,7 +342,7 @@ swfdec_action_push (SwfdecAsContext *cx, guint action, const guint8 *data, guint break; } case 1: /* float */ - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_push (cx), + *swfdec_as_stack_push (cx) = swfdec_as_value_from_number (cx, swfdec_bits_get_float (&bits)); break; case 2: /* null */ @@ -353,11 +367,11 @@ swfdec_action_push (SwfdecAsContext *cx, guint action, const guint8 *data, guint swfdec_bits_get_u8 (&bits) ? TRUE : FALSE); break; case 6: /* double */ - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_push (cx), + *swfdec_as_stack_push (cx) = swfdec_as_value_from_number (cx, swfdec_bits_get_double (&bits)); break; case 7: /* 32bit int */ - SWFDEC_AS_VALUE_SET_INT (swfdec_as_stack_push (cx), + *swfdec_as_stack_push (cx) = swfdec_as_value_from_integer (cx, swfdec_bits_get_s32 (&bits)); break; case 8: /* 8bit ConstantPool address */ @@ -394,34 +408,36 @@ super_special_movie_lookup_magic (SwfdecAsContext *cx, SwfdecAsObject *o, const SwfdecAsValue val; if (o == NULL) { - o = swfdec_as_frame_get_variable (cx->frame, name, NULL); + o = swfdec_as_frame_get_variable (cx, cx->frame, name, NULL); if (o == NULL) return NULL; } - if (SWFDEC_IS_MOVIE (o)) { - SwfdecMovie *ret = swfdec_movie_get_by_name (SWFDEC_MOVIE (o), name, TRUE); + if (o->movie) { + SwfdecMovie *ret = swfdec_movie_get_by_name (SWFDEC_MOVIE (o->relay), name, TRUE); if (ret) - return SWFDEC_AS_OBJECT (ret); + return swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (ret)); } if (!swfdec_as_object_get_variable (o, name, &val)) return NULL; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (val)) return NULL; - return SWFDEC_AS_VALUE_GET_OBJECT (&val); + return SWFDEC_AS_VALUE_GET_COMPOSITE (val); } static SwfdecAsObject * swfdec_action_get_movie_by_slash_path (SwfdecAsContext *cx, const char *path) { + SwfdecMovie *movie; SwfdecAsObject *o; - o = cx->frame->target; - if (!SWFDEC_IS_MOVIE (o)) + movie = swfdec_as_frame_get_target (cx->frame); + if (movie == NULL) return NULL; if (*path == '/') { - o = SWFDEC_AS_OBJECT (swfdec_movie_get_root (SWFDEC_MOVIE (o))); + movie = swfdec_movie_get_root (movie); path++; } + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); while (*path) { char *slash = strchr (path, '/'); const char *name; @@ -435,7 +451,7 @@ swfdec_action_get_movie_by_slash_path (SwfdecAsContext *cx, const char *path) path += strlen (path); } o = super_special_movie_lookup_magic (cx, o, name); - if (!SWFDEC_IS_MOVIE (o)) + if (o == NULL || !o->movie) return NULL; } return o; @@ -448,20 +464,24 @@ swfdec_action_lookup_object (SwfdecAsContext *cx, SwfdecAsObject *o, const char const char *start; if (path == end) { - if (o == NULL) - o = cx->frame->target; - if (SWFDEC_IS_MOVIE (o)) - return o; - else - return NULL; + if (o == NULL) { + SwfdecMovie *movie = swfdec_as_frame_get_target (cx->frame); + if (movie) + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); + } + return o; } if (path[0] == '/') { - if (o == NULL) - o = cx->frame->target; - if (!SWFDEC_IS_MOVIE (o)) - return NULL; - o = SWFDEC_AS_OBJECT (swfdec_movie_get_root (SWFDEC_MOVIE (o))); + if (o == NULL) { + SwfdecMovie *movie = swfdec_as_frame_get_target (cx->frame); + if (movie) { + movie = swfdec_movie_get_root (movie); + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); + } else { + return NULL; + } + } path++; dot_allowed = FALSE; } @@ -490,23 +510,30 @@ swfdec_action_lookup_object (SwfdecAsContext *cx, SwfdecAsObject *o, const char /* parse variable */ if (start[0] == '.' && start[1] == '.' && start + 2 == path) { + SwfdecMovie *movie; + /* ".." goes back to parent */ if (o == NULL) { GSList *walk; for (walk = cx->frame->scope_chain; walk; walk = walk->next) { - if (SWFDEC_IS_MOVIE (walk->data)) { - o = walk->data; + o = walk->data; + if (o->movie) { + movie = SWFDEC_MOVIE (o->relay); break; } } - if (o == NULL) - o = cx->frame->target; - } - /* ".." goes back to parent */ - if (!SWFDEC_IS_MOVIE (o)) + if (walk == NULL) + movie = swfdec_as_frame_get_target (cx->frame); + if (movie == NULL) + return NULL; + } else if (o->movie) { + movie = SWFDEC_MOVIE (o->relay); + } else { return NULL; - o = SWFDEC_AS_OBJECT (SWFDEC_MOVIE (o)->parent); - if (o == NULL) + } + movie = movie->parent; + if (movie == NULL) return NULL; + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); } else { o = super_special_movie_lookup_magic (cx, o, swfdec_as_context_give_string (cx, g_strndup (start, path - start))); @@ -528,10 +555,9 @@ swfdec_player_get_movie_from_value (SwfdecPlayer *player, SwfdecAsValue *val) const char *s; g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (val), NULL); cx = SWFDEC_AS_CONTEXT (player); - s = swfdec_as_value_to_string (cx, val); + s = swfdec_as_value_to_string (cx, *val); return swfdec_player_get_movie_from_string (player, s); } @@ -544,11 +570,11 @@ swfdec_player_get_movie_from_string (SwfdecPlayer *player, const char *s) g_return_val_if_fail (s != NULL, NULL); ret = swfdec_action_lookup_object (SWFDEC_AS_CONTEXT (player), NULL, s, s + strlen (s)); - if (!SWFDEC_IS_MOVIE (ret)) { + if (ret == NULL || !ret->movie) { SWFDEC_WARNING ("\"%s\" does not reference a movie", s); return NULL; } - return SWFDEC_MOVIE (ret); + return SWFDEC_MOVIE (ret->relay); } /** @@ -624,16 +650,16 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat SwfdecAsObject *object; val = swfdec_as_stack_peek (cx, 1); - s = swfdec_as_value_to_string (cx, val); + s = swfdec_as_value_to_string (cx, *val); if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) { if (object) { if (s) { swfdec_as_object_get_variable (object, swfdec_as_context_get_string (cx, s), val); } else { - SWFDEC_AS_VALUE_SET_OBJECT (val, object); + SWFDEC_AS_VALUE_SET_MOVIE (val, SWFDEC_MOVIE (object->relay)); } } else { - swfdec_as_frame_get_variable (cx->frame, swfdec_as_context_get_string (cx, s), val); + swfdec_as_frame_get_variable (cx, cx->frame, swfdec_as_context_get_string (cx, s), val); } } else { SWFDEC_AS_VALUE_SET_UNDEFINED (val); @@ -649,7 +675,7 @@ swfdec_action_set_variable (SwfdecAsContext *cx, guint action, const guint8 *dat const char *s, *rest; SwfdecAsObject *object; - s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); + s = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); if (swfdec_action_get_movie_by_path (cx, s, &object, &rest)) { if (object && rest) { swfdec_as_object_set_variable (object, swfdec_as_context_get_string (cx, rest), @@ -659,7 +685,7 @@ swfdec_action_set_variable (SwfdecAsContext *cx, guint action, const guint8 *dat rest = s; else rest = swfdec_as_context_get_string (cx, rest); - swfdec_as_frame_set_variable (cx->frame, rest, + swfdec_as_frame_set_variable (cx, cx->frame, rest, swfdec_as_stack_peek (cx, 1), TRUE, FALSE); } } @@ -672,7 +698,7 @@ swfdec_action_get_property (SwfdecAsContext *cx, guint action, const guint8 *dat SwfdecMovie *movie; guint id; - id = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); + id = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); if (!SWFDEC_IS_PLAYER (cx)) { SWFDEC_INFO ("tried using GetProperty in a non-SwfdecPlayer context"); movie = NULL; @@ -687,7 +713,7 @@ swfdec_action_get_property (SwfdecAsContext *cx, guint action, const guint8 *dat SWFDEC_WARNING ("trying to GetProperty %u, doesn't exist", id); SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx, 2)); } else { - swfdec_movie_property_get (movie, id, swfdec_as_stack_peek (cx, 2)); + *swfdec_as_stack_peek (cx, 2) = swfdec_movie_property_get (movie, id); } swfdec_as_stack_pop (cx); } @@ -698,7 +724,7 @@ swfdec_action_set_property (SwfdecAsContext *cx, guint action, const guint8 *dat SwfdecMovie *movie; guint id; - id = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); + id = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); if (!SWFDEC_IS_PLAYER (cx)) { SWFDEC_INFO ("tried using GetProperty in a non-SwfdecPlayer context"); movie = NULL; @@ -711,7 +737,7 @@ swfdec_action_set_property (SwfdecAsContext *cx, guint action, const guint8 *dat } else if (id > (cx->version > 4 ? 21 : 18)) { SWFDEC_WARNING ("trying to SetProperty %u, doesn't exist", id); } else { - swfdec_movie_property_set (movie, id, swfdec_as_stack_peek (cx, 1)); + swfdec_movie_property_set (movie, id, *swfdec_as_stack_peek (cx, 1)); } swfdec_as_stack_pop_n (cx, 3); } @@ -719,14 +745,15 @@ swfdec_action_set_property (SwfdecAsContext *cx, guint action, const guint8 *dat static void swfdec_action_get_member (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - SwfdecAsObject *object = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 2)); + SwfdecAsObject *object = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 2)); if (object) { const char *name; - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); swfdec_as_object_get_variable (object, name, swfdec_as_stack_peek (cx, 2)); #ifdef SWFDEC_WARN_MISSING_PROPERTIES - if (SWFDEC_AS_VALUE_IS_UNDEFINED (swfdec_as_stack_peek (cx, 2))) { - SWFDEC_WARNING ("no variable named %s:%s", G_OBJECT_TYPE_NAME (object), name); + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*swfdec_as_stack_peek (cx, 2))) { + SWFDEC_WARNING ("no variable named %s:%s", + object->relay ? G_OBJECT_TYPE_NAME (object->relay) : ":", name); } #endif } else { @@ -738,10 +765,11 @@ swfdec_action_get_member (SwfdecAsContext *cx, guint action, const guint8 *data, static void swfdec_action_set_member (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (cx, 3))) { - const char *name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); - swfdec_as_object_set_variable (SWFDEC_AS_VALUE_GET_OBJECT (swfdec_as_stack_peek (cx, 3)), - name, swfdec_as_stack_peek (cx, 1)); + const char *name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*swfdec_as_stack_peek (cx, 3))) { + SwfdecAsObject *o = SWFDEC_AS_VALUE_GET_COMPOSITE (*swfdec_as_stack_peek (cx, 3)); + if (o) + swfdec_as_object_set_variable (o, name, swfdec_as_stack_peek (cx, 1)); } swfdec_as_stack_pop_n (cx, 3); } @@ -753,10 +781,10 @@ swfdec_action_trace (SwfdecAsContext *cx, guint action, const guint8 *data, guin const char *s; val = swfdec_as_stack_peek (cx, 1); - if (val->type == SWFDEC_AS_TYPE_UNDEFINED) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*val)) { s = SWFDEC_AS_STR_undefined; } else { - s = swfdec_as_value_to_string (cx, val); + s = swfdec_as_value_to_string (cx, *val); } swfdec_as_stack_pop (cx); g_signal_emit_by_name (cx, "trace", s); @@ -770,15 +798,15 @@ swfdec_action_call (SwfdecAsContext *cx, guint n_args, SwfdecAsObject *super) SwfdecAsFunction *fun; SwfdecAsObject *thisp; - if (!SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (cx, 1))) + if (!SWFDEC_AS_VALUE_IS_OBJECT (*swfdec_as_stack_peek (cx, 1))) goto error; - fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (swfdec_as_stack_peek (cx, 1)); + fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (*swfdec_as_stack_peek (cx, 1))->relay); if (!SWFDEC_IS_AS_FUNCTION (fun)) goto error; - if (!SWFDEC_AS_VALUE_IS_OBJECT (swfdec_as_stack_peek (cx, 2))) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (*swfdec_as_stack_peek (cx, 2))) { thisp = NULL; } else { - thisp = SWFDEC_AS_VALUE_GET_OBJECT (swfdec_as_stack_peek (cx, 2)); + thisp = SWFDEC_AS_VALUE_GET_COMPOSITE (*swfdec_as_stack_peek (cx, 2)); } swfdec_as_stack_pop_n (cx, 2); /* sanitize argument count */ @@ -810,13 +838,13 @@ swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *da SwfdecAsValue *fun, *thisp; swfdec_as_stack_ensure_size (cx, 2); - n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); thisp = swfdec_as_stack_peek (cx, 2); fun = swfdec_as_stack_peek (cx, 1); - obj = swfdec_as_frame_get_variable (frame, name, fun); + obj = swfdec_as_frame_get_variable (cx, frame, name, fun); if (obj) { - SWFDEC_AS_VALUE_SET_OBJECT (thisp, obj); + SWFDEC_AS_VALUE_SET_COMPOSITE (thisp, obj); } else { SWFDEC_AS_VALUE_SET_NULL (thisp); SWFDEC_AS_VALUE_SET_UNDEFINED (fun); @@ -836,24 +864,24 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data const char *name; swfdec_as_stack_ensure_size (cx, 3); - obj = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 2)); - n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 3)); + obj = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 2)); + n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 3)); val = swfdec_as_stack_peek (cx, 1); if (obj) { - name = swfdec_as_value_to_string (cx, val); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (val) || + name = swfdec_as_value_to_string (cx, *val); + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*val) || name == SWFDEC_AS_STR_EMPTY) { SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx, 3)); - SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (cx, 2), obj); + SWFDEC_AS_VALUE_SET_COMPOSITE (swfdec_as_stack_peek (cx, 2), obj); name = ""; pobj = obj; } else { - SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_peek (cx, 3), obj); + SWFDEC_AS_VALUE_SET_COMPOSITE (swfdec_as_stack_peek (cx, 3), obj); swfdec_as_object_get_variable_and_flags (obj, name, swfdec_as_stack_peek (cx, 2), NULL, &pobj); } } else { - if (SWFDEC_AS_VALUE_IS_STRING (val)) - name = SWFDEC_AS_VALUE_GET_STRING (val); + if (SWFDEC_AS_VALUE_IS_STRING (*val)) + name = SWFDEC_AS_VALUE_GET_STRING (*val); else name = "???"; SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_peek (cx, 3)); @@ -861,8 +889,8 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data } swfdec_as_stack_pop (cx); /* setup super to point to the right prototype */ - if (SWFDEC_IS_AS_SUPER (obj)) { - super = swfdec_as_super_resolve_property (SWFDEC_AS_SUPER (obj), name); + if (obj && SWFDEC_IS_AS_SUPER (obj->relay)) { + super = swfdec_as_super_resolve_property (SWFDEC_AS_SUPER (obj->relay), name); } else if (cx->version > 6 && pobj != obj) { super = pobj; } else if (obj) { @@ -872,7 +900,7 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data } if (!swfdec_action_call (cx, n_args, super)) { SWFDEC_WARNING ("no function named \"%s\" on object %s", name, - obj ? G_OBJECT_TYPE_NAME(obj) : "unknown"); + obj && obj->relay ? G_OBJECT_TYPE_NAME(obj->relay) : "unknown"); } } @@ -887,8 +915,8 @@ swfdec_action_binary (SwfdecAsContext *cx, guint action, const guint8 *data, gui { double l, r; - r = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)); - l = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)); + r = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)); + l = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2)); switch (action) { case SWFDEC_AS_ACTION_ADD: l = l + r; @@ -923,7 +951,7 @@ swfdec_action_binary (SwfdecAsContext *cx, guint action, const guint8 *data, gui break; } swfdec_as_stack_pop (cx); - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), l); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_number (cx, l); } static void @@ -932,17 +960,15 @@ swfdec_action_add2_to_primitive (SwfdecAsValue *value) SwfdecAsObject *object; const char *name; - if (!SWFDEC_AS_VALUE_IS_OBJECT (value)) - return; - object = SWFDEC_AS_VALUE_GET_OBJECT (value); - if (SWFDEC_IS_MOVIE (object)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (*value)) return; + object = SWFDEC_AS_VALUE_GET_OBJECT (*value); - if (SWFDEC_IS_AS_DATE (object) && swfdec_gc_object_get_context (object)->version > 5) + if (SWFDEC_IS_AS_DATE (object->relay) && object->context->version > 5) name = SWFDEC_AS_STR_toString; else name = SWFDEC_AS_STR_valueOf; - swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (value), name, 0, NULL, value); + swfdec_as_object_call (object, name, 0, NULL, value); } static void @@ -955,26 +981,26 @@ swfdec_action_add2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint rtmp = *rval; ltmp = *lval; swfdec_action_add2_to_primitive (&rtmp); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&rtmp) || SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&rtmp))) + if (!SWFDEC_AS_VALUE_IS_OBJECT (rtmp)) rval = &rtmp; swfdec_action_add2_to_primitive (<mp); - if (!SWFDEC_AS_VALUE_IS_OBJECT (<mp) || SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (<mp))) + if (!SWFDEC_AS_VALUE_IS_OBJECT (ltmp)) lval = <mp; - if (SWFDEC_AS_VALUE_IS_STRING (lval) || SWFDEC_AS_VALUE_IS_STRING (rval)) { + if (SWFDEC_AS_VALUE_IS_STRING (*lval) || SWFDEC_AS_VALUE_IS_STRING (*rval)) { const char *lstr, *rstr; - lstr = swfdec_as_value_to_string (cx, lval); - rstr = swfdec_as_value_to_string (cx, rval); + lstr = swfdec_as_value_to_string (cx, *lval); + rstr = swfdec_as_value_to_string (cx, *rval); lstr = swfdec_as_str_concat (cx, lstr, rstr); swfdec_as_stack_pop (cx); SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_peek (cx, 1), lstr); } else { double d, d2; - d = swfdec_as_value_to_number (cx, lval); - d2 = swfdec_as_value_to_number (cx, rval); + d = swfdec_as_value_to_number (cx, *lval); + d2 = swfdec_as_value_to_number (cx, *rval); d += d2; swfdec_as_stack_pop (cx); - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), d); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_number (cx, d); } } @@ -994,33 +1020,31 @@ swfdec_action_new_comparison (SwfdecAsContext *cx, guint action, const guint8 *d rval = tmp; } /* comparison with object is always false */ - swfdec_as_value_to_primitive (lval); - if (SWFDEC_AS_VALUE_IS_OBJECT (lval) && - !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (lval))) { + *lval = swfdec_as_value_to_primitive (*lval); + if (SWFDEC_AS_VALUE_IS_OBJECT (*lval)) { swfdec_as_stack_pop (cx); SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), FALSE); return; } /* same for the rval */ - swfdec_as_value_to_primitive (rval); - if (SWFDEC_AS_VALUE_IS_OBJECT (rval) && - !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (rval))) { + *rval = swfdec_as_value_to_primitive (*rval); + if (SWFDEC_AS_VALUE_IS_OBJECT (*rval)) { swfdec_as_stack_pop (cx); SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), FALSE); return; } /* movieclips are not objects, but they evaluate to NaN, so we can handle them here */ - if (SWFDEC_AS_VALUE_IS_OBJECT (rval) || - SWFDEC_AS_VALUE_IS_OBJECT (lval)) { + if (SWFDEC_AS_VALUE_IS_MOVIE (*rval) || + SWFDEC_AS_VALUE_IS_MOVIE (*lval)) { swfdec_as_stack_pop (cx); SWFDEC_AS_VALUE_SET_UNDEFINED (swfdec_as_stack_peek (cx, 1)); return; } /* if both are strings, compare strings */ - if (SWFDEC_AS_VALUE_IS_STRING (rval) && - SWFDEC_AS_VALUE_IS_STRING (lval)) { - const char *ls = SWFDEC_AS_VALUE_GET_STRING (lval); - const char *rs = SWFDEC_AS_VALUE_GET_STRING (rval); + if (SWFDEC_AS_VALUE_IS_STRING (*rval) && + SWFDEC_AS_VALUE_IS_STRING (*lval)) { + const char *ls = SWFDEC_AS_VALUE_GET_STRING (*lval); + const char *rs = SWFDEC_AS_VALUE_GET_STRING (*rval); int cmp; if (ls == SWFDEC_AS_STR_EMPTY) { cmp = rs == SWFDEC_AS_STR_EMPTY ? 0 : 1; @@ -1034,8 +1058,8 @@ swfdec_action_new_comparison (SwfdecAsContext *cx, guint action, const guint8 *d return; } /* convert to numbers and compare those */ - l = swfdec_as_value_to_number (cx, lval); - r = swfdec_as_value_to_number (cx, rval); + l = swfdec_as_value_to_number (cx, *lval); + r = swfdec_as_value_to_number (cx, *rval); swfdec_as_stack_pop (cx); /* NaN results in undefined */ if (isnan (l) || isnan (r)) { @@ -1049,11 +1073,11 @@ static void swfdec_action_not (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { if (cx->version <= 4) { - double d = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)); - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), d == 0 ? 1 : 0); + double d = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_integer (cx, d == 0 ? 1 : 0); } else { SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), - !swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1))); + !swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1))); } } @@ -1077,7 +1101,7 @@ swfdec_action_if (SwfdecAsContext *cx, guint action, const guint8 *data, guint l SWFDEC_ERROR ("If action length invalid (is %u, should be 2)", len); return; } - if (swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1))) { + if (swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1))) { gint16 offset = data[0] | (data[1] << 8); cx->frame->pc += 5 + (int) offset; } @@ -1090,7 +1114,7 @@ swfdec_action_decrement (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsValue *val; val = swfdec_as_stack_peek (cx, 1); - SWFDEC_AS_VALUE_SET_NUMBER (val, swfdec_as_value_to_number (cx, val) - 1); + *val = swfdec_as_value_from_number (cx, swfdec_as_value_to_number (cx, *val) - 1); } static void @@ -1099,24 +1123,26 @@ swfdec_action_increment (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsValue *val; val = swfdec_as_stack_peek (cx, 1); - SWFDEC_AS_VALUE_SET_NUMBER (val, swfdec_as_value_to_number (cx, val) + 1); + *val = swfdec_as_value_from_number (cx, swfdec_as_value_to_number (cx, *val) + 1); } static void swfdec_action_get_url (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecBits bits; - char *url, *target; + char *url, *t; + const char *target; swfdec_bits_init_data (&bits, data, len); url = swfdec_bits_get_string (&bits, cx->version); - target = swfdec_bits_get_string (&bits, cx->version); - if (url == NULL || target == NULL) { + t = swfdec_bits_get_string (&bits, cx->version); + if (url == NULL || t == NULL) { SWFDEC_ERROR ("not enough data in GetURL"); g_free (url); - g_free (target); + g_free (t); return; } + target = swfdec_as_context_give_string (cx, t); if (swfdec_bits_left (&bits)) { SWFDEC_WARNING ("leftover bytes in GetURL action"); } @@ -1126,19 +1152,22 @@ swfdec_action_get_url (SwfdecAsContext *cx, guint action, const guint8 *data, gu swfdec_resource_load (SWFDEC_PLAYER (cx), target, url, NULL); } g_free (url); - g_free (target); } static void -swfdec_as_interpret_load_variables_on_finish (SwfdecAsObject *target, - const char *text) +swfdec_as_interpret_load_variables_on_finish (SwfdecPlayer *player, + const SwfdecAsValue *val, const char *text) { + SwfdecMovie *movie = SWFDEC_AS_VALUE_GET_MOVIE (*val); + + if (movie == NULL) + return; + if (text != NULL) - swfdec_as_object_decode (target, text); + swfdec_as_object_decode (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)), text); // only call onData for sprite movies - // FIXME: is it called even when loading fails? - swfdec_actor_queue_script (SWFDEC_ACTOR (target), SWFDEC_EVENT_DATA); + swfdec_actor_queue_script (SWFDEC_ACTOR (movie), SWFDEC_EVENT_DATA); } static gboolean @@ -1149,7 +1178,7 @@ swfdec_as_interpret_encode_variables_foreach (SwfdecAsObject *object, GString *variables = data; char *escaped; - context = swfdec_gc_object_get_context (object); + context = object->context; // FIXME: check propflags? if (variables->len > 0) @@ -1162,7 +1191,7 @@ swfdec_as_interpret_encode_variables_foreach (SwfdecAsObject *object, g_string_append_c (variables, '='); escaped = swfdec_as_string_escape (context, - swfdec_as_value_to_string (context, value)); + swfdec_as_value_to_string (context, *value)); g_string_append (variables, escaped); g_free (escaped); @@ -1187,6 +1216,7 @@ swfdec_action_get_url2 (SwfdecAsContext *cx, guint action, const guint8 *data, g const char *target, *url; guint method, internal, variables; SwfdecBuffer *buffer; + SwfdecAsValue val; if (len != 1) { SWFDEC_ERROR ("GetURL2 requires 1 byte of data, not %u", len); @@ -1201,11 +1231,19 @@ swfdec_action_get_url2 (SwfdecAsContext *cx, guint action, const guint8 *data, g internal = data[0] & 64; variables = data[0] & 128; - url = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); + url = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); buffer = NULL; if (method == 1 || method == 2) { - char *text = swfdec_as_interpret_encode_variables (cx->frame->target); + SwfdecMovie *movie; + char *text; + + movie = swfdec_as_frame_get_target (cx->frame); + if (movie == NULL) { + SWFDEC_FIXME ("no target, what do we encode now?"); + return; + } + text = swfdec_as_interpret_encode_variables (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie))); if (method == 1) { url = swfdec_as_context_give_string (cx, g_strjoin (NULL, url, strchr (url, '?') == NULL ? "?" : "&", text, NULL)); @@ -1222,17 +1260,18 @@ swfdec_action_get_url2 (SwfdecAsContext *cx, guint action, const guint8 *data, g } else if (variables) { SwfdecMovie *movie; - target = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + target = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); movie = swfdec_player_get_movie_from_string (SWFDEC_PLAYER (cx), target); if (movie != NULL) { - swfdec_load_object_create (SWFDEC_AS_OBJECT (movie), url, buffer, 0, + SWFDEC_AS_VALUE_SET_MOVIE (&val, movie); + swfdec_load_object_create (SWFDEC_PLAYER (cx), &val, url, buffer, 0, NULL, NULL, NULL, swfdec_as_interpret_load_variables_on_finish); } } else if (internal) { swfdec_resource_load_movie (SWFDEC_PLAYER (cx), swfdec_as_stack_peek (cx, 1), url, NULL, NULL); } else { - target = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + target = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); swfdec_resource_load (SWFDEC_PLAYER (cx), target, url, buffer); } @@ -1244,8 +1283,8 @@ swfdec_action_string_add (SwfdecAsContext *cx, guint action, const guint8 *data, { const char *lval, *rval; - rval = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); - lval = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); + rval = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); + lval = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); lval = swfdec_as_str_concat (cx, lval, rval); SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_peek (cx, 2), lval); swfdec_as_stack_pop (cx); @@ -1266,12 +1305,12 @@ swfdec_action_random_number (SwfdecAsContext *cx, guint action, const guint8 *da SwfdecAsValue *val; val = swfdec_as_stack_peek (cx, 1); - max = swfdec_as_value_to_integer (cx, val); + max = swfdec_as_value_to_integer (cx, *val); if (max <= 0) - SWFDEC_AS_VALUE_SET_NUMBER (val, 0); + *val = swfdec_as_value_from_number (cx, 0); else - SWFDEC_AS_VALUE_SET_NUMBER (val, g_rand_int_range (cx->rand, 0, max)); + *val = swfdec_as_value_from_number (cx, g_rand_int_range (cx->rand, 0, max)); } static void @@ -1280,8 +1319,8 @@ swfdec_action_old_compare (SwfdecAsContext *cx, guint action, const guint8 *data double l, r; gboolean cond; - l = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)); - r = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)); + l = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2)); + r = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)); switch (action) { case SWFDEC_AS_ACTION_EQUALS: cond = l == r; @@ -1295,7 +1334,7 @@ swfdec_action_old_compare (SwfdecAsContext *cx, guint action, const guint8 *data } swfdec_as_stack_pop (cx); if (cx->version < 5) { - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), cond ? 1 : 0); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_integer (cx, cond ? 1 : 0); } else { SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), cond); } @@ -1307,9 +1346,9 @@ swfdec_action_string_extract (SwfdecAsContext *cx, guint action, const guint8 *d int start, n, left; const char *s; - n = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); - start = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); - s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 3)); + n = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); + start = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); + s = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 3)); swfdec_as_stack_pop_n (cx, 2); left = g_utf8_strlen (s, -1); if (start > left) { @@ -1335,8 +1374,8 @@ swfdec_action_string_length (SwfdecAsContext *cx, guint action, const guint8 *da SwfdecAsValue *v; v = swfdec_as_stack_peek (cx, 1); - s = swfdec_as_value_to_string (cx, v); - SWFDEC_AS_VALUE_SET_INT (v, g_utf8_strlen (s, -1)); + s = swfdec_as_value_to_string (cx, *v); + *v = swfdec_as_value_from_integer (cx, g_utf8_strlen (s, -1)); } static void @@ -1345,8 +1384,8 @@ swfdec_action_string_compare (SwfdecAsContext *cx, guint action, const guint8 *d const char *l, *r; gboolean cond; - r = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); - l = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); + r = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); + l = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); switch (action) { case SWFDEC_AS_ACTION_STRING_EQUALS: cond = l == r; @@ -1364,7 +1403,7 @@ swfdec_action_string_compare (SwfdecAsContext *cx, guint action, const guint8 *d } swfdec_as_stack_pop (cx); if (cx->version < 5) { - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), cond ? 1 : 0); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_integer (cx, cond ? 1 : 0); } else { SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), cond); } @@ -1381,62 +1420,50 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data, rval = swfdec_as_stack_peek (cx, 1); lval = swfdec_as_stack_peek (cx, 2); - rtmp = *rval; - ltmp = *lval; - swfdec_as_value_to_primitive (&rtmp); - swfdec_as_value_to_primitive (<mp); - ltype = ltmp.type; - rtype = rtmp.type; + rtmp = swfdec_as_value_to_primitive (*rval); + ltmp = swfdec_as_value_to_primitive (*lval); + ltype = SWFDEC_AS_VALUE_GET_TYPE (ltmp); + rtype = SWFDEC_AS_VALUE_GET_TYPE (rtmp); - /* get objects compared */ - if (ltype == SWFDEC_AS_TYPE_OBJECT && rtype == SWFDEC_AS_TYPE_OBJECT) { - SwfdecAsObject *lo = SWFDEC_AS_VALUE_GET_OBJECT (<mp); - SwfdecAsObject *ro = SWFDEC_AS_VALUE_GET_OBJECT (&rtmp); - - if (SWFDEC_IS_MOVIE (lo) && SWFDEC_IS_MOVIE (ro)) { - lo = SWFDEC_AS_OBJECT (swfdec_movie_resolve (SWFDEC_MOVIE (lo))); - ro = SWFDEC_AS_OBJECT (swfdec_movie_resolve (SWFDEC_MOVIE (ro))); - } else if (SWFDEC_IS_MOVIE (lo)) { - swfdec_as_value_to_primitive (rval); - rtype = rval->type; - if (rtype != SWFDEC_AS_TYPE_OBJECT) { - cond = FALSE; - goto out; - } - ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); - } else if (SWFDEC_IS_MOVIE (ro)) { - swfdec_as_value_to_primitive (lval); - ltype = lval->type; - if (ltype != SWFDEC_AS_TYPE_OBJECT) { - cond = FALSE; - goto out; + if (SWFDEC_AS_VALUE_IS_COMPOSITE (ltmp) && SWFDEC_AS_VALUE_IS_COMPOSITE (rtmp)) { + /* get movies compared */ + if (ltype == SWFDEC_AS_TYPE_MOVIE) { + if (rtype == SWFDEC_AS_TYPE_MOVIE) { + rval = &rtmp; + } else { + *rval = swfdec_as_value_to_primitive (*rval); } - lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); - } else { - lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); - ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); + cond = SWFDEC_AS_VALUE_IS_MOVIE (*rval) && + SWFDEC_AS_VALUE_GET_MOVIE (ltmp) == SWFDEC_AS_VALUE_GET_MOVIE (*rval); + goto out; } - cond = lo == ro; + if (rtype == SWFDEC_AS_TYPE_MOVIE) { + *lval = swfdec_as_value_to_primitive (*lval); + cond = SWFDEC_AS_VALUE_IS_MOVIE (*lval) && + SWFDEC_AS_VALUE_GET_MOVIE (rtmp) == SWFDEC_AS_VALUE_GET_MOVIE (*lval); + goto out; + } + + cond = SWFDEC_AS_VALUE_GET_OBJECT (*lval) == SWFDEC_AS_VALUE_GET_OBJECT (*rval); goto out; } /* compare strings */ if (ltype == SWFDEC_AS_TYPE_STRING && rtype == SWFDEC_AS_TYPE_STRING) { - /* FIXME: flash 5 case insensitive? */ - cond = SWFDEC_AS_VALUE_GET_STRING (<mp) == SWFDEC_AS_VALUE_GET_STRING (&rtmp); + cond = SWFDEC_AS_VALUE_GET_STRING (ltmp) == SWFDEC_AS_VALUE_GET_STRING (rtmp); goto out; } /* convert to numbers */ - if (SWFDEC_AS_VALUE_IS_OBJECT (<mp) && !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (<mp))) { - l = swfdec_as_value_to_number (cx, lval); + if (SWFDEC_AS_VALUE_IS_OBJECT (ltmp)) { + l = swfdec_as_value_to_number (cx, *lval); } else { - l = swfdec_as_value_to_number (cx, <mp); + l = swfdec_as_value_to_number (cx, ltmp); } - if (SWFDEC_AS_VALUE_IS_OBJECT (&rtmp) && !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&rtmp))) { - r = swfdec_as_value_to_number (cx, rval); + if (SWFDEC_AS_VALUE_IS_OBJECT (rtmp)) { + r = swfdec_as_value_to_number (cx, *rval); } else { - r = swfdec_as_value_to_number (cx, &rtmp); + r = swfdec_as_value_to_number (cx, rtmp); } /* get rid of undefined and null */ @@ -1449,10 +1476,11 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data, } /* else compare as numbers */ - if (isnan (l) && isnan (r)) - cond = ltype == rtype; - else + if (isnan (l) && isnan (r)) { + cond = (ltype == SWFDEC_AS_TYPE_NUMBER && ltmp == rtmp); + } else { cond = l == r; + } out: swfdec_as_stack_pop (cx); @@ -1469,53 +1497,30 @@ swfdec_action_equals2_6 (SwfdecAsContext *cx, guint action, const guint8 *data, rval = swfdec_as_stack_peek (cx, 1); lval = swfdec_as_stack_peek (cx, 2); - ltype = lval->type; - rtype = rval->type; - - /* get objects compared */ - if (ltype == SWFDEC_AS_TYPE_OBJECT && rtype == SWFDEC_AS_TYPE_OBJECT) { - SwfdecAsObject *lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); - SwfdecAsObject *ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); - - if (SWFDEC_IS_MOVIE (lo) && SWFDEC_IS_MOVIE (ro)) { - lo = SWFDEC_AS_OBJECT (swfdec_movie_resolve (SWFDEC_MOVIE (lo))); - ro = SWFDEC_AS_OBJECT (swfdec_movie_resolve (SWFDEC_MOVIE (ro))); - } else if (SWFDEC_IS_MOVIE (lo)) { - swfdec_as_value_to_primitive (rval); - rtype = rval->type; - if (rtype != SWFDEC_AS_TYPE_OBJECT) { - cond = FALSE; - goto out; - } - ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); - } else if (SWFDEC_IS_MOVIE (ro)) { - swfdec_as_value_to_primitive (lval); - ltype = lval->type; - if (ltype != SWFDEC_AS_TYPE_OBJECT) { - cond = FALSE; - goto out; - } - lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); - } - cond = lo == ro; + /* check objects before anything else */ + if (SWFDEC_AS_VALUE_IS_OBJECT (*lval) && SWFDEC_AS_VALUE_IS_OBJECT (*rval)) { + cond = SWFDEC_AS_VALUE_GET_OBJECT (*lval) == SWFDEC_AS_VALUE_GET_OBJECT (*rval); goto out; } - - /* if one of the values is an object, call valueOf. - * If it's still an object, return FALSE */ - swfdec_as_value_to_primitive (lval); - ltype = lval->type; - if (ltype == SWFDEC_AS_TYPE_OBJECT) { - cond = FALSE; + *lval = swfdec_as_value_to_primitive (*lval); + *rval = swfdec_as_value_to_primitive (*rval); + + /* check if we have equal movieclips */ + if (SWFDEC_AS_VALUE_IS_MOVIE (*lval)) { + cond = SWFDEC_AS_VALUE_IS_MOVIE (*rval) && + SWFDEC_AS_VALUE_GET_MOVIE (*lval) == SWFDEC_AS_VALUE_GET_MOVIE (*rval); goto out; } - swfdec_as_value_to_primitive (rval); - rtype = rval->type; - if (rtype == SWFDEC_AS_TYPE_OBJECT) { + + /* now all composites compare false */ + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*lval) || + SWFDEC_AS_VALUE_IS_COMPOSITE (*rval)) { cond = FALSE; goto out; } - /* now we have a comparison without objects */ + + ltype = SWFDEC_AS_VALUE_GET_TYPE (*lval); + rtype = SWFDEC_AS_VALUE_GET_TYPE (*rval); /* get rid of undefined and null */ cond = rtype == SWFDEC_AS_TYPE_UNDEFINED || rtype == SWFDEC_AS_TYPE_NULL; @@ -1528,19 +1533,19 @@ swfdec_action_equals2_6 (SwfdecAsContext *cx, guint action, const guint8 *data, /* compare strings */ if (ltype == SWFDEC_AS_TYPE_STRING && rtype == SWFDEC_AS_TYPE_STRING) { - /* FIXME: flash 5 case insensitive? */ - cond = SWFDEC_AS_VALUE_GET_STRING (lval) == SWFDEC_AS_VALUE_GET_STRING (rval); + cond = SWFDEC_AS_VALUE_GET_STRING (*lval) == SWFDEC_AS_VALUE_GET_STRING (*rval); goto out; } /* else compare as numbers */ - l = swfdec_as_value_to_number (cx, lval); - r = swfdec_as_value_to_number (cx, rval); + l = swfdec_as_value_to_number (cx, *lval); + r = swfdec_as_value_to_number (cx, *rval); - if (isnan (l) && isnan (r)) - cond = ltype == rtype; - else + if (isnan (l) && isnan (r)) { + cond = (ltype == SWFDEC_AS_TYPE_NUMBER && *lval == *rval); + } else { cond = l == r; + } out: swfdec_as_stack_pop (cx); @@ -1566,40 +1571,33 @@ swfdec_action_strict_equals (SwfdecAsContext *cx, guint action, const guint8 *da rval = swfdec_as_stack_peek (cx, 1); lval = swfdec_as_stack_peek (cx, 2); - if (rval->type != lval->type) { + if (SWFDEC_AS_VALUE_GET_TYPE (*rval) != SWFDEC_AS_VALUE_GET_TYPE (*lval)) { cond = FALSE; } else { - switch (rval->type) { + switch (SWFDEC_AS_VALUE_GET_TYPE (*rval)) { case SWFDEC_AS_TYPE_UNDEFINED: case SWFDEC_AS_TYPE_NULL: cond = TRUE; break; case SWFDEC_AS_TYPE_BOOLEAN: - cond = SWFDEC_AS_VALUE_GET_BOOLEAN (rval) == SWFDEC_AS_VALUE_GET_BOOLEAN (lval); + cond = SWFDEC_AS_VALUE_GET_BOOLEAN (*rval) == SWFDEC_AS_VALUE_GET_BOOLEAN (*lval); break; case SWFDEC_AS_TYPE_NUMBER: { double l, r; - r = SWFDEC_AS_VALUE_GET_NUMBER (rval); - l = SWFDEC_AS_VALUE_GET_NUMBER (lval); + r = SWFDEC_AS_VALUE_GET_NUMBER (*rval); + l = SWFDEC_AS_VALUE_GET_NUMBER (*lval); cond = (l == r) || (isnan (l) && isnan (r)); } break; case SWFDEC_AS_TYPE_STRING: - cond = SWFDEC_AS_VALUE_GET_STRING (rval) == SWFDEC_AS_VALUE_GET_STRING (lval); + cond = SWFDEC_AS_VALUE_GET_STRING (*rval) == SWFDEC_AS_VALUE_GET_STRING (*lval); break; case SWFDEC_AS_TYPE_OBJECT: - { - SwfdecAsObject *lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); - SwfdecAsObject *ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); - if (SWFDEC_IS_MOVIE (lo) && SWFDEC_IS_MOVIE (ro)) { - cond = swfdec_movie_resolve (SWFDEC_MOVIE (lo)) == swfdec_movie_resolve (SWFDEC_MOVIE (ro)); - } else if (!SWFDEC_IS_MOVIE (lo) && !SWFDEC_IS_MOVIE (ro)) { - cond = lo == ro; - } else { - cond = FALSE; - } - } + cond = SWFDEC_AS_VALUE_GET_OBJECT (*lval) == SWFDEC_AS_VALUE_GET_OBJECT (*rval); + break; + case SWFDEC_AS_TYPE_MOVIE: + cond = SWFDEC_AS_VALUE_GET_MOVIE (*lval) == SWFDEC_AS_VALUE_GET_MOVIE (*rval); break; case SWFDEC_AS_TYPE_INT: default: @@ -1621,11 +1619,11 @@ swfdec_action_do_set_target (SwfdecAsContext *cx, const char *target, const char SwfdecAsObject *o = swfdec_action_lookup_object (cx, NULL, target, end); if (o == NULL) { SWFDEC_WARNING ("target \"%s\" is not an object", target); - } else if (!SWFDEC_IS_MOVIE (o)) { + } else if (!o->movie) { SWFDEC_FIXME ("target \"%s\" is not a movie, something weird is supposed to happen now", target); - o = NULL; + } else { + swfdec_as_frame_set_target (cx->frame, SWFDEC_MOVIE (o->relay)); } - swfdec_as_frame_set_target (cx->frame, o); } } @@ -1647,7 +1645,7 @@ swfdec_action_set_target2 (SwfdecAsContext *cx, guint action, const guint8 *data { const char *s; - s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + s = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); swfdec_action_do_set_target (cx, s, s + strlen (s)); swfdec_as_stack_pop (cx); } @@ -1661,13 +1659,13 @@ swfdec_action_start_drag (SwfdecAsContext *cx, guint action, const guint8 *data, guint stack_size = 3; swfdec_as_stack_ensure_size (cx, 3); - center = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 2)); - if (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 3))) { + center = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 2)); + if (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 3))) { swfdec_as_stack_ensure_size (cx, 7); - rect.x0 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 7)); - rect.y0 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 6)); - rect.x1 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 5)); - rect.y1 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 4)); + rect.x0 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 7)); + rect.y0 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 6)); + rect.x1 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 5)); + rect.y1 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 4)); swfdec_rect_scale (&rect, &rect, SWFDEC_TWIPS_SCALE_FACTOR); stack_size = 7; rectp = ▭ @@ -1713,10 +1711,10 @@ swfdec_action_new_object (SwfdecAsContext *cx, guint action, const guint8 *data, swfdec_as_stack_ensure_size (cx, 2); swfdec_action_get_variable (cx, action, data, len); constructor = swfdec_as_stack_peek (cx, 1); - n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); + n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); n_args = MIN (swfdec_as_stack_get_size (cx) - 2, n_args); - if (!SWFDEC_AS_VALUE_IS_OBJECT (constructor) || - !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (constructor))) { + if (!SWFDEC_AS_VALUE_IS_OBJECT (*constructor) || + !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (*constructor)->relay)) { SWFDEC_WARNING ("not a constructor"); goto fail; } @@ -1739,23 +1737,23 @@ swfdec_action_new_method (SwfdecAsContext *cx, guint action, const guint8 *data, const char *name; swfdec_as_stack_ensure_size (cx, 3); - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); constructor = swfdec_as_stack_peek (cx, 2); - n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 3)); + n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 3)); n_args = MIN (swfdec_as_stack_get_size (cx) - 3, n_args); if (name == SWFDEC_AS_STR_EMPTY || - SWFDEC_AS_VALUE_IS_UNDEFINED (swfdec_as_stack_peek (cx, 1))) { + SWFDEC_AS_VALUE_IS_UNDEFINED (*swfdec_as_stack_peek (cx, 1))) { } else { - if (!SWFDEC_AS_VALUE_IS_OBJECT (constructor)) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (*constructor)) { SWFDEC_WARNING ("NewMethod called without an object to get variable %s from", name); goto fail; } - swfdec_as_object_get_variable (SWFDEC_AS_VALUE_GET_OBJECT (constructor), + swfdec_as_object_get_variable (SWFDEC_AS_VALUE_GET_COMPOSITE (*constructor), name, constructor); } - if (!SWFDEC_AS_VALUE_IS_OBJECT (constructor) || - !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (constructor))) { + if (!SWFDEC_AS_VALUE_IS_OBJECT (*constructor) || + !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (*constructor)->relay)) { SWFDEC_WARNING ("%s is not a constructor", name); goto fail; } @@ -1775,7 +1773,7 @@ swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data SwfdecAsObject *object; guint i, n_args, size; - n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); + n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); swfdec_as_stack_pop (cx); if (n_args * 2 > swfdec_as_stack_get_size (cx)) { size = swfdec_as_stack_get_size (cx); @@ -1786,9 +1784,10 @@ swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data size = 0; } - object = swfdec_as_object_new (cx); + object = swfdec_as_object_new (cx, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_Object, NULL); for (i = 0; i < n_args; i++) { - const char *s = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); + const char *s = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); swfdec_as_object_set_variable (object, s, swfdec_as_stack_peek (cx, 1)); swfdec_as_stack_pop_n (cx, 2); } @@ -1803,17 +1802,17 @@ swfdec_action_init_array (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsObject *array; swfdec_as_stack_ensure_size (cx, 1); - n = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); + n = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); swfdec_as_stack_pop (cx); array = swfdec_as_array_new (cx); /* NB: we can't increase the stack here, as the number can easily be MAXINT */ for (i = 0; i < n && swfdec_as_stack_get_size (cx) > 0; i++) { swfdec_as_stack_ensure_size (cx, 1); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), swfdec_as_stack_pop (cx)); + swfdec_as_array_push (array, swfdec_as_stack_pop (cx)); } if (i != n) { SwfdecAsValue val; - SWFDEC_AS_VALUE_SET_INT (&val, n); + val = swfdec_as_value_from_integer (cx, n); swfdec_as_object_set_variable (array, SWFDEC_AS_STR_length, &val); } SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_push (cx), array); @@ -1895,8 +1894,8 @@ swfdec_action_define_function (SwfdecAsContext *cx, guint action, * With this knowledge we can inspect the topmost stack member, since * it will contain the name this function will soon be assigned to. */ - if (SWFDEC_AS_VALUE_IS_STRING (swfdec_as_stack_peek (cx, 1))) - name = SWFDEC_AS_VALUE_GET_STRING (swfdec_as_stack_peek (cx, 1)); + if (SWFDEC_AS_VALUE_IS_STRING (*swfdec_as_stack_peek (cx, 1))) + name = SWFDEC_AS_VALUE_GET_STRING (*swfdec_as_stack_peek (cx, 1)); } if (name == NULL) name = "unnamed_function"; @@ -1917,12 +1916,10 @@ swfdec_action_define_function (SwfdecAsContext *cx, guint action, /* see function-scope tests */ if (cx->version > 5) { /* FIXME: or original target? */ - fun = swfdec_as_script_function_new (frame->original_target, frame->scope_chain, script); + fun = swfdec_as_script_function_new (cx, frame->original_target, frame->scope_chain, script); } else { - fun = swfdec_as_script_function_new (frame->original_target, NULL, script); + fun = swfdec_as_script_function_new (cx, frame->original_target, NULL, script); } - if (fun == NULL) - return; /* This is a hack that should only trigger for functions defined in the init scripts. * It is supposed to ensure that those functions inherit their target when being * called instead of when being defined */ @@ -1931,13 +1928,17 @@ swfdec_action_define_function (SwfdecAsContext *cx, guint action, /* attach the function */ if (*function_name == '\0') { swfdec_as_stack_ensure_free (cx, 1); - SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_push (cx), SWFDEC_AS_OBJECT (fun)); + SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_push (cx), + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun))); } else { SwfdecAsValue funval; - /* FIXME: really varobj? Not eval or sth like that? */ - name = swfdec_as_context_get_string (cx, function_name); - SWFDEC_AS_VALUE_SET_OBJECT (&funval, SWFDEC_AS_OBJECT (fun)); - swfdec_as_object_set_variable (frame->target, name, &funval); + SwfdecMovie *target = frame->original_target; + if (target) { + name = swfdec_as_context_get_string (cx, function_name); + SWFDEC_AS_VALUE_SET_OBJECT (&funval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun))); + swfdec_as_object_set_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (target)), + name, &funval); + } } /* update current context */ @@ -1950,8 +1951,8 @@ swfdec_action_bitwise (SwfdecAsContext *cx, guint action, const guint8 *data, gu { int a, b; - a = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); - b = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); + a = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); + b = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); switch (action) { case 0x60: @@ -1969,7 +1970,7 @@ swfdec_action_bitwise (SwfdecAsContext *cx, guint action, const guint8 *data, gu } swfdec_as_stack_pop (cx); - SWFDEC_AS_VALUE_SET_INT (swfdec_as_stack_peek (cx, 1), a); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_integer (cx, a); } static void @@ -1977,9 +1978,9 @@ swfdec_action_shift (SwfdecAsContext *cx, guint action, const guint8 *data, guin { int amount, value; - amount = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)); + amount = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)); amount &= 31; - value = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2)); + value = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2)); switch (action) { case 0x63: @@ -1996,7 +1997,7 @@ swfdec_action_shift (SwfdecAsContext *cx, guint action, const guint8 *data, guin } swfdec_as_stack_pop (cx); - SWFDEC_AS_VALUE_SET_INT (swfdec_as_stack_peek (cx, 1), value); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_integer (cx, value); } static void @@ -2004,24 +2005,22 @@ swfdec_action_to_integer (SwfdecAsContext *cx, guint action, const guint8 *data, { SwfdecAsValue *val = swfdec_as_stack_peek (cx, 1); - SWFDEC_AS_VALUE_SET_INT (val, swfdec_as_value_to_integer (cx, val)); + *val = swfdec_as_value_from_integer (cx, swfdec_as_value_to_integer (cx, *val)); } static void swfdec_action_target_path (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *val; - SwfdecMovie *movie; char *s; val = swfdec_as_stack_peek (cx, 1); - if (!SWFDEC_AS_VALUE_IS_OBJECT (val) || - !SWFDEC_IS_MOVIE (movie = (SwfdecMovie *) SWFDEC_AS_VALUE_GET_OBJECT (val))) { + if (!SWFDEC_AS_VALUE_IS_MOVIE (*val)) { SWFDEC_AS_VALUE_SET_UNDEFINED (val); return; } - s = swfdec_movie_get_path (movie, TRUE); + s = swfdec_movie_get_path (SWFDEC_AS_VALUE_GET_MOVIE (*val), TRUE); SWFDEC_AS_VALUE_SET_STRING (val, swfdec_as_context_give_string (cx, s)); } @@ -2030,8 +2029,8 @@ swfdec_action_define_local (SwfdecAsContext *cx, guint action, const guint8 *dat { const char *name; - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); - swfdec_as_frame_set_variable (cx->frame, name, swfdec_as_stack_peek (cx, 1), + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); + swfdec_as_frame_set_variable (cx, cx->frame, name, swfdec_as_stack_peek (cx, 1), TRUE, TRUE); swfdec_as_stack_pop_n (cx, 2); } @@ -2042,21 +2041,21 @@ swfdec_action_define_local2 (SwfdecAsContext *cx, guint action, const guint8 *da SwfdecAsValue val = { 0, }; const char *name; - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); - swfdec_as_frame_set_variable (cx->frame, name, &val, FALSE, TRUE); + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); + swfdec_as_frame_set_variable (cx, cx->frame, name, &val, FALSE, TRUE); swfdec_as_stack_pop (cx); } static void swfdec_action_end (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - swfdec_as_frame_return (cx->frame, NULL); + swfdec_as_context_return (cx, NULL); } static void swfdec_action_return (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - swfdec_as_frame_return (cx->frame, swfdec_as_stack_pop (cx)); + swfdec_as_context_return (cx, swfdec_as_stack_pop (cx)); } static void @@ -2066,11 +2065,12 @@ swfdec_action_delete (SwfdecAsContext *cx, guint action, const guint8 *data, gui const char *name; gboolean success = FALSE; - name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1)); + name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1)); val = swfdec_as_stack_peek (cx, 2); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - success = swfdec_as_object_delete_variable ( - SWFDEC_AS_VALUE_GET_OBJECT (val), name) == SWFDEC_AS_DELETE_DELETED; + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*val)) { + SwfdecAsObject *o = SWFDEC_AS_VALUE_GET_COMPOSITE (*val); + if (o) + success = swfdec_as_object_delete_variable (o, name) == SWFDEC_AS_DELETE_DELETED; } SWFDEC_AS_VALUE_SET_BOOLEAN (val, success); swfdec_as_stack_pop_n (cx, 1); @@ -2084,8 +2084,8 @@ swfdec_action_delete2 (SwfdecAsContext *cx, guint action, const guint8 *data, gu gboolean success = FALSE; val = swfdec_as_stack_peek (cx, 1); - name = swfdec_as_value_to_string (cx, val); - success = swfdec_as_frame_delete_variable (cx->frame, name) == SWFDEC_AS_DELETE_DELETED; + name = swfdec_as_value_to_string (cx, *val); + success = swfdec_as_frame_delete_variable (cx, cx->frame, name) == SWFDEC_AS_DELETE_DELETED; SWFDEC_AS_VALUE_SET_BOOLEAN (val, success); } @@ -2108,8 +2108,8 @@ swfdec_action_modulo (SwfdecAsContext *cx, guint action, const guint8 *data, gui { double x, y; - y = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)); - x = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)); + y = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)); + x = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2)); /* yay, we're portable! */ if (y == 0.0) { x = NAN; @@ -2121,7 +2121,7 @@ swfdec_action_modulo (SwfdecAsContext *cx, guint action, const guint8 *data, gui } } swfdec_as_stack_pop (cx); - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), x); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_number (cx, x); } static void @@ -2133,25 +2133,25 @@ swfdec_action_swap (SwfdecAsContext *cx, guint action, const guint8 *data, guint static void swfdec_action_to_number (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_peek (cx, 1), - swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1))); + *swfdec_as_stack_peek (cx, 1) = swfdec_as_value_from_number (cx, + swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1))); } static void swfdec_action_to_string (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_peek (cx, 1), - swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1))); + swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1))); } static void swfdec_action_type_of (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - SwfdecAsValue *val; + SwfdecAsValue val; const char *type; - val = swfdec_as_stack_peek (cx, 1); - switch (val->type) { + val = *swfdec_as_stack_pop (cx); + switch (SWFDEC_AS_VALUE_GET_TYPE (val)) { case SWFDEC_AS_TYPE_NUMBER: type = SWFDEC_AS_STR_number; break; @@ -2170,28 +2170,31 @@ swfdec_action_type_of (SwfdecAsContext *cx, guint action, const guint8 *data, gu case SWFDEC_AS_TYPE_OBJECT: { SwfdecAsObject *obj = SWFDEC_AS_VALUE_GET_OBJECT (val); - if (SWFDEC_IS_MOVIE (obj)) { - SwfdecMovie *movie = swfdec_movie_resolve (SWFDEC_MOVIE (obj)); - if (movie != NULL && SWFDEC_IS_TEXT_FIELD_MOVIE (movie) && - movie->state == SWFDEC_MOVIE_STATE_RUNNING) { - type = SWFDEC_AS_STR_object; - } else { - type = SWFDEC_AS_STR_movieclip; - } - } else if (SWFDEC_IS_AS_FUNCTION (obj)) { + if (SWFDEC_IS_AS_FUNCTION (obj->relay)) { type = SWFDEC_AS_STR_function; } else { type = SWFDEC_AS_STR_object; } } break; + case SWFDEC_AS_TYPE_MOVIE: + { + SwfdecMovie *movie = SWFDEC_AS_VALUE_GET_MOVIE (val); + if (SWFDEC_IS_TEXT_FIELD_MOVIE (movie) && + movie->state == SWFDEC_MOVIE_STATE_RUNNING) { + type = SWFDEC_AS_STR_object; + } else { + type = SWFDEC_AS_STR_movieclip; + } + } + break; case SWFDEC_AS_TYPE_INT: default: g_assert_not_reached (); type = SWFDEC_AS_STR_EMPTY; break; } - SWFDEC_AS_VALUE_SET_STRING (val, type); + SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_push (cx), type); } static void @@ -2206,7 +2209,7 @@ swfdec_action_get_time (SwfdecAsContext *cx, guint action, const guint8 *data, g diff *= 1000; diff += (tv.tv_usec - cx->start_time.tv_usec) / 1000; - SWFDEC_AS_VALUE_SET_NUMBER (swfdec_as_stack_push (cx), diff); + *swfdec_as_stack_push (cx) = swfdec_as_value_from_number (cx, diff); } static gboolean @@ -2217,14 +2220,14 @@ swfdec_action_is_instance_of (SwfdecAsObject *object, SwfdecAsObject *class, *prototype; GSList *iter; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (constructor), FALSE); + g_return_val_if_fail (object != NULL, FALSE); + g_return_val_if_fail (constructor != NULL, FALSE); // FIXME: propflag tests are wrong, and we shouldn't get __proto__.prototype swfdec_as_object_get_variable (constructor, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return FALSE; - prototype = SWFDEC_AS_VALUE_GET_OBJECT (&val); + prototype = SWFDEC_AS_VALUE_GET_OBJECT (val); class = object; while ((class = swfdec_as_object_get_prototype (class)) != NULL) { @@ -2247,15 +2250,15 @@ swfdec_action_instance_of (SwfdecAsContext *cx, guint action, SwfdecAsObject *object, *constructor; val = swfdec_as_stack_pop (cx); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - constructor = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_OBJECT (*val)) { + constructor = SWFDEC_AS_VALUE_GET_OBJECT (*val); } else { constructor = NULL; } val = swfdec_as_stack_pop (cx); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - object = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*val)) { + object = SWFDEC_AS_VALUE_GET_COMPOSITE (*val); } else { object = NULL; } @@ -2278,15 +2281,15 @@ swfdec_action_cast (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsObject *object, *constructor; val = swfdec_as_stack_pop (cx); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - object = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*val)) { + object = SWFDEC_AS_VALUE_GET_COMPOSITE (*val); } else { object = NULL; } val = swfdec_as_stack_pop (cx); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - constructor = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_OBJECT (*val)) { + constructor = SWFDEC_AS_VALUE_GET_OBJECT (*val); } else { constructor = NULL; } @@ -2297,7 +2300,7 @@ swfdec_action_cast (SwfdecAsContext *cx, guint action, const guint8 *data, } if (swfdec_action_is_instance_of (object, constructor)) { - SWFDEC_AS_VALUE_SET_OBJECT (swfdec_as_stack_push (cx), object); + SWFDEC_AS_VALUE_SET_COMPOSITE (swfdec_as_stack_push (cx), object); } else { SWFDEC_AS_VALUE_SET_NULL (swfdec_as_stack_push (cx)); } @@ -2308,17 +2311,17 @@ swfdec_action_implements (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *val, *argv; - SwfdecAsObject *object, *proto, *interface; + SwfdecAsObject *object, *proto; int argc, i; swfdec_as_stack_ensure_size (cx, 2); val = swfdec_as_stack_pop (cx); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - object = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_COMPOSITE (*val)) { + object = SWFDEC_AS_VALUE_GET_COMPOSITE (*val); swfdec_as_object_get_variable (object, SWFDEC_AS_STR_prototype, val); - if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { - proto = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (SWFDEC_AS_VALUE_IS_OBJECT (*val)) { + proto = SWFDEC_AS_VALUE_GET_OBJECT (*val); } else { proto = NULL; } @@ -2328,7 +2331,7 @@ swfdec_action_implements (SwfdecAsContext *cx, guint action, } val = swfdec_as_stack_pop (cx); - argc = swfdec_as_value_to_integer (cx, val); + argc = swfdec_as_value_to_integer (cx, *val); if (argc > 0) { swfdec_as_stack_ensure_size (cx, argc); @@ -2341,14 +2344,11 @@ swfdec_action_implements (SwfdecAsContext *cx, guint action, return; for (i = 0; i < argc; i++) { - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[i])) - continue; - interface = SWFDEC_AS_VALUE_GET_OBJECT (&argv[i]); - swfdec_as_object_get_variable (interface, SWFDEC_AS_STR_prototype, val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) + swfdec_as_value_get_variable (cx, &argv[i], SWFDEC_AS_STR_prototype, val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (*val)) continue; proto->interfaces = - g_slist_prepend (proto->interfaces, SWFDEC_AS_VALUE_GET_OBJECT (val)); + g_slist_prepend (proto->interfaces, SWFDEC_AS_VALUE_GET_OBJECT (*val)); } } @@ -2361,16 +2361,16 @@ swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, gu superclass = swfdec_as_stack_peek (cx, 1); subclass = swfdec_as_stack_peek (cx, 2); - if (!SWFDEC_AS_VALUE_IS_OBJECT (superclass) || - !SWFDEC_IS_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (superclass))) { + if (!SWFDEC_AS_VALUE_IS_OBJECT (*superclass) || + !SWFDEC_IS_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (*superclass)->relay)) { SWFDEC_ERROR ("superclass is not a function"); goto fail; } - if (!SWFDEC_AS_VALUE_IS_OBJECT (subclass)) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (*subclass)) { SWFDEC_ERROR ("subclass is not an object"); goto fail; } - super = SWFDEC_AS_VALUE_GET_OBJECT (superclass); + super = SWFDEC_AS_VALUE_GET_OBJECT (*superclass); prototype = swfdec_as_object_new_empty (cx); swfdec_as_object_get_variable (super, SWFDEC_AS_STR_prototype, &proto); swfdec_as_object_set_variable_and_flags (prototype, SWFDEC_AS_STR___proto__, &proto, @@ -2378,43 +2378,19 @@ swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, gu swfdec_as_object_set_variable_and_flags (prototype, SWFDEC_AS_STR___constructor__, superclass, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_VERSION_6_UP); SWFDEC_AS_VALUE_SET_OBJECT (&proto, prototype); - swfdec_as_object_set_variable (SWFDEC_AS_VALUE_GET_OBJECT (subclass), + swfdec_as_object_set_variable (SWFDEC_AS_VALUE_GET_COMPOSITE (*subclass), SWFDEC_AS_STR_prototype, &proto); fail: swfdec_as_stack_pop_n (cx, 2); } -static gboolean -swfdec_action_enumerate_foreach (SwfdecAsObject *object, const char *variable, - SwfdecAsValue *value, guint flags, gpointer listp) -{ - GSList **list = listp; - - if (flags & SWFDEC_AS_VARIABLE_HIDDEN) - return TRUE; - - *list = g_slist_remove (*list, variable); - *list = g_slist_prepend (*list, (gpointer) variable); - return TRUE; -} - static void swfdec_action_do_enumerate (SwfdecAsContext *cx, SwfdecAsObject *object) { guint i; - GSList *walk, *list = NULL; + GSList *walk, *list; - for (i = 0; i < 256 && object; i++) { - swfdec_as_object_foreach (object, swfdec_action_enumerate_foreach, &list); - object = swfdec_as_object_get_prototype (object); - } - if (i == 256) { - swfdec_as_context_abort (swfdec_gc_object_get_context (object), - "Prototype recursion limit exceeded"); - g_slist_free (list); - return; - } - list = g_slist_reverse (list); + list = swfdec_as_object_enumerate (object); i = 0; for (walk = list; walk; walk = walk->next) { /* 8 is an arbitrary value */ @@ -2435,12 +2411,12 @@ swfdec_action_enumerate2 (SwfdecAsContext *cx, guint action, const guint8 *data, SwfdecAsObject *obj; val = swfdec_as_stack_peek (cx, 1); - if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (*val) || + (obj = SWFDEC_AS_VALUE_GET_COMPOSITE (*val)) == NULL) { SWFDEC_WARNING ("Enumerate called without an object"); SWFDEC_AS_VALUE_SET_UNDEFINED (val); return; } - obj = SWFDEC_AS_VALUE_GET_OBJECT (val); SWFDEC_AS_VALUE_SET_UNDEFINED (val); swfdec_action_do_enumerate (cx, obj); } @@ -2459,17 +2435,17 @@ swfdec_action_logical (SwfdecAsContext *cx, guint action, const guint8 *data, gu gboolean l, r; if (cx->version <= 4) { - l = (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)) != 0); + l = (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)) != 0); // don't call second parameter if not necessary if ((action == SWFDEC_AS_ACTION_AND && !l) || (action != SWFDEC_AS_ACTION_AND && l)) { - r = (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)) != 0); + r = (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2)) != 0); } else { r = FALSE; } } else { - l = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1)); - r = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 2)); + l = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1)); + r = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 2)); } SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 2), @@ -2481,7 +2457,7 @@ static void swfdec_action_char_to_ascii (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { SwfdecAsValue *val = swfdec_as_stack_peek (cx, 1); - const char *s = swfdec_as_value_to_string (cx, val); + const char *s = swfdec_as_value_to_string (cx, *val); if (cx->version <= 5) { char *ascii = g_convert (s, -1, "LATIN1", "UTF-8", NULL, NULL, NULL); @@ -2489,9 +2465,9 @@ swfdec_action_char_to_ascii (SwfdecAsContext *cx, guint action, const guint8 *da if (ascii == NULL) { /* This can happen if a Flash 5 movie gets loaded into a Flash 7 movie */ SWFDEC_FIXME ("Someone threw unconvertible text %s at Flash <= 5", s); - SWFDEC_AS_VALUE_SET_INT (val, 0); /* FIXME: what to return??? */ + *val = swfdec_as_value_from_integer (cx, 0); /* FIXME: what to return??? */ } else { - SWFDEC_AS_VALUE_SET_INT (val, (guchar) ascii[0]); + *val = swfdec_as_value_from_integer (cx, (guchar) ascii[0]); g_free (ascii); } } else { @@ -2500,9 +2476,9 @@ swfdec_action_char_to_ascii (SwfdecAsContext *cx, guint action, const guint8 *da if (uni == NULL) { /* This should never happen, everything is valid UTF-8 in here */ g_warning ("conversion of character %s failed", s); - SWFDEC_AS_VALUE_SET_INT (val, 0); + *val = swfdec_as_value_from_integer (cx, 0); } else { - SWFDEC_AS_VALUE_SET_INT (val, uni[0]); + *val = swfdec_as_value_from_integer (cx, uni[0]); g_free (uni); } } @@ -2519,12 +2495,12 @@ swfdec_action_ascii_to_char (SwfdecAsContext *cx, guint action, const guint8 *da guint i; if (action == SWFDEC_AS_ACTION_ASCII_TO_CHAR) { - s[0] = ((guint) swfdec_as_value_to_integer (cx, val)) % 256; + s[0] = ((guint) swfdec_as_value_to_integer (cx, *val)) % 256; s[1] = 0; } else { g_assert (action == SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR); - i = ((guint) swfdec_as_value_to_integer (cx, val)); + i = ((guint) swfdec_as_value_to_integer (cx, *val)); if (i > 255) { s[0] = i / 256; s[1] = i % 256; @@ -2545,7 +2521,7 @@ swfdec_action_ascii_to_char (SwfdecAsContext *cx, guint action, const guint8 *da } } else { char *s; - gunichar c = ((guint) swfdec_as_value_to_integer (cx, val)) % 65536; + gunichar c = ((guint) swfdec_as_value_to_integer (cx, *val)) % 65536; s = g_ucs4_to_utf8 (&c, 1, NULL, NULL, NULL); if (s == NULL) { @@ -2597,7 +2573,6 @@ swfdec_action_try_end_finally (SwfdecAsContext *cx, SwfdecAsFrame *frame, gpoint { SwfdecAsValue *exception_value = data; - g_return_if_fail (SWFDEC_IS_AS_VALUE (exception_value)); // finally has ended and we had exception stored, throw it if (!cx->exception && cx->frame == frame) @@ -2762,7 +2737,7 @@ swfdec_action_with (SwfdecAsContext *cx, guint action, const guint8 *data, guint return; } offset = data[0] | (data[1] << 8); - object = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 1)); + object = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 1)); if (object == NULL) { SWFDEC_INFO ("With called without an object, skipping"); cx->frame->pc = (guint8 *) data + len + offset; @@ -2777,7 +2752,8 @@ swfdec_action_with (SwfdecAsContext *cx, guint action, const guint8 *data, guint static void swfdec_action_remove_sprite (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - if (!SWFDEC_IS_MOVIE (cx->frame->target)) { + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); + if (target == NULL) { SWFDEC_FIXME ("target is not a movie in RemoveSprite"); } else if (!SWFDEC_IS_PLAYER (cx)) { SWFDEC_INFO ("tried using RemoveSprite in a non-SwfdecPlayer context"); @@ -2797,13 +2773,14 @@ swfdec_action_remove_sprite (SwfdecAsContext *cx, guint action, const guint8 *da static void swfdec_action_clone_sprite (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { + SwfdecMovie *target = swfdec_as_frame_get_target (cx->frame); SwfdecMovie *movie, *new_movie; const char *new_name; int depth; - depth = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)) - 16384; - new_name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 2)); - if (!SWFDEC_IS_MOVIE (cx->frame->target)) { + depth = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)) - 16384; + new_name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2)); + if (target == NULL) { SWFDEC_FIXME ("target is not a movie in CloneSprite"); } else if (!SWFDEC_IS_PLAYER (cx)) { SWFDEC_INFO ("tried using CloneSprite in a non-SwfdecPlayer context"); @@ -2823,449 +2800,134 @@ swfdec_action_clone_sprite (SwfdecAsContext *cx, guint action, const guint8 *dat swfdec_as_stack_pop_n (cx, 3); } -/*** PRINT FUNCTIONS ***/ - -static char * -swfdec_action_print_with (guint action, const guint8 *data, guint len) -{ - if (len != 2) { - SWFDEC_ERROR ("With action requires a length of 2, but got %u", len); - return NULL; - } - return g_strdup_printf ("With %u", data[0] | (data[1] << 8)); -} - -static char * -swfdec_action_print_store_register (guint action, const guint8 *data, guint len) -{ - if (len != 1) { - SWFDEC_ERROR ("StoreRegister action requires a length of 1, but got %u", len); - return NULL; - } - return g_strdup_printf ("StoreRegister %u", (guint) *data); -} - -static char * -swfdec_action_print_set_target (guint action, const guint8 *data, guint len) -{ - if (!memchr (data, 0, len)) { - SWFDEC_ERROR ("SetTarget action does not specify a string"); - return NULL; - } - return g_strconcat ("SetTarget ", data, NULL); -} - -static char * -swfdec_action_print_define_function (guint action, const guint8 *data, guint len) -{ - SwfdecBits bits; - GString *string; - const char *function_name; - guint i, n_args, size; - gboolean v2 = (action == 0x8e); - - string = g_string_new (v2 ? "DefineFunction2 " : "DefineFunction "); - swfdec_bits_init_data (&bits, data, len); - /* FIXME: version! */ - function_name = swfdec_bits_get_string (&bits, 7); - if (function_name == NULL) { - SWFDEC_ERROR ("could not parse function name"); - g_string_free (string, TRUE); - return NULL; - } - if (*function_name) { - g_string_append (string, function_name); - g_string_append_c (string, ' '); - } - n_args = swfdec_bits_get_u16 (&bits); - g_string_append_c (string, '('); - if (v2) { - /* n_regs = */ swfdec_bits_get_u8 (&bits); - /* flags = */ swfdec_bits_get_u16 (&bits); - } - - for (i = 0; i < n_args; i++) { - guint preload; - const char *arg_name; - if (v2) - preload = swfdec_bits_get_u8 (&bits); - else - preload = 0; - arg_name = swfdec_bits_get_string (&bits, 7); - if (preload == 0 && (arg_name == NULL || *arg_name == '\0')) { - SWFDEC_ERROR ("empty argument name not allowed"); - g_string_free (string, TRUE); - return NULL; - } - if (i) - g_string_append (string, ", "); - g_string_append (string, arg_name); - if (preload) - g_string_append_printf (string, " (%u)", preload); - } - g_string_append_c (string, ')'); - size = swfdec_bits_get_u16 (&bits); - g_string_append_printf (string, " %u", size); - return g_string_free (string, FALSE); -} - -static char * -swfdec_action_print_get_url2 (guint action, const guint8 *data, guint len) -{ - guint method; - - if (len != 1) { - SWFDEC_ERROR ("GetURL2 requires 1 byte of data, not %u", len); - return NULL; - } - method = data[0] >> 6; - if (method == 3) { - SWFDEC_ERROR ("GetURL method 3 invalid"); - method = 0; - } - if (method) { - SWFDEC_FIXME ("implement encoding variables using %s", method == 1 ? "GET" : "POST"); - } - return g_strdup_printf ("GetURL2%s%s%s", method == 0 ? "" : (method == 1 ? " GET" : " POST"), - data[0] & 2 ? " LoadTarget" : "", data[0] & 1 ? " LoadVariables" : ""); -} - -static char * -swfdec_action_print_get_url (guint action, const guint8 *data, guint len) -{ - SwfdecBits bits; - char *url, *target, *ret; - - swfdec_bits_init_data (&bits, data, len); - url = swfdec_bits_get_string (&bits, 7); - target = swfdec_bits_get_string (&bits, 7); - if (url == NULL) { - SWFDEC_ERROR ("not enough data in GetURL"); - url = g_strdup ("???"); - } - if (target == NULL) { - SWFDEC_ERROR ("not enough data in GetURL"); - target = g_strdup ("???"); - } - if (swfdec_bits_left (&bits)) { - SWFDEC_WARNING ("leftover bytes in GetURL action"); - } - ret = g_strdup_printf ("GetURL %s %s", url, target); - g_free (url); - g_free (target); - return ret; -} - -static char * -swfdec_action_print_if (guint action, const guint8 *data, guint len) -{ - gint16 offset; - - if (len != 2) { - SWFDEC_ERROR ("If action length invalid (is %u, should be 2)", len); - return NULL; - } - offset = data[0] | (data[1] << 8); - return g_strdup_printf ("If %d", (int) offset); -} - -static char * -swfdec_action_print_jump (guint action, const guint8 *data, guint len) -{ - gint16 offset; - - if (len != 2) { - SWFDEC_ERROR ("If action length invalid (is %u, should be 2)", len); - return NULL; - } - offset = data[0] | (data[1] << 8); - return g_strdup_printf ("Jump %d", (int) offset); -} - -static char * -swfdec_action_print_push (guint action, const guint8 *data, guint len) -{ - gboolean first = TRUE; - SwfdecBits bits; - GString *string = g_string_new ("Push"); - - swfdec_bits_init_data (&bits, data, len); - while (swfdec_bits_left (&bits)) { - guint type = swfdec_bits_get_u8 (&bits); - if (first) - g_string_append (string, " "); - else - g_string_append (string, ", "); - first = FALSE; - switch (type) { - case 0: /* string */ - { - /* FIXME: need version! */ - char *s = swfdec_bits_get_string (&bits, 7); - if (!s) { - g_string_free (string, TRUE); - return NULL; - } - g_string_append_c (string, '"'); - g_string_append (string, s); - g_string_append_c (string, '"'); - g_free (s); - break; - } - case 1: /* float */ - g_string_append_printf (string, "%g", swfdec_bits_get_float (&bits)); - break; - case 2: /* null */ - g_string_append (string, "null"); - break; - case 3: /* undefined */ - g_string_append (string, "void"); - break; - case 4: /* register */ - g_string_append_printf (string, "Register %u", swfdec_bits_get_u8 (&bits)); - break; - case 5: /* boolean */ - g_string_append (string, swfdec_bits_get_u8 (&bits) ? "True" : "False"); - break; - case 6: /* double */ - g_string_append_printf (string, "%g", swfdec_bits_get_double (&bits)); - break; - case 7: /* 32bit int */ - g_string_append_printf (string, "%d", swfdec_bits_get_s32 (&bits)); - break; - case 8: /* 8bit ConstantPool address */ - g_string_append_printf (string, "Pool %u", swfdec_bits_get_u8 (&bits)); - break; - case 9: /* 16bit ConstantPool address */ - g_string_append_printf (string, "Pool %u", swfdec_bits_get_u16 (&bits)); - break; - default: - SWFDEC_ERROR ("Push: unknown type %u, skipping", type); - break; - } - } - return g_string_free (string, FALSE); -} - -/* NB: constant pool actions are special in that they are called at init time */ -static char * -swfdec_action_print_constant_pool (guint action, const guint8 *data, guint len) -{ - guint i; - GString *string; - SwfdecConstantPool *pool; - SwfdecBuffer *buffer; - - /* FIXME: version */ - buffer = swfdec_buffer_new_static (data, len); - pool = swfdec_constant_pool_new (NULL, buffer, 6); - if (pool == NULL) - return g_strdup ("ConstantPool (invalid)"); - string = g_string_new ("ConstantPool"); - for (i = 0; i < swfdec_constant_pool_size (pool); i++) { - g_string_append (string, i ? ", " : " "); - g_string_append (string, swfdec_constant_pool_get (pool, i)); - g_string_append_printf (string, " (%u)", i); - } - swfdec_constant_pool_unref (pool); - swfdec_buffer_unref (buffer); - return g_string_free (string, FALSE); -} - -static char * -swfdec_action_print_wait_for_frame2 (guint action, const guint8 *data, guint len) -{ - if (len < 1) { - SWFDEC_ERROR ("WaitForFrame2 needs a 1-byte data"); - return NULL; - } - return g_strdup_printf ("WaitForFrame2 %u", (guint) *data); -} - -static char * -swfdec_action_print_goto_frame2 (guint action, const guint8 *data, guint len) -{ - gboolean play, bias; - SwfdecBits bits; - - swfdec_bits_init_data (&bits, data, len); - if (swfdec_bits_getbits (&bits, 6)) { - SWFDEC_WARNING ("reserved bits in GotoFrame2 aren't 0"); - } - bias = swfdec_bits_getbit (&bits); - play = swfdec_bits_getbit (&bits); - if (bias) { - return g_strdup_printf ("GotoFrame2 %s +%u", play ? "play" : "stop", - swfdec_bits_get_u16 (&bits)); - } else { - return g_strdup_printf ("GotoFrame2 %s", play ? "play" : "stop"); - } -} - -static char * -swfdec_action_print_goto_frame (guint action, const guint8 *data, guint len) -{ - guint frame; - - if (len != 2) - return NULL; - - frame = data[0] | (data[1] << 8); - return g_strdup_printf ("GotoFrame %u", frame); -} - -static char * -swfdec_action_print_goto_label (guint action, const guint8 *data, guint len) -{ - if (!memchr (data, 0, len)) { - SWFDEC_ERROR ("GotoLabel action does not specify a string"); - return NULL; - } - - return g_strdup_printf ("GotoLabel %s", data); -} - -static char * -swfdec_action_print_wait_for_frame (guint action, const guint8 *data, guint len) -{ - guint frame, jump; - - if (len != 3) - return NULL; - - frame = data[0] | (data[1] << 8); - jump = data[2]; - return g_strdup_printf ("WaitForFrame %u %u", frame, jump); -} - /*** BIG FUNCTION TABLE ***/ const SwfdecActionSpec swfdec_as_actions[256] = { /* version 1 */ - [SWFDEC_AS_ACTION_END] = { "End", NULL, 0, 0, swfdec_action_end, 1 }, - [SWFDEC_AS_ACTION_NEXT_FRAME] = { "NextFrame", NULL, 0, 0, swfdec_action_next_frame, 1 }, - [SWFDEC_AS_ACTION_PREVIOUS_FRAME] = { "PreviousFrame", NULL, 0, 0, swfdec_action_previous_frame, 1 }, - [SWFDEC_AS_ACTION_PLAY] = { "Play", NULL, 0, 0, swfdec_action_play, 1 }, - [SWFDEC_AS_ACTION_STOP] = { "Stop", NULL, 0, 0, swfdec_action_stop, 1 }, - [SWFDEC_AS_ACTION_TOGGLE_QUALITY] = { "ToggleQuality", NULL, -1, -1, NULL, 1 }, + [SWFDEC_AS_ACTION_END] = { "End", 0, 0, swfdec_action_end, 1 }, + [SWFDEC_AS_ACTION_NEXT_FRAME] = { "NextFrame", 0, 0, swfdec_action_next_frame, 1 }, + [SWFDEC_AS_ACTION_PREVIOUS_FRAME] = { "PreviousFrame", 0, 0, swfdec_action_previous_frame, 1 }, + [SWFDEC_AS_ACTION_PLAY] = { "Play", 0, 0, swfdec_action_play, 1 }, + [SWFDEC_AS_ACTION_STOP] = { "Stop", 0, 0, swfdec_action_stop, 1 }, + [SWFDEC_AS_ACTION_TOGGLE_QUALITY] = { "ToggleQuality", -1, -1, NULL, 1 }, /* version 2 */ - [SWFDEC_AS_ACTION_STOP_SOUNDS] = { "StopSounds", NULL, 0, 0, swfdec_action_stop_sounds, 2 }, + [SWFDEC_AS_ACTION_STOP_SOUNDS] = { "StopSounds", 0, 0, swfdec_action_stop_sounds, 2 }, /* version 4 */ - [SWFDEC_AS_ACTION_ADD] = { "Add", NULL, 2, 1, swfdec_action_binary, 4 }, - [SWFDEC_AS_ACTION_SUBTRACT] = { "Subtract", NULL, 2, 1, swfdec_action_binary, 4 }, - [SWFDEC_AS_ACTION_MULTIPLY] = { "Multiply", NULL, 2, 1, swfdec_action_binary, 4 }, - [SWFDEC_AS_ACTION_DIVIDE] = { "Divide", NULL, 2, 1, swfdec_action_binary, 4 }, - [SWFDEC_AS_ACTION_EQUALS] = { "Equals", NULL, 2, 1, swfdec_action_old_compare, 4 }, - [SWFDEC_AS_ACTION_LESS] = { "Less", NULL, 2, 1, swfdec_action_old_compare, 4 }, - [SWFDEC_AS_ACTION_AND] = { "And", NULL, 2, 1, swfdec_action_logical, 4 }, - [SWFDEC_AS_ACTION_OR] = { "Or", NULL, 2, 1, swfdec_action_logical, 4 }, - [SWFDEC_AS_ACTION_NOT] = { "Not", NULL, 1, 1, swfdec_action_not, 4 }, - [SWFDEC_AS_ACTION_STRING_EQUALS] = { "StringEquals", NULL, 2, 1, swfdec_action_string_compare, 4 }, - [SWFDEC_AS_ACTION_STRING_LENGTH] = { "StringLength", NULL, 1, 1, swfdec_action_string_length, 4 }, - [SWFDEC_AS_ACTION_STRING_EXTRACT] = { "StringExtract", NULL, 3, 1, swfdec_action_string_extract, 4 }, - [SWFDEC_AS_ACTION_POP] = { "Pop", NULL, 1, 0, swfdec_action_pop, 4 }, - [SWFDEC_AS_ACTION_TO_INTEGER] = { "ToInteger", NULL, 1, 1, swfdec_action_to_integer, 4 }, - [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", NULL, 1, 1, swfdec_action_get_variable, 4 }, - [SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", NULL, 2, 0, swfdec_action_set_variable, 4 }, + [SWFDEC_AS_ACTION_ADD] = { "Add", 2, 1, swfdec_action_binary, 4 }, + [SWFDEC_AS_ACTION_SUBTRACT] = { "Subtract", 2, 1, swfdec_action_binary, 4 }, + [SWFDEC_AS_ACTION_MULTIPLY] = { "Multiply", 2, 1, swfdec_action_binary, 4 }, + [SWFDEC_AS_ACTION_DIVIDE] = { "Divide", 2, 1, swfdec_action_binary, 4 }, + [SWFDEC_AS_ACTION_EQUALS] = { "Equals", 2, 1, swfdec_action_old_compare, 4 }, + [SWFDEC_AS_ACTION_LESS] = { "Less", 2, 1, swfdec_action_old_compare, 4 }, + [SWFDEC_AS_ACTION_AND] = { "And", 2, 1, swfdec_action_logical, 4 }, + [SWFDEC_AS_ACTION_OR] = { "Or", 2, 1, swfdec_action_logical, 4 }, + [SWFDEC_AS_ACTION_NOT] = { "Not", 1, 1, swfdec_action_not, 4 }, + [SWFDEC_AS_ACTION_STRING_EQUALS] = { "StringEquals", 2, 1, swfdec_action_string_compare, 4 }, + [SWFDEC_AS_ACTION_STRING_LENGTH] = { "StringLength", 1, 1, swfdec_action_string_length, 4 }, + [SWFDEC_AS_ACTION_STRING_EXTRACT] = { "StringExtract", 3, 1, swfdec_action_string_extract, 4 }, + [SWFDEC_AS_ACTION_POP] = { "Pop", 1, 0, swfdec_action_pop, 4 }, + [SWFDEC_AS_ACTION_TO_INTEGER] = { "ToInteger", 1, 1, swfdec_action_to_integer, 4 }, + [SWFDEC_AS_ACTION_GET_VARIABLE] = { "GetVariable", 1, 1, swfdec_action_get_variable, 4 }, + [SWFDEC_AS_ACTION_SET_VARIABLE] = { "SetVariable", 2, 0, swfdec_action_set_variable, 4 }, /* version 3 */ - [SWFDEC_AS_ACTION_SET_TARGET2] = { "SetTarget2", NULL, 1, 0, swfdec_action_set_target2, 3 }, + [SWFDEC_AS_ACTION_SET_TARGET2] = { "SetTarget2", 1, 0, swfdec_action_set_target2, 3 }, /* version 4 */ - [SWFDEC_AS_ACTION_STRING_ADD] = { "StringAdd", NULL, 2, 1, swfdec_action_string_add, 4 }, - [SWFDEC_AS_ACTION_GET_PROPERTY] = { "GetProperty", NULL, 2, 1, swfdec_action_get_property, 4 }, - [SWFDEC_AS_ACTION_SET_PROPERTY] = { "SetProperty", NULL, 3, 0, swfdec_action_set_property, 4 }, - [SWFDEC_AS_ACTION_CLONE_SPRITE] = { "CloneSprite", NULL, 3, 0, swfdec_action_clone_sprite, 4 }, - [SWFDEC_AS_ACTION_REMOVE_SPRITE] = { "RemoveSprite", NULL, 1, 0, swfdec_action_remove_sprite, 4 }, - [SWFDEC_AS_ACTION_TRACE] = { "Trace", NULL, 1, 0, swfdec_action_trace, 4 }, - [SWFDEC_AS_ACTION_START_DRAG] = { "StartDrag", NULL, -1, 0, swfdec_action_start_drag, 4 }, - [SWFDEC_AS_ACTION_END_DRAG] = { "EndDrag", NULL, 0, 0, swfdec_action_end_drag, 4 }, - [SWFDEC_AS_ACTION_STRING_LESS] = { "StringLess", NULL, 2, 1, swfdec_action_string_compare, 4 }, + [SWFDEC_AS_ACTION_STRING_ADD] = { "StringAdd", 2, 1, swfdec_action_string_add, 4 }, + [SWFDEC_AS_ACTION_GET_PROPERTY] = { "GetProperty", 2, 1, swfdec_action_get_property, 4 }, + [SWFDEC_AS_ACTION_SET_PROPERTY] = { "SetProperty", 3, 0, swfdec_action_set_property, 4 }, + [SWFDEC_AS_ACTION_CLONE_SPRITE] = { "CloneSprite", 3, 0, swfdec_action_clone_sprite, 4 }, + [SWFDEC_AS_ACTION_REMOVE_SPRITE] = { "RemoveSprite", 1, 0, swfdec_action_remove_sprite, 4 }, + [SWFDEC_AS_ACTION_TRACE] = { "Trace", 1, 0, swfdec_action_trace, 4 }, + [SWFDEC_AS_ACTION_START_DRAG] = { "StartDrag", -1, 0, swfdec_action_start_drag, 4 }, + [SWFDEC_AS_ACTION_END_DRAG] = { "EndDrag", 0, 0, swfdec_action_end_drag, 4 }, + [SWFDEC_AS_ACTION_STRING_LESS] = { "StringLess", 2, 1, swfdec_action_string_compare, 4 }, /* version 7 */ - [SWFDEC_AS_ACTION_THROW] = { "Throw", NULL, 1, 0, swfdec_action_throw, 7 }, - [SWFDEC_AS_ACTION_CAST] = { "Cast", NULL, 2, 1, swfdec_action_cast, 7 }, - [SWFDEC_AS_ACTION_IMPLEMENTS] = { "Implements", NULL, -1, 0, swfdec_action_implements, 7 }, + [SWFDEC_AS_ACTION_THROW] = { "Throw", 1, 0, swfdec_action_throw, 7 }, + [SWFDEC_AS_ACTION_CAST] = { "Cast", 2, 1, swfdec_action_cast, 7 }, + [SWFDEC_AS_ACTION_IMPLEMENTS] = { "Implements", -1, 0, swfdec_action_implements, 7 }, /* version 4 */ - [SWFDEC_AS_ACTION_RANDOM] = { "RandomNumber", NULL, 1, 1, swfdec_action_random_number, 4 }, - [SWFDEC_AS_ACTION_MB_STRING_LENGTH] = { "MBStringLength", NULL, 1, 1, swfdec_action_string_length, 4 }, - [SWFDEC_AS_ACTION_CHAR_TO_ASCII] = { "CharToAscii", NULL, 1, 1, swfdec_action_char_to_ascii, 4 }, - [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", NULL, 1, 1, swfdec_action_ascii_to_char, 4 }, - [SWFDEC_AS_ACTION_GET_TIME] = { "GetTime", NULL, 0, 1, swfdec_action_get_time, 4 }, - [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract", NULL, 3, 1, swfdec_action_string_extract, 4 }, - [SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII] = { "MBCharToAscii", NULL, 1, 1, swfdec_action_char_to_ascii, 4 }, - [SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR] = { "MBAsciiToChar", NULL, 1, 1, swfdec_action_ascii_to_char, 4 }, + [SWFDEC_AS_ACTION_RANDOM] = { "RandomNumber", 1, 1, swfdec_action_random_number, 4 }, + [SWFDEC_AS_ACTION_MB_STRING_LENGTH] = { "MBStringLength", 1, 1, swfdec_action_string_length, 4 }, + [SWFDEC_AS_ACTION_CHAR_TO_ASCII] = { "CharToAscii", 1, 1, swfdec_action_char_to_ascii, 4 }, + [SWFDEC_AS_ACTION_ASCII_TO_CHAR] = { "AsciiToChar", 1, 1, swfdec_action_ascii_to_char, 4 }, + [SWFDEC_AS_ACTION_GET_TIME] = { "GetTime", 0, 1, swfdec_action_get_time, 4 }, + [SWFDEC_AS_ACTION_MB_STRING_EXTRACT] = { "MBStringExtract", 3, 1, swfdec_action_string_extract, 4 }, + [SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII] = { "MBCharToAscii", 1, 1, swfdec_action_char_to_ascii, 4 }, + [SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR] = { "MBAsciiToChar", 1, 1, swfdec_action_ascii_to_char, 4 }, /* version 5 */ - [SWFDEC_AS_ACTION_DELETE] = { "Delete", NULL, 2, 1, swfdec_action_delete, 5 }, - [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 1, swfdec_action_delete2, 5 }, - [SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, swfdec_action_define_local, 5 }, - [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, swfdec_action_call_function, 5 }, - [SWFDEC_AS_ACTION_RETURN] = { "Return", NULL, 1, 0, swfdec_action_return, 5 }, - [SWFDEC_AS_ACTION_MODULO] = { "Modulo", NULL, 2, 1, swfdec_action_modulo, 5 }, - [SWFDEC_AS_ACTION_NEW_OBJECT] = { "NewObject", NULL, -1, 1, swfdec_action_new_object, 5 }, - [SWFDEC_AS_ACTION_DEFINE_LOCAL2] = { "DefineLocal2", NULL, 1, 0, swfdec_action_define_local2, 5 }, - [SWFDEC_AS_ACTION_INIT_ARRAY] = { "InitArray", NULL, -1, 1, swfdec_action_init_array, 5 }, - [SWFDEC_AS_ACTION_INIT_OBJECT] = { "InitObject", NULL, -1, 1, swfdec_action_init_object, 5 }, - [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", NULL, 1, 1, swfdec_action_type_of, 5 }, - [SWFDEC_AS_ACTION_TARGET_PATH] = { "TargetPath", NULL, 1, 1, swfdec_action_target_path, 5 }, - [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", NULL, 1, -1, swfdec_action_enumerate, 5 }, - [SWFDEC_AS_ACTION_ADD2] = { "Add2", NULL, 2, 1, swfdec_action_add2, 5 }, - [SWFDEC_AS_ACTION_LESS2] = { "Less2", NULL, 2, 1, swfdec_action_new_comparison, 5 }, - [SWFDEC_AS_ACTION_EQUALS2] = { "Equals2", NULL, 2, 1, swfdec_action_equals2, 5 }, - [SWFDEC_AS_ACTION_TO_NUMBER] = { "ToNumber", NULL, 1, 1, swfdec_action_to_number, 5 }, - [SWFDEC_AS_ACTION_TO_STRING] = { "ToString", NULL, 1, 1, swfdec_action_to_string, 5 }, - [SWFDEC_AS_ACTION_PUSH_DUPLICATE] = { "PushDuplicate", NULL, 1, 2, swfdec_action_push_duplicate, 5 }, - [SWFDEC_AS_ACTION_SWAP] = { "Swap", NULL, 2, 2, swfdec_action_swap, 5 }, + [SWFDEC_AS_ACTION_DELETE] = { "Delete", 2, 1, swfdec_action_delete, 5 }, + [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", 1, 1, swfdec_action_delete2, 5 }, + [SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", 2, 0, swfdec_action_define_local, 5 }, + [SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", -1, 1, swfdec_action_call_function, 5 }, + [SWFDEC_AS_ACTION_RETURN] = { "Return", 1, 0, swfdec_action_return, 5 }, + [SWFDEC_AS_ACTION_MODULO] = { "Modulo", 2, 1, swfdec_action_modulo, 5 }, + [SWFDEC_AS_ACTION_NEW_OBJECT] = { "NewObject", -1, 1, swfdec_action_new_object, 5 }, + [SWFDEC_AS_ACTION_DEFINE_LOCAL2] = { "DefineLocal2", 1, 0, swfdec_action_define_local2, 5 }, + [SWFDEC_AS_ACTION_INIT_ARRAY] = { "InitArray", -1, 1, swfdec_action_init_array, 5 }, + [SWFDEC_AS_ACTION_INIT_OBJECT] = { "InitObject", -1, 1, swfdec_action_init_object, 5 }, + [SWFDEC_AS_ACTION_TYPE_OF] = { "TypeOf", 1, 1, swfdec_action_type_of, 5 }, + [SWFDEC_AS_ACTION_TARGET_PATH] = { "TargetPath", 1, 1, swfdec_action_target_path, 5 }, + [SWFDEC_AS_ACTION_ENUMERATE] = { "Enumerate", 1, -1, swfdec_action_enumerate, 5 }, + [SWFDEC_AS_ACTION_ADD2] = { "Add2", 2, 1, swfdec_action_add2, 5 }, + [SWFDEC_AS_ACTION_LESS2] = { "Less2", 2, 1, swfdec_action_new_comparison, 5 }, + [SWFDEC_AS_ACTION_EQUALS2] = { "Equals2", 2, 1, swfdec_action_equals2, 5 }, + [SWFDEC_AS_ACTION_TO_NUMBER] = { "ToNumber", 1, 1, swfdec_action_to_number, 5 }, + [SWFDEC_AS_ACTION_TO_STRING] = { "ToString", 1, 1, swfdec_action_to_string, 5 }, + [SWFDEC_AS_ACTION_PUSH_DUPLICATE] = { "PushDuplicate", 1, 2, swfdec_action_push_duplicate, 5 }, + [SWFDEC_AS_ACTION_SWAP] = { "Swap", 2, 2, swfdec_action_swap, 5 }, /* version 4 */ - [SWFDEC_AS_ACTION_GET_MEMBER] = { "GetMember", NULL, 2, 1, swfdec_action_get_member, 4 }, - [SWFDEC_AS_ACTION_SET_MEMBER] = { "SetMember", NULL, 3, 0, swfdec_action_set_member, 4 }, + [SWFDEC_AS_ACTION_GET_MEMBER] = { "GetMember", 2, 1, swfdec_action_get_member, 4 }, + [SWFDEC_AS_ACTION_SET_MEMBER] = { "SetMember", 3, 0, swfdec_action_set_member, 4 }, /* version 5 */ - [SWFDEC_AS_ACTION_INCREMENT] = { "Increment", NULL, 1, 1, swfdec_action_increment, 5 }, - [SWFDEC_AS_ACTION_DECREMENT] = { "Decrement", NULL, 1, 1, swfdec_action_decrement, 5 }, - [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", NULL, -1, 1, swfdec_action_call_method, 5 }, - [SWFDEC_AS_ACTION_NEW_METHOD] = { "NewMethod", NULL, -1, 1, swfdec_action_new_method, 5 }, + [SWFDEC_AS_ACTION_INCREMENT] = { "Increment", 1, 1, swfdec_action_increment, 5 }, + [SWFDEC_AS_ACTION_DECREMENT] = { "Decrement", 1, 1, swfdec_action_decrement, 5 }, + [SWFDEC_AS_ACTION_CALL_METHOD] = { "CallMethod", -1, 1, swfdec_action_call_method, 5 }, + [SWFDEC_AS_ACTION_NEW_METHOD] = { "NewMethod", -1, 1, swfdec_action_new_method, 5 }, /* version 6 */ - [SWFDEC_AS_ACTION_INSTANCE_OF] = { "InstanceOf", NULL, 2, 1, swfdec_action_instance_of, 6 }, - [SWFDEC_AS_ACTION_ENUMERATE2] = { "Enumerate2", NULL, 1, -1, swfdec_action_enumerate2, 6 }, - [SWFDEC_AS_ACTION_BREAKPOINT] = { "Breakpoint", NULL, -1, -1, NULL, 6 }, + [SWFDEC_AS_ACTION_INSTANCE_OF] = { "InstanceOf", 2, 1, swfdec_action_instance_of, 6 }, + [SWFDEC_AS_ACTION_ENUMERATE2] = { "Enumerate2", 1, -1, swfdec_action_enumerate2, 6 }, + [SWFDEC_AS_ACTION_BREAKPOINT] = { "Breakpoint", -1, -1, NULL, 6 }, /* version 5 */ - [SWFDEC_AS_ACTION_BIT_AND] = { "BitAnd", NULL, 2, 1, swfdec_action_bitwise, 5 }, - [SWFDEC_AS_ACTION_BIT_OR] = { "BitOr", NULL, 2, 1, swfdec_action_bitwise, 5 }, - [SWFDEC_AS_ACTION_BIT_XOR] = { "BitXor", NULL, 2, 1, swfdec_action_bitwise, 5 }, - [SWFDEC_AS_ACTION_BIT_LSHIFT] = { "BitLShift", NULL, 2, 1, swfdec_action_shift, 5 }, - [SWFDEC_AS_ACTION_BIT_RSHIFT] = { "BitRShift", NULL, 2, 1, swfdec_action_shift, 5 }, - [SWFDEC_AS_ACTION_BIT_URSHIFT] = { "BitURShift", NULL, 2, 1, swfdec_action_shift, 5 }, + [SWFDEC_AS_ACTION_BIT_AND] = { "BitAnd", 2, 1, swfdec_action_bitwise, 5 }, + [SWFDEC_AS_ACTION_BIT_OR] = { "BitOr", 2, 1, swfdec_action_bitwise, 5 }, + [SWFDEC_AS_ACTION_BIT_XOR] = { "BitXor", 2, 1, swfdec_action_bitwise, 5 }, + [SWFDEC_AS_ACTION_BIT_LSHIFT] = { "BitLShift", 2, 1, swfdec_action_shift, 5 }, + [SWFDEC_AS_ACTION_BIT_RSHIFT] = { "BitRShift", 2, 1, swfdec_action_shift, 5 }, + [SWFDEC_AS_ACTION_BIT_URSHIFT] = { "BitURShift", 2, 1, swfdec_action_shift, 5 }, /* version 6 */ - [SWFDEC_AS_ACTION_STRICT_EQUALS] = { "StrictEquals", NULL, 2, 1, swfdec_action_strict_equals, 6 }, - [SWFDEC_AS_ACTION_GREATER] = { "Greater", NULL, 2, 1, swfdec_action_new_comparison, 6 }, - [SWFDEC_AS_ACTION_STRING_GREATER] = { "StringGreater", NULL, 2, 1, swfdec_action_string_compare, 6 }, + [SWFDEC_AS_ACTION_STRICT_EQUALS] = { "StrictEquals", 2, 1, swfdec_action_strict_equals, 6 }, + [SWFDEC_AS_ACTION_GREATER] = { "Greater", 2, 1, swfdec_action_new_comparison, 6 }, + [SWFDEC_AS_ACTION_STRING_GREATER] = { "StringGreater", 2, 1, swfdec_action_string_compare, 6 }, /* version 7 */ - [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, swfdec_action_extends, 7 }, + [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", 2, 0, swfdec_action_extends, 7 }, /* version 1 */ - [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, swfdec_action_goto_frame, 1 }, - [SWFDEC_AS_ACTION_GET_URL] = { "GetURL", swfdec_action_print_get_url, 0, 0, swfdec_action_get_url, 1 }, + [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", 0, 0, swfdec_action_goto_frame, 1 }, + [SWFDEC_AS_ACTION_GET_URL] = { "GetURL", 0, 0, swfdec_action_get_url, 1 }, /* version 5 */ - [SWFDEC_AS_ACTION_STORE_REGISTER] = { "StoreRegister", swfdec_action_print_store_register, 1, 1, swfdec_action_store_register, 5 }, - [SWFDEC_AS_ACTION_CONSTANT_POOL] = { "ConstantPool", swfdec_action_print_constant_pool, 0, 0, swfdec_action_constant_pool, 5 }, - [SWFDEC_AS_ACTION_STRICT_MODE] = { "StrictMode", NULL, -1, -1, NULL, 5 }, + [SWFDEC_AS_ACTION_STORE_REGISTER] = { "StoreRegister", 1, 1, swfdec_action_store_register, 5 }, + [SWFDEC_AS_ACTION_CONSTANT_POOL] = { "ConstantPool", 0, 0, swfdec_action_constant_pool, 5 }, + [SWFDEC_AS_ACTION_STRICT_MODE] = { "StrictMode", -1, -1, NULL, 5 }, /* version 1 */ - [SWFDEC_AS_ACTION_WAIT_FOR_FRAME] = { "WaitForFrame", swfdec_action_print_wait_for_frame, 0, 0, swfdec_action_wait_for_frame, 1 }, - [SWFDEC_AS_ACTION_SET_TARGET] = { "SetTarget", swfdec_action_print_set_target, 0, 0, swfdec_action_set_target, 1 }, + [SWFDEC_AS_ACTION_WAIT_FOR_FRAME] = { "WaitForFrame", 0, 0, swfdec_action_wait_for_frame, 1 }, + [SWFDEC_AS_ACTION_SET_TARGET] = { "SetTarget", 0, 0, swfdec_action_set_target, 1 }, /* version 3 */ - [SWFDEC_AS_ACTION_GOTO_LABEL] = { "GotoLabel", swfdec_action_print_goto_label, 0, 0, swfdec_action_goto_label, 3 }, + [SWFDEC_AS_ACTION_GOTO_LABEL] = { "GotoLabel", 0, 0, swfdec_action_goto_label, 3 }, /* version 4 */ - [SWFDEC_AS_ACTION_WAIT_FOR_FRAME2] = { "WaitForFrame2", swfdec_action_print_wait_for_frame2, 1, 0, swfdec_action_wait_for_frame2, 4 }, + [SWFDEC_AS_ACTION_WAIT_FOR_FRAME2] = { "WaitForFrame2", 1, 0, swfdec_action_wait_for_frame2, 4 }, /* version 7 */ - [SWFDEC_AS_ACTION_DEFINE_FUNCTION2] = { "DefineFunction2", swfdec_action_print_define_function, 0, -1, swfdec_action_define_function, 7 }, - [SWFDEC_AS_ACTION_TRY] = { "Try", NULL, 0, 0, swfdec_action_try, 7 }, + [SWFDEC_AS_ACTION_DEFINE_FUNCTION2] = { "DefineFunction2", 0, -1, swfdec_action_define_function, 7 }, + [SWFDEC_AS_ACTION_TRY] = { "Try", 0, 0, swfdec_action_try, 7 }, /* version 5 */ - [SWFDEC_AS_ACTION_WITH] = { "With", swfdec_action_print_with, 1, 0, swfdec_action_with, 5 }, + [SWFDEC_AS_ACTION_WITH] = { "With", 1, 0, swfdec_action_with, 5 }, /* version 4 */ - [SWFDEC_AS_ACTION_PUSH] = { "Push", swfdec_action_print_push, 0, -1, swfdec_action_push, 4 }, - [SWFDEC_AS_ACTION_JUMP] = { "Jump", swfdec_action_print_jump, 0, 0, swfdec_action_jump, 4 }, - [SWFDEC_AS_ACTION_GET_URL2] = { "GetURL2", swfdec_action_print_get_url2, 2, 0, swfdec_action_get_url2, 4 }, + [SWFDEC_AS_ACTION_PUSH] = { "Push", 0, -1, swfdec_action_push, 4 }, + [SWFDEC_AS_ACTION_JUMP] = { "Jump", 0, 0, swfdec_action_jump, 4 }, + [SWFDEC_AS_ACTION_GET_URL2] = { "GetURL2", 2, 0, swfdec_action_get_url2, 4 }, /* version 5 */ - [SWFDEC_AS_ACTION_DEFINE_FUNCTION] = { "DefineFunction", swfdec_action_print_define_function, 0, -1, swfdec_action_define_function, 5 }, + [SWFDEC_AS_ACTION_DEFINE_FUNCTION] = { "DefineFunction", 0, -1, swfdec_action_define_function, 5 }, /* version 4 */ - [SWFDEC_AS_ACTION_IF] = { "If", swfdec_action_print_if, 1, 0, swfdec_action_if, 4 }, - [SWFDEC_AS_ACTION_CALL] = { "Call", NULL, -1, -1, NULL, 4 }, - [SWFDEC_AS_ACTION_GOTO_FRAME2] = { "GotoFrame2", swfdec_action_print_goto_frame2, 1, 0, swfdec_action_goto_frame2, 4 } + [SWFDEC_AS_ACTION_IF] = { "If", 1, 0, swfdec_action_if, 4 }, + [SWFDEC_AS_ACTION_CALL] = { "Call", -1, -1, NULL, 4 }, + [SWFDEC_AS_ACTION_GOTO_FRAME2] = { "GotoFrame2", 1, 0, swfdec_action_goto_frame2, 4 } }; diff --git a/swfdec/swfdec_as_interpret.h b/swfdec/swfdec_as_interpret.h index 36f2f3fd..f7a77a20 100644 --- a/swfdec/swfdec_as_interpret.h +++ b/swfdec/swfdec_as_interpret.h @@ -26,7 +26,6 @@ G_BEGIN_DECLS typedef struct { const char * name; /* name identifying the action */ - char * (* print) (guint action, const guint8 *data, guint len); int remove; /* values removed from stack or -1 for dynamic */ int add; /* values added to the stack or -1 for dynamic */ void (* exec) (SwfdecAsContext *cx, guint action, const guint8 *data, guint len); diff --git a/swfdec/swfdec_as_math.c b/swfdec/swfdec_as_math.c index 5ec53a81..ad3942aa 100644 --- a/swfdec/swfdec_as_math.c +++ b/swfdec/swfdec_as_math.c @@ -42,11 +42,11 @@ swfdec_as_math_ ## name (SwfdecAsContext *cx, SwfdecAsObject *object, \ { \ double d, unused; \ \ - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); \ + *ret = swfdec_as_value_from_number (cx, NAN); \ SWFDEC_AS_CHECK (0, NULL, "n|n", &d, &unused); \ \ d = name (d); \ - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); \ + *ret = swfdec_as_value_from_number (cx, d); \ } SWFDEC_AS_NATIVE (200, 16, swfdec_as_math_acos) @@ -79,10 +79,10 @@ swfdec_as_math_abs (SwfdecAsContext *cx, SwfdecAsObject *object, { double d, unused; - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); SWFDEC_AS_CHECK (0, NULL, "n|n", &d, &unused); - SWFDEC_AS_VALUE_SET_NUMBER (ret, fabs (d)); + *ret = swfdec_as_value_from_number (cx, fabs (d)); } SWFDEC_AS_NATIVE (200, 5, swfdec_as_math_atan2) @@ -92,10 +92,10 @@ swfdec_as_math_atan2 (SwfdecAsContext *cx, SwfdecAsObject *object, { double x, y; - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); SWFDEC_AS_CHECK (0, NULL, "nn", &y, &x); - SWFDEC_AS_VALUE_SET_NUMBER (ret, atan2 (y, x)); + *ret = swfdec_as_value_from_number (cx, atan2 (y, x)); } SWFDEC_AS_NATIVE (200, 2, swfdec_as_math_max) @@ -106,13 +106,13 @@ swfdec_as_math_max (SwfdecAsContext *cx, SwfdecAsObject *object, double x, y; if (argc == 0) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, -HUGE_VAL); + *ret = swfdec_as_value_from_number (cx, -HUGE_VAL); } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); } SWFDEC_AS_CHECK (0, NULL, "nn", &x, &y); - SWFDEC_AS_VALUE_SET_NUMBER (ret, isnan (x) || isnan (y) ? NAN : MAX (x, y)); + *ret = swfdec_as_value_from_number (cx, isnan (x) || isnan (y) ? NAN : MAX (x, y)); } SWFDEC_AS_NATIVE (200, 1, swfdec_as_math_min) @@ -123,13 +123,13 @@ swfdec_as_math_min (SwfdecAsContext *cx, SwfdecAsObject *object, double x, y; if (argc == 0) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, HUGE_VAL); + *ret = swfdec_as_value_from_number (cx, HUGE_VAL); } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); } SWFDEC_AS_CHECK (0, NULL, "nn", &x, &y); - SWFDEC_AS_VALUE_SET_NUMBER (ret, isnan (x) || isnan (y) ? NAN : MIN (x, y)); + *ret = swfdec_as_value_from_number (cx, isnan (x) || isnan (y) ? NAN : MIN (x, y)); } SWFDEC_AS_NATIVE (200, 17, swfdec_as_math_pow) @@ -139,10 +139,10 @@ swfdec_as_math_pow (SwfdecAsContext *cx, SwfdecAsObject *object, { double x, y; - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); SWFDEC_AS_CHECK (0, NULL, "nn", &x, &y); - SWFDEC_AS_VALUE_SET_NUMBER (ret, isfinite (x) ? pow (x, y): NAN); + *ret = swfdec_as_value_from_number (cx, isfinite (x) ? pow (x, y): NAN); } SWFDEC_AS_NATIVE (200, 11, swfdec_as_math_random) @@ -152,10 +152,10 @@ swfdec_as_math_random (SwfdecAsContext *cx, SwfdecAsObject *object, { double unused, unused2; - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); SWFDEC_AS_CHECK (0, NULL, "|nn", &unused, &unused2); - SWFDEC_AS_VALUE_SET_NUMBER (ret, g_rand_double (cx->rand)); + *ret = swfdec_as_value_from_number (cx, g_rand_double (cx->rand)); } SWFDEC_AS_NATIVE (200, 10, swfdec_as_math_round) @@ -165,8 +165,8 @@ swfdec_as_math_round (SwfdecAsContext *cx, SwfdecAsObject *object, { double d, unused; - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); SWFDEC_AS_CHECK (0, NULL, "n|n", &d, &unused); - SWFDEC_AS_VALUE_SET_NUMBER (ret, floor (d + 0.5)); + *ret = swfdec_as_value_from_number (cx, floor (d + 0.5)); } diff --git a/swfdec/swfdec_as_movie_value.c b/swfdec/swfdec_as_movie_value.c new file mode 100644 index 00000000..821c4afa --- /dev/null +++ b/swfdec/swfdec_as_movie_value.c @@ -0,0 +1,113 @@ +/* Swfdec + * Copyright (C) 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_as_movie_value.h" + +#include <string.h> + +#include "swfdec_as_gcable.h" +#include "swfdec_as_strings.h" +#include "swfdec_movie.h" +#include "swfdec_player_internal.h" + +SwfdecAsMovieValue * +swfdec_as_movie_value_new (SwfdecMovie *movie, const char *name) +{ + SwfdecAsMovieValue *val, *parent; + SwfdecAsContext *context; + guint i, n_names; + + g_assert (SWFDEC_IS_MOVIE (movie)); + g_assert (name != NULL); + g_assert (name != SWFDEC_AS_STR_EMPTY); + + context = swfdec_gc_object_get_context (movie); + parent = movie->parent ? movie->parent->as_value : NULL; + n_names = parent ? parent->n_names + 1 : 1; + + val = swfdec_as_gcable_alloc (context, sizeof (SwfdecAsMovieValue) + n_names * sizeof (const char *)); + val->player = SWFDEC_PLAYER (context); + val->movie = movie; + val->n_names = n_names; + val->names[n_names - 1] = name; + movie = movie->parent; + for (i = n_names - 2; movie; i--) { + if (movie->name != SWFDEC_AS_STR_EMPTY) { + val->names[i] = movie->name; + } else { + val->names[i] = movie->as_value->names[i]; + }; + movie = movie->parent; + } + + SWFDEC_AS_GCABLE_SET_NEXT (val, context->movies); + context->movies = val; + + return val; +} + +void +swfdec_as_movie_value_mark (SwfdecAsMovieValue *value) +{ + guint i; + + g_assert (value != NULL); + + SWFDEC_AS_GCABLE_SET_FLAG ((SwfdecAsGcable *) value, SWFDEC_AS_GC_MARK); + + if (value->movie) + swfdec_gc_object_mark (value->movie); + for (i = 0; i < value->n_names; i++) { + swfdec_as_string_mark (value->names[i]); + } +} + +static SwfdecMovie * +swfdec_player_get_movie_by_name (SwfdecPlayer *player, const char *name) +{ + GList *walk; + + for (walk = player->priv->roots; walk; walk = walk->next) { + SwfdecMovie *cur = walk->data; + if (cur->as_value->names[0] == name) + return cur; + } + return NULL; +} + +SwfdecMovie * +swfdec_as_movie_value_get (SwfdecAsMovieValue *value) +{ + SwfdecMovie *movie; + guint i; + + g_assert (value != NULL); + g_assert (value->movie == NULL); /* checked by macros */ + + /* FIXME: getting a root movie by name should be simpler */ + movie = swfdec_player_get_movie_by_name (value->player, value->names[0]); + for (i = 1; i < value->n_names && movie; i++) { + movie = swfdec_movie_get_by_name (movie, value->names[i], TRUE); + } + return movie; +} diff --git a/swfdec/swfdec_as_movie_value.h b/swfdec/swfdec_as_movie_value.h new file mode 100644 index 00000000..29f0f20a --- /dev/null +++ b/swfdec/swfdec_as_movie_value.h @@ -0,0 +1,50 @@ +/* Swfdec + * Copyright (C) 2008 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_AS_MOVIE_VALUE_H_ +#define _SWFDEC_AS_MOVIE_VALUE_H_ + +#include <swfdec/swfdec.h> +#include <swfdec/swfdec_types.h> + +G_BEGIN_DECLS + +typedef struct _SwfdecAsMovieValue SwfdecAsMovieValue; +struct _SwfdecAsMovieValue { + SwfdecAsMovieValue * next; /* required for GC'd stuff */ + /* FIXME: I'd like to get rid of this */ + SwfdecPlayer * player; /* current player instance */ + SwfdecMovie * movie; /* reference to the movie while it isn't destroyed */ + guint n_names; /* number of names */ + const char * names[]; /* gc'd strings of the names of all movies */ +}; + +SwfdecAsMovieValue * + swfdec_as_movie_value_new (SwfdecMovie * movie, + const char * name); +#define swfdec_as_movie_value_free(value) swfdec_as_gcable_free (SWFDEC_AS_CONTEXT ((value)->player), \ + (value), sizeof (SwfdecAsMovieValue) + (value)->n_names * sizeof (const char *)) + +void swfdec_as_movie_value_mark (SwfdecAsMovieValue * value); + +SwfdecMovie * swfdec_as_movie_value_get (SwfdecAsMovieValue * value); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c index 7fbe5b2e..e827066b 100644 --- a/swfdec/swfdec_as_native_function.c +++ b/swfdec/swfdec_as_native_function.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -63,12 +63,6 @@ swfdec_as_native_function_call (SwfdecAsFunction *function, SwfdecAsObject *this SwfdecAsValue rval = { 0, }; SwfdecAsValue *argv; - if (construct && native->construct_type != 0 && - !g_type_is_a (G_OBJECT_TYPE (thisp), native->construct_type)) { - SWFDEC_FIXME ("Swfdec can't handle call to native constructor with invalid type"); - return; - } - g_assert (native->name); swfdec_as_frame_init_native (&frame, cx); @@ -83,8 +77,10 @@ swfdec_as_native_function_call (SwfdecAsFunction *function, SwfdecAsObject *this frame.target = frame.next->original_target; frame.original_target = frame.target; } - if (thisp) - swfdec_as_frame_set_this (&frame, swfdec_as_object_resolve (thisp)); + if (thisp) { + thisp = swfdec_as_object_resolve (thisp); + swfdec_as_frame_set_this (&frame, thisp); + } frame.argc = n_args; frame.argv = args; frame.return_value = return_value; @@ -114,18 +110,10 @@ swfdec_as_native_function_call (SwfdecAsFunction *function, SwfdecAsObject *this argv[i] = *cur; } } - native->native (cx, frame.thisp, frame.argc, argv, &rval); + native->native (cx, thisp, frame.argc, argv, &rval); if (argv != frame.argv) g_free (argv); - swfdec_as_frame_return (&frame, &rval); -} - -static char * -swfdec_as_native_function_debug (SwfdecAsObject *object) -{ - SwfdecAsNativeFunction *native = SWFDEC_AS_NATIVE_FUNCTION (object); - - return g_strdup_printf ("%s ()", native->name); + swfdec_as_context_return (cx, &rval); } static void @@ -143,13 +131,10 @@ static void swfdec_as_native_function_class_init (SwfdecAsNativeFunctionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); SwfdecAsFunctionClass *function_class = SWFDEC_AS_FUNCTION_CLASS (klass); object_class->dispose = swfdec_as_native_function_dispose; - asobject_class->debug = swfdec_as_native_function_debug; - function_class->call = swfdec_as_native_function_call; } @@ -163,8 +148,6 @@ swfdec_as_native_function_init (SwfdecAsNativeFunction *function) * @context: a #SwfdecAsContext * @name: name of the function * @native: function to call when executed - * @prototype: The object to be used as "prototype" property for the created - * function or %NULL for none. * * Creates a new native function, that will execute @native when called. You * might want to use swfdec_as_object_add_function() instead of this function. @@ -173,49 +156,41 @@ swfdec_as_native_function_init (SwfdecAsNativeFunction *function) **/ SwfdecAsFunction * swfdec_as_native_function_new (SwfdecAsContext *context, const char *name, - SwfdecAsNative native, SwfdecAsObject *prototype) + SwfdecAsNative native) { - SwfdecAsNativeFunction *fun; + SwfdecAsFunction *fun; + SwfdecAsObject *object; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (native != NULL, NULL); - g_return_val_if_fail (prototype == NULL || SWFDEC_IS_AS_OBJECT (prototype), NULL); - fun = g_object_new (SWFDEC_TYPE_AS_NATIVE_FUNCTION, "context", context, NULL); - fun->native = native; - fun->name = g_strdup (name); - /* need to set prototype before setting the constructor or Function.constructor - * being CONSTANT disallows setting it. */ - if (prototype) { - SwfdecAsValue val; - SWFDEC_AS_VALUE_SET_OBJECT (&val, prototype); - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (fun), SWFDEC_AS_STR_prototype, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - } - swfdec_as_function_set_constructor (SWFDEC_AS_FUNCTION (fun)); + fun = swfdec_as_native_function_new_bare (context, name, native); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun)); - return SWFDEC_AS_FUNCTION (fun); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_Function, NULL); + swfdec_as_object_set_variable_flags (object, SWFDEC_AS_STR___proto__, SWFDEC_AS_VARIABLE_VERSION_6_UP); + + return fun; } -/** - * swfdec_as_native_function_set_construct_type: - * @function: a #SwfdecAsNativeFunction - * @type: #GType used when constructing an object with @function - * - * Sets the @type to be used when using @function as a constructor. If this is - * not set, using @function as a constructor will create a #SwfdecAsObject. - **/ -void -swfdec_as_native_function_set_construct_type (SwfdecAsNativeFunction *function, GType type) +SwfdecAsFunction * +swfdec_as_native_function_new_bare (SwfdecAsContext *context, const char *name, + SwfdecAsNative native) { - GTypeQuery query; + SwfdecAsNativeFunction *fun; + SwfdecAsObject *object; + + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (native != NULL, NULL); + + fun = g_object_new (SWFDEC_TYPE_AS_NATIVE_FUNCTION, "context", context, NULL); + fun->native = native; + fun->name = g_strdup (name); - g_return_if_fail (SWFDEC_IS_AS_NATIVE_FUNCTION (function)); - g_return_if_fail (g_type_is_a (type, SWFDEC_TYPE_AS_OBJECT)); + object = swfdec_as_object_new_empty (context); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (fun)); - g_type_query (type, &query); - function->construct_type = type; - function->construct_size = query.instance_size; + return SWFDEC_AS_FUNCTION (fun); } /** @@ -260,6 +235,12 @@ swfdec_as_native_function_set_construct_type (SwfdecAsNativeFunction *function, * </para></listitem> * <listitem><para>"i": convert to integer. Requires an %integer pointer * </para></listitem> + * <listitem><para>"m": convert to an existing movieclip. This is only valid + * inside Swfdec. Requires a %SwfdecMovie pointer. + * </para></listitem> + * <listitem><para>"M": convert to a movieclip or %NULL. This is only valid + * inside Swfdec. If the movie has already been destroyed, + * the pointer will be set to %NULL</para></listitem> * <listitem><para>"n": convert to number. Requires a %double pointer * </para></listitem> * <listitem><para>"o": convert to object. Requires a #SwfdecAsObject pointer. @@ -325,9 +306,13 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object, /* check that we got a valid type */ if (type) { - if (!G_TYPE_CHECK_INSTANCE_TYPE (object, type)) - return FALSE; - *result = object; + if (G_TYPE_CHECK_INSTANCE_TYPE (object, type)) { + *result = object; + } else if (object && G_TYPE_CHECK_INSTANCE_TYPE (object->relay, type)) { + *result = object->relay; + } else { + return FALSE; + } } for (i = 0; *args && i < argc; i++, args++) { switch (*args) { @@ -340,32 +325,47 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object, case 'b': { gboolean *b = va_arg (varargs, gboolean *); - *b = swfdec_as_value_to_boolean (cx, &argv[i]); + *b = swfdec_as_value_to_boolean (cx, argv[i]); } break; case 'i': { int *j = va_arg (varargs, int *); - *j = swfdec_as_value_to_integer (cx, &argv[i]); + *j = swfdec_as_value_to_integer (cx, argv[i]); + } + break; + case 'm': + case 'M': + { + SwfdecMovie *m; + SwfdecMovie **arg = va_arg (varargs, SwfdecMovie **); + if (SWFDEC_AS_VALUE_IS_MOVIE (argv[i])) { + m = SWFDEC_AS_VALUE_GET_MOVIE (argv[i]); + } else { + m = NULL; + } + if (m == NULL && *args != 'M') + return FALSE; + *arg = m; } break; case 'n': { double *d = va_arg (varargs, double *); - *d = swfdec_as_value_to_number (cx, &argv[i]); + *d = swfdec_as_value_to_number (cx, argv[i]); } break; case 's': { const char **s = va_arg (varargs, const char **); - *s = swfdec_as_value_to_string (cx, &argv[i]); + *s = swfdec_as_value_to_string (cx, argv[i]); } break; case 'o': case 'O': { SwfdecAsObject **o = va_arg (varargs, SwfdecAsObject **); - *o = swfdec_as_value_to_object (cx, &argv[i]); + *o = swfdec_as_value_to_object (cx, argv[i]); if (*o == NULL && *args != 'O') return FALSE; } diff --git a/swfdec/swfdec_as_native_function.h b/swfdec/swfdec_as_native_function.h index 283d3cc4..add13a80 100644 --- a/swfdec/swfdec_as_native_function.h +++ b/swfdec/swfdec_as_native_function.h @@ -42,9 +42,6 @@ struct _SwfdecAsNativeFunction { SwfdecAsNative native; /* native call or NULL when script */ char * name; /* function name */ - /* constructor info */ - GType construct_type; /* type used when used as a constructor or 0 */ - guint construct_size; /* instance size of type */ }; struct _SwfdecAsNativeFunctionClass { @@ -55,12 +52,7 @@ GType swfdec_as_native_function_get_type (void); SwfdecAsFunction *swfdec_as_native_function_new (SwfdecAsContext * context, const char * name, - SwfdecAsNative native, - SwfdecAsObject * prototype); - -void swfdec_as_native_function_set_construct_type - (SwfdecAsNativeFunction *function, - GType type); + SwfdecAsNative native); gboolean swfdec_as_native_function_check (SwfdecAsContext * cx, SwfdecAsObject * object, diff --git a/swfdec/swfdec_as_number.c b/swfdec/swfdec_as_number.c index 75d0cb53..06c74eae 100644 --- a/swfdec/swfdec_as_number.c +++ b/swfdec/swfdec_as_number.c @@ -31,7 +31,7 @@ #include "swfdec_as_strings.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsNumber, swfdec_as_number, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecAsNumber, swfdec_as_number, SWFDEC_TYPE_AS_RELAY) static void swfdec_as_number_class_init (SwfdecAsNumberClass *klass) @@ -45,7 +45,7 @@ swfdec_as_number_init (SwfdecAsNumber *number) /*** AS CODE ***/ -SWFDEC_AS_CONSTRUCTOR (106, 2, swfdec_as_number_construct, swfdec_as_number_get_type) +SWFDEC_AS_NATIVE (106, 2, swfdec_as_number_construct) void swfdec_as_number_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) @@ -53,17 +53,18 @@ swfdec_as_number_construct (SwfdecAsContext *cx, SwfdecAsObject *object, double d; if (argc > 0) { - d = swfdec_as_value_to_number (swfdec_gc_object_get_context (object), &argv[0]); + d = swfdec_as_value_to_number (cx, argv[0]); } else { - d = NAN; + d = 0; } if (swfdec_as_context_is_constructing (cx)) { - SwfdecAsNumber *num = SWFDEC_AS_NUMBER (object); + SwfdecAsNumber *num = g_object_new (SWFDEC_TYPE_AS_NUMBER, "context", cx, NULL); num->number = d; + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (num)); SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } else { - SWFDEC_AS_VALUE_SET_NUMBER (ret, d); + *ret = swfdec_as_value_from_number (cx, d); } } @@ -125,8 +126,8 @@ swfdec_as_number_toString (SwfdecAsContext *cx, SwfdecAsObject *object, if (radix == 10 || radix < 2 || radix > 36 || isinf (num->number) || isnan (num->number)) { - SWFDEC_AS_VALUE_SET_NUMBER (&val, num->number); - s = swfdec_as_value_to_string (cx, &val); + val = swfdec_as_value_from_number (cx, num->number); + s = swfdec_as_value_to_string (cx, val); } else { s = swfdec_as_number_toStringRadix (cx, num->number, radix); } @@ -140,11 +141,9 @@ swfdec_as_number_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecAsNumber *num; - if (!SWFDEC_IS_AS_NUMBER (object)) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_NUMBER, &num, ""); - num = SWFDEC_AS_NUMBER (object); - SWFDEC_AS_VALUE_SET_NUMBER (ret, num->number); + *ret = swfdec_as_value_from_number (cx, num->number); } // only available as ASnative diff --git a/swfdec/swfdec_as_number.h b/swfdec/swfdec_as_number.h index eeb1c1c0..9290715d 100644 --- a/swfdec/swfdec_as_number.h +++ b/swfdec/swfdec_as_number.h @@ -20,8 +20,7 @@ #ifndef _SWFDEC_AS_NUMBER_H_ #define _SWFDEC_AS_NUMBER_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -36,13 +35,13 @@ typedef struct _SwfdecAsNumberClass SwfdecAsNumberClass; #define SWFDEC_AS_NUMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_NUMBER, SwfdecAsNumberClass)) struct _SwfdecAsNumber { - SwfdecAsObject object; + SwfdecAsRelay relay; double number; /* number represented by this number object */ }; struct _SwfdecAsNumberClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_as_number_get_type (void); diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c index 2e92e085..8ea79fc3 100644 --- a/swfdec/swfdec_as_object.c +++ b/swfdec/swfdec_as_object.c @@ -21,19 +21,25 @@ #include "config.h" #endif +#include <stdlib.h> #include <string.h> #include "swfdec_as_object.h" + +#include "swfdec_as_array.h" #include "swfdec_as_context.h" #include "swfdec_as_frame_internal.h" #include "swfdec_as_internal.h" #include "swfdec_as_native_function.h" +#include "swfdec_as_relay.h" #include "swfdec_as_stack.h" #include "swfdec_as_string.h" #include "swfdec_as_strings.h" #include "swfdec_as_super.h" #include "swfdec_debug.h" #include "swfdec_movie.h" +#include "swfdec_resource.h" +#include "swfdec_utils.h" /** * SECTION:SwfdecAsObject @@ -118,19 +124,18 @@ struct _SwfdecAsVariable { }; typedef struct { + SwfdecAsContext * context; /* context this watch operates in */ SwfdecAsFunction * watch; /* watcher or %NULL */ SwfdecAsValue watch_data; /* user data to watcher */ guint refcount; /* refcount - misused for recursion detection */ } SwfdecAsWatch; -G_DEFINE_TYPE (SwfdecAsObject, swfdec_as_object, SWFDEC_TYPE_GC_OBJECT) - static gboolean swfdec_as_watch_can_recurse (SwfdecAsWatch *watch) { guint version; - version = swfdec_gc_object_get_context (watch->watch)->version; + version = watch->context->version; if (version <= 6) { return watch->refcount <= 1; } else { @@ -149,7 +154,7 @@ swfdec_as_watch_unref (SwfdecAsWatch *watch) { watch->refcount--; if (watch->refcount == 0) { - swfdec_as_context_unuse_mem (swfdec_gc_object_get_context (watch->watch), + swfdec_as_context_unuse_mem (watch->context, sizeof (SwfdecAsWatch)); g_slice_free (SwfdecAsWatch, watch); } @@ -173,40 +178,33 @@ swfdec_as_object_free_property (gpointer key, gpointer value, gpointer data) { SwfdecAsObject *object = data; - swfdec_as_context_unuse_mem (swfdec_gc_object_get_context (object), sizeof (SwfdecAsVariable)); + swfdec_as_context_unuse_mem (object->context, sizeof (SwfdecAsVariable)); g_slice_free (SwfdecAsVariable, value); } -static void -swfdec_as_object_dispose (GObject *gobject) +void +swfdec_as_object_free (SwfdecAsContext *context, SwfdecAsObject *object) { - SwfdecAsContext *context = swfdec_gc_object_get_context (gobject); - SwfdecAsObject *object = SWFDEC_AS_OBJECT (gobject); - if (context->debugger) { SwfdecAsDebuggerClass *klass = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger); if (klass->remove) klass->remove (context->debugger, context, object); } - if (object->properties) { - g_hash_table_foreach (object->properties, swfdec_as_object_free_property, object); - g_hash_table_destroy (object->properties); - object->properties = NULL; - } + g_hash_table_foreach (object->properties, swfdec_as_object_free_property, object); + g_hash_table_destroy (object->properties); + if (object->watches) { g_hash_table_foreach_steal (object->watches, swfdec_as_object_steal_watches, object); g_hash_table_destroy (object->watches); - object->watches = NULL; } g_slist_free (object->interfaces); - object->interfaces = NULL; - G_OBJECT_CLASS (swfdec_as_object_parent_class)->dispose (gobject); + swfdec_as_gcable_free (context, object, sizeof (SwfdecAsObject)); } static void -swfdec_gc_object_mark_property (gpointer key, gpointer value, gpointer unused) +swfdec_as_object_mark_property (gpointer key, gpointer value, gpointer unused) { SwfdecAsVariable *var = value; @@ -221,7 +219,7 @@ swfdec_gc_object_mark_property (gpointer key, gpointer value, gpointer unused) } static void -swfdec_gc_object_mark_watch (gpointer key, gpointer value, gpointer unused) +swfdec_as_object_mark_watch (gpointer key, gpointer value, gpointer unused) { SwfdecAsWatch *watch = value; @@ -230,17 +228,31 @@ swfdec_gc_object_mark_watch (gpointer key, gpointer value, gpointer unused) swfdec_as_value_mark (&watch->watch_data); } -static void -swfdec_as_object_mark (SwfdecGcObject *gc) +/** + * swfdec_as_object_mark: + * @object: the object to mark + * + * Mark @object as being in use. Calling this function is only valid during + * the marking phase of garbage collection. + **/ +void +swfdec_as_object_mark (SwfdecAsObject *object) { - SwfdecAsObject *object = SWFDEC_AS_OBJECT (gc); + g_return_if_fail (object != NULL); + + if (SWFDEC_AS_GCABLE_FLAG_IS_SET ((SwfdecAsGcable *) object, SWFDEC_AS_GC_MARK)) + return; + + SWFDEC_AS_GCABLE_SET_FLAG ((SwfdecAsGcable *) object, SWFDEC_AS_GC_MARK); if (object->prototype) - swfdec_gc_object_mark (object->prototype); - g_hash_table_foreach (object->properties, swfdec_gc_object_mark_property, NULL); + swfdec_as_object_mark (object->prototype); + g_hash_table_foreach (object->properties, swfdec_as_object_mark_property, NULL); if (object->watches) - g_hash_table_foreach (object->watches, swfdec_gc_object_mark_watch, NULL); - g_slist_foreach (object->interfaces, (GFunc) swfdec_gc_object_mark, NULL); + g_hash_table_foreach (object->watches, swfdec_as_object_mark_watch, NULL); + if (object->relay) + swfdec_gc_object_mark (object->relay); + g_slist_foreach (object->interfaces, (GFunc) swfdec_as_object_mark, NULL); } static gboolean @@ -260,7 +272,7 @@ swfdec_as_object_hash_lookup (SwfdecAsObject *object, const char *variable) { SwfdecAsVariable *var = g_hash_table_lookup (object->properties, variable); - if (var || swfdec_gc_object_get_context (object)->version >= 7) + if (var || object->context->version >= 7) return var; var = g_hash_table_find (object->properties, swfdec_as_object_lookup_case_insensitive, (gpointer) variable); return var; @@ -273,7 +285,7 @@ swfdec_as_object_hash_create (SwfdecAsObject *object, const char *variable, guin if (!swfdec_as_variable_name_is_valid (variable)) return NULL; - swfdec_as_context_use_mem (swfdec_gc_object_get_context (object), sizeof (SwfdecAsVariable)); + swfdec_as_context_use_mem (object->context, sizeof (SwfdecAsVariable)); var = g_slice_new0 (SwfdecAsVariable); var->flags = flags; g_hash_table_insert (object->properties, (gpointer) variable, var); @@ -299,39 +311,17 @@ swfdec_as_object_variable_enabled_in_version (SwfdecAsVariable *var, return TRUE; } -static gboolean -swfdec_as_object_do_get (SwfdecAsObject *object, SwfdecAsObject *orig, - const char *variable, SwfdecAsValue *val, guint *flags) -{ - SwfdecAsVariable *var = swfdec_as_object_hash_lookup (object, variable); - - if (var == NULL) - return FALSE; - - /* variable flag checks */ - if (!swfdec_as_object_variable_enabled_in_version (var, - swfdec_gc_object_get_context (object)->version)) - return FALSE; - - if (var->get) { - swfdec_as_function_call (var->get, orig, 0, NULL, val); - *flags = var->flags; - } else { - *val = var->value; - *flags = var->flags; - } - return TRUE; -} - static SwfdecAsWatch * swfdec_as_watch_new (SwfdecAsFunction *function) { SwfdecAsWatch *watch; + SwfdecAsContext *cx; - swfdec_as_context_use_mem (swfdec_gc_object_get_context (function), - sizeof (SwfdecAsWatch)); + cx = swfdec_gc_object_get_context (function); + swfdec_as_context_use_mem (cx, sizeof (SwfdecAsWatch)); watch = g_slice_new (SwfdecAsWatch); + watch->context = cx; watch->refcount = 1; watch->watch = function; SWFDEC_AS_VALUE_SET_UNDEFINED (&watch->watch_data); @@ -348,9 +338,9 @@ swfdec_as_object_get_prototype_internal (SwfdecAsObject *object) { int version; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + g_return_val_if_fail (object != NULL, NULL); - version = swfdec_gc_object_get_context (object)->version; + version = object->context->version; if (object->prototype == NULL) return NULL; @@ -381,9 +371,9 @@ swfdec_as_object_get_prototype (SwfdecAsObject *object) int version; SwfdecAsObject *prototype; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + g_return_val_if_fail (object != NULL, NULL); - version = swfdec_gc_object_get_context (object)->version; + version = object->context->version; prototype = swfdec_as_object_get_prototype_internal (object); @@ -433,7 +423,7 @@ swfdec_as_object_hash_lookup_with_prototype (SwfdecAsObject *object, } if (i == SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT) { - swfdec_as_context_abort (swfdec_gc_object_get_context (object), "Prototype recursion limit exceeded"); + swfdec_as_context_abort (object->context, "Prototype recursion limit exceeded"); return NULL; } } @@ -444,136 +434,6 @@ swfdec_as_object_hash_lookup_with_prototype (SwfdecAsObject *object, return var; } -static void -swfdec_as_object_do_set (SwfdecAsObject *object, const char *variable, - const SwfdecAsValue *val, guint flags) -{ - SwfdecAsVariable *var; - SwfdecAsWatch *watch; - SwfdecAsObject *proto; - - if (!swfdec_as_variable_name_is_valid (variable)) - return; - - var = swfdec_as_object_hash_lookup_with_prototype (object, variable, &proto); - if (swfdec_as_context_is_aborted (swfdec_gc_object_get_context (object))) - return; - - // if variable is disabled in this version - if (var != NULL && !swfdec_as_object_variable_enabled_in_version (var, - swfdec_gc_object_get_context (object)->version)) { - if (proto == NULL) { - // it's at the top level, remove getter and setter plus overwrite - var->get = NULL; - var->set = NULL; - } else { - // it's in proto, we create a new one at the top level - var = NULL; - } - } - - if (var == NULL) { - var = swfdec_as_object_hash_create (object, variable, flags); - if (var == NULL) - return; - } else { - if (var->flags & SWFDEC_AS_VARIABLE_CONSTANT) - return; - // remove the flags that could make this variable hidden - if (swfdec_gc_object_get_context (object)->version == 6) { - // version 6, so let's forget SWFDEC_AS_VARIABLE_VERSION_7_UP flag, oops! - // we will still set the value though, even if that flag is set - var->flags &= ~(SWFDEC_AS_VARIABLE_VERSION_6_UP | - SWFDEC_AS_VARIABLE_VERSION_NOT_6 | SWFDEC_AS_VARIABLE_VERSION_8_UP | - SWFDEC_AS_VARIABLE_VERSION_9_UP); - } else { - var->flags &= ~(SWFDEC_AS_VARIABLE_VERSION_6_UP | - SWFDEC_AS_VARIABLE_VERSION_NOT_6 | SWFDEC_AS_VARIABLE_VERSION_7_UP | - SWFDEC_AS_VARIABLE_VERSION_8_UP | SWFDEC_AS_VARIABLE_VERSION_9_UP); - } - } - if (object->watches) { - SwfdecAsValue ret = *val; - watch = g_hash_table_lookup (object->watches, variable); - /* FIXME: figure out if this limit here is correct. Add a watch in Flash 7 - * and set a variable using Flash 6 */ - if (watch && swfdec_as_watch_can_recurse (watch)) { - SwfdecAsValue args[4]; - SWFDEC_AS_VALUE_SET_STRING (&args[0], variable); - args[1] = var->value; - args[2] = *val; - args[3] = watch->watch_data; - swfdec_as_watch_ref (watch); - swfdec_as_function_call (watch->watch, object, 4, args, &ret); - swfdec_as_watch_unref (watch); - var = swfdec_as_object_hash_lookup_with_prototype (object, variable, - NULL); - if (swfdec_as_context_is_aborted (swfdec_gc_object_get_context (object))) - return; - if (var == NULL) { - SWFDEC_INFO ("watch removed variable %s", variable); - return; - } - } - - var->value = ret; - } else { - watch = NULL; - } - if (var->get) { - if (var->set) { - SwfdecAsValue tmp; - swfdec_as_function_call (var->set, object, 1, val, &tmp); - } - } else if (watch == NULL) { - var->value = *val; - } - - if (variable == SWFDEC_AS_STR___proto__) { - if (SWFDEC_AS_VALUE_IS_OBJECT (val) && - !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (val))) { - object->prototype = SWFDEC_AS_VALUE_GET_OBJECT (val); - object->prototype_flags = var->flags; - } else { - object->prototype = NULL; - object->prototype_flags = 0; - } - } -} - -static void -swfdec_as_object_do_set_flags (SwfdecAsObject *object, const char *variable, guint flags, guint mask) -{ - SwfdecAsVariable *var = swfdec_as_object_hash_lookup (object, variable); - - if (var) { - var->flags = (var->flags & ~mask) | flags; - - if (variable == SWFDEC_AS_STR___proto__) - object->prototype_flags = var->flags; - } -} - -static SwfdecAsDeleteReturn -swfdec_as_object_do_delete (SwfdecAsObject *object, const char *variable) -{ - SwfdecAsVariable *var; - - var = g_hash_table_lookup (object->properties, variable); - if (var == NULL) - return SWFDEC_AS_DELETE_NOT_FOUND; - if (var->flags & SWFDEC_AS_VARIABLE_PERMANENT) - return SWFDEC_AS_DELETE_NOT_DELETED; - - // Note: We won't remove object->prototype, even if __proto__ is deleted - - swfdec_as_object_free_property (NULL, var, object); - if (!g_hash_table_remove (object->properties, variable)) { - g_assert_not_reached (); - } - return SWFDEC_AS_DELETE_DELETED; -} - typedef struct { SwfdecAsObject * object; SwfdecAsVariableForeach func; @@ -593,16 +453,6 @@ swfdec_as_object_hash_foreach (gpointer key, gpointer value, gpointer data) fdata->retval = fdata->func (fdata->object, key, &var->value, var->flags, fdata->data); } -/* FIXME: does not do Adobe Flash's order for Enumerate actions */ -static gboolean -swfdec_as_object_do_foreach (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) -{ - ForeachData fdata = { object, func, data, TRUE }; - - g_hash_table_foreach (object->properties, swfdec_as_object_hash_foreach, &fdata); - return fdata.retval; -} - typedef struct { SwfdecAsObject * object; SwfdecAsVariableForeachRemove func; @@ -639,7 +489,7 @@ swfdec_as_object_foreach_remove (SwfdecAsObject *object, SwfdecAsVariableForeach { ForeachRemoveData fdata = { object, func, data }; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), 0); + g_return_val_if_fail (object != NULL, 0); g_return_val_if_fail (func != NULL, 0); return g_hash_table_foreach_remove (object->properties, @@ -686,7 +536,7 @@ swfdec_as_object_foreach_rename (SwfdecAsObject *object, SwfdecAsVariableForeach { ForeachRenameData fdata = { object, NULL, func, data }; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (func != NULL); fdata.properties_new = g_hash_table_new (g_direct_hash, g_direct_equal); @@ -695,60 +545,6 @@ swfdec_as_object_foreach_rename (SwfdecAsObject *object, SwfdecAsVariableForeach object->properties = fdata.properties_new; } -static char * -swfdec_as_object_do_debug (SwfdecAsObject *object) -{ - if (G_OBJECT_TYPE (object) != SWFDEC_TYPE_AS_OBJECT) - return g_strdup (G_OBJECT_TYPE_NAME (object)); - - return g_strdup ("Object"); -} - -static GObject * -swfdec_as_object_constructor (GType type, guint n_construct_properties, - GObjectConstructParam *construct_properties) -{ - GObject *gobject; - SwfdecAsContext *context; - - gobject = G_OBJECT_CLASS (swfdec_as_object_parent_class)->constructor (type, - n_construct_properties, construct_properties); - - context = swfdec_gc_object_get_context (gobject); - if (context->debugger) { - SwfdecAsDebuggerClass *dklass = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger); - if (dklass->add) - dklass->add (context->debugger, context, SWFDEC_AS_OBJECT (gobject)); - } - - return gobject; -} - -static void -swfdec_as_object_class_init (SwfdecAsObjectClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); - - object_class->constructor = swfdec_as_object_constructor; - object_class->dispose = swfdec_as_object_dispose; - - gc_class->mark = swfdec_as_object_mark; - - klass->get = swfdec_as_object_do_get; - klass->set = swfdec_as_object_do_set; - klass->set_flags = swfdec_as_object_do_set_flags; - klass->del = swfdec_as_object_do_delete; - klass->foreach = swfdec_as_object_do_foreach; - klass->debug = swfdec_as_object_do_debug; -} - -static void -swfdec_as_object_init (SwfdecAsObject *object) -{ - object->properties = g_hash_table_new (g_direct_hash, g_direct_equal); -} - /** * swfdec_as_object_new_empty: * @context: a #SwfdecAsContext @@ -765,35 +561,54 @@ swfdec_as_object_new_empty (SwfdecAsContext *context) { g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - return g_object_new (SWFDEC_TYPE_AS_OBJECT, "context", context, NULL); + return swfdec_as_object_new (context, NULL); } /** * swfdec_as_object_new: * @context: a #SwfdecAsContext + * @...: %NULL-terminated list of names of the constructor or %NULL for an + * empty object. * - * Allocates a new Object. This does the same as the Actionscript code - * "new Object()". + * Allocates a new object and if @name is not %NULL, runs the constructor. + * Name is a list of variables to get from the global context as the + * constructor. * * Returns: the new object **/ SwfdecAsObject * -swfdec_as_object_new (SwfdecAsContext *context) +swfdec_as_object_new (SwfdecAsContext *context, ...) { - SwfdecAsObject *object; - SwfdecAsValue val; + SwfdecAsObject *object, *fun; + SwfdecAsValue rval; + const char *name; + va_list args; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - g_assert (context->Object); - g_assert (context->Object_prototype); - object = swfdec_as_object_new_empty (context); - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object); - swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype); - swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + object = swfdec_as_gcable_new (context, SwfdecAsObject); + object->context = context; + object->properties = g_hash_table_new (g_direct_hash, g_direct_equal); + SWFDEC_AS_GCABLE_SET_NEXT ((SwfdecAsGcable *) object, context->objects); + context->objects = object; + if (context->debugger) { + SwfdecAsDebuggerClass *dklass = SWFDEC_AS_DEBUGGER_GET_CLASS (context->debugger); + if (dklass->add) + dklass->add (context->debugger, context, object); + } + + va_start (args, context); + name = va_arg (args, const char *); + if (name == NULL) + return object; + + g_return_val_if_fail (context->global, NULL); + fun = swfdec_as_object_set_constructor_by_namev (object, name, args); + va_end (args); + if (SWFDEC_IS_AS_FUNCTION (fun->relay)) { + swfdec_as_function_call_full (SWFDEC_AS_FUNCTION (fun->relay), object, + TRUE, object->prototype, 0, NULL, &rval); + } return object; } @@ -824,20 +639,156 @@ void swfdec_as_object_set_variable_and_flags (SwfdecAsObject *object, const char *variable, const SwfdecAsValue *value, guint default_flags) { - SwfdecAsObjectClass *klass; + SwfdecAsVariable *var; + SwfdecAsWatch *watch; + SwfdecAsObject *proto; + SwfdecAsContext *context; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (variable != NULL); - g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); - if (swfdec_gc_object_get_context (object)->debugger) { - SwfdecAsDebugger *debugger = swfdec_gc_object_get_context (object)->debugger; + context = object->context; + + /* FIXME: in front of or after debugger check? */ + if (!swfdec_as_variable_name_is_valid (variable) || + swfdec_as_context_is_aborted (context) || + object->super) + return; + + if (context->debugger) { + SwfdecAsDebugger *debugger = context->debugger; SwfdecAsDebuggerClass *dklass = SWFDEC_AS_DEBUGGER_GET_CLASS (debugger); if (dklass->set_variable) - dklass->set_variable (debugger, swfdec_gc_object_get_context (object), object, variable, value); + dklass->set_variable (debugger, context, object, variable, value); + } + + if (object->movie) { + SwfdecMovie *movie = SWFDEC_MOVIE (object->relay); + + guint prop_id = swfdec_movie_property_lookup (variable); + if (prop_id != G_MAXUINT) { + swfdec_movie_property_set (movie, prop_id, *value); + return; + } + + swfdec_movie_call_variable_listeners (movie, variable, value); + } + + var = swfdec_as_object_hash_lookup_with_prototype (object, variable, &proto); + + // if variable is disabled in this version + if (var != NULL && !swfdec_as_object_variable_enabled_in_version (var, context->version)) { + if (proto == NULL) { + // it's at the top level, remove getter and setter plus overwrite + var->get = NULL; + var->set = NULL; + } else { + // it's in proto, we create a new one at the top level + var = NULL; + } + } + + if (var == NULL) { + var = swfdec_as_object_hash_create (object, variable, default_flags); + if (var == NULL) + return; + } else { + if (var->flags & SWFDEC_AS_VARIABLE_CONSTANT) + return; + // remove the flags that could make this variable hidden + if (context->version == 6) { + // version 6, so let's forget SWFDEC_AS_VARIABLE_VERSION_7_UP flag, oops! + // we will still set the value though, even if that flag is set + var->flags &= ~(SWFDEC_AS_VARIABLE_VERSION_6_UP | + SWFDEC_AS_VARIABLE_VERSION_NOT_6 | SWFDEC_AS_VARIABLE_VERSION_8_UP | + SWFDEC_AS_VARIABLE_VERSION_9_UP); + } else { + var->flags &= ~(SWFDEC_AS_VARIABLE_VERSION_6_UP | + SWFDEC_AS_VARIABLE_VERSION_NOT_6 | SWFDEC_AS_VARIABLE_VERSION_7_UP | + SWFDEC_AS_VARIABLE_VERSION_8_UP | SWFDEC_AS_VARIABLE_VERSION_9_UP); + } + } + if (object->watches) { + SwfdecAsValue ret = *value; + watch = g_hash_table_lookup (object->watches, variable); + /* FIXME: figure out if this limit here is correct. Add a watch in Flash 7 + * and set a variable using Flash 6 */ + if (watch && swfdec_as_watch_can_recurse (watch)) { + SwfdecAsValue args[4]; + SWFDEC_AS_VALUE_SET_STRING (&args[0], variable); + args[1] = var->value; + args[2] = *value; + args[3] = watch->watch_data; + swfdec_as_watch_ref (watch); + swfdec_as_function_call (watch->watch, object, 4, args, &ret); + swfdec_as_watch_unref (watch); + var = swfdec_as_object_hash_lookup_with_prototype (object, variable, NULL); + if (var == NULL) { + SWFDEC_INFO ("watch removed variable %s", variable); + return; + } + } + + var->value = ret; + } else { + watch = NULL; + } + + if (object->array) { + /* if we changed to smaller length, destroy all values that are outside it */ + if (!swfdec_strcmp (context->version, variable, + SWFDEC_AS_STR_length)) + { + gint32 length_old = swfdec_as_array_get_length (object); + gint32 length_new = swfdec_as_value_to_integer (context, *value); + length_new = MAX (0, length_new); + if (length_old > length_new) { + swfdec_as_array_remove_range (object, length_new, + length_old - length_new); + } + } + } + + if (var->get) { + if (var->set) { + SwfdecAsValue tmp; + swfdec_as_function_call (var->set, object, 1, value, &tmp); + } + } else if (watch == NULL) { + var->value = *value; + } + + if (variable == SWFDEC_AS_STR___proto__) { + if (SWFDEC_AS_VALUE_IS_OBJECT (*value)) { + object->prototype = SWFDEC_AS_VALUE_GET_OBJECT (*value); + object->prototype_flags = var->flags; + } else { + object->prototype = NULL; + object->prototype_flags = 0; + } + } + + /* If we are an array, do the special magic now */ + if (object->array) { + char *end; + gint32 l; + + /* if we added new value outside the current length, set a bigger length */ + l = strtoul (variable, &end, 10); + if (*end == '\0') { + SwfdecAsValue tmp; + gint32 length; + swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &tmp); + length = swfdec_as_value_to_integer (context, tmp); + if (l >= length) { + object->array = FALSE; + tmp = swfdec_as_value_from_integer (context, l + 1); + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_length, &tmp, + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + object->array = TRUE; + } + } } - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - klass->set (object, variable, value, default_flags); } /** @@ -900,15 +851,16 @@ gboolean swfdec_as_object_get_variable_and_flags (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint *flags, SwfdecAsObject **pobject) { - SwfdecAsObjectClass *klass; + SwfdecAsContext *context; guint i; SwfdecAsValue tmp_val; guint tmp_flags; SwfdecAsObject *tmp_pobject, *cur, *resolve; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); + g_return_val_if_fail (object != NULL, FALSE); g_return_val_if_fail (variable != NULL, FALSE); + context = object->context; if (value == NULL) value = &tmp_val; if (flags == NULL) @@ -916,26 +868,74 @@ swfdec_as_object_get_variable_and_flags (SwfdecAsObject *object, if (pobject == NULL) pobject = &tmp_pobject; - cur = object; + if (object->super) { + cur = SWFDEC_AS_SUPER (object->relay)->object; + if (cur) + cur = cur->prototype; + } else { + cur = object; + } + resolve = NULL; for (i = 0; i <= SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT && cur != NULL; i++) { - klass = SWFDEC_AS_OBJECT_GET_CLASS (cur); - if (klass->get (cur, object, variable, value, flags)) { + SwfdecAsVariable *var; + + var = swfdec_as_object_hash_lookup (cur, variable); + if (var != NULL && + swfdec_as_object_variable_enabled_in_version (var, context->version)) { + if (var->get) { + swfdec_as_function_call (var->get, object, 0, NULL, value); + *flags = var->flags; + } else { + *value = var->value; + *flags = var->flags; + } *pobject = cur; return TRUE; } + + if (cur->movie) { + SwfdecMovie *movie, *ret; + guint prop_id; + + movie = SWFDEC_MOVIE (cur->relay); + + if (context->version > 5 && variable == SWFDEC_AS_STR__global) { + /* FIXME: current global or movie's global? */ + SWFDEC_AS_VALUE_SET_OBJECT (value, swfdec_as_relay_get_as_object ( + SWFDEC_AS_RELAY (movie->resource->sandbox))); + *flags = 0; + *pobject = cur; + return TRUE; + } + + ret = swfdec_movie_get_by_name (movie, variable, FALSE); + if (ret) { + SWFDEC_AS_VALUE_SET_MOVIE (value, ret); + *flags = 0; + *pobject = cur; + return TRUE; + } + + prop_id = swfdec_movie_property_lookup (variable); + if (prop_id != G_MAXUINT) { + *value = swfdec_movie_property_get (movie, prop_id); + *flags = 0; + *pobject = cur; + return TRUE; + } + } + if (resolve == NULL) { - SwfdecAsVariable *var = - swfdec_as_object_hash_lookup (cur, SWFDEC_AS_STR___resolve); + var = swfdec_as_object_hash_lookup (cur, SWFDEC_AS_STR___resolve); - if (var != NULL && (swfdec_gc_object_get_context (object)->version <= 6 || - SWFDEC_AS_VALUE_IS_OBJECT (&var->value))) + if (var != NULL && (context->version <= 6 || SWFDEC_AS_VALUE_IS_COMPOSITE (var->value))) resolve = cur; } cur = swfdec_as_object_get_prototype_internal (cur); } if (i > SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT) { - swfdec_as_context_abort (swfdec_gc_object_get_context (object), "Prototype recursion limit exceeded"); + swfdec_as_context_abort (context, "Prototype recursion limit exceeded"); SWFDEC_AS_VALUE_SET_UNDEFINED (value); *flags = 0; *pobject = NULL; @@ -945,18 +945,16 @@ swfdec_as_object_get_variable_and_flags (SwfdecAsObject *object, SwfdecAsValue argv; SwfdecAsVariable *var; SwfdecAsFunction *fun; - SwfdecAsContext *context; *flags = 0; *pobject = resolve; SWFDEC_AS_VALUE_SET_UNDEFINED (value); - context = swfdec_gc_object_get_context (resolve); var = swfdec_as_object_hash_lookup (resolve, SWFDEC_AS_STR___resolve); g_assert (var != NULL); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&var->value)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (var->value)) return FALSE; - fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&var->value); + fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (var->value)->relay); if (!SWFDEC_IS_AS_FUNCTION (fun)) return FALSE; SWFDEC_AS_VALUE_SET_STRING (&argv, variable); @@ -989,7 +987,7 @@ swfdec_as_object_has_variable (SwfdecAsObject *object, const char *variable) guint i; SwfdecAsVariable *var; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); + g_return_val_if_fail (object != NULL, FALSE); for (i = 0; i <= SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT && object != NULL; i++) { var = swfdec_as_object_hash_lookup (object, variable); @@ -1015,13 +1013,24 @@ swfdec_as_object_has_variable (SwfdecAsObject *object, const char *variable) SwfdecAsDeleteReturn swfdec_as_object_delete_variable (SwfdecAsObject *object, const char *variable) { - SwfdecAsObjectClass *klass; + SwfdecAsVariable *var; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); + g_return_val_if_fail (object != NULL, FALSE); g_return_val_if_fail (variable != NULL, FALSE); - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - return klass->del (object, variable); + var = g_hash_table_lookup (object->properties, variable); + if (var == NULL) + return SWFDEC_AS_DELETE_NOT_FOUND; + if (var->flags & SWFDEC_AS_VARIABLE_PERMANENT) + return SWFDEC_AS_DELETE_NOT_DELETED; + + // Note: We won't remove object->prototype, even if __proto__ is deleted + + swfdec_as_object_free_property (NULL, var, object); + if (!g_hash_table_remove (object->properties, variable)) { + g_assert_not_reached (); + } + return SWFDEC_AS_DELETE_DELETED; } /** @@ -1033,7 +1042,7 @@ swfdec_as_object_delete_variable (SwfdecAsObject *object, const char *variable) void swfdec_as_object_delete_all_variables (SwfdecAsObject *object) { - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_hash_table_foreach (object->properties, swfdec_as_object_free_property, object); g_hash_table_remove_all (object->properties); @@ -1051,13 +1060,19 @@ void swfdec_as_object_set_variable_flags (SwfdecAsObject *object, const char *variable, SwfdecAsVariableFlag flags) { - SwfdecAsObjectClass *klass; + SwfdecAsVariable *var; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (variable != NULL); - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - klass->set_flags (object, variable, flags, flags); + var = swfdec_as_object_hash_lookup (object, variable); + if (var == NULL) + return; + + var->flags |= flags; + + if (variable == SWFDEC_AS_STR___proto__) + object->prototype_flags = var->flags; } /** @@ -1073,13 +1088,20 @@ void swfdec_as_object_unset_variable_flags (SwfdecAsObject *object, const char *variable, SwfdecAsVariableFlag flags) { - SwfdecAsObjectClass *klass; + SwfdecAsVariable *var; + - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (variable != NULL); - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - klass->set_flags (object, variable, 0, flags); + var = swfdec_as_object_hash_lookup (object, variable); + if (var == NULL) + return; + + var->flags &= ~flags; + + if (variable == SWFDEC_AS_STR___proto__) + object->prototype_flags = var->flags; } /** @@ -1097,83 +1119,125 @@ gboolean swfdec_as_object_foreach (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) { - SwfdecAsObjectClass *klass; + ForeachData fdata = { object, func, data, TRUE }; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); + g_return_val_if_fail (object != NULL, FALSE); g_return_val_if_fail (func != NULL, FALSE); - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - g_return_val_if_fail (klass->foreach != NULL, FALSE); - return klass->foreach (object, func, data); + /* FIXME: does not do Adobe Flash's order for Enumerate actions */ + g_hash_table_foreach (object->properties, swfdec_as_object_hash_foreach, &fdata); + if (!fdata.retval) + return FALSE; + + if (object->movie) { + SwfdecMovie *movie = SWFDEC_MOVIE (object->relay); + SwfdecAsValue val; + GList *walk; + + for (walk = movie->list; walk; walk = walk->next) { + SwfdecMovie *cur = walk->data; + if (cur->name == SWFDEC_AS_STR_EMPTY) + continue; + SWFDEC_AS_VALUE_SET_MOVIE (&val, cur); + if (!func (object, cur->name, &val, 0, data)) + return FALSE; + } + } + + return TRUE; } /*** SIMPLIFICATIONS ***/ -static void -swfdec_as_object_do_nothing (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) +static gboolean +swfdec_as_object_enumerate_foreach (SwfdecAsObject *object, const char *variable, + SwfdecAsValue *value, guint flags, gpointer listp) { + GSList **list = listp; + + if (flags & SWFDEC_AS_VARIABLE_HIDDEN) + return TRUE; + + *list = g_slist_remove (*list, variable); + *list = g_slist_prepend (*list, (gpointer) variable); + return TRUE; } /** - * swfdec_as_object_add_function: - * @object: a #SwfdecAsObject - * @name: name of the function. The string does not have to be - * garbage-collected. - * @native: a native function or %NULL to just not do anything + * swfdec_as_object_enumerate: + * @object: the object to enumerate * - * Adds @native as a variable named @name to @object. The newly added variable - * will not be enumerated. + * Enumerates all non-hidden properties of a given object and its prototypes + * and returns their names as garbage-collected strings in a list. This + * function is a special case of swfdec_as_object_foreach(). * - * Returns: the newly created #SwfdecAsFunction + * Returns: a GSList of all properties of the object. You need to + * g_slist_free() the list after use. **/ -SwfdecAsFunction * -swfdec_as_object_add_function (SwfdecAsObject *object, const char *name, SwfdecAsNative native) +GSList * +swfdec_as_object_enumerate (SwfdecAsObject *object) { - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); - g_return_val_if_fail (name != NULL, NULL); + guint i; + GSList *list = NULL; + + for (i = 0; i < SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT && object; i++) { + swfdec_as_object_foreach (object, swfdec_as_object_enumerate_foreach, &list); + object = swfdec_as_object_get_prototype (object); + } + if (i == 256) { + swfdec_as_context_abort (object->context, "Prototype recursion limit exceeded"); + g_slist_free (list); + return NULL; + } +#if 0 + list = g_slist_reverse (list); +#else + /* we force an alphabetical order into the list for now. This is wrong, + * but at least ensures reproducability */ + list = g_slist_sort (list, (GCompareFunc) strcmp); +#endif + return list; +} - return swfdec_as_object_add_constructor (object, name, 0, native, NULL); +static void +swfdec_as_object_do_nothing (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) +{ } /** - * swfdec_as_object_add_constructor: + * swfdec_as_object_add_function: * @object: a #SwfdecAsObject * @name: name of the function. The string does not have to be * garbage-collected. - * @construct_type: type used when using this function as a constructor. May - * be 0 to use the default type. * @native: a native function or %NULL to just not do anything - * @prototype: An optional object to be set as the "prototype" property of the - * new function. The prototype will be hidden and constant. * - * Adds @native as a constructor named @name to @object. The newly added variable + * Adds @native as a variable named @name to @object. The newly added variable * will not be enumerated. * * Returns: the newly created #SwfdecAsFunction **/ SwfdecAsFunction * -swfdec_as_object_add_constructor (SwfdecAsObject *object, const char *name, - GType construct_type, SwfdecAsNative native, SwfdecAsObject *prototype) +swfdec_as_object_add_function (SwfdecAsObject *object, const char *name, SwfdecAsNative native) { SwfdecAsFunction *function; + SwfdecAsContext *cx; SwfdecAsValue val; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (construct_type == 0 || g_type_is_a (construct_type, SWFDEC_TYPE_AS_OBJECT), NULL); - g_return_val_if_fail (prototype == NULL || SWFDEC_IS_AS_OBJECT (prototype), NULL); + cx = object->context; if (!native) native = swfdec_as_object_do_nothing; - function = swfdec_as_native_function_new (swfdec_gc_object_get_context (object), name, native, prototype); - if (construct_type != 0) - swfdec_as_native_function_set_construct_type (SWFDEC_AS_NATIVE_FUNCTION (function), construct_type); - name = swfdec_as_context_get_string (swfdec_gc_object_get_context (object), name); - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (function)); + function = swfdec_as_native_function_new (cx, name, native); + + name = swfdec_as_context_get_string (cx, name); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function))); /* FIXME: I'd like to make sure no such property exists yet */ swfdec_as_object_set_variable_and_flags (object, name, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + return function; } @@ -1190,15 +1254,23 @@ swfdec_as_object_run (SwfdecAsObject *object, SwfdecScript *script) SwfdecAsFrame frame = { NULL, }; SwfdecAsContext *context; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (script != NULL); - context = swfdec_gc_object_get_context (object); + context = object->context; swfdec_as_frame_init (&frame, context, script); + if (object->movie) { + frame.target = SWFDEC_MOVIE (object->relay); + frame.original_target = frame.target; + } swfdec_as_frame_set_this (&frame, object); - swfdec_as_frame_preload (&frame); - /* we take no prisoners */ - frame.activation = NULL; + swfdec_as_frame_preload (context, &frame); + if (object->movie) { + frame.activation = NULL; + } else { + frame.activation = object; + frame.scope_chain = g_slist_append (frame.scope_chain, object); + } swfdec_as_context_run (context); swfdec_as_stack_pop (context); } @@ -1227,17 +1299,17 @@ swfdec_as_object_call (SwfdecAsObject *object, const char *name, guint argc, SwfdecAsValue tmp; SwfdecAsFunction *fun; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), TRUE); + g_return_val_if_fail (object != NULL, TRUE); g_return_val_if_fail (name != NULL, TRUE); g_return_val_if_fail (argc == 0 || argv != NULL, TRUE); - g_return_val_if_fail (swfdec_gc_object_get_context (object)->global != NULL, TRUE); /* for SwfdecPlayer */ + g_return_val_if_fail (object->context->global != NULL, TRUE); /* for SwfdecPlayer */ if (return_value) SWFDEC_AS_VALUE_SET_UNDEFINED (return_value); swfdec_as_object_get_variable (object, name, &tmp); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&tmp)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (tmp)) return FALSE; - fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&tmp); + fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (tmp)->relay; if (!SWFDEC_IS_AS_FUNCTION (fun)) return FALSE; swfdec_as_function_call (fun, object, argc, argv, return_value ? return_value : &tmp); @@ -1260,56 +1332,21 @@ swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, const SwfdecAsValue *args, SwfdecAsValue *return_value) { SwfdecAsValue val; - SwfdecAsObject *new; + SwfdecAsObject *new, *fun_object; SwfdecAsContext *context; - SwfdecAsFunction *cur; - guint i, size = 0; - GType type = 0; g_return_if_fail (SWFDEC_IS_AS_FUNCTION (fun)); - // FIXME: The way we decide object's type is wrong - // It seems to be actually possible to change the type inside a constructor - // (many times) by changing this.__proto__.__constructor__ and calling super - context = swfdec_gc_object_get_context (fun); - cur = fun; - i = 0; - do { - if (SWFDEC_IS_AS_NATIVE_FUNCTION (cur)) { - SwfdecAsNativeFunction *native = SWFDEC_AS_NATIVE_FUNCTION (cur); - if (native->construct_size) { - type = native->construct_type; - size = native->construct_size; - break; - } - } - i++; - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (cur), SWFDEC_AS_STR_prototype, &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { - SwfdecAsObject *proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); - swfdec_as_object_get_variable (proto, SWFDEC_AS_STR___constructor__, &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { - cur = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val); - if (SWFDEC_IS_AS_FUNCTION (cur)) { - continue; - } - } - } - cur = NULL; - } while (type == 0 && cur != NULL && i < SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT); - if (type == 0) { - type = SWFDEC_TYPE_AS_OBJECT; - size = sizeof (SwfdecAsObject); - } + fun_object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun)); - new = g_object_new (type, "context", context, NULL); + new = swfdec_as_object_new (context, NULL); /* set initial variables */ - if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (fun), SWFDEC_AS_STR_prototype, &val)) { + if (swfdec_as_object_get_variable (fun_object, SWFDEC_AS_STR_prototype, &val)) { swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR___proto__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (fun)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, fun_object); if (context->version < 7) { swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN); @@ -1320,31 +1357,71 @@ swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, swfdec_as_function_call_full (fun, new, TRUE, new->prototype, n_args, args, return_value); } -void +/** + * swfdec_as_object_set_constructor_by_name: + * @object: the object to set a constructor on + * @name: first variable name for getting the constructor + * @...: %NULL-terminated list of further variables to get + * + * Sets the constructor of @object to be the objet you get when you get the + * variables given by @name and further arguments on the global object. It is + * equivalent to calling swfdec_as_object_get_variable() with the names first + * and then calling swfdec_as_object_set_constructor() on @object with the + * final result. + * + * Returns: The actual constructor that was set or %NULL on failure + **/ +SwfdecAsObject * swfdec_as_object_set_constructor_by_name (SwfdecAsObject *object, const char *name, ...) { - SwfdecAsContext *context; - SwfdecAsObject *cur; - SwfdecAsValue val; + SwfdecAsObject *ret; va_list args; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); - g_return_if_fail (name != NULL); + g_return_val_if_fail (object != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); - context = swfdec_gc_object_get_context (object); va_start (args, name); + ret = swfdec_as_object_set_constructor_by_namev (object, name, args); + va_end (args); + return ret; +} + +/** + * swfdec_as_object_set_constructor_by_namev: + * @object: the object to set a constructor on + * @name: first variable name for getting the constructor + * @args: va_list of further name arguments + * + * This is the va_list version of swfdec_as_object_set_constructor_by_name(). + * See that function for details. + * + * Returns: The actual constructor that was set or %NULL on failure + **/ +SwfdecAsObject * +swfdec_as_object_set_constructor_by_namev (SwfdecAsObject *object, + const char *name, va_list args) +{ + SwfdecAsContext *context; + SwfdecAsObject *cur; + SwfdecAsValue *val; + + g_return_val_if_fail (object != NULL, NULL); + g_return_val_if_fail (name != NULL, NULL); + + context = object->context; cur = context->global; do { - if (!swfdec_as_object_get_variable (cur, name, &val) || - !SWFDEC_AS_VALUE_IS_OBJECT (&val)) { + val = swfdec_as_object_peek_variable (cur, name); + if (val == NULL || + !SWFDEC_AS_VALUE_IS_OBJECT (*val)) { SWFDEC_WARNING ("could not find constructor %s", name); - return; + return NULL; } - cur = SWFDEC_AS_VALUE_GET_OBJECT (&val); + cur = SWFDEC_AS_VALUE_GET_OBJECT (*val); name = va_arg (args, const char *); } while (name != NULL); - va_end (args); swfdec_as_object_set_constructor (object, cur); + return cur; } /** @@ -1364,17 +1441,14 @@ swfdec_as_object_set_constructor (SwfdecAsObject *object, SwfdecAsObject *constr { SwfdecAsValue val; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (construct)); + g_return_if_fail (object != NULL); + g_return_if_fail (construct != NULL); SWFDEC_AS_VALUE_SET_OBJECT (&val, construct); swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (construct), - SWFDEC_AS_STR_prototype, &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { - SwfdecAsObject *proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); - SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); + if (swfdec_as_object_get_variable (construct, + SWFDEC_AS_STR_prototype, &val)) { swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } else { @@ -1402,7 +1476,7 @@ swfdec_as_object_add_variable (SwfdecAsObject *object, const char *variable, { SwfdecAsVariable *var; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (variable != NULL); g_return_if_fail (SWFDEC_IS_AS_FUNCTION (get)); g_return_if_fail (set == NULL || SWFDEC_IS_AS_FUNCTION (set)); @@ -1422,18 +1496,16 @@ swfdec_as_object_add_native_variable (SwfdecAsObject *object, { SwfdecAsFunction *get_func, *set_func; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (variable != NULL); g_return_if_fail (get != NULL); get_func = - swfdec_as_native_function_new (swfdec_gc_object_get_context (object), variable, get, NULL); - if (get_func == NULL) - return; + swfdec_as_native_function_new (object->context, variable, get); if (set != NULL) { set_func = - swfdec_as_native_function_new (swfdec_gc_object_get_context (object), variable, set, NULL); + swfdec_as_native_function_new (object->context, variable, set); } else { set_func = NULL; } @@ -1454,15 +1526,15 @@ swfdec_as_object_addProperty (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); if (argc < 3) return; - name = swfdec_as_value_to_string (cx, &argv[0]); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[1]) || - !SWFDEC_IS_AS_FUNCTION ((get = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[1])))) + name = swfdec_as_value_to_string (cx, argv[0]); + if (!SWFDEC_AS_VALUE_IS_OBJECT (argv[1]) || + !SWFDEC_IS_AS_FUNCTION ((get = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (argv[1])->relay)))) return; - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[2])) { - set = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[2]); + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[2])) { + set = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (argv[2])->relay); if (!SWFDEC_IS_AS_FUNCTION (set)) return; - } else if (SWFDEC_AS_VALUE_IS_NULL (&argv[2])) { + } else if (SWFDEC_AS_VALUE_IS_NULL (argv[2])) { set = NULL; } else { return; @@ -1484,12 +1556,7 @@ swfdec_as_object_hasOwnProperty (SwfdecAsContext *cx, SwfdecAsObject *object, return; SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); - - // return false even if no params - if (argc < 1) - return; - - name = swfdec_as_value_to_string (swfdec_gc_object_get_context (object), &argv[0]); + SWFDEC_AS_CHECK (0, NULL, "s", &name); if (!(var = swfdec_as_object_hash_lookup (object, name))) return; @@ -1514,12 +1581,7 @@ swfdec_as_object_isPropertyEnumerable (SwfdecAsContext *cx, return; SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); - - // return false even if no params - if (argc < 1) - return; - - name = swfdec_as_value_to_string (swfdec_gc_object_get_context (object), &argv[0]); + SWFDEC_AS_CHECK (0, NULL, "s", &name); if (!(var = swfdec_as_object_hash_lookup (object, name))) return; @@ -1544,7 +1606,7 @@ swfdec_as_object_isPrototypeOf (SwfdecAsContext *cx, if (argc < 1) return; - class = swfdec_as_value_to_object (cx, &argv[0]); + class = swfdec_as_value_to_object (cx, argv[0]); if (class == NULL) return; @@ -1564,20 +1626,16 @@ swfdec_as_object_watch (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecAsWatch *watch; + SwfdecAsObject *o; + SwfdecAsFunction *fun; const char *name; SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); + SWFDEC_AS_CHECK (0, NULL, "so", &name, &o); - if (argc < 2) - return; - - name = swfdec_as_value_to_string (cx, &argv[0]); - - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) - return; - - if (!SWFDEC_IS_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]))) + if (!SWFDEC_IS_AS_FUNCTION (o->relay)) return; + fun = SWFDEC_AS_FUNCTION (o->relay); if (object->watches == NULL) { object->watches = g_hash_table_new_full (g_direct_hash, g_direct_equal, @@ -1587,12 +1645,10 @@ swfdec_as_object_watch (SwfdecAsContext *cx, SwfdecAsObject *object, watch = g_hash_table_lookup (object->watches, name); } if (watch == NULL) { - watch = swfdec_as_watch_new (SWFDEC_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]))); - if (watch == NULL) - return; + watch = swfdec_as_watch_new (fun); g_hash_table_insert (object->watches, (char *) name, watch); } else { - watch->watch = SWFDEC_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (&argv[1])); + watch->watch = fun; } if (argc >= 3) { @@ -1616,11 +1672,7 @@ swfdec_as_object_unwatch (SwfdecAsContext *cx, SwfdecAsObject *object, return; SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE); - - if (argc < 1) - return; - - name = swfdec_as_value_to_string (cx, &argv[0]); + SWFDEC_AS_CHECK (0, NULL, "s", &name); // special case: can't unwatch native properties if ((var = swfdec_as_object_hash_lookup (object, name))&& var->get != NULL) @@ -1644,7 +1696,7 @@ swfdec_as_object_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { if (object != NULL) - SWFDEC_AS_VALUE_SET_OBJECT (retval, object); + SWFDEC_AS_VALUE_SET_COMPOSITE (retval, object); } SWFDEC_AS_NATIVE (101, 4, swfdec_as_object_toString) @@ -1652,7 +1704,7 @@ void swfdec_as_object_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { - if (SWFDEC_IS_AS_FUNCTION (object)) { + if (object && SWFDEC_IS_AS_FUNCTION (object->relay)) { SWFDEC_AS_VALUE_SET_STRING (retval, SWFDEC_AS_STR__type_Function_); } else { SWFDEC_AS_VALUE_SET_STRING (retval, SWFDEC_AS_STR__object_Object_); @@ -1671,12 +1723,12 @@ swfdec_as_object_old_constructor (SwfdecAsContext *cx, SwfdecAsObject *object, void swfdec_as_object_decode (SwfdecAsObject *object, const char *str) { - SwfdecAsContext *cx = swfdec_gc_object_get_context (object); + SwfdecAsContext *cx = object->context; SwfdecAsValue val; char **varlist, *p, *unescaped; guint i; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (str != NULL); varlist = g_strsplit (str, "&", -1); @@ -1714,19 +1766,19 @@ swfdec_as_object_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { if (argc > 0) { - SwfdecAsObject *result = swfdec_as_value_to_object (cx, &argv[0]); - if (result != NULL) { - if (!cx->frame->construct) { + if (SWFDEC_AS_VALUE_IS_MOVIE (argv[0])) { + *ret = argv[0]; + return; + } else { + SwfdecAsObject *result = swfdec_as_value_to_object (cx, argv[0]); + if (result != NULL) { SWFDEC_AS_VALUE_SET_OBJECT (ret, result); - } else { - SWFDEC_FIXME ("new Object (x) should return x"); - SWFDEC_AS_VALUE_SET_OBJECT (ret, object); + return; } - return; } } - if (!cx->frame->construct) + if (!swfdec_as_context_is_constructing (cx)) object = swfdec_as_object_new_empty (cx); SWFDEC_AS_VALUE_SET_OBJECT (ret, object); @@ -1735,50 +1787,62 @@ swfdec_as_object_construct (SwfdecAsContext *cx, SwfdecAsObject *object, void swfdec_as_object_init_context (SwfdecAsContext *context) { + SwfdecAsObject *function, *fun_proto, *object, *obj_proto; + SwfdecAsFunction *fun; SwfdecAsValue val; - SwfdecAsObject *object, *proto; - - proto = swfdec_as_object_new_empty (context); - object = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_Object, swfdec_as_object_construct)); - context->Object = object; - context->Object_prototype = proto; - SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - /* first, set our own */ - swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_prototype, + + /* initialize core objects */ + fun = swfdec_as_native_function_new_bare (context, SWFDEC_AS_STR_Object, swfdec_as_object_construct); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun)); + obj_proto = swfdec_as_object_new_empty (context); + fun = swfdec_as_native_function_new_bare (context, SWFDEC_AS_STR_Function, swfdec_as_object_do_nothing); + function = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun)); + fun_proto = swfdec_as_object_new_empty (context); + + /* initialize Function */ + SWFDEC_AS_VALUE_SET_OBJECT (&val, function); + swfdec_as_object_set_variable_and_flags (context->global, SWFDEC_AS_STR_Function, &val, + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | SWFDEC_AS_VARIABLE_VERSION_6_UP); + SWFDEC_AS_VALUE_SET_OBJECT (&val, function); + swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VALUE_SET_OBJECT (&val, fun_proto); + swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_prototype, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | - SWFDEC_AS_VARIABLE_CONSTANT); + SWFDEC_AS_VARIABLE_VERSION_6_UP); - /* then finish the function prototype (use this order or - * SWFDEC_AS_VARIABLE_CONSTANT won't let us */ - swfdec_as_object_set_variable_and_flags (context->Function_prototype, + /* initialize Function.prototype */ + SWFDEC_AS_VALUE_SET_OBJECT (&val, function); + swfdec_as_object_set_variable_and_flags (fun_proto, SWFDEC_AS_STR_constructor, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VALUE_SET_OBJECT (&val, obj_proto); + swfdec_as_object_set_variable_and_flags (fun_proto, SWFDEC_AS_STR___proto__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + + /* initialize Object */ SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, + swfdec_as_object_set_variable_and_flags (context->global, SWFDEC_AS_STR_Object, &val, + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VALUE_SET_OBJECT (&val, function); + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); -} - -/** - * swfdec_as_object_get_debug: - * @object: a #SwfdecAsObject - * - * Gets a representation string suitable for debugging. This function is - * guaranteed to not modify the state of the script engine, unlike - * swfdec_as_value_to_string() for example. - * - * Returns: A newly allocated string. Free it with g_free() after use. - **/ -char * -swfdec_as_object_get_debug (SwfdecAsObject *object) -{ - SwfdecAsObjectClass *klass; - - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + SWFDEC_AS_VALUE_SET_OBJECT (&val, fun_proto); + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | + SWFDEC_AS_VARIABLE_VERSION_6_UP); + SWFDEC_AS_VALUE_SET_OBJECT (&val, obj_proto); + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_prototype, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT | + SWFDEC_AS_VARIABLE_CONSTANT); - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - return klass->debug (object); + /* initialize Object.prototype */ + SWFDEC_AS_VALUE_SET_OBJECT (&val, object); + swfdec_as_object_set_variable_and_flags (obj_proto, SWFDEC_AS_STR_constructor, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } /** @@ -1795,13 +1859,39 @@ swfdec_as_object_get_debug (SwfdecAsObject *object) SwfdecAsObject * swfdec_as_object_resolve (SwfdecAsObject *object) { - SwfdecAsObjectClass *klass; + g_return_val_if_fail (object != NULL, NULL); - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + if (G_UNLIKELY (object->super)) + return SWFDEC_AS_SUPER (object->relay)->thisp; + + return object; +} - klass = SWFDEC_AS_OBJECT_GET_CLASS (object); - if (klass->resolve == NULL) - return object; +/** + * swfdec_as_object_set_relay: + * @object: The object to set a new relay on + * @relay: The relay to set + * + * Associates @object and @relay. This allows you to associate your own data + * with a given #SwfdecAsObject, so you can write native functions making use + * of this. See #SwfdecAsRelay documentation for details about relays. + **/ +void +swfdec_as_object_set_relay (SwfdecAsObject *object, SwfdecAsRelay *relay) +{ + g_return_if_fail (object != NULL); - return klass->resolve (object); + if (relay) { + g_return_if_fail (SWFDEC_IS_AS_RELAY (relay)); + g_return_if_fail (relay->relay == NULL); + } + + if (object->relay) { + object->relay->relay = NULL; + } + object->relay = relay; + object->array = FALSE; + if (relay) + relay->relay = object; } + diff --git a/swfdec/swfdec_as_object.h b/swfdec/swfdec_as_object.h index 9293cfa1..95f42ac8 100644 --- a/swfdec/swfdec_as_object.h +++ b/swfdec/swfdec_as_object.h @@ -22,7 +22,6 @@ #include <glib-object.h> #include <swfdec/swfdec_as_types.h> -#include <swfdec/swfdec_gc_object.h> G_BEGIN_DECLS @@ -45,64 +44,36 @@ typedef enum { SWFDEC_AS_DELETE_NOT_DELETED } SwfdecAsDeleteReturn; -typedef struct _SwfdecAsObjectClass SwfdecAsObjectClass; typedef gboolean (* SwfdecAsVariableForeach) (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint flags, gpointer data); -#define SWFDEC_TYPE_AS_OBJECT (swfdec_as_object_get_type()) -#define SWFDEC_IS_AS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_OBJECT)) -#define SWFDEC_IS_AS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_AS_OBJECT)) -#define SWFDEC_AS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_AS_OBJECT, SwfdecAsObject)) -#define SWFDEC_AS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_OBJECT, SwfdecAsObjectClass)) -#define SWFDEC_AS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_OBJECT, SwfdecAsObjectClass)) - struct _SwfdecAsObject { - /*< protected >*/ - SwfdecGcObject object; /*< private >*/ + SwfdecAsObject * next; /* GC management */ + SwfdecAsContext * context; /* the context that manages the object */ + gboolean array:1; /* TRUE if object is an array */ + gboolean super:1; /* TRUE if object is a super object */ + gboolean movie:1; /* TRUE if object is really a MovieClip */ SwfdecAsObject * prototype; /* prototype object (referred to as __proto__) */ guint prototype_flags; /* propflags for the prototype object */ GHashTable * properties; /* string->SwfdecAsVariable mapping or NULL when not in GC */ GHashTable * watches; /* string->WatchData mapping or NULL when not watching anything */ GSList * interfaces; /* list of interfaces this object implements */ + SwfdecAsRelay * relay; /* object we relay data to */ }; -struct _SwfdecAsObjectClass { - SwfdecGcObjectClass object_class; - - /* get the value and flags for a variables */ - gboolean (* get) (SwfdecAsObject * object, - SwfdecAsObject * orig, - const char * variable, - SwfdecAsValue * val, - guint * flags); - /* set the variable - and return it (or NULL on error) */ - void (* set) (SwfdecAsObject * object, - const char * variable, - const SwfdecAsValue * val, - guint default_flags); - /* set flags of a variable */ - void (* set_flags) (SwfdecAsObject * object, - const char * variable, - guint flags, - guint mask); - /* delete the variable - return TRUE if it exists */ - SwfdecAsDeleteReturn (* del) (SwfdecAsObject * object, - const char * variable); - /* call with every variable until func returns FALSE */ - gboolean (* foreach) (SwfdecAsObject * object, - SwfdecAsVariableForeach func, - gpointer data); - /* get the real object referenced by this object (useful for internal objects) */ - SwfdecAsObject * (* resolve) (SwfdecAsObject * object); - /* get a debug string representation for this object */ - char * (* debug) (SwfdecAsObject * object); -}; - -GType swfdec_as_object_get_type (void); -SwfdecAsObject *swfdec_as_object_new (SwfdecAsContext * context); +SwfdecAsObject *swfdec_as_object_new (SwfdecAsContext * context, + ...) G_GNUC_NULL_TERMINATED; SwfdecAsObject *swfdec_as_object_new_empty (SwfdecAsContext * context); +SwfdecAsObject * swfdec_as_object_set_constructor_by_name + (SwfdecAsObject * object, + const char * name, + ...) G_GNUC_NULL_TERMINATED; +SwfdecAsObject * swfdec_as_object_set_constructor_by_namev + (SwfdecAsObject * object, + const char * name, + va_list args); void swfdec_as_object_create (SwfdecAsFunction * fun, guint n_args, const SwfdecAsValue * args, @@ -110,7 +81,10 @@ void swfdec_as_object_create (SwfdecAsFunction * fun, void swfdec_as_object_set_constructor(SwfdecAsObject * object, SwfdecAsObject * construct); SwfdecAsObject *swfdec_as_object_resolve (SwfdecAsObject * object); -char * swfdec_as_object_get_debug (SwfdecAsObject * object); +void swfdec_as_object_mark (SwfdecAsObject * object); + +void swfdec_as_object_set_relay (SwfdecAsObject * object, + SwfdecAsRelay * relay); /* I'd like to name these [gs]et_property, but binding authors will complain * about overlap with g_object_[gs]et_property then */ @@ -152,16 +126,11 @@ void swfdec_as_object_unset_variable_flags gboolean swfdec_as_object_foreach (SwfdecAsObject * object, SwfdecAsVariableForeach func, gpointer data); +GSList * swfdec_as_object_enumerate (SwfdecAsObject * object); SwfdecAsFunction *swfdec_as_object_add_function (SwfdecAsObject * object, const char * name, SwfdecAsNative native); -SwfdecAsFunction *swfdec_as_object_add_constructor - (SwfdecAsObject * object, - const char * name, - GType construct_type, - SwfdecAsNative native, - SwfdecAsObject * prototype); gboolean swfdec_as_object_call (SwfdecAsObject * object, const char * name, diff --git a/swfdec/swfdec_as_relay.c b/swfdec/swfdec_as_relay.c new file mode 100644 index 00000000..f5babc9f --- /dev/null +++ b/swfdec/swfdec_as_relay.c @@ -0,0 +1,143 @@ +/* Swfdec + * Copyright (C) 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <string.h> + +#include "swfdec_as_relay.h" +#include "swfdec_as_context.h" +#include "swfdec_as_object.h" +#include "swfdec_as_function.h" + +/** + * SECTION:SwfdecAsRelay + * @title: SwfdecAsRelay + * @short_description: object for attaching to Actionscript objects + * + * #SwfdecAsRelay objects can be attached to a #SwfdecAsObject using + * swfdec_as_object_relay(). You can then query an object for its relay in + * your own native function and use it there, for example by using + * SWFDEC_AS_CHECK(). + */ + +/** + * SwfdecAsRelay: + * + * This object has no public members. + */ + +/** + * SwfdecAsRelayClass: + * + * This is the base class for all objects that can be attached to a + * #SwfdecAsObject. It has no virtual functions. + */ + +G_DEFINE_ABSTRACT_TYPE (SwfdecAsRelay, swfdec_as_relay, SWFDEC_TYPE_GC_OBJECT) + +static void +swfdec_as_relay_mark (SwfdecGcObject *object) +{ + SwfdecAsRelay *relay = SWFDEC_AS_RELAY (object); + + if (relay->relay) + swfdec_as_object_mark (relay->relay); + + SWFDEC_GC_OBJECT_CLASS (swfdec_as_relay_parent_class)->mark (object); +} + +static void +swfdec_as_relay_class_init (SwfdecAsRelayClass *klass) +{ + SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); + + gc_class->mark = swfdec_as_relay_mark; +} + +static void +swfdec_as_relay_init (SwfdecAsRelay *object) +{ +} + +/** + * swfdec_as_relay_get_as_object: + * @relay: a #SwfdecAsRelay. + * + * Gets the Actionscript object associated with this object. + * + * Returns: The #SwfdecAsObject associated with this relay. + **/ +SwfdecAsObject * +swfdec_as_relay_get_as_object (SwfdecAsRelay *relay) +{ + g_return_val_if_fail (SWFDEC_IS_AS_RELAY (relay), NULL); + g_return_val_if_fail (relay->relay != NULL, NULL); + + return relay->relay; +} + +/** + * swfdec_as_relay_call: + * @relay: a #SwfdecAsRelay + * @name: garbage-collected string naming the function to call. + * @argc: number of arguments to provide to function + * @argv: arguments or %NULL when @argc is 0 + * @return_value: location to take the return value of the call or %NULL to + * ignore the return value. + * + * Calls the function named @name on the given object. This function is + * essentially equal to the folloeing Actionscript code: + * <informalexample><programlisting> + * @return_value = @object.@name (@argv[0], ..., @argv[argc-1]); + * </programlisting></informalexample> + * + * Returns: %TRUE if @object had a function with the given name, %FALSE otherwise + **/ +gboolean +swfdec_as_relay_call (SwfdecAsRelay *relay, const char *name, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *return_value) +{ + SwfdecAsValue tmp; + SwfdecAsFunction *fun; + + g_return_val_if_fail (SWFDEC_IS_AS_RELAY (relay), TRUE); + g_return_val_if_fail (name != NULL, TRUE); + g_return_val_if_fail (argc == 0 || argv != NULL, TRUE); + g_return_val_if_fail (swfdec_gc_object_get_context (relay)->global != NULL, TRUE); /* for SwfdecPlayer */ + + /* If this doesn't hold, we need to use swfdec_as_relay_get_as_object() + * and have that function create the relay on demand. */ + g_assert (relay->relay); + + if (return_value) + SWFDEC_AS_VALUE_SET_UNDEFINED (return_value); + swfdec_as_object_get_variable (relay->relay, name, &tmp); + if (!SWFDEC_AS_VALUE_IS_OBJECT (tmp)) + return FALSE; + fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (tmp)->relay); + if (!SWFDEC_IS_AS_FUNCTION (fun)) + return FALSE; + swfdec_as_function_call (fun, relay->relay, argc, argv, return_value ? return_value : &tmp); + + return TRUE; +} + diff --git a/swfdec/swfdec_as_relay.h b/swfdec/swfdec_as_relay.h new file mode 100644 index 00000000..55cd3fab --- /dev/null +++ b/swfdec/swfdec_as_relay.h @@ -0,0 +1,61 @@ +/* Swfdec + * Copyright (C) 2008 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_AS_RELAY_H_ +#define _SWFDEC_AS_RELAY_H_ + +#include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_gc_object.h> + +G_BEGIN_DECLS + +typedef struct _SwfdecAsRelayClass SwfdecAsRelayClass; + +#define SWFDEC_TYPE_AS_RELAY (swfdec_as_relay_get_type()) +#define SWFDEC_IS_AS_RELAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_RELAY)) +#define SWFDEC_IS_AS_RELAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_AS_RELAY)) +#define SWFDEC_AS_RELAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_AS_RELAY, SwfdecAsRelay)) +#define SWFDEC_AS_RELAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_RELAY, SwfdecAsRelayClass)) +#define SWFDEC_AS_RELAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_RELAY, SwfdecAsRelayClass)) + +struct _SwfdecAsRelay { + /*< protected >*/ + SwfdecGcObject object; + /*< private >*/ + SwfdecAsObject * relay; +}; + +struct _SwfdecAsRelayClass { + /*< private >*/ + SwfdecGcObjectClass object_class; +}; + +GType swfdec_as_relay_get_type (void); + +SwfdecAsObject *swfdec_as_relay_get_as_object (SwfdecAsRelay * relay); + +gboolean swfdec_as_relay_call (SwfdecAsRelay * relay, + const char * name, + guint argc, + SwfdecAsValue * argv, + SwfdecAsValue * return_value); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_as_script_function.c b/swfdec/swfdec_as_script_function.c index 03bfd17b..c6ef1fe3 100644 --- a/swfdec/swfdec_as_script_function.c +++ b/swfdec/swfdec_as_script_function.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -38,22 +38,33 @@ swfdec_as_script_function_call (SwfdecAsFunction *function, SwfdecAsObject *this const SwfdecAsValue *args, SwfdecAsValue *return_value) { SwfdecAsScriptFunction *script = SWFDEC_AS_SCRIPT_FUNCTION (function); + SwfdecAsContext *context; + SwfdecSandbox *old_sandbox = NULL; SwfdecAsFrame frame = { NULL, }; /* just to be sure... */ if (return_value) SWFDEC_AS_VALUE_SET_UNDEFINED (return_value); + context = swfdec_gc_object_get_context (function); + /* do security checks */ + if (script->sandbox != NULL && + script->sandbox != (old_sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (context)))) { + if (!swfdec_sandbox_allow (script->sandbox, old_sandbox)) + return; + swfdec_sandbox_unuse (old_sandbox); + swfdec_sandbox_use (script->sandbox); + } + swfdec_as_frame_init (&frame, swfdec_gc_object_get_context (function), script->script); frame.scope_chain = g_slist_concat (frame.scope_chain, g_slist_copy (script->scope_chain)); frame.function = function; - frame.target = script->target; - frame.original_target = script->target; - /* FIXME: figure out what to do in these situations? - * It's a problem when called inside swfdec_as_function_call () as the - * user of that function expects success, but super may fail here */ + if (script->target) { + frame.target = script->target; + frame.original_target = script->target; + } /* second check especially for super object */ - if (thisp != NULL && frame.thisp == NULL) { + if (thisp != NULL && SWFDEC_AS_VALUE_IS_UNDEFINED (frame.thisp)) { swfdec_as_frame_set_this (&frame, swfdec_as_object_resolve (thisp)); } frame.argc = n_args; @@ -66,10 +77,16 @@ swfdec_as_script_function_call (SwfdecAsFunction *function, SwfdecAsObject *this swfdec_as_super_new (&frame, thisp, super_reference); } else { // FIXME: Does the super object really reference the function when thisp is NULL? - swfdec_as_super_new (&frame, SWFDEC_AS_OBJECT (function), super_reference); + swfdec_as_super_new (&frame, + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function)), super_reference); + } + swfdec_as_frame_preload (context, &frame); + swfdec_as_context_run (context); + + if (old_sandbox) { + swfdec_sandbox_unuse (script->sandbox); + swfdec_sandbox_use (old_sandbox); } - swfdec_as_frame_preload (&frame); - swfdec_as_context_run (swfdec_gc_object_get_context (function)); } static void @@ -92,45 +109,24 @@ swfdec_as_script_function_mark (SwfdecGcObject *object) { SwfdecAsScriptFunction *script = SWFDEC_AS_SCRIPT_FUNCTION (object); - g_slist_foreach (script->scope_chain, (GFunc) swfdec_gc_object_mark, NULL); + g_slist_foreach (script->scope_chain, (GFunc) swfdec_as_object_mark, NULL); + if (script->sandbox) + swfdec_gc_object_mark (script->sandbox); SWFDEC_GC_OBJECT_CLASS (swfdec_as_script_function_parent_class)->mark (object); } -static char * -swfdec_as_script_function_debug (SwfdecAsObject *object) -{ - SwfdecAsScriptFunction *script = SWFDEC_AS_SCRIPT_FUNCTION (object); - SwfdecScript *s = script->script; - GString *string; - guint i; - - string = g_string_new (s->name); - g_string_append (string, " ("); - for (i = 0; i < s->n_arguments; i++) { - if (i > 0) - g_string_append (string, ", "); - g_string_append (string, s->arguments[i].name); - } - g_string_append (string, ")"); - - return g_string_free (string, FALSE); -} - static void swfdec_as_script_function_class_init (SwfdecAsScriptFunctionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); SwfdecAsFunctionClass *function_class = SWFDEC_AS_FUNCTION_CLASS (klass); object_class->dispose = swfdec_as_script_function_dispose; gc_class->mark = swfdec_as_script_function_mark; - asobject_class->debug = swfdec_as_script_function_debug; - function_class->call = swfdec_as_script_function_call; } @@ -140,34 +136,51 @@ swfdec_as_script_function_init (SwfdecAsScriptFunction *script_function) } SwfdecAsFunction * -swfdec_as_script_function_new (SwfdecAsObject *target, const GSList *scope_chain, SwfdecScript *script) +swfdec_as_script_function_new (SwfdecAsContext *context, SwfdecMovie *target, + const GSList *scope_chain, SwfdecScript *script) { - SwfdecAsValue val; + SwfdecAsValue val, *tmp; SwfdecAsScriptFunction *fun; - SwfdecAsObject *proto; - SwfdecAsContext *context; + SwfdecAsObject *proto, *object; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (target), NULL); + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (target == NULL || SWFDEC_IS_MOVIE (target), NULL); g_return_val_if_fail (script != NULL, NULL); - context = swfdec_gc_object_get_context (target); fun = g_object_new (SWFDEC_TYPE_AS_SCRIPT_FUNCTION, "context", context, NULL); fun->scope_chain = g_slist_copy ((GSList *) scope_chain); fun->script = script; fun->target = target; + + /* if context is a flash player, copy current sandbox for security checking. + * FIXME: export this somehow? */ + if (SWFDEC_IS_PLAYER (context)) + fun->sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (context)); + + object = swfdec_as_object_new_empty (context); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (fun)); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_Function, NULL); + swfdec_as_object_set_variable_flags (object, SWFDEC_AS_STR___proto__, + SWFDEC_AS_VARIABLE_VERSION_6_UP); + /* set prototype */ proto = swfdec_as_object_new_empty (context); SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (fun), - SWFDEC_AS_STR_prototype, &val, - SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - swfdec_as_function_set_constructor (SWFDEC_AS_FUNCTION (fun)); - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (fun)); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_prototype, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, + + SWFDEC_AS_VALUE_SET_OBJECT (&val, object); + swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + tmp = swfdec_as_object_peek_variable (context->global, SWFDEC_AS_STR_Object); + if (tmp && SWFDEC_AS_VALUE_IS_OBJECT (*tmp)) { + tmp = swfdec_as_object_peek_variable (SWFDEC_AS_VALUE_GET_OBJECT (*tmp), + SWFDEC_AS_STR_prototype); + if (tmp) { + swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, + tmp, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + } + } return SWFDEC_AS_FUNCTION (fun); } diff --git a/swfdec/swfdec_as_script_function.h b/swfdec/swfdec_as_script_function.h index ab04a720..8d0d3461 100644 --- a/swfdec/swfdec_as_script_function.h +++ b/swfdec/swfdec_as_script_function.h @@ -22,7 +22,9 @@ #include <swfdec/swfdec_as_function.h> #include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_sandbox.h> #include <swfdec/swfdec_script.h> +#include <swfdec/swfdec_types.h> G_BEGIN_DECLS @@ -43,7 +45,8 @@ struct _SwfdecAsScriptFunction { /* for script script_functions */ SwfdecScript * script; /* script being executed or NULL when native */ GSList * scope_chain; /* scope this script_function was defined in */ - SwfdecAsObject * target; /* target this object was defined in or NULL if in init script */ + SwfdecMovie * target; /* target this object was defined in or NULL if in init script */ + SwfdecSandbox * sandbox; /* sandbox this function was defined in or NULL if don't care */ }; struct _SwfdecAsScriptFunctionClass { @@ -52,7 +55,8 @@ struct _SwfdecAsScriptFunctionClass { GType swfdec_as_script_function_get_type (void); -SwfdecAsFunction * swfdec_as_script_function_new (SwfdecAsObject * target, +SwfdecAsFunction * swfdec_as_script_function_new (SwfdecAsContext * context, + SwfdecMovie * target, const GSList * scope_chain, SwfdecScript * script); diff --git a/swfdec/swfdec_as_string.c b/swfdec/swfdec_as_string.c index c5f94d4b..7bbd314c 100644 --- a/swfdec/swfdec_as_string.c +++ b/swfdec/swfdec_as_string.c @@ -32,7 +32,7 @@ #include "swfdec_as_strings.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecAsString, swfdec_as_string, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecAsString, swfdec_as_string, SWFDEC_TYPE_AS_RELAY) static void swfdec_as_string_do_mark (SwfdecGcObject *object) @@ -44,23 +44,12 @@ swfdec_as_string_do_mark (SwfdecGcObject *object) SWFDEC_GC_OBJECT_CLASS (swfdec_as_string_parent_class)->mark (object); } -static char * -swfdec_as_string_debug (SwfdecAsObject *object) -{ - SwfdecAsString *string = SWFDEC_AS_STRING (object); - - return g_strdup (string->string); -} - static void swfdec_as_string_class_init (SwfdecAsStringClass *klass) { SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); gc_class->mark = swfdec_as_string_do_mark; - - asobject_class->debug = swfdec_as_string_debug; } static void @@ -71,23 +60,17 @@ swfdec_as_string_init (SwfdecAsString *string) /*** AS CODE ***/ -static const char * -swfdec_as_string_object_to_string (SwfdecAsContext *context, - SwfdecAsObject *object) -{ - SwfdecAsValue val; - - g_return_val_if_fail (object == NULL || SWFDEC_IS_AS_OBJECT (object), - SWFDEC_AS_STR_EMPTY); - - if (object == NULL) { - SWFDEC_AS_VALUE_SET_UNDEFINED (&val); - } else { - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - } - - return swfdec_as_value_to_string (context, &val); -} +#define SWFDEC_AS_STRING_CHECK(result,...) G_STMT_START {\ + if (object) {\ + SwfdecAsValue _tmp; \ + SWFDEC_AS_VALUE_SET_COMPOSITE (&_tmp, object); \ + *(result) = swfdec_as_value_to_string (cx, _tmp);\ + } else {\ + *(result) = SWFDEC_AS_STR_undefined; \ + }\ + if (!swfdec_as_native_function_check (cx, object, 0, NULL, argc, argv, __VA_ARGS__)) \ + return; \ +}G_STMT_END static const char * swfdec_as_str_nth_char (const char *s, guint n) @@ -102,19 +85,17 @@ void swfdec_as_string_lastIndexOf (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; gsize len; const char *s; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "s", &s); - s = swfdec_as_value_to_string (cx, &argv[0]); if (argc == 2) { - int offset = swfdec_as_value_to_integer (cx, &argv[1]); + int offset = swfdec_as_value_to_integer (cx, argv[1]); const char *tmp; if (offset < 0) { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); return; } tmp = string; @@ -127,9 +108,9 @@ swfdec_as_string_lastIndexOf (SwfdecAsContext *cx, SwfdecAsObject *object, } s = g_strrstr_len (string, len, s); if (s) { - SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_pointer_to_offset (string, s)); + *ret = swfdec_as_value_from_integer (cx, g_utf8_pointer_to_offset (string, s)); } else { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); } } @@ -138,16 +119,14 @@ void swfdec_as_string_indexOf (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; int offset=0, len, i=-1; const char *s, *t = NULL; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "s", &s); - s = swfdec_as_value_to_string (cx, &argv[0]); if (argc == 2) - offset = swfdec_as_value_to_integer (cx, &argv[1]); + offset = swfdec_as_value_to_integer (cx, argv[1]); if (offset < 0) offset = 0; len = g_utf8_strlen (string, -1); @@ -158,7 +137,7 @@ swfdec_as_string_indexOf (SwfdecAsContext *cx, SwfdecAsObject *object, i = g_utf8_pointer_to_offset (string, t); } - SWFDEC_AS_VALUE_SET_INT (ret, i); + *ret = swfdec_as_value_from_integer (cx, i); } SWFDEC_AS_NATIVE (251, 5, swfdec_as_string_charAt) @@ -166,14 +145,12 @@ void swfdec_as_string_charAt (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; int i; const char *s, *t; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "i", &i); - i = swfdec_as_value_to_integer (cx, &argv[0]); if (i < 0) { SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_EMPTY); return; @@ -193,30 +170,28 @@ void swfdec_as_string_charCodeAt (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; int i; const char *s; gunichar c; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "i", &i); - i = swfdec_as_value_to_integer (cx, &argv[0]); if (i < 0) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); return; } s = swfdec_as_str_nth_char (string, i); if (*s == 0) { if (cx->version > 5) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, NAN); + *ret = swfdec_as_value_from_number (cx, NAN); } else { - SWFDEC_AS_VALUE_SET_INT (ret, 0); + *ret = swfdec_as_value_from_integer (cx, 0); } return; } c = g_utf8_get_char (s); - SWFDEC_AS_VALUE_SET_NUMBER (ret, c); + *ret = swfdec_as_value_from_number (cx, c); } static void @@ -231,7 +206,7 @@ swfdec_as_string_fromCharCode_5 (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc > 0) { for (i = 0; i < argc; i++) { - c = ((guint) swfdec_as_value_to_integer (cx, &argv[i])) % 65536; + c = ((guint) swfdec_as_value_to_integer (cx, argv[i])) % 65536; if (c > 255) { append = c / 256; g_byte_array_append (array, &append, 1); @@ -247,8 +222,7 @@ swfdec_as_string_fromCharCode_5 (SwfdecAsContext *cx, SwfdecAsObject *object, } if (s) { - SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_get_string (cx, s)); - g_free (s); + SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s)); } else { SWFDEC_ERROR ("%s", error->message); g_error_free (error); @@ -272,7 +246,7 @@ swfdec_as_string_fromCharCode_6 (SwfdecAsContext *cx, SwfdecAsObject *object, chars = g_new (gunichar, argc); for (i = 0; i < argc; i++) { - chars[i] = ((guint) swfdec_as_value_to_integer (cx, &argv[i])) % 65536; + chars[i] = ((guint) swfdec_as_value_to_integer (cx, argv[i])) % 65536; } s = g_ucs4_to_utf8 (chars, argc, NULL, NULL, &error); @@ -300,7 +274,7 @@ swfdec_as_string_fromCharCode (SwfdecAsContext *cx, SwfdecAsObject *object, } } -SWFDEC_AS_CONSTRUCTOR (251, 0, swfdec_as_string_construct, swfdec_as_string_get_type) +SWFDEC_AS_NATIVE (251, 0, swfdec_as_string_construct) void swfdec_as_string_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) @@ -308,19 +282,22 @@ swfdec_as_string_construct (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; if (argc > 0) { - s = swfdec_as_value_to_string (cx, &argv[0]); + s = swfdec_as_value_to_string (cx, argv[0]); } else { s = SWFDEC_AS_STR_EMPTY; } if (swfdec_as_context_is_constructing (cx)) { - SwfdecAsString *string = SWFDEC_AS_STRING (object); + SwfdecAsString *string = g_object_new (SWFDEC_TYPE_AS_STRING, "context", cx, NULL); SwfdecAsValue val; string->string = s; - SWFDEC_AS_VALUE_SET_INT (&val, g_utf8_strlen (string->string, -1)); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (string)); + + val = swfdec_as_value_from_integer (cx, g_utf8_strlen (string->string, -1)); swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_length, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } else { SWFDEC_AS_VALUE_SET_STRING (ret, s); @@ -332,10 +309,11 @@ void swfdec_as_string_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_AS_STRING (object)) - return; + SwfdecAsString *string; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_STRING, &string, ""); - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STRING (object)->string); + SWFDEC_AS_VALUE_SET_STRING (ret, string->string); } SWFDEC_AS_NATIVE (251, 1, swfdec_as_string_valueOf) @@ -343,46 +321,40 @@ void swfdec_as_string_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (object == NULL) - return; + const char *string; - if (SWFDEC_IS_AS_STRING (object)) { - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STRING (object)->string); - } else { - SwfdecAsValue val; - - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_value_to_string (cx, &val)); - } + SWFDEC_AS_STRING_CHECK (&string, ""); + SWFDEC_AS_VALUE_SET_STRING (ret, string); } static void swfdec_as_string_split_5 (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SwfdecAsArray *arr; + SwfdecAsObject *arr; SwfdecAsValue val; const char *str, *end, *delim; int count; - str = swfdec_as_string_object_to_string (cx, object); - arr = SWFDEC_AS_ARRAY (swfdec_as_array_new (cx)); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (arr)); + SWFDEC_AS_STRING_CHECK (&str, ""); + + arr = swfdec_as_array_new (cx); + SWFDEC_AS_VALUE_SET_OBJECT (ret, arr); /* hi, i'm the special case */ - if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) { + if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) { delim = SWFDEC_AS_STR_COMMA; } else { - delim = swfdec_as_value_to_string (cx, &argv[0]); + delim = swfdec_as_value_to_string (cx, argv[0]); } if (delim == SWFDEC_AS_STR_EMPTY) { SWFDEC_AS_VALUE_SET_STRING (&val, str); swfdec_as_array_push (arr, &val); return; } - if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1])) { - swfdec_as_value_to_string (cx, &argv[0]); - count = swfdec_as_value_to_integer (cx, &argv[1]); + if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) { + swfdec_as_value_to_string (cx, argv[0]); + count = swfdec_as_value_to_integer (cx, argv[1]); } else { count = G_MAXINT; } @@ -411,22 +383,23 @@ static void swfdec_as_string_split_6 (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SwfdecAsArray *arr; + SwfdecAsObject *arr; SwfdecAsValue val; const char *str, *end, *delim; int count; guint len; - str = swfdec_as_string_object_to_string (cx, object); - arr = SWFDEC_AS_ARRAY (swfdec_as_array_new (cx)); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (arr)); + SWFDEC_AS_STRING_CHECK (&str, ""); + + arr = swfdec_as_array_new (cx); + SWFDEC_AS_VALUE_SET_OBJECT (ret, arr); /* hi, i'm the special case */ - if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) { + if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) { SWFDEC_AS_VALUE_SET_STRING (&val, str); swfdec_as_array_push (arr, &val); return; } - delim = swfdec_as_value_to_string (cx, &argv[0]); + delim = swfdec_as_value_to_string (cx, argv[0]); if (str == SWFDEC_AS_STR_EMPTY) { if (strlen (delim) > 0) { SWFDEC_AS_VALUE_SET_STRING (&val, str); @@ -434,8 +407,8 @@ swfdec_as_string_split_6 (SwfdecAsContext *cx, SwfdecAsObject *object, } return; } - if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1])) - count = swfdec_as_value_to_integer (cx, &argv[1]); + if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) + count = swfdec_as_value_to_integer (cx, argv[1]); else count = G_MAXINT; if (count <= 0) @@ -482,19 +455,16 @@ swfdec_as_string_slice (SwfdecAsContext *cx, SwfdecAsObject *object, int start, end, length; const char *str; - if (argc == 0) - return; + SWFDEC_AS_STRING_CHECK (&str, "i", &start); - str = swfdec_as_string_object_to_string (cx, object); length = g_utf8_strlen (str, -1); - start = swfdec_as_value_to_integer (cx, &argv[0]); if (start < 0) start += length; start = CLAMP (start, 0, length); if (argc > 1) { - end = swfdec_as_value_to_integer (cx, &argv[1]); + end = swfdec_as_value_to_integer (cx, argv[1]); if (end < 0) end += length; end = CLAMP (end, start, length); @@ -513,11 +483,14 @@ swfdec_as_string_concat (SwfdecAsContext *cx, SwfdecAsObject *object, { guint i; GString *string; + const char *s; - string = g_string_new (swfdec_as_string_object_to_string (cx, object)); + SWFDEC_AS_STRING_CHECK (&s, ""); + + string = g_string_new (s); for (i = 0; i < argc; i++) { - string = g_string_append (string, swfdec_as_value_to_string (cx, &argv[i])); + string = g_string_append (string, swfdec_as_value_to_string (cx, argv[i])); } SWFDEC_AS_VALUE_SET_STRING (ret, @@ -540,17 +513,15 @@ void swfdec_as_string_substr (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; int from, to, len; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "i", &from); - from = swfdec_as_value_to_integer (cx, &argv[0]); len = g_utf8_strlen (string, -1); - if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1])) { - to = swfdec_as_value_to_integer (cx, &argv[1]); + if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) { + to = swfdec_as_value_to_integer (cx, argv[1]); /* FIXME: wtf? */ if (to < 0) { if (-to <= from) @@ -577,16 +548,14 @@ void swfdec_as_string_substring (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; int from, to, len; - if (argc < 1) - return; + SWFDEC_AS_STRING_CHECK (&string, "i", &from); len = g_utf8_strlen (string, -1); - from = swfdec_as_value_to_integer (cx, &argv[0]); - if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1])) { - to = swfdec_as_value_to_integer (cx, &argv[1]); + if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) { + to = swfdec_as_value_to_integer (cx, argv[1]); } else { to = len; } @@ -609,9 +578,11 @@ void swfdec_as_string_toLowerCase (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; char *s; + SWFDEC_AS_STRING_CHECK (&string, ""); + s = g_utf8_strdown (string, -1); SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s)); } @@ -621,9 +592,11 @@ void swfdec_as_string_toUpperCase (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; char *s; + SWFDEC_AS_STRING_CHECK (&string, ""); + s = g_utf8_strup (string, -1); SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s)); } @@ -634,9 +607,11 @@ void swfdec_as_string_old_toLowerCase (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; char *s; + SWFDEC_AS_STRING_CHECK (&string, ""); + s = g_ascii_strdown (string, -1); SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s)); } @@ -647,9 +622,11 @@ void swfdec_as_string_old_toUpperCase (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *string = swfdec_as_string_object_to_string (cx, object); + const char *string; char *s; + SWFDEC_AS_STRING_CHECK (&string, ""); + s = g_ascii_strup (string, -1); SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, s)); } @@ -733,7 +710,7 @@ swfdec_as_string_escape (SwfdecAsContext *cx, const char *s) array = g_byte_array_new (); if (cx->version <= 5) { in = g_convert (s, -1, "LATIN1", "UTF-8", NULL, NULL, NULL); - if (s == NULL) { + if (in == NULL) { SWFDEC_FIXME ("%s can not be converted to utf8 - is this Flash 5 or what?", s); return NULL; } else { diff --git a/swfdec/swfdec_as_string.h b/swfdec/swfdec_as_string.h index 915ced0a..f9a2f0eb 100644 --- a/swfdec/swfdec_as_string.h +++ b/swfdec/swfdec_as_string.h @@ -20,8 +20,7 @@ #ifndef _SWFDEC_AS_STRING_H_ #define _SWFDEC_AS_STRING_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -36,13 +35,13 @@ typedef struct _SwfdecAsStringClass SwfdecAsStringClass; #define SWFDEC_AS_STRING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_STRING, SwfdecAsStringClass)) struct _SwfdecAsString { - SwfdecAsObject object; + SwfdecAsRelay relay; const char * string; /* string represented by this string object */ }; struct _SwfdecAsStringClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_as_string_get_type (void); diff --git a/vivified/core/vivi_ming.h b/swfdec/swfdec_as_string_value.h index f33eb5a7..f2b85a85 100644 --- a/vivified/core/vivi_ming.h +++ b/swfdec/swfdec_as_string_value.h @@ -1,5 +1,5 @@ -/* Vivified - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> +/* Swfdec + * Copyright (C) 2008 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 @@ -17,17 +17,20 @@ * Boston, MA 02110-1301 USA */ -#include <swfdec/swfdec.h> -#include <ming.h> +#ifndef _SWFDEC_AS_STRING_VALUE_H_ +#define _SWFDEC_AS_STRING_VALUE_H_ -#ifndef _VIVI_MING_H_ -#define _VIVI_MING_H_ +#include <glib-object.h> G_BEGIN_DECLS +typedef struct _SwfdecAsStringValue SwfdecAsStringValue; +struct _SwfdecAsStringValue { + SwfdecAsStringValue * next; + gsize length; + char string[]; +}; -SwfdecScript * vivi_ming_compile (const char * code, - char ** error); G_END_DECLS diff --git a/swfdec/swfdec_as_strings.c b/swfdec/swfdec_as_strings.c index 44f95a95..699a9450 100644 --- a/swfdec/swfdec_as_strings.c +++ b/swfdec/swfdec_as_strings.c @@ -21,8 +21,13 @@ #include "config.h" #endif -#define SWFDEC_AS_CONSTANT_STRING(str) "\2" str "\0" -const char swfdec_as_strings[] = +#include "swfdec_as_strings.h" + +#include "swfdec_as_gcable.h" + + +#define SWFDEC_AS_CONSTANT_STRING(str) { GSIZE_TO_POINTER (SWFDEC_AS_GC_ROOT), sizeof (str) - 1, str "\0" }, +const SwfdecAsConstantStringValue swfdec_as_strings[] = { SWFDEC_AS_CONSTANT_STRING ("") SWFDEC_AS_CONSTANT_STRING ("__proto__") SWFDEC_AS_CONSTANT_STRING ("this") @@ -532,4 +537,5 @@ const char swfdec_as_strings[] = SWFDEC_AS_CONSTANT_STRING ("auto") SWFDEC_AS_CONSTANT_STRING ("Matrix") /* add more here */ -; + { 0, 0, "" } +}; diff --git a/swfdec/swfdec_as_super.c b/swfdec/swfdec_as_super.c index 6975bc11..a012b790 100644 --- a/swfdec/swfdec_as_super.c +++ b/swfdec/swfdec_as_super.c @@ -49,8 +49,8 @@ swfdec_as_super_call (SwfdecAsFunction *function, SwfdecAsObject *thisp, } swfdec_as_object_get_variable (super->object, SWFDEC_AS_STR___constructor__, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val) || - !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val))) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val) || + !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay))) return; if (construct) { @@ -61,76 +61,11 @@ swfdec_as_super_call (SwfdecAsFunction *function, SwfdecAsObject *thisp, super->object->prototype, n_args, args, return_value); } -static gboolean -swfdec_as_super_get (SwfdecAsObject *object, SwfdecAsObject *orig, - const char *variable, SwfdecAsValue *val, guint *flags) -{ - SwfdecAsSuper *super = SWFDEC_AS_SUPER (object); - SwfdecAsObjectClass *klass; - SwfdecAsObject *cur; - guint i; - - if (super->object == NULL) { - SWFDEC_WARNING ("super.%s () called without an object.", variable); - return FALSE; - } - cur = super->object->prototype; - for (i = 0; i <= SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT && cur != NULL; i++) { - klass = SWFDEC_AS_OBJECT_GET_CLASS (cur); - /* FIXME: is the orig pointer correct? */ - if (klass->get (cur, super->object, variable, val, flags)) - return TRUE; - /* FIXME: need get_prototype_internal here? */ - cur = swfdec_as_object_get_prototype (cur); - } - if (i > SWFDEC_AS_OBJECT_PROTOTYPE_RECURSION_LIMIT) { - swfdec_as_context_abort (swfdec_gc_object_get_context (object), - "Prototype recursion limit exceeded"); - } - SWFDEC_AS_VALUE_SET_UNDEFINED (val); - *flags = 0; - return FALSE; -} - -static void -swfdec_as_super_set (SwfdecAsObject *object, const char *variable, const SwfdecAsValue *val, guint flags) -{ - /* This seems to be ignored completely */ -} - -static void -swfdec_as_super_set_flags (SwfdecAsObject *object, const char *variable, guint flags, guint mask) -{ - /* if we have no variables, we also can't set its flags... */ -} - -static SwfdecAsDeleteReturn -swfdec_as_super_delete (SwfdecAsObject *object, const char *variable) -{ - /* if we have no variables... */ - return SWFDEC_AS_DELETE_NOT_FOUND; -} - -static SwfdecAsObject * -swfdec_as_super_resolve (SwfdecAsObject *object) -{ - SwfdecAsSuper *super = SWFDEC_AS_SUPER (object); - - return super->thisp; -} - static void swfdec_as_super_class_init (SwfdecAsSuperClass *klass) { - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); SwfdecAsFunctionClass *function_class = SWFDEC_AS_FUNCTION_CLASS (klass); - asobject_class->get = swfdec_as_super_get; - asobject_class->set = swfdec_as_super_set; - asobject_class->set_flags = swfdec_as_super_set_flags; - asobject_class->del = swfdec_as_super_delete; - asobject_class->resolve = swfdec_as_super_resolve; - function_class->call = swfdec_as_super_call; } @@ -143,26 +78,30 @@ void swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *thisp, SwfdecAsObject *ref) { SwfdecAsContext *context; + SwfdecAsObject *object; SwfdecAsSuper *super; g_return_if_fail (frame != NULL); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (thisp)); - g_return_if_fail (ref == NULL || SWFDEC_IS_AS_OBJECT (ref)); + g_return_if_fail (thisp != NULL); if (frame->super != NULL) return; - context = swfdec_gc_object_get_context (thisp); + context = thisp->context; if (context->version <= 5) return; super = g_object_new (SWFDEC_TYPE_AS_SUPER, "context", context, NULL); - frame->super = SWFDEC_AS_OBJECT (super); + frame->super = super; super->thisp = swfdec_as_object_resolve (thisp); if (context->version <= 5) { super->object = NULL; } else { super->object = ref; } + + object = swfdec_as_object_new_empty (context); + object->super = TRUE; + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (super)); } SwfdecAsObject * diff --git a/swfdec/swfdec_as_super.h b/swfdec/swfdec_as_super.h index d89100bf..22d96b03 100644 --- a/swfdec/swfdec_as_super.h +++ b/swfdec/swfdec_as_super.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c index bdb85f1b..5432ade7 100644 --- a/swfdec/swfdec_as_types.c +++ b/swfdec/swfdec_as_types.c @@ -25,10 +25,12 @@ #include <string.h> #include "swfdec_as_types.h" -#include "swfdec_as_object.h" #include "swfdec_as_context.h" #include "swfdec_as_function.h" +#include "swfdec_as_gcable.h" +#include "swfdec_as_internal.h" #include "swfdec_as_number.h" +#include "swfdec_as_object.h" #include "swfdec_as_stack.h" #include "swfdec_as_string.h" #include "swfdec_as_strings.h" @@ -60,6 +62,7 @@ /** * SwfdecAsValueType: * @SWFDEC_AS_TYPE_UNDEFINED: the special undefined value + * @SWFDEC_AS_TYPE_NULL: the spaecial null value * @SWFDEC_AS_TYPE_BOOLEAN: a boolean value - true or false * @SWFDEC_AS_TYPE_INT: reserved value for integers. Should the need arise for * performance enhancements - especially on embedded @@ -68,8 +71,9 @@ * it will cause Swfdec to crash. * @SWFDEC_AS_TYPE_NUMBER: a double value - also used for integer numbers * @SWFDEC_AS_TYPE_STRING: a string. Strings are garbage-collected and unique. - * @SWFDEC_AS_TYPE_NULL: the spaecial null value * @SWFDEC_AS_TYPE_OBJECT: an object - must be of type #SwfdecAsObject + * @SWFDEC_AS_TYPE_MOVIE: an internal type used only inside #SwfdecPlayer + * objects. It is not exported in the API. * * These are the possible values the Swfdec Actionscript engine knows about. */ @@ -80,9 +84,21 @@ * * This is the type used to present an opaque value in the Actionscript * engine. See #SwfdecAsValueType for possible types. It's similar in - * spirit to #GValue. The value held is garbage-collected. Apart from the type - * member, use the provided macros to access this structure. - * <note>If you memset a SwfdecAsValue to 0, it is a valid undefined value.</note> + * spirit to #GValue. Use the provided macros to access this structure. + */ + +/** + * SWFDEC_AS_VALUE_GET_TYPE: + * @val: The value to extract the type from + * + * Extracts the type from a given value. + */ + +/** + * SWFDEC_AS_VALUE_UNDEFINED: + * + * The special "undefined" value. Use SWFDEC_AS_VALUE_IS_UNDEFINED() to + * check if a value equals this value. */ /** @@ -94,6 +110,18 @@ */ /** + * SWFDEC_AS_VALUE_FALSE: + * + * The boolean value false. + */ + +/** + * SWFDEC_AS_VALUE_TRUE: + * + * The boolean value true. + */ + +/** * SWFDEC_AS_VALUE_GET_BOOLEAN: * @val: value to get, the value must reference a boolean * @@ -104,6 +132,17 @@ */ /** + * SWFDEC_AS_VALUE_FROM_BOOLEAN: + * @b: boolean to convert + * + * Converts the given value to a boolean #SwfdecAsValue. When knowing the value + * at compile-time, use the static values such as %SWFDEC_AS_VALUE_TRUE instead + * of SWFDEC_AS_VALUE_FROM_BOOLEAN(%TRUE). + * + * Returns: %SWFDEC_AS_VALUE_TRUE or %SWFDEC_AS_VALUE_FALSE + */ + +/** * SWFDEC_AS_VALUE_SET_BOOLEAN: * @val: value to set * @b: boolean value to set, must be either %TRUE or %FALSE @@ -123,25 +162,6 @@ */ /** - * SWFDEC_AS_VALUE_SET_NUMBER: - * @val: value to set - * @d: double value to set - * - * Sets @val to the given value. If you are sure the value is a valid - * integer value, use SWFDEC_AS_VALUE_SET_INT() instead. - */ - -/** - * SWFDEC_AS_VALUE_SET_INT: - * @val: value to set - * @d: integer value to set - * - * Sets @val to the given value. Currently this macro is equivalent to - * SWFDEC_AS_VALUE_SET_NUMBER(), but this may change in future versions of - * Swfdec. - */ - -/** * SWFDEC_AS_VALUE_GET_STRING: * @val: value to get, the value must reference a string * @@ -152,6 +172,15 @@ */ /** + * SWFDEC_AS_VALUE_FROM_STRING: + * @s: garbage-collected string to convert + * + * Converts the given string to a #SwfdecAsValue. + * + * Returns: a SwfdecAsValue representing the given string + */ + +/** * SWFDEC_AS_VALUE_SET_STRING: * @val: value to set * @s: garbage-collected string to use @@ -160,6 +189,13 @@ */ /** + * SWFDEC_AS_VALUE_NULL: + * + * The special "null" value. Use SWFDEC_AS_VALUE_IS_NULL() to + * check if a value equals this value. + */ + +/** * SWFDEC_AS_VALUE_SET_NULL: * @val: value to set * @@ -177,6 +213,15 @@ */ /** + * SWFDEC_AS_VALUE_FROM_OBJECT: + * @o: the #SwfdecAsObject to convert + * + * Converts the given object to a #SwfdecAsValue. + * + * Returns: a SwfdecAsValue representing the given object + */ + +/** * SWFDEC_AS_VALUE_SET_OBJECT: * @val: value to set * @o: garbage-collected #SwfdecAsObject to use @@ -188,6 +233,43 @@ /*** actual code ***/ /** + * swfdec_as_value_from_integer: + * @cx: The context to use + * @i: integer value to set + * + * Creates a garbage-collected value representing @i and returns it. + * Currently this function is a macro that calls swfdec_as_value_set_number(), + * but this may change in future versions of Swfdec. + * + * Returns: The new value representing @i + */ + +/** + * swfdec_as_value_from_number: + * @context: The context to use + * @number: double value to set + * + * Creates a garbage-collected value representing @number and returns it. + * + * Returns: The new value representing @number + */ +SwfdecAsValue +swfdec_as_value_from_number (SwfdecAsContext *context, + double d) +{ + SwfdecAsDoubleValue *dval; + + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), SWFDEC_AS_VALUE_UNDEFINED); + + dval = swfdec_as_gcable_new (context, SwfdecAsDoubleValue); + dval->number = d; + SWFDEC_AS_GCABLE_SET_NEXT (dval, context->numbers); + context->numbers = dval; + + return SWFDEC_AS_VALUE_COMBINE (dval, SWFDEC_AS_TYPE_NUMBER); +} + +/** * swfdec_as_str_concat: * @cx: a #SwfdecAsContext * @s1: first string @@ -363,12 +445,11 @@ swfdec_as_double_to_string (SwfdecAsContext *context, double d) * never be %NULL. **/ const char * -swfdec_as_value_to_string (SwfdecAsContext *context, const SwfdecAsValue *value) +swfdec_as_value_to_string (SwfdecAsContext *context, SwfdecAsValue value) { g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), SWFDEC_AS_STR_EMPTY); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), SWFDEC_AS_STR_EMPTY); - switch (value->type) { + switch (SWFDEC_AS_VALUE_GET_TYPE (value)) { case SWFDEC_AS_TYPE_STRING: return SWFDEC_AS_VALUE_GET_STRING (value); case SWFDEC_AS_TYPE_UNDEFINED: @@ -385,67 +466,35 @@ swfdec_as_value_to_string (SwfdecAsContext *context, const SwfdecAsValue *value) case SWFDEC_AS_TYPE_OBJECT: { SwfdecAsObject *object = SWFDEC_AS_VALUE_GET_OBJECT (value); - if (SWFDEC_IS_MOVIE (object)) { - SwfdecMovie *movie = swfdec_movie_resolve (SWFDEC_MOVIE (object)); - if (movie == NULL) { - return SWFDEC_AS_STR_EMPTY; - } else { - char *str = swfdec_movie_get_path (SWFDEC_MOVIE (object), TRUE); - return swfdec_as_context_give_string (context, str); - } - } else if (SWFDEC_IS_AS_STRING (object)) { - return SWFDEC_AS_STRING (object)->string; + if (SWFDEC_IS_AS_STRING (object->relay)) { + return SWFDEC_AS_STRING (object->relay)->string; } else { SwfdecAsValue ret; swfdec_as_object_call (object, SWFDEC_AS_STR_toString, 0, NULL, &ret); - if (SWFDEC_AS_VALUE_IS_STRING (&ret)) - return SWFDEC_AS_VALUE_GET_STRING (&ret); - else if (SWFDEC_IS_AS_SUPER (SWFDEC_AS_VALUE_GET_OBJECT (value))) + if (SWFDEC_AS_VALUE_IS_STRING (ret)) + return SWFDEC_AS_VALUE_GET_STRING (ret); + else if (SWFDEC_IS_AS_SUPER (object->relay)) return SWFDEC_AS_STR__type_Object_; - else if (SWFDEC_IS_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (value))) + else if (SWFDEC_IS_AS_FUNCTION (object->relay)) return SWFDEC_AS_STR__type_Function_; else return SWFDEC_AS_STR__type_Object_; } } - case SWFDEC_AS_TYPE_INT: - default: - g_assert_not_reached (); - return SWFDEC_AS_STR_EMPTY; - } -} - -/** - * swfdec_as_value_to_debug: - * @value: a #SwfdecAsValue - * - * Converts the given @value to a string in a safe way. It will not call into - * the scripting engine. Its intended use is for output in debuggers. - * - * Returns: a newly allocated string. Free with g_free(). - **/ -char * -swfdec_as_value_to_debug (const SwfdecAsValue *value) -{ - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), NULL); + case SWFDEC_AS_TYPE_MOVIE: + { + SwfdecMovie *movie = SWFDEC_AS_VALUE_GET_MOVIE (value); + char *str; - switch (value->type) { - case SWFDEC_AS_TYPE_STRING: - return g_shell_quote (SWFDEC_AS_VALUE_GET_STRING (value)); - case SWFDEC_AS_TYPE_UNDEFINED: - return g_strdup ("undefined"); - case SWFDEC_AS_TYPE_BOOLEAN: - return g_strdup (SWFDEC_AS_VALUE_GET_BOOLEAN (value) ? "true" : "false"); - case SWFDEC_AS_TYPE_NULL: - return g_strdup ("null"); - case SWFDEC_AS_TYPE_NUMBER: - return g_strdup_printf ("%g", SWFDEC_AS_VALUE_GET_NUMBER (value)); - case SWFDEC_AS_TYPE_OBJECT: - return swfdec_as_object_get_debug (SWFDEC_AS_VALUE_GET_OBJECT (value)); + if (movie == NULL) + return SWFDEC_AS_STR_EMPTY; + str = swfdec_movie_get_path (movie, TRUE); + return swfdec_as_context_give_string (context, str); + } case SWFDEC_AS_TYPE_INT: default: g_assert_not_reached (); - return NULL; + return SWFDEC_AS_STR_EMPTY; } } @@ -462,24 +511,20 @@ swfdec_as_value_to_debug (const SwfdecAsValue *value) * Returns: a double value. It can be NaN or +-Infinity. It will not be -0.0. **/ double -swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value) +swfdec_as_value_to_number (SwfdecAsContext *context, SwfdecAsValue value) { - SwfdecAsValue tmp; - g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0.0); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), 0.0); - tmp = *value; - swfdec_as_value_to_primitive (&tmp); + value = swfdec_as_value_to_primitive (value); - switch (tmp.type) { + switch (SWFDEC_AS_VALUE_GET_TYPE (value)) { case SWFDEC_AS_TYPE_UNDEFINED: case SWFDEC_AS_TYPE_NULL: return (context->version >= 7) ? NAN : 0.0; case SWFDEC_AS_TYPE_BOOLEAN: - return SWFDEC_AS_VALUE_GET_BOOLEAN (&tmp) ? 1 : 0; + return SWFDEC_AS_VALUE_GET_BOOLEAN (value) ? 1 : 0; case SWFDEC_AS_TYPE_NUMBER: - return SWFDEC_AS_VALUE_GET_NUMBER (&tmp); + return SWFDEC_AS_VALUE_GET_NUMBER (value); case SWFDEC_AS_TYPE_STRING: { const char *s; @@ -487,7 +532,7 @@ swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value) double d; // FIXME: We should most likely copy Tamarin's code here (MathUtils.cpp) - s = SWFDEC_AS_VALUE_GET_STRING (&tmp); + s = SWFDEC_AS_VALUE_GET_STRING (value); if (s == SWFDEC_AS_STR_EMPTY) return (context->version >= 5) ? NAN : 0.0; if (context->version > 5 && s[0] == '0' && @@ -508,6 +553,7 @@ swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value) return NAN; } case SWFDEC_AS_TYPE_OBJECT: + case SWFDEC_AS_TYPE_MOVIE: return (context->version >= 5) ? NAN : 0.0; case SWFDEC_AS_TYPE_INT: default: @@ -550,7 +596,7 @@ swfdec_as_double_to_integer (double d) * Returns: An Integer that can be represented in 32 bits. **/ int -swfdec_as_value_to_integer (SwfdecAsContext *context, const SwfdecAsValue *value) +swfdec_as_value_to_integer (SwfdecAsContext *context, SwfdecAsValue value) { double d; @@ -572,16 +618,15 @@ swfdec_as_value_to_integer (SwfdecAsContext *context, const SwfdecAsValue *value * Returns: object representing @value or %NULL. **/ SwfdecAsObject * -swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value) +swfdec_as_value_to_object (SwfdecAsContext *context, SwfdecAsValue value) { SwfdecAsFunction *fun; SwfdecAsValue val; const char *s; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), NULL); - switch (value->type) { + switch (SWFDEC_AS_VALUE_GET_TYPE (value)) { case SWFDEC_AS_TYPE_UNDEFINED: case SWFDEC_AS_TYPE_NULL: return NULL; @@ -595,7 +640,8 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value) s = SWFDEC_AS_STR_Boolean; break; case SWFDEC_AS_TYPE_OBJECT: - return SWFDEC_AS_VALUE_GET_OBJECT (value); + case SWFDEC_AS_TYPE_MOVIE: + return SWFDEC_AS_VALUE_GET_COMPOSITE (value); case SWFDEC_AS_TYPE_INT: default: g_assert_not_reached (); @@ -603,12 +649,12 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value) } swfdec_as_object_get_variable (context->global, s, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val) || - !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val))) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val) || + !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay))) return NULL; - swfdec_as_object_create (fun, 1, value, &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { - return SWFDEC_AS_VALUE_GET_OBJECT (&val); + swfdec_as_object_create (fun, 1, &value, &val); + if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { + return SWFDEC_AS_VALUE_GET_OBJECT (val); } else { SWFDEC_ERROR ("did not construct an object"); return NULL; @@ -626,13 +672,12 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value) * Returns: either %TRUE or %FALSE. **/ gboolean -swfdec_as_value_to_boolean (SwfdecAsContext *context, const SwfdecAsValue *value) +swfdec_as_value_to_boolean (SwfdecAsContext *context, SwfdecAsValue value) { g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), FALSE); - g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), FALSE); /* FIXME: what do we do when called in flash 4? */ - switch (value->type) { + switch (SWFDEC_AS_VALUE_GET_TYPE (value)) { case SWFDEC_AS_TYPE_UNDEFINED: case SWFDEC_AS_TYPE_NULL: return FALSE; @@ -651,6 +696,7 @@ swfdec_as_value_to_boolean (SwfdecAsContext *context, const SwfdecAsValue *value return SWFDEC_AS_VALUE_GET_STRING (value) != SWFDEC_AS_STR_EMPTY; } case SWFDEC_AS_TYPE_OBJECT: + case SWFDEC_AS_TYPE_MOVIE: return TRUE; case SWFDEC_AS_TYPE_INT: default: @@ -667,16 +713,49 @@ swfdec_as_value_to_boolean (SwfdecAsContext *context, const SwfdecAsValue *value * values are values that are not objects. If the value is an object, the * object's valueOf function is called. If the result of that function is still * an object, it is returned nonetheless. +* +* Returns: The primitive value for &value **/ -void -swfdec_as_value_to_primitive (SwfdecAsValue *value) +SwfdecAsValue +swfdec_as_value_to_primitive (SwfdecAsValue value) { - g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); - if (SWFDEC_AS_VALUE_IS_OBJECT (value) && !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (value))) { + if (SWFDEC_AS_VALUE_IS_OBJECT (value)) { swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (value), SWFDEC_AS_STR_valueOf, - 0, NULL, value); + 0, NULL, &value); } + return value; +} + +/** + * swfdec_as_value_get_variable: + * @cx: the context + * @value: the value to get the variable from + * @name: name of the variable to get + * @ret: The return value to set. May be identical to the passed in @value. + * + * Gets a variable from the given @value. This function is a shortcut for + * converting to a #SwfdecAsObject and then calling + * swfdec_As_object_get_variable(). When the @value cannot be converted to an + * object, @ret is set to undefined. + **/ +void +swfdec_as_value_get_variable (SwfdecAsContext *cx, const SwfdecAsValue *value, + const char *name, SwfdecAsValue *ret) +{ + SwfdecAsObject *object; + + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); + g_return_if_fail (value != NULL); + g_return_if_fail (name != NULL); + g_return_if_fail (ret != NULL); + + object = swfdec_as_value_to_object (cx, *value); + if (object == NULL) { + SWFDEC_AS_VALUE_SET_UNDEFINED (ret); + return; + } + swfdec_as_object_get_variable (object, name, ret); } /* from swfdec_internal.h */ @@ -690,10 +769,10 @@ swfdec_as_value_to_twips (SwfdecAsContext *context, const SwfdecAsValue *val, g_return_val_if_fail (val != NULL, FALSE); g_return_val_if_fail (result != NULL, FALSE); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (val) || SWFDEC_AS_VALUE_IS_NULL (val)) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (*val) || SWFDEC_AS_VALUE_IS_NULL (*val)) return FALSE; - d = swfdec_as_value_to_number (context, val); + d = swfdec_as_value_to_number (context, *val); if (isnan (d)) return FALSE; if (is_length && d < 0) @@ -706,15 +785,3 @@ swfdec_as_value_to_twips (SwfdecAsContext *context, const SwfdecAsValue *val, return TRUE; } -SwfdecAsObject * -swfdec_as_value_get_object (const SwfdecAsValue *val) -{ - SwfdecAsObject *o = val->value.object; - - if (SWFDEC_IS_MOVIE (o)) { - o = SWFDEC_AS_OBJECT (swfdec_movie_resolve (SWFDEC_MOVIE (o))); - if (o == NULL) - o = val->value.object; - } - return o; -} diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h index 0ce9644d..b668bb0d 100644 --- a/swfdec/swfdec_as_types.h +++ b/swfdec/swfdec_as_types.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -21,29 +21,32 @@ #define _SWFDEC_AS_TYPES_H_ #include <glib-object.h> +#include <swfdec/swfdec_as_string_value.h> G_BEGIN_DECLS /* fundamental types */ typedef enum { SWFDEC_AS_TYPE_UNDEFINED = 0, - SWFDEC_AS_TYPE_BOOLEAN, - SWFDEC_AS_TYPE_INT, /* unimplemented, but reserved if someone wants it */ - SWFDEC_AS_TYPE_NUMBER, - SWFDEC_AS_TYPE_STRING, - SWFDEC_AS_TYPE_NULL, - SWFDEC_AS_TYPE_OBJECT + SWFDEC_AS_TYPE_NULL = 1, + SWFDEC_AS_TYPE_BOOLEAN = 2, + SWFDEC_AS_TYPE_INT = 3, + SWFDEC_AS_TYPE_NUMBER = 4, + SWFDEC_AS_TYPE_STRING = 5, + SWFDEC_AS_TYPE_OBJECT = 6, + SWFDEC_AS_TYPE_MOVIE = 7 } SwfdecAsValueType; -typedef struct _SwfdecAsArray SwfdecAsArray; typedef struct _SwfdecAsContext SwfdecAsContext; typedef struct _SwfdecAsDebugger SwfdecAsDebugger; +typedef struct _SwfdecAsDoubleValue SwfdecAsDoubleValue; typedef struct _SwfdecAsFrame SwfdecAsFrame; typedef struct _SwfdecAsFunction SwfdecAsFunction; typedef struct _SwfdecAsObject SwfdecAsObject; +typedef struct _SwfdecAsRelay SwfdecAsRelay; typedef struct _SwfdecAsScope SwfdecAsScope; typedef struct _SwfdecAsStack SwfdecAsStack; -typedef struct _SwfdecAsValue SwfdecAsValue; +typedef gsize SwfdecAsValue; typedef void (* SwfdecAsNative) (SwfdecAsContext * context, SwfdecAsObject * thisp, guint argc, @@ -54,81 +57,75 @@ typedef struct _SwfdecScript SwfdecScript; /* IMPORTANT: a SwfdecAsValue memset to 0 is a valid undefined value */ -struct _SwfdecAsValue { - SwfdecAsValueType type; - /*< private >*/ - union { - gboolean boolean; - double number; - const char * string; - SwfdecAsObject * object; - } value; -}; - -#define SWFDEC_IS_AS_VALUE(val) ((val) != NULL && (val)->type <= SWFDEC_TYPE_AS_OBJECT) - -#define SWFDEC_AS_VALUE_IS_UNDEFINED(val) ((val)->type == SWFDEC_AS_TYPE_UNDEFINED) -#define SWFDEC_AS_VALUE_SET_UNDEFINED(val) (val)->type = SWFDEC_AS_TYPE_UNDEFINED - -#define SWFDEC_AS_VALUE_IS_BOOLEAN(val) ((val)->type == SWFDEC_AS_TYPE_BOOLEAN) -#define SWFDEC_AS_VALUE_GET_BOOLEAN(val) ((val)->value.boolean) +#define SWFDEC_AS_VALUE_TYPE_BITS (3) +#define SWFDEC_AS_VALUE_TYPE_MASK ((1 << SWFDEC_AS_VALUE_TYPE_BITS) - 1) +#define SWFDEC_AS_VALUE_VALUE_MASK (~SWFDEC_AS_VALUE_TYPE_MASK) + +#define SWFDEC_AS_VALUE_GET_TYPE(val) ((SwfdecAsValueType) ((val) & SWFDEC_AS_VALUE_TYPE_MASK)) +#define SWFDEC_AS_VALUE_GET_VALUE(val) GSIZE_TO_POINTER ((val) & SWFDEC_AS_VALUE_VALUE_MASK) +#define SWFDEC_AS_VALUE_COMBINE(val, type) (GPOINTER_TO_SIZE (val) | type) + +#define SWFDEC_AS_VALUE_UNDEFINED SWFDEC_AS_VALUE_COMBINE (NULL, SWFDEC_AS_TYPE_UNDEFINED) +#define SWFDEC_AS_VALUE_IS_UNDEFINED(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_UNDEFINED) +#define SWFDEC_AS_VALUE_SET_UNDEFINED(val) *(val) = SWFDEC_AS_VALUE_UNDEFINED + +#define SWFDEC_AS_VALUE_FALSE SWFDEC_AS_VALUE_COMBINE(NULL, SWFDEC_AS_TYPE_BOOLEAN) +#define SWFDEC_AS_VALUE_TRUE SWFDEC_AS_VALUE_COMBINE(GSIZE_TO_POINTER (1 << SWFDEC_AS_VALUE_TYPE_BITS), SWFDEC_AS_TYPE_BOOLEAN) +#define SWFDEC_AS_VALUE_IS_BOOLEAN(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_BOOLEAN) +#define SWFDEC_AS_VALUE_GET_BOOLEAN(val) (SWFDEC_AS_VALUE_GET_VALUE (val) != NULL) +#define SWFDEC_AS_VALUE_FROM_BOOLEAN(b) (b ? SWFDEC_AS_VALUE_TRUE : SWFDEC_AS_VALUE_FALSE) #define SWFDEC_AS_VALUE_SET_BOOLEAN(val,b) G_STMT_START { \ - SwfdecAsValue *__val = (val); \ gboolean __tmp = (b); \ g_assert (__tmp == TRUE || __tmp == FALSE); \ - (__val)->value.boolean = __tmp; \ - (__val)->type = SWFDEC_AS_TYPE_BOOLEAN; \ + *(val) = SWFDEC_AS_VALUE_FROM_BOOLEAN(__tmp); \ } G_STMT_END -#define SWFDEC_AS_VALUE_IS_NUMBER(val) ((val)->type == SWFDEC_AS_TYPE_NUMBER) -#define SWFDEC_AS_VALUE_GET_NUMBER(val) ((val)->value.number) -#define SWFDEC_AS_VALUE_SET_NUMBER(val,d) G_STMT_START { \ - SwfdecAsValue *__val = (val); \ - (__val)->value.number = (d); \ - (__val)->type = SWFDEC_AS_TYPE_NUMBER; \ -} G_STMT_END +struct _SwfdecAsDoubleValue { + SwfdecAsDoubleValue * next; + double number; +}; -#define SWFDEC_AS_VALUE_SET_INT(val,d) SWFDEC_AS_VALUE_SET_NUMBER(val,(int) (d)) +#define SWFDEC_AS_VALUE_IS_NUMBER(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_NUMBER) +#define SWFDEC_AS_VALUE_GET_NUMBER(val) (((SwfdecAsDoubleValue *) SWFDEC_AS_VALUE_GET_VALUE(val))->number) -#define SWFDEC_AS_VALUE_IS_STRING(val) ((val)->type == SWFDEC_AS_TYPE_STRING) -#define SWFDEC_AS_VALUE_GET_STRING(val) ((val)->value.string) +#define SWFDEC_AS_VALUE_IS_STRING(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_STRING) +#define SWFDEC_AS_VALUE_GET_STRING(val) (((SwfdecAsStringValue *) SWFDEC_AS_VALUE_GET_VALUE(val))->string) +#define SWFDEC_AS_VALUE_FROM_STRING(s) SWFDEC_AS_VALUE_COMBINE (((guint8 *) (s) - G_STRUCT_OFFSET (SwfdecAsStringValue, string)), SWFDEC_AS_TYPE_STRING) #define SWFDEC_AS_VALUE_SET_STRING(val,s) G_STMT_START { \ - SwfdecAsValue *__val = (val); \ - (__val)->value.string = s; \ - (__val)->type = SWFDEC_AS_TYPE_STRING; \ + *(val) = SWFDEC_AS_VALUE_FROM_STRING (s); \ } G_STMT_END -#define SWFDEC_AS_VALUE_IS_NULL(val) ((val)->type == SWFDEC_AS_TYPE_NULL) -#define SWFDEC_AS_VALUE_SET_NULL(val) (val)->type = SWFDEC_AS_TYPE_NULL +#define SWFDEC_AS_VALUE_NULL SWFDEC_AS_VALUE_COMBINE (NULL, SWFDEC_AS_TYPE_NULL) +#define SWFDEC_AS_VALUE_IS_NULL(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_NULL) +#define SWFDEC_AS_VALUE_SET_NULL(val) *(val) = SWFDEC_AS_VALUE_NULL -#define SWFDEC_AS_VALUE_IS_OBJECT(val) ((val)->type == SWFDEC_AS_TYPE_OBJECT) -#if 0 -#define SWFDEC_AS_VALUE_GET_OBJECT(val) ((val)->value.object) -#else -#define SWFDEC_AS_VALUE_GET_OBJECT swfdec_as_value_get_object -SwfdecAsObject *swfdec_as_value_get_object (const SwfdecAsValue *val); -#endif +#define SWFDEC_AS_VALUE_IS_OBJECT(val) (SWFDEC_AS_VALUE_GET_TYPE (val) == SWFDEC_AS_TYPE_OBJECT) +#define SWFDEC_AS_VALUE_GET_OBJECT(val) ((SwfdecAsObject *) SWFDEC_AS_VALUE_GET_VALUE (val)) +#define SWFDEC_AS_VALUE_FROM_OBJECT(o) SWFDEC_AS_VALUE_COMBINE (o, SWFDEC_AS_TYPE_OBJECT) #define SWFDEC_AS_VALUE_SET_OBJECT(val,o) G_STMT_START { \ - SwfdecAsValue *__val = (val); \ SwfdecAsObject *__o = (o); \ g_assert (__o != NULL); \ - (__val)->type = SWFDEC_AS_TYPE_OBJECT; \ - (__val)->value.object = __o; \ + g_assert (!__o->movie); \ + *(val) = SWFDEC_AS_VALUE_FROM_OBJECT (__o); \ } G_STMT_END +/* value setters */ +#define swfdec_as_value_from_integer(cx, i) swfdec_as_value_from_number((cx), (int) (i)) +SwfdecAsValue swfdec_as_value_from_number (SwfdecAsContext * context, + double number); + /* value conversion functions */ gboolean swfdec_as_value_to_boolean (SwfdecAsContext * context, - const SwfdecAsValue * value); + SwfdecAsValue value); int swfdec_as_value_to_integer (SwfdecAsContext * context, - const SwfdecAsValue * value); + SwfdecAsValue value); double swfdec_as_value_to_number (SwfdecAsContext * context, - const SwfdecAsValue * value); + SwfdecAsValue value); SwfdecAsObject *swfdec_as_value_to_object (SwfdecAsContext * context, - const SwfdecAsValue * value); -void swfdec_as_value_to_primitive (SwfdecAsValue * value); + SwfdecAsValue value); +SwfdecAsValue swfdec_as_value_to_primitive (SwfdecAsValue value); const char * swfdec_as_value_to_string (SwfdecAsContext * context, - const SwfdecAsValue * value); -char * swfdec_as_value_to_debug (const SwfdecAsValue * value); + SwfdecAsValue value); /* special conversion functions */ const char * swfdec_as_integer_to_string (SwfdecAsContext * context, @@ -140,6 +137,12 @@ const char * swfdec_as_str_concat (SwfdecAsContext * cx, const char * s1, const char * s2); +/* variable get/set */ +void swfdec_as_value_get_variable (SwfdecAsContext * cx, + const SwfdecAsValue * value, + const char * name, + SwfdecAsValue * ret); + G_END_DECLS #endif diff --git a/swfdec/swfdec_asbroadcaster.c b/swfdec/swfdec_asbroadcaster.c index f15b8284..d29f2217 100644 --- a/swfdec/swfdec_asbroadcaster.c +++ b/swfdec/swfdec_asbroadcaster.c @@ -46,17 +46,17 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc < 1) return; - name = swfdec_as_value_to_string (cx, &argv[0]); + name = swfdec_as_value_to_string (cx, argv[0]); argv += 1; argc--; swfdec_as_object_get_variable (object, SWFDEC_AS_STR__listeners, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (val)) return; - listeners = SWFDEC_AS_VALUE_GET_OBJECT (&val); + listeners = SWFDEC_AS_VALUE_GET_COMPOSITE (val); swfdec_as_object_get_variable (listeners, SWFDEC_AS_STR_length, &val); - length = swfdec_as_value_to_integer (cx, &val); + length = swfdec_as_value_to_integer (cx, val); /* return undefined if we won't try to call anything */ if (length <= 0) @@ -65,7 +65,7 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object, /* FIXME: solve this wth foreach, so it gets faster for weird cases */ for (i = 0; i < length; i++) { swfdec_as_object_get_variable (listeners, swfdec_as_integer_to_string (cx, i), &val); - o = swfdec_as_value_to_object (cx, &val); + o = swfdec_as_value_to_object (cx, val); if (o == NULL) continue; list = g_slist_prepend (list, o); diff --git a/swfdec/swfdec_asnative.h b/swfdec/swfdec_asnative.h index e512bb6d..ab42f6ef 100644 --- a/swfdec/swfdec_asnative.h +++ b/swfdec/swfdec_asnative.h @@ -28,7 +28,6 @@ extern const struct { guint x, y; SwfdecAsNative func; const char *name; - GType (* get_type) (void); } native_funcs[]; G_END_DECLS diff --git a/swfdec/swfdec_audio.c b/swfdec/swfdec_audio.c index 260eb424..0722feba 100644 --- a/swfdec/swfdec_audio.c +++ b/swfdec/swfdec_audio.c @@ -69,7 +69,7 @@ static guint signals[LAST_SIGNAL] = { 0, }; static void swfdec_audio_dispose (GObject *object) { - SwfdecAudio *audio = SWFDEC_AUDIO (object); + G_GNUC_UNUSED SwfdecAudio *audio = SWFDEC_AUDIO (object); g_assert (audio->actor == NULL); g_assert (audio->player == NULL); diff --git a/swfdec/swfdec_audio_decoder.c b/swfdec/swfdec_audio_decoder.c index 72be7326..c0b666bd 100644 --- a/swfdec/swfdec_audio_decoder.c +++ b/swfdec/swfdec_audio_decoder.c @@ -83,6 +83,8 @@ swfdec_audio_decoder_prepare (guint codec, SwfdecAudioFormat format, char **miss * swfdec_audio_decoder_new: * @codec: codec id * @format: #SwfdecAudioCodec to decode + * @data: setup data for the codec or %NULL for none. Setup data is only + * required for AAC audio. * * Creates a decoder suitable for decoding @format. If no decoder is available * for the given for mat, %NULL is returned. @@ -90,7 +92,7 @@ swfdec_audio_decoder_prepare (guint codec, SwfdecAudioFormat format, char **miss * Returns: a new decoder or %NULL **/ SwfdecAudioDecoder * -swfdec_audio_decoder_new (guint codec, SwfdecAudioFormat format) +swfdec_audio_decoder_new (guint codec, SwfdecAudioFormat format, SwfdecBuffer *data) { SwfdecAudioDecoder *ret = NULL; GSList *walk; @@ -99,7 +101,7 @@ swfdec_audio_decoder_new (guint codec, SwfdecAudioFormat format) for (walk = audio_codecs; walk; walk = walk->next) { SwfdecAudioDecoderClass *klass = g_type_class_ref (GPOINTER_TO_SIZE (walk->data)); - ret = klass->create (codec, format); + ret = klass->create (codec, format, data); g_type_class_unref (klass); if (ret) break; diff --git a/swfdec/swfdec_audio_decoder.h b/swfdec/swfdec_audio_decoder.h index e0e2960b..8c7fb5d8 100644 --- a/swfdec/swfdec_audio_decoder.h +++ b/swfdec/swfdec_audio_decoder.h @@ -30,8 +30,14 @@ G_BEGIN_DECLS #define SWFDEC_AUDIO_CODEC_ADPCM 1 #define SWFDEC_AUDIO_CODEC_MP3 2 #define SWFDEC_AUDIO_CODEC_UNCOMPRESSED 3 +#define SWFDEC_AUDIO_CODEC_NELLYMOSER_16KHZ 4 #define SWFDEC_AUDIO_CODEC_NELLYMOSER_8KHZ 5 #define SWFDEC_AUDIO_CODEC_NELLYMOSER 6 +#define SWFDEC_AUDIO_CODEC_ALAW 7 +#define SWFDEC_AUDIO_CODEC_MULAW 8 +#define SWFDEC_AUDIO_CODEC_AAC 10 +#define SWFDEC_AUDIO_CODEC_SPEEX 11 +#define SWFDEC_AUDIO_CODEC_MP3_8KHZ 14 typedef struct _SwfdecAudioDecoder SwfdecAudioDecoder; @@ -64,7 +70,8 @@ struct _SwfdecAudioDecoderClass SwfdecAudioFormat format, char ** missing); SwfdecAudioDecoder * (* create) (guint codec, - SwfdecAudioFormat format); + SwfdecAudioFormat format, + SwfdecBuffer * data); void (* push) (SwfdecAudioDecoder * decoder, SwfdecBuffer * buffer); @@ -79,7 +86,8 @@ gboolean swfdec_audio_decoder_prepare (guint codec, SwfdecAudioFormat format, char ** missing); SwfdecAudioDecoder * swfdec_audio_decoder_new (guint codec, - SwfdecAudioFormat format); + SwfdecAudioFormat format, + SwfdecBuffer * data); void swfdec_audio_decoder_push (SwfdecAudioDecoder * decoder, SwfdecBuffer * buffer); diff --git a/swfdec/swfdec_audio_decoder_adpcm.c b/swfdec/swfdec_audio_decoder_adpcm.c index 18eaab17..255af889 100644 --- a/swfdec/swfdec_audio_decoder_adpcm.c +++ b/swfdec/swfdec_audio_decoder_adpcm.c @@ -34,7 +34,7 @@ swfdec_audio_decoder_adpcm_prepare (guint codec, SwfdecAudioFormat format, char } static SwfdecAudioDecoder * -swfdec_audio_decoder_adpcm_create (guint codec, SwfdecAudioFormat format) +swfdec_audio_decoder_adpcm_create (guint codec, SwfdecAudioFormat format, SwfdecBuffer *data) { if (codec != SWFDEC_AUDIO_CODEC_ADPCM) return NULL; diff --git a/swfdec/swfdec_audio_decoder_gst.c b/swfdec/swfdec_audio_decoder_gst.c index 9b29957f..e22c05b4 100644 --- a/swfdec/swfdec_audio_decoder_gst.c +++ b/swfdec/swfdec_audio_decoder_gst.c @@ -108,7 +108,7 @@ swfdec_audio_decoder_get_resampler (void) } static SwfdecAudioDecoder * -swfdec_audio_decoder_gst_create (guint type, SwfdecAudioFormat format) +swfdec_audio_decoder_gst_create (guint type, SwfdecAudioFormat format, SwfdecBuffer *data) { SwfdecAudioDecoderGst *player; GstCaps *srccaps, *sinkcaps; diff --git a/swfdec/swfdec_audio_decoder_uncompressed.c b/swfdec/swfdec_audio_decoder_uncompressed.c index 6a4caf6c..e299f728 100644 --- a/swfdec/swfdec_audio_decoder_uncompressed.c +++ b/swfdec/swfdec_audio_decoder_uncompressed.c @@ -35,7 +35,7 @@ swfdec_audio_decoder_uncompressed_prepare (guint codec, SwfdecAudioFormat format } static SwfdecAudioDecoder * -swfdec_audio_decoder_uncompressed_create (guint codec, SwfdecAudioFormat format) +swfdec_audio_decoder_uncompressed_create (guint codec, SwfdecAudioFormat format, SwfdecBuffer *data) { if (codec != SWFDEC_AUDIO_CODEC_UNDEFINED && codec != SWFDEC_AUDIO_CODEC_UNCOMPRESSED) diff --git a/swfdec/swfdec_audio_flv.c b/swfdec/swfdec_audio_flv.c index 2a49ee6e..e5cd6be6 100644 --- a/swfdec/swfdec_audio_flv.c +++ b/swfdec/swfdec_audio_flv.c @@ -92,7 +92,7 @@ swfdec_audio_flv_decode_one (SwfdecAudioFlv *flv) } flv->format = format; flv->in = in; - flv->decoder = swfdec_audio_decoder_new (flv->format, flv->in); + flv->decoder = swfdec_audio_decoder_new (flv->format, flv->in, NULL); if (flv->decoder == NULL) return NULL; } else if (format != flv->format || diff --git a/swfdec/swfdec_audio_load.c b/swfdec/swfdec_audio_load.c index d63da2d1..f8365be5 100644 --- a/swfdec/swfdec_audio_load.c +++ b/swfdec/swfdec_audio_load.c @@ -30,19 +30,6 @@ G_DEFINE_TYPE (SwfdecAudioLoad, swfdec_audio_load, SWFDEC_TYPE_AUDIO_STREAM) -static void -swfdec_audio_load_dispose (GObject *object) -{ - SwfdecAudioLoad *stream = SWFDEC_AUDIO_LOAD (object); - - if (stream->load != NULL) { - g_object_unref (stream->load); - stream->load = NULL; - } - - G_OBJECT_CLASS (swfdec_audio_load_parent_class)->dispose (object); -} - static SwfdecBuffer * swfdec_audio_load_pull (SwfdecAudioStream *audio) { @@ -60,11 +47,8 @@ swfdec_audio_load_pull (SwfdecAudioStream *audio) static void swfdec_audio_load_class_init (SwfdecAudioLoadClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); SwfdecAudioStreamClass *stream_class = SWFDEC_AUDIO_STREAM_CLASS (klass); - object_class->dispose = swfdec_audio_load_dispose; - stream_class->pull = swfdec_audio_load_pull; } @@ -82,7 +66,7 @@ swfdec_audio_load_new (SwfdecPlayer *player, SwfdecLoadSound *load) g_return_val_if_fail (SWFDEC_IS_LOAD_SOUND (load), NULL); stream = g_object_new (SWFDEC_TYPE_AUDIO_LOAD, NULL); - stream->load = g_object_ref (load); + stream->load = load; swfdec_audio_stream_use_decoder (SWFDEC_AUDIO_STREAM (stream), SWFDEC_AUDIO_CODEC_MP3, swfdec_audio_format_new (44100, TRUE, 2)); diff --git a/swfdec/swfdec_audio_stream.c b/swfdec/swfdec_audio_stream.c index 857fecdc..08063504 100644 --- a/swfdec/swfdec_audio_stream.c +++ b/swfdec/swfdec_audio_stream.c @@ -203,7 +203,7 @@ swfdec_audio_stream_use_decoder (SwfdecAudioStream *stream, /* FIXME: send NULL buffer */ g_object_unref (stream->decoder); } - stream->decoder = swfdec_audio_decoder_new (codec, format); + stream->decoder = swfdec_audio_decoder_new (codec, format, NULL); } void diff --git a/swfdec/swfdec_bitmap_data.c b/swfdec/swfdec_bitmap_data.c index 4ef20b03..041b448a 100644 --- a/swfdec/swfdec_bitmap_data.c +++ b/swfdec/swfdec_bitmap_data.c @@ -47,7 +47,7 @@ enum { }; static guint signals[LAST_SIGNAL]; -G_DEFINE_TYPE (SwfdecBitmapData, swfdec_bitmap_data, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecBitmapData, swfdec_bitmap_data, SWFDEC_TYPE_AS_RELAY) static void swfdec_bitmap_data_invalidate (SwfdecBitmapData *bitmap, guint x, guint y, guint w, guint h) @@ -57,23 +57,24 @@ swfdec_bitmap_data_invalidate (SwfdecBitmapData *bitmap, guint x, guint y, guint g_return_if_fail (w > 0); g_return_if_fail (h > 0); + if (bitmap->surface) + cairo_surface_mark_dirty_rectangle (bitmap->surface, x, y, w, h); g_signal_emit (bitmap, signals[INVALIDATE], 0, &rect); } static void swfdec_bitmap_data_clear (SwfdecBitmapData *bitmap) { - int w, h; - if (bitmap->surface == NULL) return; - w = cairo_image_surface_get_width (bitmap->surface); - h = cairo_image_surface_get_height (bitmap->surface); - swfdec_bitmap_data_invalidate (bitmap, 0, 0, w, h); - swfdec_as_context_unuse_mem (swfdec_gc_object_get_context (bitmap), 4 * w * h); + swfdec_bitmap_data_invalidate (bitmap, 0, 0, bitmap->width, bitmap->height); cairo_surface_destroy (bitmap->surface); + swfdec_as_context_unuse_mem (swfdec_gc_object_get_context (bitmap), + 4 * bitmap->width * bitmap->height); bitmap->surface = NULL; + bitmap->width = 0; + bitmap->height = 0; } static void @@ -107,6 +108,7 @@ SwfdecBitmapData * swfdec_bitmap_data_new (SwfdecAsContext *context, gboolean transparent, guint width, guint height) { SwfdecBitmapData *bitmap; + SwfdecAsObject *object; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (width > 0, NULL); @@ -116,11 +118,15 @@ swfdec_bitmap_data_new (SwfdecAsContext *context, gboolean transparent, guint wi return NULL; bitmap = g_object_new (SWFDEC_TYPE_BITMAP_DATA, "context", context, NULL); + bitmap->width = width; + bitmap->height = height; bitmap->surface = cairo_image_surface_create ( transparent ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, width, height); - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (bitmap), + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_flash, SWFDEC_AS_STR_display, SWFDEC_AS_STR_BitmapData, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (bitmap)); return bitmap; } @@ -134,14 +140,19 @@ swfdec_bitmap_data_loadBitmap (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecBitmapData *bitmap; SwfdecImage *image; + SwfdecMovie *movie; const char *name; cairo_surface_t *isurface; cairo_t *cr; SWFDEC_AS_CHECK (0, NULL, "s", &name); - g_assert (SWFDEC_IS_MOVIE (cx->frame->target)); - image = swfdec_resource_get_export (SWFDEC_MOVIE (cx->frame->target)->resource, name); + movie = swfdec_as_frame_get_target (cx->frame); + if (movie == NULL) { + SWFDEC_ERROR ("no target to load from"); + return; + } + image = swfdec_resource_get_export (movie->resource, name); if (!SWFDEC_IS_IMAGE (image)) { SWFDEC_ERROR ("loadBitmap cannot find image with name %s", name); return; @@ -165,21 +176,20 @@ swfdec_bitmap_data_loadBitmap (SwfdecAsContext *cx, SwfdecAsObject *object, cairo_paint (cr); cairo_destroy (cr); cairo_surface_destroy (isurface); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (bitmap)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (bitmap))); } // properties -SWFDEC_AS_NATIVE (1100, 100, swfdec_bitmap_data_get_width) +SWFDEC_AS_NATIVE (1100, 100, swfdec_bitmap_data_do_get_width) void -swfdec_bitmap_data_get_width (SwfdecAsContext *cx, SwfdecAsObject *object, +swfdec_bitmap_data_do_get_width (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecBitmapData *bitmap; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, ""); - SWFDEC_AS_VALUE_SET_INT (ret, bitmap->surface ? - cairo_image_surface_get_width (bitmap->surface) : -1); + *ret = swfdec_as_value_from_integer (cx, bitmap->surface ? (int) bitmap->width : -1); } SWFDEC_AS_NATIVE (1100, 101, swfdec_bitmap_data_set_width) @@ -190,17 +200,16 @@ swfdec_bitmap_data_set_width (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_STUB ("BitmapData.width (set)"); } -SWFDEC_AS_NATIVE (1100, 102, swfdec_bitmap_data_get_height) +SWFDEC_AS_NATIVE (1100, 102, swfdec_bitmap_data_do_get_height) void -swfdec_bitmap_data_get_height (SwfdecAsContext *cx, SwfdecAsObject *object, +swfdec_bitmap_data_do_get_height (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecBitmapData *bitmap; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, ""); - SWFDEC_AS_VALUE_SET_INT (ret, bitmap->surface ? - cairo_image_surface_get_height (bitmap->surface) : -1); + *ret = swfdec_as_value_from_integer (cx, bitmap->surface ? (int) bitmap->height : -1); } SWFDEC_AS_NATIVE (1100, 103, swfdec_bitmap_data_set_height) @@ -222,30 +231,24 @@ swfdec_bitmap_data_get_rectangle (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, ""); - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); if (bitmap->surface == NULL) return; swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_flash, args); - if (!SWFDEC_AS_VALUE_IS_OBJECT (args)) - return; - o = SWFDEC_AS_VALUE_GET_OBJECT (args); - swfdec_as_object_get_variable (o, SWFDEC_AS_STR_geom, args); - if (!SWFDEC_AS_VALUE_IS_OBJECT (args)) + swfdec_as_value_get_variable (cx, args, SWFDEC_AS_STR_geom, args); + swfdec_as_value_get_variable (cx, args, SWFDEC_AS_STR_Rectangle, args); + if (!SWFDEC_AS_VALUE_IS_OBJECT (*args)) return; - o = SWFDEC_AS_VALUE_GET_OBJECT (args); - swfdec_as_object_get_variable (o, SWFDEC_AS_STR_Rectangle, args); - if (!SWFDEC_AS_VALUE_IS_OBJECT (args)) - return; - o = SWFDEC_AS_VALUE_GET_OBJECT (args); - if (!SWFDEC_IS_AS_FUNCTION (o)) + o = SWFDEC_AS_VALUE_GET_OBJECT (*args); + if (!SWFDEC_IS_AS_FUNCTION (o->relay)) return; - SWFDEC_AS_VALUE_SET_INT (&args[0], 0); - SWFDEC_AS_VALUE_SET_INT (&args[1], 0); - SWFDEC_AS_VALUE_SET_INT (&args[2], cairo_image_surface_get_width (bitmap->surface)); - SWFDEC_AS_VALUE_SET_INT (&args[3], cairo_image_surface_get_height (bitmap->surface)); - swfdec_as_object_create (SWFDEC_AS_FUNCTION (o), 4, args, ret); + args[0] = swfdec_as_value_from_integer (cx, 0); + args[1] = swfdec_as_value_from_integer (cx, 0); + args[2] = swfdec_as_value_from_integer (cx, bitmap->width); + args[3] = swfdec_as_value_from_integer (cx, bitmap->height); + swfdec_as_object_create (SWFDEC_AS_FUNCTION (o->relay), 4, args, ret); } SWFDEC_AS_NATIVE (1100, 105, swfdec_bitmap_data_set_rectangle) @@ -270,7 +273,7 @@ swfdec_bitmap_data_get_transparent (SwfdecAsContext *cx, SWFDEC_AS_VALUE_SET_BOOLEAN (ret, swfdec_surface_has_alpha (bitmap->surface) ? TRUE : FALSE); } else { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); } } @@ -304,22 +307,16 @@ swfdec_bitmap_data_getPixel (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecBitmapData *bitmap; guint x, y, color; - guint8 *addr; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "ii", &x, &y); - if (bitmap->surface == NULL || - x >= (guint) cairo_image_surface_get_width (bitmap->surface) || - y >= (guint) cairo_image_surface_get_height (bitmap->surface)) + if (bitmap->surface == NULL || x >= (guint) bitmap->width || y >= (guint) bitmap->height) return; - addr = cairo_image_surface_get_data (bitmap->surface); - addr += cairo_image_surface_get_stride (bitmap->surface) * y; - addr += 4 * x; - color = *(SwfdecColor *) (gpointer) addr; + color = swfdec_bitmap_data_get_pixel (bitmap, x, y); color = SWFDEC_COLOR_UNMULTIPLY (color); color &= SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0); - SWFDEC_AS_VALUE_SET_INT (ret, color); + *ret = swfdec_as_value_from_integer (cx, color); } SWFDEC_AS_NATIVE (1100, 2, swfdec_bitmap_data_setPixel) @@ -330,59 +327,44 @@ swfdec_bitmap_data_setPixel (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecBitmapData *bitmap; guint x, y, color; SwfdecColor old; - guint8 *addr; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "iii", &x, &y, &color); - if (bitmap->surface == NULL || - x >= (guint) cairo_image_surface_get_width (bitmap->surface) || - y >= (guint) cairo_image_surface_get_height (bitmap->surface)) + if (bitmap->surface == NULL || x >= bitmap->width || y >= bitmap->height) return; - addr = cairo_image_surface_get_data (bitmap->surface); - addr += cairo_image_surface_get_stride (bitmap->surface) * y; - addr += 4 * x; - old = *(SwfdecColor *) (gpointer) addr; + old = swfdec_bitmap_data_get_pixel (bitmap, x, y); old |= SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0); color = old & SWFDEC_COLOR_OPAQUE (color); - *(SwfdecColor *) (gpointer) addr = SWFDEC_COLOR_MULTIPLY (color); - cairo_surface_mark_dirty_rectangle (bitmap->surface, x, y, 1, 1); - swfdec_bitmap_data_invalidate (bitmap, x, y, 1, 1); -} - -SWFDEC_AS_NATIVE (1100, 3, swfdec_bitmap_data_fillRect) -void -swfdec_bitmap_data_fillRect (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) -{ - SWFDEC_STUB ("BitmapData.fillRect"); + color = SWFDEC_COLOR_MULTIPLY (color); + swfdec_bitmap_data_set_pixel (bitmap, x, y, color); } static gboolean swfdec_rectangle_from_as_object (SwfdecRectangle *rect, SwfdecAsObject *object) { SwfdecAsValue *val; - SwfdecAsContext *cx = swfdec_gc_object_get_context (object); + SwfdecAsContext *cx = object->context; /* FIXME: This function is untested */ val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_x); if (val) - rect->x = swfdec_as_value_to_integer (cx, val); + rect->x = swfdec_as_value_to_integer (cx, *val); else rect->x = 0; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_y); if (val) - rect->y = swfdec_as_value_to_integer (cx, val); + rect->y = swfdec_as_value_to_integer (cx, *val); else rect->y = 0; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_width); if (val) - rect->width = swfdec_as_value_to_integer (cx, val); + rect->width = swfdec_as_value_to_integer (cx, *val); else rect->width = 0; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_height); if (val) - rect->height = swfdec_as_value_to_integer (cx, val); + rect->height = swfdec_as_value_to_integer (cx, *val); else rect->height = 0; return rect->width > 0 && rect->height > 0; @@ -392,13 +374,42 @@ static void swfdec_point_from_as_object (int *x, int *y, SwfdecAsObject *object) { SwfdecAsValue *val; - SwfdecAsContext *cx = swfdec_gc_object_get_context (object); + SwfdecAsContext *cx = object->context; /* FIXME: This function is untested */ val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_x); - *x = swfdec_as_value_to_integer (cx, val); + *x = swfdec_as_value_to_integer (cx, *val); val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_y); - *y = swfdec_as_value_to_integer (cx, val); + *y = swfdec_as_value_to_integer (cx, *val); +} + +SWFDEC_AS_NATIVE (1100, 3, swfdec_bitmap_data_fillRect) +void +swfdec_bitmap_data_fillRect (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBitmapData *bitmap; + guint color; + SwfdecAsObject *recto; + SwfdecRectangle rect; + cairo_t *cr; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "oi", &recto, &color); + + if (!swfdec_rectangle_from_as_object (&rect, recto) || bitmap->surface == NULL) + return; + + if (!swfdec_surface_has_alpha(bitmap->surface)) + /* We can treat a guint as a SwfdecColor */ + color = SWFDEC_COLOR_OPAQUE (color); + + cr = cairo_create (bitmap->surface); + swfdec_color_set_source (cr, color); + cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); + cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); + cairo_fill (cr); + cairo_destroy(cr); + swfdec_bitmap_data_invalidate (bitmap, rect.x, rect.y, rect.width, rect.height); } SWFDEC_AS_NATIVE (1100, 4, swfdec_bitmap_data_copyPixels) @@ -410,6 +421,8 @@ swfdec_bitmap_data_copyPixels (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecAsObject *recto = NULL, *pt, *apt = NULL, *so, *ao = NULL; SwfdecRectangle rect; gboolean copy_alpha = FALSE; + SwfdecColorTransform ctrans; + cairo_pattern_t *pattern; cairo_t *cr; int x, y; @@ -417,10 +430,10 @@ swfdec_bitmap_data_copyPixels (SwfdecAsContext *cx, SwfdecAsObject *object, &ao, &apt, ©_alpha); if (bitmap->surface == NULL || - !SWFDEC_IS_BITMAP_DATA (so) || - (source = SWFDEC_BITMAP_DATA (so))->surface == NULL || - (ao != NULL && (!SWFDEC_IS_BITMAP_DATA (ao) || - (alpha = SWFDEC_BITMAP_DATA (ao))->surface == NULL)) || + !SWFDEC_IS_BITMAP_DATA (so->relay) || + (source = SWFDEC_BITMAP_DATA (so->relay))->surface == NULL || + (ao != NULL && (!SWFDEC_IS_BITMAP_DATA (ao->relay) || + (alpha = SWFDEC_BITMAP_DATA (ao->relay))->surface == NULL)) || !swfdec_rectangle_from_as_object (&rect, recto)) return; @@ -428,46 +441,46 @@ swfdec_bitmap_data_copyPixels (SwfdecAsContext *cx, SwfdecAsObject *object, y = rect.y; swfdec_point_from_as_object (&rect.x, &rect.y, pt); cr = cairo_create (bitmap->surface); + cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); + cairo_clip (cr); + cairo_translate (cr, rect.x - x, rect.y - y); + swfdec_color_transform_init_identity (&ctrans); + pattern = swfdec_bitmap_data_get_pattern (source, + SWFDEC_PLAYER (cx)->priv->renderer, + &ctrans); + cairo_set_source (cr, pattern); + cairo_pattern_destroy (pattern); if (bitmap == source) { - cairo_surface_t *copy = cairo_surface_create_similar (source->surface, - cairo_surface_get_content (source->surface), - rect.width, rect.height); - cairo_t *cr2 = cairo_create (copy); - cairo_set_source_surface (cr2, source->surface, x, y); - cairo_paint (cr2); - cairo_destroy (cr2); - cairo_set_source_surface (cr, copy, rect.x, rect.y); - cairo_surface_destroy (copy); - } else { - cairo_set_source_surface (cr, source->surface, rect.x - x, rect.y - y); + /* FIXME Is this necessary or does Cairo handle source == target? */ + cairo_push_group_with_content (cr, cairo_surface_get_content (source->surface)); + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); + cairo_paint (cr); + cairo_pop_group_to_source (cr); } if (swfdec_surface_has_alpha (bitmap->surface) && !copy_alpha) { cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); } - cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); if (alpha) { - cairo_surface_t *mask = cairo_surface_create_similar (alpha->surface, - CAIRO_CONTENT_COLOR_ALPHA, rect.width, rect.height); - cairo_t *cr2 = cairo_create (mask); - - cairo_surface_set_device_offset (mask, -rect.x, -rect.y); - cairo_set_source (cr2, cairo_get_source (cr)); + cairo_push_group_with_content (cr, cairo_surface_get_content (source->surface)); + pattern = swfdec_bitmap_data_get_pattern (alpha, + SWFDEC_PLAYER (cx)->priv->renderer, + &ctrans); if (apt) { - swfdec_point_from_as_object (&x, &y, apt); + int mask_x, mask_y; + swfdec_point_from_as_object (&mask_x, &mask_y, apt); + cairo_translate (cr, x - mask_x, y - mask_y); } else { - x = y = 0; + cairo_translate (cr, x, y); } - cairo_mask_surface (cr2, alpha->surface, rect.x - x, rect.y - y); - cairo_destroy (cr2); - cairo_set_source_surface (cr, mask, 0, 0); - cairo_surface_destroy (mask); + cairo_mask (cr, pattern); + cairo_pattern_destroy (pattern); + cairo_pop_group_to_source (cr); } - cairo_fill (cr); + cairo_paint (cr); cairo_destroy (cr); - cairo_surface_mark_dirty_rectangle (bitmap->surface, rect.x, rect.y, - rect.width, rect.height); + swfdec_bitmap_data_invalidate (bitmap, rect.x, rect.y, rect.width, rect.height); } SWFDEC_AS_NATIVE (1100, 5, swfdec_bitmap_data_applyFilter) @@ -500,11 +513,12 @@ swfdec_bitmap_data_draw (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecAsObject *o, *matrix = NULL, *trans = NULL; - cairo_t *cr; SwfdecColorTransform ctrans; SwfdecBitmapData *bitmap; SwfdecRenderer *renderer; + SwfdecRectangle area; cairo_matrix_t mat; + cairo_t *cr; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "o|OO", &o, &matrix, &trans); @@ -517,8 +531,8 @@ swfdec_bitmap_data_draw (SwfdecAsContext *cx, SwfdecAsObject *object, } else { cairo_matrix_init_identity (&mat); } - if (SWFDEC_IS_COLOR_TRANSFORM_AS (trans)) { - swfdec_color_transform_get_transform (SWFDEC_COLOR_TRANSFORM_AS (trans), &ctrans); + if (trans && SWFDEC_IS_COLOR_TRANSFORM_AS (trans->relay)) { + swfdec_color_transform_get_transform (SWFDEC_COLOR_TRANSFORM_AS (trans->relay), &ctrans); } else { swfdec_color_transform_init_identity (&ctrans); } @@ -526,6 +540,11 @@ swfdec_bitmap_data_draw (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc > 3) { SWFDEC_FIXME ("only the first 3 arguments to Bitmap.draw() are implemented"); } + /* FIXME: compute area from arguments */ + area.x = 0; + area.y = 0; + area.width = bitmap->width; + area.height = bitmap->height; cr = cairo_create (bitmap->surface); /* FIXME: Do we have a better renderer? */ @@ -533,23 +552,16 @@ swfdec_bitmap_data_draw (SwfdecAsContext *cx, SwfdecAsObject *object, swfdec_renderer_attach (renderer, cr); cairo_transform (cr, &mat); - if (SWFDEC_IS_BITMAP_DATA (o)) { - SwfdecBitmapData *src = SWFDEC_BITMAP_DATA (o); - if (src->surface) { - if (swfdec_color_transform_is_identity (&ctrans)) { - cairo_set_source_surface (cr, SWFDEC_BITMAP_DATA (o)->surface, 0, 0); - } else { - cairo_surface_t *transformed = swfdec_renderer_transform (renderer, - SWFDEC_BITMAP_DATA (o)->surface, &ctrans); - SWFDEC_FIXME ("unmodified pixels will be treated as -1, not as 0 as in our " - "transform code, but we don't know if a pixel is unmodified."); - cairo_set_source_surface (cr, transformed, 0, 0); - cairo_surface_destroy (transformed); - } + if (SWFDEC_IS_BITMAP_DATA (o->relay)) { + cairo_pattern_t *pattern = swfdec_bitmap_data_get_pattern ( + SWFDEC_BITMAP_DATA (o->relay), renderer, &ctrans); + if (pattern) { + cairo_set_source (cr, pattern); cairo_paint (cr); + cairo_pattern_destroy (pattern); } - } else if (SWFDEC_IS_MOVIE (o)) { - SwfdecMovie *movie = SWFDEC_MOVIE (o); + } else if (o->movie) { + SwfdecMovie *movie = SWFDEC_MOVIE (o->relay); swfdec_movie_update (movie); cairo_scale (cr, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR); cairo_transform (cr, &movie->inverse_matrix); @@ -559,6 +571,7 @@ swfdec_bitmap_data_draw (SwfdecAsContext *cx, SwfdecAsObject *object, } cairo_destroy (cr); + swfdec_bitmap_data_invalidate (bitmap, area.x, area.y, area.width, area.height); } SWFDEC_AS_NATIVE (1100, 9, swfdec_bitmap_data_pixelDissolve) @@ -576,21 +589,15 @@ swfdec_bitmap_data_getPixel32 (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecBitmapData *bitmap; guint x, y, color; - guint8 *addr; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "ii", &x, &y); - if (bitmap->surface == NULL || - x >= (guint) cairo_image_surface_get_width (bitmap->surface) || - y >= (guint) cairo_image_surface_get_height (bitmap->surface)) + if (bitmap->surface == NULL || x >= bitmap->width || y >= bitmap->height) return; - addr = cairo_image_surface_get_data (bitmap->surface); - addr += cairo_image_surface_get_stride (bitmap->surface) * y; - addr += 4 * x; - color = *(SwfdecColor *) (gpointer) addr; + color = swfdec_bitmap_data_get_pixel (bitmap, x, y); color = SWFDEC_COLOR_UNMULTIPLY (color); - SWFDEC_AS_VALUE_SET_INT (ret, color); + *ret = swfdec_as_value_from_integer (cx, color); } SWFDEC_AS_NATIVE (1100, 11, swfdec_bitmap_data_setPixel32) @@ -600,25 +607,18 @@ swfdec_bitmap_data_setPixel32 (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecBitmapData *bitmap; guint x, y, color; - guint8 *addr; SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "iii", &x, &y, &color); - if (bitmap->surface == NULL || - x >= (guint) cairo_image_surface_get_width (bitmap->surface) || - y >= (guint) cairo_image_surface_get_height (bitmap->surface)) + if (bitmap->surface == NULL || x >= bitmap->width || y >= bitmap->height) return; - addr = cairo_image_surface_get_data (bitmap->surface); - addr += cairo_image_surface_get_stride (bitmap->surface) * y; - addr += 4 * x; if (swfdec_surface_has_alpha (bitmap->surface)) { - *(SwfdecColor *) (gpointer) addr = SWFDEC_COLOR_MULTIPLY ((SwfdecColor) color); + color = SWFDEC_COLOR_MULTIPLY ((SwfdecColor) color); } else { - *(SwfdecColor *) (gpointer) addr = SWFDEC_COLOR_OPAQUE ((SwfdecColor) color); + color = SWFDEC_COLOR_OPAQUE ((SwfdecColor) color); } - cairo_surface_mark_dirty_rectangle (bitmap->surface, x, y, 1, 1); - swfdec_bitmap_data_invalidate (bitmap, x, y, 1, 1); + swfdec_bitmap_data_set_pixel (bitmap, x, y, color); } SWFDEC_AS_NATIVE (1100, 12, swfdec_bitmap_data_floodFill) @@ -651,7 +651,56 @@ void swfdec_bitmap_data_colorTransform (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SWFDEC_STUB ("BitmapData.colorTransform"); + SwfdecBitmapData *bitmap; + SwfdecAsObject *rect, *trans; + SwfdecRectangle area; + SwfdecColorTransform ctrans; + cairo_surface_t *surface; + cairo_t *cr; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "oO", &rect, &trans); + + if (bitmap->surface == NULL) + return; + + if (!swfdec_rectangle_from_as_object (&area, rect)) + return; + if (trans && SWFDEC_IS_COLOR_TRANSFORM_AS (trans->relay)) + swfdec_color_transform_get_transform (SWFDEC_COLOR_TRANSFORM_AS (trans->relay), &ctrans); + else + return; + + if (area.x < 0) { + area.width += area.x; + area.x = 0; + } else if ((guint) area.x >= bitmap->width) { + return; + } + if (area.y < 0) { + area.height += area.y; + area.y = 0; + } else if ((guint) area.y >= bitmap->height) { + return; + } + if (area.width + area.x > (int) bitmap->width) { + area.width = bitmap->width - area.x; + } else if (area.width <= 0) { + return; + } + if (area.height + area.y > (int) bitmap->height) { + area.height = bitmap->height - area.y; + } else if (area.height <= 0) { + return; + } + + surface = swfdec_renderer_transform (SWFDEC_PLAYER (cx)->priv->renderer, + bitmap->surface, &ctrans, &area); + cr = cairo_create (bitmap->surface); + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); + cairo_set_source_surface (cr, surface, 0, 0); + cairo_paint (cr); + cairo_destroy (cr); + cairo_surface_destroy (surface); } SWFDEC_AS_NATIVE (1100, 16, swfdec_bitmap_data_hitTest) @@ -707,10 +756,8 @@ swfdec_bitmap_data_clone (SwfdecAsContext *cx, SwfdecAsObject *object, if (bitmap->surface == NULL) return; - clone = swfdec_bitmap_data_new (cx, - swfdec_surface_has_alpha (bitmap->surface), - cairo_image_surface_get_width (bitmap->surface), - cairo_image_surface_get_height (bitmap->surface)); + clone = swfdec_bitmap_data_new (cx, swfdec_surface_has_alpha (bitmap->surface), + bitmap->width, bitmap->height); if (clone == NULL) return; @@ -718,7 +765,7 @@ swfdec_bitmap_data_clone (SwfdecAsContext *cx, SwfdecAsObject *object, cairo_set_source_surface (cr, bitmap->surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (clone)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (clone))); } SWFDEC_AS_NATIVE (1100, 22, swfdec_bitmap_data_do_dispose) @@ -751,7 +798,7 @@ swfdec_bitmap_data_compare (SwfdecAsContext *cx, SWFDEC_STUB ("BitmapData.compare"); } -SWFDEC_AS_CONSTRUCTOR (1100, 0, swfdec_bitmap_data_construct, swfdec_bitmap_data_get_type) +SWFDEC_AS_NATIVE (1100, 0, swfdec_bitmap_data_construct) void swfdec_bitmap_data_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) @@ -764,7 +811,7 @@ swfdec_bitmap_data_construct (SwfdecAsContext *cx, SwfdecAsObject *object, if (!swfdec_as_context_is_constructing (cx)) return; - SWFDEC_AS_CHECK (SWFDEC_TYPE_BITMAP_DATA, &bitmap, "ii|bi", + SWFDEC_AS_CHECK (0, NULL, "ii|bi", &w, &h, &transparent, &color); if (w > 2880 || w <= 0 || h > 2880 || h <= 0) { @@ -774,6 +821,9 @@ swfdec_bitmap_data_construct (SwfdecAsContext *cx, SwfdecAsObject *object, if (!swfdec_as_context_try_use_mem (cx, w * h * 4)) return; + bitmap = g_object_new (SWFDEC_TYPE_BITMAP_DATA, "context", cx, NULL); + bitmap->width = w; + bitmap->height = h; bitmap->surface = cairo_image_surface_create ( transparent ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, w, h); @@ -783,4 +833,88 @@ swfdec_bitmap_data_construct (SwfdecAsContext *cx, SwfdecAsObject *object, cairo_paint (cr); cairo_destroy (cr); } + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (bitmap)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); +} + +/*** PUBLIC API ***/ + +guint +swfdec_bitmap_data_get_width (SwfdecBitmapData *bitmap) +{ + g_return_val_if_fail (SWFDEC_IS_BITMAP_DATA (bitmap), 0); + + return bitmap->surface ? bitmap->width : 0; +} + +guint +swfdec_bitmap_data_get_height (SwfdecBitmapData *bitmap) +{ + g_return_val_if_fail (SWFDEC_IS_BITMAP_DATA (bitmap), 0); + + return bitmap->surface ? bitmap->height : 0; +} + +cairo_pattern_t * +swfdec_bitmap_data_get_pattern (SwfdecBitmapData *bitmap, SwfdecRenderer *renderer, + const SwfdecColorTransform *ctrans) +{ + cairo_pattern_t *pattern; + + g_return_val_if_fail (SWFDEC_IS_BITMAP_DATA (bitmap), NULL); + g_return_val_if_fail (SWFDEC_IS_RENDERER (renderer), NULL); + g_return_val_if_fail (ctrans != NULL, NULL); + g_return_val_if_fail (!swfdec_color_transform_is_mask (ctrans), NULL); + + /* FIXME: Is this correct for the case where the surface is NULL? + * Do we want a red surface */ + if (bitmap->surface == NULL) + return NULL; + + if (swfdec_color_transform_is_identity (ctrans)) { + pattern = cairo_pattern_create_for_surface (bitmap->surface); + } else { + /* FIXME: do caching? */ + SwfdecRectangle area = { 0, 0, bitmap->width, bitmap->height }; + cairo_surface_t *surface = swfdec_renderer_transform (renderer, + bitmap->surface, ctrans, &area); + SWFDEC_FIXME ("unmodified pixels will be treated as -1, not as 0 as in our " + "transform code, but we don't know if a pixel is unmodified."); + pattern = cairo_pattern_create_for_surface (surface); + cairo_surface_destroy (surface); + } + + return pattern; +} + +SwfdecColor +swfdec_bitmap_data_get_pixel (SwfdecBitmapData *bitmap, guint x, guint y) +{ + guint8 *addr; + + g_return_val_if_fail (SWFDEC_IS_BITMAP_DATA (bitmap), 0); + g_return_val_if_fail (x < bitmap->width, 0); + g_return_val_if_fail (y < bitmap->height, 0); + + addr = cairo_image_surface_get_data (bitmap->surface); + addr += cairo_image_surface_get_stride (bitmap->surface) * y; + addr += 4 * x; + return *(guint32 *) (gpointer) addr; +} + +void +swfdec_bitmap_data_set_pixel (SwfdecBitmapData *bitmap, guint x, guint y, SwfdecColor color) +{ + guint8 *addr; + + g_return_if_fail (SWFDEC_IS_BITMAP_DATA (bitmap)); + g_return_if_fail (x < bitmap->width); + g_return_if_fail (y < bitmap->height); + + addr = cairo_image_surface_get_data (bitmap->surface); + addr += cairo_image_surface_get_stride (bitmap->surface) * y; + addr += 4 * x; + *(guint32 *) (gpointer) addr = color; + swfdec_bitmap_data_invalidate (bitmap, x, y, 1, 1); } + diff --git a/swfdec/swfdec_bitmap_data.h b/swfdec/swfdec_bitmap_data.h index 425e3156..cd356ce6 100644 --- a/swfdec/swfdec_bitmap_data.h +++ b/swfdec/swfdec_bitmap_data.h @@ -21,7 +21,9 @@ #define _SWFDEC_BITMAP_DATA_H_ #include <cairo.h> -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> +#include <swfdec/swfdec_color.h> +#include <swfdec/swfdec_renderer.h> G_BEGIN_DECLS @@ -35,13 +37,15 @@ typedef struct _SwfdecBitmapDataClass SwfdecBitmapDataClass; #define SWFDEC_BITMAP_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_BITMAP_DATA, SwfdecBitmapDataClass)) struct _SwfdecBitmapData { - SwfdecAsObject object; + SwfdecAsRelay relay; cairo_surface_t * surface; /* An image surface or NULL */ + guint width; /* width of surface */ + guint height; /* height of surface */ }; struct _SwfdecBitmapDataClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_bitmap_data_get_type (void); @@ -51,6 +55,19 @@ SwfdecBitmapData * swfdec_bitmap_data_new (SwfdecAsContext * context, guint width, guint height); +guint swfdec_bitmap_data_get_width (SwfdecBitmapData * data); +guint swfdec_bitmap_data_get_height (SwfdecBitmapData * data); +cairo_pattern_t * swfdec_bitmap_data_get_pattern (SwfdecBitmapData * data, + SwfdecRenderer * renderer, + const SwfdecColorTransform *ctrans); +SwfdecColor swfdec_bitmap_data_get_pixel (SwfdecBitmapData * bitmap, + guint x, + guint y); +void swfdec_bitmap_data_set_pixel (SwfdecBitmapData * bitmap, + guint x, + guint y, + SwfdecColor color); + G_END_DECLS #endif diff --git a/swfdec/swfdec_bitmap_movie.c b/swfdec/swfdec_bitmap_movie.c index a117feb0..cbe6e4dd 100644 --- a/swfdec/swfdec_bitmap_movie.c +++ b/swfdec/swfdec_bitmap_movie.c @@ -24,6 +24,7 @@ #include "swfdec_bitmap_movie.h" #include "swfdec_debug.h" #include "swfdec_player_internal.h" +#include "swfdec_renderer_internal.h" G_DEFINE_TYPE (SwfdecBitmapMovie, swfdec_bitmap_movie, SWFDEC_TYPE_MOVIE) @@ -37,39 +38,50 @@ swfdec_bitmap_movie_update_extents (SwfdecMovie *movie, if (bitmap->bitmap->surface == NULL) return; - rect.x1 = cairo_image_surface_get_width (bitmap->bitmap->surface) * SWFDEC_TWIPS_SCALE_FACTOR; - rect.y1 = cairo_image_surface_get_height (bitmap->bitmap->surface) * SWFDEC_TWIPS_SCALE_FACTOR; + rect.x1 = swfdec_bitmap_data_get_width (bitmap->bitmap) * SWFDEC_TWIPS_SCALE_FACTOR; + rect.y1 = swfdec_bitmap_data_get_height (bitmap->bitmap) * SWFDEC_TWIPS_SCALE_FACTOR; swfdec_rect_union (extents, extents, &rect); } static void swfdec_bitmap_movie_render (SwfdecMovie *movie, cairo_t *cr, - const SwfdecColorTransform *trans) + const SwfdecColorTransform *ctrans) { SwfdecBitmapMovie *bitmap = SWFDEC_BITMAP_MOVIE (movie); + SwfdecRenderer *renderer; + cairo_pattern_t *pattern; - if (bitmap->bitmap->surface == NULL) - return; + renderer = swfdec_renderer_get (cr); cairo_scale (cr, SWFDEC_TWIPS_SCALE_FACTOR, SWFDEC_TWIPS_SCALE_FACTOR); - if (swfdec_color_transform_is_mask (trans)) { + if (swfdec_color_transform_is_mask (ctrans)) { SWFDEC_FIXME ("does attachBitmap mask?"); cairo_set_source_rgb (cr, 0, 0, 0); cairo_rectangle (cr, 0, 0, - cairo_image_surface_get_width (bitmap->bitmap->surface), - cairo_image_surface_get_height (bitmap->bitmap->surface)); + swfdec_bitmap_data_get_width (bitmap->bitmap), + swfdec_bitmap_data_get_height (bitmap->bitmap)); cairo_fill (cr); - } else if (swfdec_color_transform_is_identity (trans)) { - cairo_set_source_surface (cr, bitmap->bitmap->surface, 0, 0); - cairo_paint (cr); - } else if (swfdec_color_transform_is_alpha (trans)) { - cairo_set_source_surface (cr, bitmap->bitmap->surface, 0, 0); - cairo_paint_with_alpha (cr, trans->aa / 255.0); + } else if (!swfdec_color_transform_is_identity (ctrans) && + swfdec_color_transform_is_alpha (ctrans)) { + /* optimization for alpha fills */ + SwfdecColorTransform identity; + swfdec_color_transform_init_identity (&identity); + pattern = swfdec_bitmap_data_get_pattern (bitmap->bitmap, + renderer, &identity); + if (pattern == NULL) + return; + cairo_set_source (cr, pattern); + cairo_paint_with_alpha (cr, ctrans->aa / 255.0); + cairo_pattern_destroy (pattern); } else { - SWFDEC_FIXME ("properly color-transform bitmap"); - cairo_set_source_surface (cr, bitmap->bitmap->surface, 0, 0); + pattern = swfdec_bitmap_data_get_pattern (bitmap->bitmap, + renderer, ctrans); + if (pattern == NULL) + return; + cairo_set_source (cr, pattern); cairo_paint (cr); + cairo_pattern_destroy (pattern); } } @@ -82,11 +94,12 @@ swfdec_bitmap_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix if (bitmap->bitmap->surface == NULL) return; - rect.x1 = cairo_image_surface_get_width (bitmap->bitmap->surface) * SWFDEC_TWIPS_SCALE_FACTOR; - rect.y1 = cairo_image_surface_get_height (bitmap->bitmap->surface) * SWFDEC_TWIPS_SCALE_FACTOR; + rect.x1 = swfdec_bitmap_data_get_width (bitmap->bitmap) * SWFDEC_TWIPS_SCALE_FACTOR; + rect.y1 = swfdec_bitmap_data_get_height (bitmap->bitmap) * SWFDEC_TWIPS_SCALE_FACTOR; swfdec_rect_transform (&rect, &rect, matrix); - swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); } static SwfdecMovie * diff --git a/swfdec/swfdec_bitmap_pattern.c b/swfdec/swfdec_bitmap_pattern.c index 3fc722b2..2b953bc4 100644 --- a/swfdec/swfdec_bitmap_pattern.c +++ b/swfdec/swfdec_bitmap_pattern.c @@ -24,6 +24,7 @@ #include "swfdec_bitmap_pattern.h" #include "swfdec_debug.h" #include "swfdec_player_internal.h" +#include "swfdec_renderer_internal.h" enum { INVALIDATE, @@ -35,17 +36,14 @@ static guint signals[LAST_SIGNAL]; static cairo_pattern_t * swfdec_bitmap_pattern_get_pattern (SwfdecPattern *pat, SwfdecRenderer *renderer, - const SwfdecColorTransform *trans) + const SwfdecColorTransform *ctrans) { SwfdecBitmapPattern *bitmap = SWFDEC_BITMAP_PATTERN (pat); cairo_pattern_t *pattern; - /* FIXME: Is this correct for the case where the surface is NULL? - * Do we want a red surface */ - if (bitmap->bitmap->surface == NULL) + pattern = swfdec_bitmap_data_get_pattern (bitmap->bitmap, renderer, ctrans); + if (pattern == NULL) return NULL; - - pattern = cairo_pattern_create_for_surface (bitmap->bitmap->surface); cairo_pattern_set_matrix (pattern, &pat->transform); cairo_pattern_set_extend (pattern, bitmap->extend); cairo_pattern_set_filter (pattern, bitmap->filter); diff --git a/swfdec/swfdec_blur_filter.c b/swfdec/swfdec_blur_filter.c index 3a40c40a..662a09d3 100644 --- a/swfdec/swfdec_blur_filter.c +++ b/swfdec/swfdec_blur_filter.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> + * Copyright (C) 2008 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 @@ -21,62 +21,194 @@ #include "config.h" #endif -#include "swfdec_as_internal.h" +#include "swfdec_blur_filter.h" + +#include <math.h> + #include "swfdec_debug.h" -SWFDEC_AS_NATIVE (1102, 1, swfdec_blur_filter_get_blurX) -void -swfdec_blur_filter_get_blurX (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +G_DEFINE_TYPE (SwfdecBlurFilter, swfdec_blur_filter, SWFDEC_TYPE_FILTER) + +static void +swfdec_blur_filter_clone (SwfdecFilter *dfilter, SwfdecFilter *sfilter) { - SWFDEC_STUB ("BlurFilter.blurX (get)"); + SwfdecBlurFilter *dest = SWFDEC_BLUR_FILTER (dfilter); + SwfdecBlurFilter *source = SWFDEC_BLUR_FILTER (sfilter); + + dest->x = source->x; + dest->y = source->y; + dest->quality = source->quality; } -SWFDEC_AS_NATIVE (1102, 2, swfdec_blur_filter_set_blurX) -void -swfdec_blur_filter_set_blurX (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +static void +swfdec_blur_filter_create_convolution_matrix (SwfdecBlurFilter *blur, + double xscale, double yscale) { - SWFDEC_STUB ("BlurFilter.blurX (set)"); + guint x, y, w, h; + double div, blurx, blury; + + if (blur->matrix && xscale == blur->xscale && yscale == blur->yscale) + return; + + blurx = MAX (blur->x * xscale, 1); + blury = MAX (blur->y * yscale, 1); + w = ceil ((blurx - 1) / 2); + w = w * 2 + 1; + h = ceil ((blury - 1) / 2); + h = h * 2 + 1; + + blur->matrix = swfdec_convolution_matrix_new (w, h); + blur->xscale = xscale; + blur->yscale = yscale; + + div = 1.0 / (blurx * blury); + for (y = 0; y < h; y++) { + double val = div; + if (y == 0 || y == w - 1) { + val *= (1 - (h - MAX (blury, 1)) / 2); + } + for (x = 0; x < w; x++) { + if (x == 0 || x == w - 1) { + swfdec_convolution_matrix_set (blur->matrix, x, y, + val * (1 - (w - MAX (blurx, 1)) / 2)); + } else { + swfdec_convolution_matrix_set (blur->matrix, x, y, val); + } + } + } } -SWFDEC_AS_NATIVE (1102, 3, swfdec_blur_filter_get_blurY) -void -swfdec_blur_filter_get_blurY (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +static void +swfdec_blur_filter_get_rectangle (SwfdecFilter *filter, SwfdecRectangle *dest, + double xscale, double yscale, const SwfdecRectangle *source) { - SWFDEC_STUB ("BlurFilter.blurY (get)"); + SwfdecBlurFilter *blur = SWFDEC_BLUR_FILTER (filter); + double blurx, blury; + guint w, h; + + blurx = MAX (blur->x * xscale, 1); + blury = MAX (blur->y * yscale, 1); + w = ceil ((blurx - 1) / 2); + w *= blur->quality; + h = ceil ((blury - 1) / 2); + h *= blur->quality; + + dest->x = source->x - w; + dest->y = source->y - h; + dest->width = source->width + 2 * w; + dest->height = source->height + 2 * h; } -SWFDEC_AS_NATIVE (1102, 4, swfdec_blur_filter_set_blurY) -void -swfdec_blur_filter_set_blurY (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +static cairo_pattern_t * +swfdec_blur_filter_apply (SwfdecFilter *filter, cairo_pattern_t *pattern, + double xscale, double yscale, const SwfdecRectangle *rect) +{ + SwfdecBlurFilter *blur = SWFDEC_BLUR_FILTER (filter); + cairo_surface_t *a, *b; + guint i, j, x, y; + guint8 *adata, *bdata; + guint astride, bstride; + cairo_t *cr; + + if (blur->x <= 1.0 && blur->y <= 1.0) + return cairo_pattern_reference (pattern); + + swfdec_blur_filter_create_convolution_matrix (blur, xscale, yscale); + x = swfdec_convolution_matrix_get_width (blur->matrix) / 2; + y = swfdec_convolution_matrix_get_height (blur->matrix) / 2; + + /* FIXME: make this work in a single pass (requires smarter matrix construction) */ + a = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, + rect->width + 2 * x * blur->quality, + rect->height + 2 * y * blur->quality); + cairo_surface_set_device_offset (a, + - (double) rect->x + x * blur->quality, - (double) rect->y + y * blur->quality); + b = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, + rect->width + 2 * x * blur->quality, + rect->height + 2 * y * blur->quality); + cairo_surface_set_device_offset (b, + - (double) rect->x + x * blur->quality, - (double) rect->y + y * blur->quality); + + cr = cairo_create (b); + cairo_set_source (cr, pattern); + cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height); + cairo_fill (cr); + cairo_destroy (cr); + cairo_surface_flush (b); + + adata = cairo_image_surface_get_data (a); + astride = cairo_image_surface_get_stride (a); + bdata = cairo_image_surface_get_data (b); + bstride = cairo_image_surface_get_stride (b); + for (i = 1, j = blur->quality - 1; i <= blur->quality; i++, j--) { + swfdec_convolution_matrix_apply (blur->matrix, + rect->width + 2 * x * i, rect->height + 2 * y * i, + adata + 4 * x * j + astride * y * j, astride, + bdata + 4 * x * j + bstride * y * j, bstride); + i++; + j--; + if (i > blur->quality) { + cairo_surface_destroy (b); + goto out; + } + swfdec_convolution_matrix_apply (blur->matrix, + rect->width + 2 * x * i, rect->height + 2 * y * i, + bdata + 4 * x * j + bstride * y * j, bstride, + adata + 4 * x * j + astride * y * j, astride); + } + + cairo_surface_destroy (a); + a = b; +out: + cairo_surface_mark_dirty (a); + pattern = cairo_pattern_create_for_surface (a); + cairo_surface_destroy (a); + + return pattern; +} + +static void +swfdec_blur_filter_dispose (GObject *object) { - SWFDEC_STUB ("BlurFilter.blurY (set)"); + SwfdecBlurFilter *blur = SWFDEC_BLUR_FILTER (object); + + if (blur->matrix) { + swfdec_convolution_matrix_free (blur->matrix); + blur->matrix = NULL; + } + + G_OBJECT_CLASS (swfdec_blur_filter_parent_class)->dispose (object); } -SWFDEC_AS_NATIVE (1102, 5, swfdec_blur_filter_get_quality) -void -swfdec_blur_filter_get_quality (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +static void +swfdec_blur_filter_class_init (SwfdecBlurFilterClass *klass) { - SWFDEC_STUB ("BlurFilter.quality (get)"); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + SwfdecFilterClass *filter_class = SWFDEC_FILTER_CLASS (klass); + + object_class->dispose = swfdec_blur_filter_dispose; + + filter_class->clone = swfdec_blur_filter_clone; + filter_class->get_rectangle = swfdec_blur_filter_get_rectangle; + filter_class->apply = swfdec_blur_filter_apply; } -SWFDEC_AS_NATIVE (1102, 6, swfdec_blur_filter_set_quality) -void -swfdec_blur_filter_set_quality (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +static void +swfdec_blur_filter_init (SwfdecBlurFilter *filter) { - SWFDEC_STUB ("BlurFilter.quality (set)"); + filter->x = 4; + filter->y = 4; + filter->quality = 1; } -// constructor -SWFDEC_AS_NATIVE (1102, 0, swfdec_blur_filter_construct) void -swfdec_blur_filter_construct (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +swfdec_blur_filter_invalidate (SwfdecBlurFilter *blur) { - SWFDEC_STUB ("BlurFilter"); + g_return_if_fail (SWFDEC_IS_BLUR_FILTER (blur)); + + if (blur->matrix) { + swfdec_convolution_matrix_free (blur->matrix); + blur->matrix = NULL; + } } + diff --git a/swfdec/swfdec_blur_filter.h b/swfdec/swfdec_blur_filter.h new file mode 100644 index 00000000..249b3974 --- /dev/null +++ b/swfdec/swfdec_blur_filter.h @@ -0,0 +1,61 @@ +/* Swfdec + * Copyright (C) 2008 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_BLUR_FILTER_H_ +#define _SWFDEC_BLUR_FILTER_H_ + +#include <swfdec/swfdec_filter.h> +#include <swfdec/swfdec_convolution_matrix.h> + +G_BEGIN_DECLS + + +typedef struct _SwfdecBlurFilter SwfdecBlurFilter; +typedef struct _SwfdecBlurFilterClass SwfdecBlurFilterClass; + +#define SWFDEC_TYPE_BLUR_FILTER (swfdec_blur_filter_get_type()) +#define SWFDEC_IS_BLUR_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_BLUR_FILTER)) +#define SWFDEC_IS_BLUR_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_BLUR_FILTER)) +#define SWFDEC_BLUR_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_BLUR_FILTER, SwfdecBlurFilter)) +#define SWFDEC_BLUR_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_BLUR_FILTER, SwfdecBlurFilterClass)) +#define SWFDEC_BLUR_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_BLUR_FILTER, SwfdecBlurFilterClass)) + +struct _SwfdecBlurFilter { + SwfdecFilter filter; + + double x; /* blur in horizontal direction */ + double y; /* blur in vertical direction */ + guint quality; /* number of passes */ + + SwfdecConvolutionMatrix *matrix; /* matrix if computed or NULL */ + double xscale; /* xscale matrix was computed for */ + double yscale; /* yscale matrix was computed for */ +}; + +struct _SwfdecBlurFilterClass { + SwfdecFilterClass filter_class; +}; + +GType swfdec_blur_filter_get_type (void); + +void swfdec_blur_filter_invalidate (SwfdecBlurFilter * blur); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_blur_filter_as.c b/swfdec/swfdec_blur_filter_as.c new file mode 100644 index 00000000..8da57e00 --- /dev/null +++ b/swfdec/swfdec_blur_filter_as.c @@ -0,0 +1,129 @@ +/* Swfdec + * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> + * 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_as_internal.h" +#include "swfdec_blur_filter.h" +#include "swfdec_debug.h" + +SWFDEC_AS_NATIVE (1102, 1, swfdec_blur_filter_get_blurX) +void +swfdec_blur_filter_get_blurX (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, ""); + + *ret = swfdec_as_value_from_number (cx, filter->x); +} + +SWFDEC_AS_NATIVE (1102, 2, swfdec_blur_filter_set_blurX) +void +swfdec_blur_filter_set_blurX (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + double d; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, "n", &d); + + filter->x = CLAMP (d, 0, 255); + swfdec_blur_filter_invalidate (filter); +} + +SWFDEC_AS_NATIVE (1102, 3, swfdec_blur_filter_get_blurY) +void +swfdec_blur_filter_get_blurY (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, ""); + + *ret = swfdec_as_value_from_number (cx, filter->y); +} + +SWFDEC_AS_NATIVE (1102, 4, swfdec_blur_filter_set_blurY) +void +swfdec_blur_filter_set_blurY (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + double d; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, "n", &d); + + filter->y = CLAMP (d, 0, 255); + swfdec_blur_filter_invalidate (filter); +} + +SWFDEC_AS_NATIVE (1102, 5, swfdec_blur_filter_get_quality) +void +swfdec_blur_filter_get_quality (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, ""); + + *ret = swfdec_as_value_from_integer (cx, filter->quality); +} + +SWFDEC_AS_NATIVE (1102, 6, swfdec_blur_filter_set_quality) +void +swfdec_blur_filter_set_quality (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + int i; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_BLUR_FILTER, &filter, "i", &i); + + filter->y = CLAMP (i, 0, 15); + swfdec_blur_filter_invalidate (filter); +} + +// constructor +SWFDEC_AS_NATIVE (1102, 0, swfdec_blur_filter_construct) +void +swfdec_blur_filter_construct (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecBlurFilter *filter; + double x = 4, y = 4; + int quality = 1; + + SWFDEC_AS_CHECK (0, NULL, "|nni", &x, &y, &quality); + + if (!swfdec_as_context_is_constructing (cx)) + return; + + filter = g_object_new (SWFDEC_TYPE_BLUR_FILTER, "context", cx, NULL); + filter->x = CLAMP (x, 0, 255); + filter->y = CLAMP (y, 0, 255); + filter->quality = CLAMP (quality, 0, 15); + + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (filter)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); +} diff --git a/swfdec/swfdec_bots.h b/swfdec/swfdec_bots.h index 87640c7a..93c120dc 100644 --- a/swfdec/swfdec_bots.h +++ b/swfdec/swfdec_bots.h @@ -26,7 +26,13 @@ G_BEGIN_DECLS - +/* About the name SwfdecBots: + * We were (actually, we still are) looking for a good name to match + * SwfdecBits, but couldn't come up with anything. So we just translated "bits" + * as "Binary Input Token Stream", and as this struct is for output, the name + * Bots == "Binary Output Token Stream" suddenly made a lot of sense. + * If you find a more natural name, tell us. + */ typedef struct _SwfdecBots SwfdecBots; struct _SwfdecBots { diff --git a/swfdec/swfdec_button.c b/swfdec/swfdec_button.c index aa3a8c1b..5eaee0e2 100644 --- a/swfdec/swfdec_button.c +++ b/swfdec/swfdec_button.c @@ -22,8 +22,10 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include <string.h> #include "swfdec_button.h" + +#include <string.h> + #include "swfdec_button_movie.h" #include "swfdec_debug.h" #include "swfdec_filter.h" @@ -89,7 +91,7 @@ swfdec_button_translate_conditions (guint conditions, gboolean menu) guint i, ret; ret = 0; - for (i = 0; i <= G_N_ELEMENTS (events); i++) { + for (i = 0; i < G_N_ELEMENTS (events); i++) { if (conditions & (1 << i)) ret |= events[i][menu ? 1 : 0]; } @@ -132,7 +134,7 @@ tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag) guint states, gid; gboolean has_blend_mode, has_filters; - /* we parse the placement info into buffers each containing one palcement */ + /* we parse the placement info into buffers each containing one placement */ tmp = bits; if (s->version >= 8) { @@ -165,12 +167,10 @@ tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag) trans.x0, trans.y0); swfdec_bits_get_color_transform (&bits, &ctrans); - if (has_filters) { - GSList *list = swfdec_filter_parse (&bits); - g_slist_free (list); - } + if (has_filters) + swfdec_filter_skip (&bits); if (has_blend_mode) { - guint blend_mode = swfdec_bits_get_u8 (&bits); + G_GNUC_UNUSED guint blend_mode = swfdec_bits_get_u8 (&bits); SWFDEC_LOG (" blend mode = %u", blend_mode); } buffer = swfdec_bits_get_buffer (&tmp, (swfdec_bits_left (&tmp) - swfdec_bits_left (&bits)) / 8); diff --git a/swfdec/swfdec_button_movie.c b/swfdec/swfdec_button_movie.c index d4d23f9c..aa154aed 100644 --- a/swfdec/swfdec_button_movie.c +++ b/swfdec/swfdec_button_movie.c @@ -83,10 +83,8 @@ swfdec_button_movie_perform_place (SwfdecButtonMovie *button, SwfdecBits *bits) } else { blend_mode = 0; } - if (has_filters) { - GSList *filters = swfdec_filter_parse (bits); - g_slist_free (filters); - } + if (has_filters) + new->filters = swfdec_filter_parse (player, bits); } else { /* DefineButton1 record */ v2 = FALSE; diff --git a/swfdec/swfdec_color.h b/swfdec/swfdec_color.h index 6ec58428..1c0e70ac 100644 --- a/swfdec/swfdec_color.h +++ b/swfdec/swfdec_color.h @@ -55,27 +55,35 @@ struct _SwfdecColorTransform { #define SWFDEC_COLOR_WHITE SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF) -SwfdecColor swfdec_color_apply_morph (SwfdecColor start, SwfdecColor end, guint ratio); -void swfdec_color_set_source (cairo_t *cr, SwfdecColor color); -void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); -void swfdec_color_transform_init_mask (SwfdecColorTransform * trans); -void swfdec_color_transform_init_color (SwfdecColorTransform *trans, SwfdecColor color); -gboolean swfdec_color_transform_is_identity (const SwfdecColorTransform * trans); -gboolean swfdec_color_transform_is_alpha (const SwfdecColorTransform * trans); +SwfdecColor swfdec_color_apply_morph (SwfdecColor start, + SwfdecColor end, + guint ratio); +void swfdec_color_set_source (cairo_t * cr, + SwfdecColor color); +void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); +void swfdec_color_transform_init_mask (SwfdecColorTransform * trans); +void swfdec_color_transform_init_color (SwfdecColorTransform * trans, + SwfdecColor color); +gboolean swfdec_color_transform_is_identity (const SwfdecColorTransform * trans); +gboolean swfdec_color_transform_is_alpha (const SwfdecColorTransform * trans); #define swfdec_color_transform_is_mask(trans) ((trans)->mask) -void swfdec_color_transform_chain (SwfdecColorTransform *dest, - const SwfdecColorTransform *last, const SwfdecColorTransform *first); -SwfdecColor swfdec_color_apply_transform (SwfdecColor in, - const SwfdecColorTransform * trans); -SwfdecColor swfdec_color_apply_transform_premultiplied (SwfdecColor in, - const SwfdecColorTransform * trans); +void swfdec_color_transform_chain (SwfdecColorTransform * dest, + const SwfdecColorTransform * last, + const SwfdecColorTransform * first); +SwfdecColor swfdec_color_apply_transform (SwfdecColor in, + const SwfdecColorTransform * trans); +SwfdecColor swfdec_color_apply_transform_premultiplied (SwfdecColor in, + const SwfdecColorTransform * trans); -void swfdec_matrix_ensure_invertible (cairo_matrix_t *matrix, cairo_matrix_t *inverse); -double swfdec_matrix_get_xscale (const cairo_matrix_t *matrix); -double swfdec_matrix_get_yscale (const cairo_matrix_t *matrix); -double swfdec_matrix_get_rotation (const cairo_matrix_t *matrix); -void swfdec_matrix_morph (cairo_matrix_t *dest, const cairo_matrix_t *start, - const cairo_matrix_t *end, guint ratio); +void swfdec_matrix_ensure_invertible (cairo_matrix_t * matrix, + cairo_matrix_t * inverse); +double swfdec_matrix_get_xscale (const cairo_matrix_t * matrix); +double swfdec_matrix_get_yscale (const cairo_matrix_t * matrix); +double swfdec_matrix_get_rotation (const cairo_matrix_t * matrix); +void swfdec_matrix_morph (cairo_matrix_t * dest, + const cairo_matrix_t * start, + const cairo_matrix_t * end, + guint ratio); G_END_DECLS diff --git a/swfdec/swfdec_color_as.c b/swfdec/swfdec_color_as.c index b76de669..2b688616 100644 --- a/swfdec/swfdec_color_as.c +++ b/swfdec/swfdec_color_as.c @@ -35,20 +35,15 @@ static SwfdecMovie * swfdec_movie_color_get_movie (SwfdecAsObject *object) { SwfdecAsValue val; - SwfdecAsObject *target; if (object == NULL) return NULL; swfdec_as_object_get_variable (object, SWFDEC_AS_STR_target, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_MOVIE (val)) return NULL; - target = SWFDEC_AS_VALUE_GET_OBJECT (&val); - if (!SWFDEC_IS_MOVIE (target)) - return NULL; - - return SWFDEC_MOVIE (target); + return SWFDEC_AS_VALUE_GET_MOVIE (val); } SWFDEC_AS_NATIVE (700, 2, swfdec_movie_color_getRGB) @@ -67,7 +62,7 @@ swfdec_movie_color_getRGB (SwfdecAsContext *cx, SwfdecAsObject *obj, result = (movie->color_transform.rb << 16) | ((movie->color_transform.gb % 256) << 8) | (movie->color_transform.bb % 256); - SWFDEC_AS_VALUE_SET_INT (ret, result); + *ret = swfdec_as_value_from_integer (cx, result); } static void @@ -75,7 +70,7 @@ add_variable (SwfdecAsObject *obj, const char *name, double value) { SwfdecAsValue val; - SWFDEC_AS_VALUE_SET_NUMBER (&val, value); + val = swfdec_as_value_from_number (obj->context, value); swfdec_as_object_set_variable (obj, name, &val); } @@ -92,7 +87,7 @@ swfdec_movie_color_getTransform (SwfdecAsContext *cx, SwfdecAsObject *obj, if (movie == NULL) return; - ret = swfdec_as_object_new (cx); + ret = swfdec_as_object_new (cx, SWFDEC_AS_STR_Object, NULL); add_variable (ret, SWFDEC_AS_STR_ra, movie->color_transform.ra * 100.0 / 256.0); add_variable (ret, SWFDEC_AS_STR_ga, movie->color_transform.ga * 100.0 / 256.0); @@ -121,7 +116,7 @@ swfdec_movie_color_setRGB (SwfdecAsContext *cx, SwfdecAsObject *obj, if (movie == NULL) return; - color = swfdec_as_value_to_integer (cx, &argv[0]); + color = swfdec_as_value_to_integer (cx, argv[0]); movie->color_transform.ra = 0; movie->color_transform.rb = (color & 0xFF0000) >> 16; @@ -140,7 +135,7 @@ parse_property (SwfdecAsObject *obj, const char *name, int *target, gboolean sca if (!swfdec_as_object_get_variable (obj, name, &val)) return; - d = swfdec_as_value_to_number (swfdec_gc_object_get_context (obj), &val); + d = swfdec_as_value_to_number (obj->context, val); if (scale) { *target = d * 256.0 / 100.0; } else { @@ -164,9 +159,11 @@ swfdec_movie_color_setTransform (SwfdecAsContext *cx, SwfdecAsObject *obj, if (movie == NULL) return; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0])) + return; + parse = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0]); + if (parse == NULL) return; - parse = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); parse_property (parse, SWFDEC_AS_STR_ra, &movie->color_transform.ra, TRUE); parse_property (parse, SWFDEC_AS_STR_ga, &movie->color_transform.ga, TRUE); parse_property (parse, SWFDEC_AS_STR_ba, &movie->color_transform.ba, TRUE); diff --git a/swfdec/swfdec_color_matrix_filter.c b/swfdec/swfdec_color_matrix_filter.c index 95959af7..63d250fa 100644 --- a/swfdec/swfdec_color_matrix_filter.c +++ b/swfdec/swfdec_color_matrix_filter.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> + * Copyright (C) 2008 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 @@ -21,33 +21,103 @@ #include "config.h" #endif -#include "swfdec_as_internal.h" +#include "swfdec_color_matrix_filter.h" + +#include <string.h> + #include "swfdec_debug.h" -SWFDEC_AS_NATIVE (1110, 1, swfdec_color_matrix_filter_get_matrix) -void -swfdec_color_matrix_filter_get_matrix (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *ret) +G_DEFINE_TYPE (SwfdecColorMatrixFilter, swfdec_color_matrix_filter, SWFDEC_TYPE_FILTER) + +static void +swfdec_color_matrix_filter_clone (SwfdecFilter *dfilter, SwfdecFilter *sfilter) { - SWFDEC_STUB ("ColorMatrixFilter.matrix (get)"); + SwfdecColorMatrixFilter *dest = SWFDEC_COLOR_MATRIX_FILTER (dfilter); + SwfdecColorMatrixFilter *source = SWFDEC_COLOR_MATRIX_FILTER (sfilter); + + memcpy (dest->matrix, source->matrix, sizeof (double) * 20); } -SWFDEC_AS_NATIVE (1110, 2, swfdec_color_matrix_filter_set_matrix) -void -swfdec_color_matrix_filter_set_matrix (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *ret) +static void +swfdec_color_matrix_filter_get_rectangle (SwfdecFilter *filter, SwfdecRectangle *dest, + double xscale, double yscale, const SwfdecRectangle *source) { - SWFDEC_STUB ("ColorMatrixFilter.matrix (set)"); + if (dest != source) + *dest = *source; } -// constructor -SWFDEC_AS_NATIVE (1110, 0, swfdec_color_matrix_filter_contruct) -void -swfdec_color_matrix_filter_contruct (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *ret) +static cairo_pattern_t * +swfdec_color_matrix_filter_apply (SwfdecFilter *filter, cairo_pattern_t *pattern, + double xscale, double yscale, const SwfdecRectangle *rect) { - SWFDEC_STUB ("ColorMatrixFilter"); + SwfdecColorMatrixFilter *cm = SWFDEC_COLOR_MATRIX_FILTER (filter); + cairo_surface_t *surface; + int x, y; + guint8 *data; + guint stride; + cairo_t *cr; + double a, r, g, b, anew, tmp; + + /* FIXME: make this work in a single pass (requires smarter matrix construction) */ + surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, rect->width, rect->height); + cairo_surface_set_device_offset (surface, -rect->x, -rect->y); + + cr = cairo_create (surface); + cairo_set_source (cr, pattern); + cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height); + cairo_fill (cr); + cairo_destroy (cr); + + data = cairo_image_surface_get_data (surface); + stride = cairo_image_surface_get_stride (surface); + for (y = 0; y < rect->height; y++) { + for (x = 0; x < rect->width; x++) { + a = data[x * 4 + SWFDEC_COLOR_INDEX_ALPHA]; + r = data[x * 4 + SWFDEC_COLOR_INDEX_RED]; + g = data[x * 4 + SWFDEC_COLOR_INDEX_GREEN]; + b = data[x * 4 + SWFDEC_COLOR_INDEX_BLUE]; + anew = r * cm->matrix[15] + g * cm->matrix[16] + b * cm->matrix[17] + + a * cm->matrix[18] + cm->matrix[19]; + anew = CLAMP (anew, 0, 255); + data[x * 4 + SWFDEC_COLOR_INDEX_ALPHA] = anew; + tmp = r * cm->matrix[0] + g * cm->matrix[1] + b * cm->matrix[2] + + a * cm->matrix[3] + cm->matrix[4]; + tmp = CLAMP (tmp, 0, anew); + data[x * 4 + SWFDEC_COLOR_INDEX_RED] = tmp; + tmp = r * cm->matrix[5] + g * cm->matrix[6] + b * cm->matrix[7] + + a * cm->matrix[8] + cm->matrix[9]; + tmp = CLAMP (tmp, 0, anew); + data[x * 4 + SWFDEC_COLOR_INDEX_GREEN] = tmp; + tmp = r * cm->matrix[10] + g * cm->matrix[11] + b * cm->matrix[12] + + a * cm->matrix[13] + cm->matrix[14]; + tmp = CLAMP (tmp, 0, anew); + data[x * 4 + SWFDEC_COLOR_INDEX_BLUE] = tmp; + } + data += stride; + } + + pattern = cairo_pattern_create_for_surface (surface); + cairo_surface_destroy (surface); + + return pattern; } + +static void +swfdec_color_matrix_filter_class_init (SwfdecColorMatrixFilterClass *klass) +{ + SwfdecFilterClass *filter_class = SWFDEC_FILTER_CLASS (klass); + + filter_class->clone = swfdec_color_matrix_filter_clone; + filter_class->get_rectangle = swfdec_color_matrix_filter_get_rectangle; + filter_class->apply = swfdec_color_matrix_filter_apply; +} + +static void +swfdec_color_matrix_filter_init (SwfdecColorMatrixFilter *filter) +{ + filter->matrix[0] = 1.0; + filter->matrix[6] = 1.0; + filter->matrix[12] = 1.0; + filter->matrix[18] = 1.0; +} + diff --git a/swfdec/swfdec_color_matrix_filter.h b/swfdec/swfdec_color_matrix_filter.h new file mode 100644 index 00000000..b5d0b748 --- /dev/null +++ b/swfdec/swfdec_color_matrix_filter.h @@ -0,0 +1,53 @@ +/* Swfdec + * Copyright (C) 2008 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_COLOR_MATRIX_FILTER_H_ +#define _SWFDEC_COLOR_MATRIX_FILTER_H_ + +#include <swfdec/swfdec_filter.h> +#include <swfdec/swfdec_convolution_matrix.h> + +G_BEGIN_DECLS + + +typedef struct _SwfdecColorMatrixFilter SwfdecColorMatrixFilter; +typedef struct _SwfdecColorMatrixFilterClass SwfdecColorMatrixFilterClass; + +#define SWFDEC_TYPE_COLOR_MATRIX_FILTER (swfdec_color_matrix_filter_get_type()) +#define SWFDEC_IS_COLOR_MATRIX_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_COLOR_MATRIX_FILTER)) +#define SWFDEC_IS_COLOR_MATRIX_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_COLOR_MATRIX_FILTER)) +#define SWFDEC_COLOR_MATRIX_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_COLOR_MATRIX_FILTER, SwfdecColorMatrixFilter)) +#define SWFDEC_COLOR_MATRIX_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_COLOR_MATRIX_FILTER, SwfdecColorMatrixFilterClass)) +#define SWFDEC_COLOR_MATRIX_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_COLOR_MATRIX_FILTER, SwfdecColorMatrixFilterClass)) + +struct _SwfdecColorMatrixFilter { + SwfdecFilter filter; + + double matrix[20]; /* color matrix to apply */ +}; + +struct _SwfdecColorMatrixFilterClass { + SwfdecFilterClass filter_class; +}; + +GType swfdec_color_matrix_filter_get_type (void); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_color_matrix_filter_as.c b/swfdec/swfdec_color_matrix_filter_as.c new file mode 100644 index 00000000..76865ae8 --- /dev/null +++ b/swfdec/swfdec_color_matrix_filter_as.c @@ -0,0 +1,110 @@ +/* Swfdec + * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> + * 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_color_matrix_filter.h" + +#include <string.h> + +#include "swfdec_as_array.h" +#include "swfdec_as_internal.h" +#include "swfdec_as_native_function.h" +#include "swfdec_debug.h" + +SWFDEC_AS_NATIVE (1110, 1, swfdec_color_matrix_filter_get_matrix) +void +swfdec_color_matrix_filter_get_matrix (SwfdecAsContext *cx, + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, + SwfdecAsValue *ret) +{ + SwfdecColorMatrixFilter *cm; + SwfdecAsObject *array; + SwfdecAsValue val[20]; + guint i; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_MATRIX_FILTER, &cm, ""); + + for (i = 0; i < 20; i++) { + val[i] = swfdec_as_value_from_number (cx, cm->matrix[i]); + } + array = swfdec_as_array_new (cx); + swfdec_as_array_append (array, 20, val); + SWFDEC_AS_VALUE_SET_OBJECT (ret, array); +} + +static void +swfdec_color_matrix_filter_do_set_matrix (SwfdecColorMatrixFilter *cm, + SwfdecAsObject *array) +{ + SwfdecAsContext *cx = swfdec_gc_object_get_context (cm); + SwfdecAsValue val; + int i; + + if (!array->array) { + memset (cm->matrix, 0, sizeof (double) * 20); + return; + } + + for (i = 0; i < 20; i++) { + if (!swfdec_as_object_get_variable (array, swfdec_as_integer_to_string (cx, i), &val)) { + cm->matrix[i] = 0; + } else { + cm->matrix[i] = swfdec_as_value_to_number (cx, val); + } + } +} + +SWFDEC_AS_NATIVE (1110, 2, swfdec_color_matrix_filter_set_matrix) +void +swfdec_color_matrix_filter_set_matrix (SwfdecAsContext *cx, + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, + SwfdecAsValue *ret) +{ + SwfdecColorMatrixFilter *cm; + SwfdecAsObject *array; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_MATRIX_FILTER, &cm, "o", &array); + + swfdec_color_matrix_filter_do_set_matrix (cm, array); +} + +SWFDEC_AS_NATIVE (1110, 0, swfdec_color_matrix_filter_contruct) +void +swfdec_color_matrix_filter_contruct (SwfdecAsContext *cx, + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, + SwfdecAsValue *ret) +{ + SwfdecColorMatrixFilter *cm; + SwfdecAsObject *array; + + if (!swfdec_as_context_is_constructing (cx)) + return; + + SWFDEC_AS_CHECK (0, NULL, "o", &array); + + cm = g_object_new (SWFDEC_TYPE_COLOR_MATRIX_FILTER, "context", cx, NULL); + swfdec_color_matrix_filter_do_set_matrix (cm, array); + + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (cm)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); +} diff --git a/swfdec/swfdec_color_transform_as.c b/swfdec/swfdec_color_transform_as.c index 95c949dc..3f60aee2 100644 --- a/swfdec/swfdec_color_transform_as.c +++ b/swfdec/swfdec_color_transform_as.c @@ -27,7 +27,7 @@ #include "swfdec_as_frame_internal.h" #include "swfdec_debug.h" -G_DEFINE_TYPE (SwfdecColorTransformAs, swfdec_color_transform_as, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecColorTransformAs, swfdec_color_transform_as, SWFDEC_TYPE_AS_RELAY) static void swfdec_color_transform_as_class_init (SwfdecColorTransformAsClass *klass) @@ -58,7 +58,7 @@ swfdec_color_transform_as_get_alphaMultiplier (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->aa); + *ret = swfdec_as_value_from_number (cx, transform->aa); } SWFDEC_AS_NATIVE (1105, 102, swfdec_color_transform_as_set_alphaMultiplier) @@ -85,7 +85,7 @@ swfdec_color_transform_as_get_redMultiplier (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->ra); + *ret = swfdec_as_value_from_number (cx, transform->ra); } SWFDEC_AS_NATIVE (1105, 104, swfdec_color_transform_as_set_redMultiplier) @@ -112,7 +112,7 @@ swfdec_color_transform_as_get_greenMultiplier (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->ga); + *ret = swfdec_as_value_from_number (cx, transform->ga); } SWFDEC_AS_NATIVE (1105, 106, swfdec_color_transform_as_set_greenMultiplier) @@ -139,7 +139,7 @@ swfdec_color_transform_as_get_blueMultiplier (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->ba); + *ret = swfdec_as_value_from_number (cx, transform->ba); } SWFDEC_AS_NATIVE (1105, 108, swfdec_color_transform_as_set_blueMultiplier) @@ -166,7 +166,7 @@ swfdec_color_transform_as_get_alphaOffset (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->ab); + *ret = swfdec_as_value_from_number (cx, transform->ab); } SWFDEC_AS_NATIVE (1105, 110, swfdec_color_transform_as_set_alphaOffset) @@ -193,7 +193,7 @@ swfdec_color_transform_as_get_redOffset (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->rb); + *ret = swfdec_as_value_from_number (cx, transform->rb); } SWFDEC_AS_NATIVE (1105, 112, swfdec_color_transform_as_set_redOffset) @@ -220,7 +220,7 @@ swfdec_color_transform_as_get_greenOffset (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->gb); + *ret = swfdec_as_value_from_number (cx, transform->gb); } SWFDEC_AS_NATIVE (1105, 114, swfdec_color_transform_as_set_greenOffset) @@ -247,7 +247,7 @@ swfdec_color_transform_as_get_blueOffset (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, transform->bb); + *ret = swfdec_as_value_from_number (cx, transform->bb); } SWFDEC_AS_NATIVE (1105, 116, swfdec_color_transform_as_set_blueOffset) @@ -281,7 +281,7 @@ swfdec_color_transform_as_get_rgb (SwfdecAsContext *cx, value |= swfdec_as_double_to_integer (transform->gb) << 8; value |= swfdec_as_double_to_integer (transform->bb); - SWFDEC_AS_VALUE_SET_INT (ret, value); + *ret = swfdec_as_value_from_integer (cx, value); } SWFDEC_AS_NATIVE (1105, 118, swfdec_color_transform_as_set_rgb) @@ -316,9 +316,9 @@ swfdec_color_transform_as_concat (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_COLOR_TRANSFORM_AS, &transform, "o", &other_object); - if (!SWFDEC_IS_COLOR_TRANSFORM_AS (other_object)) + if (!SWFDEC_IS_COLOR_TRANSFORM_AS (other_object->relay)) return; - other = SWFDEC_COLOR_TRANSFORM_AS (other_object); + other = SWFDEC_COLOR_TRANSFORM_AS (other_object->relay); transform->rb += (transform->ra * other->rb); transform->gb += (transform->ga * other->gb); @@ -331,32 +331,27 @@ swfdec_color_transform_as_concat (SwfdecAsContext *cx, } // constructor -SWFDEC_AS_CONSTRUCTOR (1105, 0, swfdec_color_transform_as_construct, swfdec_color_transform_as_get_type) +SWFDEC_AS_NATIVE (1105, 0, swfdec_color_transform_as_construct) void swfdec_color_transform_as_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecColorTransformAs *transform; - guint i; - if (!cx->frame->construct) + if (!swfdec_as_context_is_constructing (cx)) return; + transform = g_object_new (SWFDEC_TYPE_COLOR_TRANSFORM_AS, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (transform)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); + if (argc < 8) return; - transform = SWFDEC_COLOR_TRANSFORM_AS (object); - - i = 0; - transform->ra = swfdec_as_value_to_number (cx, &argv[i++]); - transform->ga = swfdec_as_value_to_number (cx, &argv[i++]); - transform->ba = swfdec_as_value_to_number (cx, &argv[i++]); - transform->aa = swfdec_as_value_to_number (cx, &argv[i++]); - transform->rb = swfdec_as_value_to_number (cx, &argv[i++]); - transform->gb = swfdec_as_value_to_number (cx, &argv[i++]); - transform->bb = swfdec_as_value_to_number (cx, &argv[i++]); - transform->ab = swfdec_as_value_to_number (cx, &argv[i++]); + SWFDEC_AS_CHECK (0, NULL, "nnnnnnnn", + &transform->ra, &transform->ga, &transform->ba, &transform->aa, + &transform->rb, &transform->gb, &transform->bb, &transform->ab); } SwfdecColorTransformAs * @@ -364,13 +359,16 @@ swfdec_color_transform_as_new_from_transform (SwfdecAsContext *context, const SwfdecColorTransform *transform) { SwfdecColorTransformAs *transform_as; + SwfdecAsObject *object; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (transform != NULL, NULL); transform_as = g_object_new (SWFDEC_TYPE_COLOR_TRANSFORM_AS, "context", context, NULL); - - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (transform_as), + /* do it this way so the constructor isn't called */ + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (transform_as)); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_flash, SWFDEC_AS_STR_geom, SWFDEC_AS_STR_ColorTransform, NULL); transform_as->ra = transform->ra / 256.0; diff --git a/swfdec/swfdec_color_transform_as.h b/swfdec/swfdec_color_transform_as.h index 6a0704e8..d2811520 100644 --- a/swfdec/swfdec_color_transform_as.h +++ b/swfdec/swfdec_color_transform_as.h @@ -20,9 +20,7 @@ #ifndef _SWFDEC_COLOR_TRANSFORM_H_ #define _SWFDEC_COLOR_TRANSFORM_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_types.h> -#include <swfdec/swfdec_types.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_color.h> G_BEGIN_DECLS @@ -38,13 +36,13 @@ typedef struct _SwfdecColorTransformAsClass SwfdecColorTransformAsClass; #define SWFDEC_COLOR_TRANSFORM_AS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_COLOR_TRANSFORM_AS, SwfdecColorTransformAsClass)) struct _SwfdecColorTransformAs { - SwfdecAsObject object; + SwfdecAsRelay relay; double ra, rb, ga, gb, ba, bb, aa, ab; }; struct _SwfdecColorTransformAsClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_color_transform_as_get_type (void); diff --git a/swfdec/swfdec_constant_pool.c b/swfdec/swfdec_constant_pool.c index 9a143128..c7df4f9c 100644 --- a/swfdec/swfdec_constant_pool.c +++ b/swfdec/swfdec_constant_pool.c @@ -92,6 +92,7 @@ swfdec_constant_pool_new (SwfdecAsContext *context, SwfdecBuffer *buffer, guint if (context) { pool->context = context; g_hash_table_insert (context->constant_pools, buffer->data, pool); + swfdec_constant_pool_ref (pool); } return pool; } @@ -131,9 +132,7 @@ swfdec_constant_pool_unref (SwfdecConstantPool *pool) if (pool->refcount) return; - if (pool->context) { - g_hash_table_remove (pool->context->constant_pools, pool->buffer->data); - } else { + if (pool->context == NULL) { guint i; for (i = 0; i < pool->n_strings; i++) { g_free (pool->strings[i]); @@ -143,6 +142,16 @@ swfdec_constant_pool_unref (SwfdecConstantPool *pool) g_slice_free1 (sizeof (SwfdecConstantPool) + (MAX (1, pool->n_strings) - 1) * sizeof (char *), pool); } +gboolean +swfdec_constant_pool_collect (SwfdecConstantPool *pool) +{ + if (pool->refcount) { + swfdec_constant_pool_unref (pool); + return TRUE; + } + return FALSE; +} + /** * swfdec_constant_pool_size: * @pool: a pool diff --git a/swfdec/swfdec_constant_pool.h b/swfdec/swfdec_constant_pool.h index 3592dbcf..462ad13e 100644 --- a/swfdec/swfdec_constant_pool.h +++ b/swfdec/swfdec_constant_pool.h @@ -35,6 +35,7 @@ SwfdecConstantPool * swfdec_constant_pool_new (SwfdecAsContext * context, guint version); SwfdecConstantPool * swfdec_constant_pool_ref (SwfdecConstantPool * pool); void swfdec_constant_pool_unref (SwfdecConstantPool * pool); +gboolean swfdec_constant_pool_collect (SwfdecConstantPool * pool); guint swfdec_constant_pool_size (SwfdecConstantPool * pool); const char * swfdec_constant_pool_get (SwfdecConstantPool * pool, diff --git a/swfdec/swfdec_convolution_matrix.c b/swfdec/swfdec_convolution_matrix.c new file mode 100644 index 00000000..994d3553 --- /dev/null +++ b/swfdec/swfdec_convolution_matrix.c @@ -0,0 +1,152 @@ +/* Swfdec + * Copyright (C) 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_convolution_matrix.h" + +#include "swfdec_color.h" +#include "swfdec_debug.h" + +struct _SwfdecConvolutionMatrix { + guint width; + guint height; + double matrix[1]; +}; + +SwfdecConvolutionMatrix * +swfdec_convolution_matrix_new (guint width, guint height) +{ + SwfdecConvolutionMatrix *matrix; + + g_return_val_if_fail (width % 2 != 0, NULL); + g_return_val_if_fail (height % 2 != 0, NULL); + + matrix = g_slice_alloc0 (sizeof (SwfdecConvolutionMatrix) + + sizeof (guint8) * (width * height * 256 - 1)); + matrix->width = width; + matrix->height = height; + return matrix; +} + +void +swfdec_convolution_matrix_free (SwfdecConvolutionMatrix *matrix) +{ + g_return_if_fail (matrix != NULL); + + g_slice_free1 (sizeof (SwfdecConvolutionMatrix) + + sizeof (guint8) * (matrix->width * matrix->height * 256 - 1), matrix); +} + +void +swfdec_convolution_matrix_set (SwfdecConvolutionMatrix *matrix, + guint x, guint y, double value) +{ + g_return_if_fail (matrix != NULL); + g_return_if_fail (x < matrix->width); + g_return_if_fail (y < matrix->height); + + matrix->matrix[matrix->width * y + x] = value; +} + +double +swfdec_convolution_matrix_get (SwfdecConvolutionMatrix *matrix, guint x, guint y) +{ + g_return_val_if_fail (matrix != NULL, 0); + g_return_val_if_fail (x < matrix->width, 0); + g_return_val_if_fail (y < matrix->height, 0); + + return matrix->matrix[matrix->width * y + x]; +} + +guint +swfdec_convolution_matrix_get_width (SwfdecConvolutionMatrix *matrix) +{ + g_return_val_if_fail (matrix != NULL, 1); + + return matrix->width; +} + +guint +swfdec_convolution_matrix_get_height (SwfdecConvolutionMatrix *matrix) +{ + g_return_val_if_fail (matrix != NULL, 1); + + return matrix->height; +} + +void +swfdec_convolution_matrix_apply (SwfdecConvolutionMatrix *matrix, guint width, guint height, + guint8 *tdata, guint tstride, const guint8 *sdata, guint sstride) +{ + double r, g, b, a; + guint x, y; + int offx, offy, offyend, offxend; + + g_return_if_fail (matrix != NULL); + g_return_if_fail (width > 0); + g_return_if_fail (height > 0); + g_return_if_fail (tdata != NULL); + g_return_if_fail (tstride >= width * 4); + g_return_if_fail (sdata != NULL); + g_return_if_fail (sstride >= width * 4); + + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + double *next = matrix->matrix; + a = r = g = b = 0; + offy = y - matrix->height / 2; + offyend = offy + matrix->height; + for (; offy < offyend; offy++) { + if (offy < 0 || (guint) offy >= height) { + next += matrix->width; + continue; + } + offx = x - matrix->width / 2; + offxend = offx + matrix->width; + for (; offx < offxend; offx++) { + const guint8 *cur; + if (offx < 0 || (guint) offx >= width) { + next++; + continue; + } + cur = &sdata[4 * offx + sstride * offy]; + g_assert (cur < sdata + sstride * height); + a += *next * cur[SWFDEC_COLOR_INDEX_ALPHA]; + r += *next * cur[SWFDEC_COLOR_INDEX_RED]; + g += *next * cur[SWFDEC_COLOR_INDEX_GREEN]; + b += *next * cur[SWFDEC_COLOR_INDEX_BLUE]; + next++; + } + } + a = CLAMP (a, 0, 255); + r = CLAMP (r, 0, a); + g = CLAMP (g, 0, a); + b = CLAMP (b, 0, a); + tdata[4 * x + SWFDEC_COLOR_INDEX_ALPHA] = a; + tdata[4 * x + SWFDEC_COLOR_INDEX_RED] = r; + tdata[4 * x + SWFDEC_COLOR_INDEX_GREEN] = g; + tdata[4 * x + SWFDEC_COLOR_INDEX_BLUE] = b; + } + tdata += tstride; + } +} + diff --git a/swfdec/swfdec_convolution_matrix.h b/swfdec/swfdec_convolution_matrix.h new file mode 100644 index 00000000..12d578ab --- /dev/null +++ b/swfdec/swfdec_convolution_matrix.h @@ -0,0 +1,54 @@ +/* Swfdec + * Copyright (C) 2008 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_CONVOLUTION_MATRIX_H_ +#define _SWFDEC_CONVOLUTION_MATRIX_H_ + +#include <glib.h> + +G_BEGIN_DECLS + + +typedef struct _SwfdecConvolutionMatrix SwfdecConvolutionMatrix; + +SwfdecConvolutionMatrix * + swfdec_convolution_matrix_new (guint width, + guint height); +void swfdec_convolution_matrix_free (SwfdecConvolutionMatrix * matrix); + +void swfdec_convolution_matrix_set (SwfdecConvolutionMatrix * matrix, + guint x, + guint y, + double value); +double swfdec_convolution_matrix_get (SwfdecConvolutionMatrix * matrix, + guint x, + guint y); +guint swfdec_convolution_matrix_get_width (SwfdecConvolutionMatrix * matrix); +guint swfdec_convolution_matrix_get_height (SwfdecConvolutionMatrix * matrix); +void swfdec_convolution_matrix_apply (SwfdecConvolutionMatrix * matrix, + guint width, + guint height, + guint8 * tdata, + guint tstride, + const guint8 * sdata, + guint sstride); + + +G_END_DECLS +#endif diff --git a/vivified/core/vivified-core.h b/swfdec/swfdec_display_object.c index 34a3fca8..bd423c5a 100644 --- a/vivified/core/vivified-core.h +++ b/swfdec/swfdec_display_object.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2008 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 @@ -17,9 +17,23 @@ * Boston, MA 02110-1301 USA */ -#ifndef __VIVIFIED_CORE_H__ -#define __VIVIFIED_CORE_H__ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include <vivified/core/vivi_application.h> +#include "swfdec_display_object.h" +#include "swfdec_debug.h" + + +G_DEFINE_TYPE (SwfdecDisplayObject, swfdec_display_object, SWFDEC_TYPE_EVENT_DISPATCHER) + +static void +swfdec_display_object_class_init (SwfdecDisplayObjectClass *klass) +{ +} + +static void +swfdec_display_object_init (SwfdecDisplayObject *display_object) +{ +} -#endif diff --git a/swfdec/swfdec_display_object.h b/swfdec/swfdec_display_object.h new file mode 100644 index 00000000..78ae1b79 --- /dev/null +++ b/swfdec/swfdec_display_object.h @@ -0,0 +1,52 @@ +/* Swfdec + * Copyright (C) 2008 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_DISPLAY_OBJECT_H_ +#define _SWFDEC_DISPLAY_OBJECT_H_ + +#include <swfdec/swfdec_event_dispatcher.h> +#include <swfdec/swfdec_types.h> + +G_BEGIN_DECLS + +//typedef struct _SwfdecDisplayObject SwfdecDisplayObject; +typedef struct _SwfdecDisplayObjectClass SwfdecDisplayObjectClass; + +#define SWFDEC_TYPE_DISPLAY_OBJECT (swfdec_display_object_get_type()) +#define SWFDEC_IS_DISPLAY_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_DISPLAY_OBJECT)) +#define SWFDEC_IS_DISPLAY_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_DISPLAY_OBJECT)) +#define SWFDEC_DISPLAY_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_DISPLAY_OBJECT, SwfdecDisplayObject)) +#define SWFDEC_DISPLAY_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_DISPLAY_OBJECT, SwfdecDisplayObjectClass)) +#define SWFDEC_DISPLAY_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_DISPLAY_OBJECT, SwfdecDisplayObjectClass)) + +struct _SwfdecDisplayObject +{ + SwfdecEventDispatcher dispatcher; +}; + +struct _SwfdecDisplayObjectClass +{ + SwfdecEventDispatcherClass dispatcher_class; +}; + +GType swfdec_display_object_get_type (void); + + +G_END_DECLS +#endif diff --git a/vivified/ui/vivi_player.c b/swfdec/swfdec_display_object_container.c index f456e076..bb09ff15 100644 --- a/vivified/ui/vivi_player.c +++ b/swfdec/swfdec_display_object_container.c @@ -1,5 +1,5 @@ -/* Vivified - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> +/* Swfdec + * Copyright (C) 2008 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 @@ -21,16 +21,19 @@ #include "config.h" #endif -#include <swfdec-gtk/swfdec-gtk.h> -#include "vivi_vivi_docklet.h" -#include "vivi_widget.h" +#include "swfdec_display_object_container.h" +#include "swfdec_debug.h" -void -vivi_player_application_set (ViviViviDocklet *docklet, ViviApplication *app); -void -vivi_player_application_set (ViviViviDocklet *docklet, ViviApplication *app) + +G_DEFINE_TYPE (SwfdecDisplayObjectContainer, swfdec_display_object_container, SWFDEC_TYPE_INTERACTIVE_OBJECT) + +static void +swfdec_display_object_container_class_init (SwfdecDisplayObjectContainerClass *klass) { - ViviWidget *widget = VIVI_WIDGET (vivi_vivi_docklet_find_widget_by_type (docklet, VIVI_TYPE_WIDGET)); +} - vivi_widget_set_application (widget, app); +static void +swfdec_display_object_container_init (SwfdecDisplayObjectContainer *display_object_container) +{ } + diff --git a/swfdec/swfdec_display_object_container.h b/swfdec/swfdec_display_object_container.h new file mode 100644 index 00000000..a1c26012 --- /dev/null +++ b/swfdec/swfdec_display_object_container.h @@ -0,0 +1,51 @@ +/* Swfdec + * Copyright (C) 2008 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_DISPLAY_OBJECT_CONTAINER_H_ +#define _SWFDEC_DISPLAY_OBJECT_CONTAINER_H_ + +#include <swfdec/swfdec_interactive_object.h> + +G_BEGIN_DECLS + +//typedef struct _SwfdecDisplayObjectContainer SwfdecDisplayObjectContainer; +typedef struct _SwfdecDisplayObjectContainerClass SwfdecDisplayObjectContainerClass; + +#define SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER (swfdec_display_object_container_get_type()) +#define SWFDEC_IS_DISPLAY_OBJECT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER)) +#define SWFDEC_IS_DISPLAY_OBJECT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER)) +#define SWFDEC_DISPLAY_OBJECT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER, SwfdecDisplayObjectContainer)) +#define SWFDEC_DISPLAY_OBJECT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER, SwfdecDisplayObjectContainerClass)) +#define SWFDEC_DISPLAY_OBJECT_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_DISPLAY_OBJECT_CONTAINER, SwfdecDisplayObjectContainerClass)) + +struct _SwfdecDisplayObjectContainer +{ + SwfdecInteractiveObject interactive_object; +}; + +struct _SwfdecDisplayObjectContainerClass +{ + SwfdecInteractiveObjectClass interactive_object_class; +}; + +GType swfdec_display_object_container_get_type (void); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_event.c b/swfdec/swfdec_event.c index 98ff5056..d8f28432 100644 --- a/swfdec/swfdec_event.c +++ b/swfdec/swfdec_event.c @@ -175,7 +175,7 @@ swfdec_event_list_execute (SwfdecEventList *list, SwfdecAsObject *object, guint i; g_return_if_fail (list != NULL); - g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (object != NULL); g_return_if_fail (condition < N_CONDITIONS); condition = (1 << condition); @@ -194,13 +194,12 @@ swfdec_event_list_execute (SwfdecEventList *list, SwfdecAsObject *object, } gboolean -swfdec_event_list_has_conditions (SwfdecEventList *list, SwfdecAsObject *object, +swfdec_event_list_has_conditions (SwfdecEventList *list, guint condition, guint8 key) { guint i; g_return_val_if_fail (list != NULL, FALSE); - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE); g_return_val_if_fail (condition < N_CONDITIONS, FALSE); condition = 1 << condition; diff --git a/swfdec/swfdec_event.h b/swfdec/swfdec_event.h index ef69df34..b4f1d951 100644 --- a/swfdec/swfdec_event.h +++ b/swfdec/swfdec_event.h @@ -71,7 +71,6 @@ void swfdec_event_list_execute (SwfdecEventList * list, guint condition, guint8 key); gboolean swfdec_event_list_has_conditions(SwfdecEventList * list, - SwfdecAsObject * object, guint conditions, guint8 key); gboolean swfdec_event_list_has_mouse_events(SwfdecEventList * list); diff --git a/vivified/dock/vivified-dock.h b/swfdec/swfdec_event_dispatcher.c index 244aad81..299d1790 100644 --- a/vivified/dock/vivified-dock.h +++ b/swfdec/swfdec_event_dispatcher.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2008 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 @@ -17,10 +17,23 @@ * Boston, MA 02110-1301 USA */ -#ifndef __VIVIFIED_DOCK_H__ -#define __VIVIFIED_DOCK_H__ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include <vivified/dock/vivi_docklet.h> -#include <vivified/dock/vivi_vdock.h> +#include "swfdec_event_dispatcher.h" +#include "swfdec_debug.h" + + +G_DEFINE_TYPE (SwfdecEventDispatcher, swfdec_event_dispatcher, SWFDEC_TYPE_GC_OBJECT) + +static void +swfdec_event_dispatcher_class_init (SwfdecEventDispatcherClass *klass) +{ +} + +static void +swfdec_event_dispatcher_init (SwfdecEventDispatcher *event_dispatcher) +{ +} -#endif diff --git a/swfdec/swfdec_event_dispatcher.h b/swfdec/swfdec_event_dispatcher.h new file mode 100644 index 00000000..b6622b9e --- /dev/null +++ b/swfdec/swfdec_event_dispatcher.h @@ -0,0 +1,52 @@ +/* Swfdec + * Copyright (C) 2008 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_EVENT_DISPATCHER_H_ +#define _SWFDEC_EVENT_DISPATCHER_H_ + +#include <swfdec/swfdec_gc_object.h> +#include <swfdec/swfdec_types.h> + +G_BEGIN_DECLS + +//typedef struct _SwfdecEventDispatcher SwfdecEventDispatcher; +typedef struct _SwfdecEventDispatcherClass SwfdecEventDispatcherClass; + +#define SWFDEC_TYPE_EVENT_DISPATCHER (swfdec_event_dispatcher_get_type()) +#define SWFDEC_IS_EVENT_DISPATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_EVENT_DISPATCHER)) +#define SWFDEC_IS_EVENT_DISPATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_EVENT_DISPATCHER)) +#define SWFDEC_EVENT_DISPATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_EVENT_DISPATCHER, SwfdecEventDispatcher)) +#define SWFDEC_EVENT_DISPATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_EVENT_DISPATCHER, SwfdecEventDispatcherClass)) +#define SWFDEC_EVENT_DISPATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_EVENT_DISPATCHER, SwfdecEventDispatcherClass)) + +struct _SwfdecEventDispatcher +{ + SwfdecGcObject object; +}; + +struct _SwfdecEventDispatcherClass +{ + SwfdecGcObjectClass object_class; +}; + +GType swfdec_event_dispatcher_get_type (void); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_external_interface.c b/swfdec/swfdec_external_interface.c index 9574954e..af7a0083 100644 --- a/swfdec/swfdec_external_interface.c +++ b/swfdec/swfdec_external_interface.c @@ -73,10 +73,10 @@ swfdec_external_interface__addCallback (SwfdecAsContext *cx, const char *name; SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE); - SWFDEC_AS_CHECK (0, NULL, "sO", &name, &fun); + SWFDEC_AS_CHECK (0, NULL, "so", &name, &fun); /* FIXME: do we allow setting if scripting is unsupported? */ - if (!SWFDEC_IS_AS_FUNCTION (fun)) + if (!SWFDEC_IS_AS_FUNCTION (fun->relay)) return; g_hash_table_insert (priv->scripting_callbacks, (gpointer) name, fun); @@ -94,9 +94,10 @@ swfdec_external_interface__evalJS (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; SWFDEC_AS_VALUE_SET_NULL (ret); - if (scripting == NULL || argc == 0) + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (scripting == NULL) return; - s = swfdec_as_value_to_string (cx, &argv[0]); + klass = SWFDEC_PLAYER_SCRIPTING_GET_CLASS (scripting); if (klass->js_call) { char *t = klass->js_call (scripting, player, s); @@ -118,9 +119,9 @@ swfdec_external_interface__callOut (SwfdecAsContext *cx, const char *s; SWFDEC_AS_VALUE_SET_NULL (ret); - if (scripting == NULL || argc == 0) + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (scripting == NULL) return; - s = swfdec_as_value_to_string (cx, &argv[0]); klass = SWFDEC_PLAYER_SCRIPTING_GET_CLASS (scripting); if (klass->xml_call) { char *t = klass->xml_call (scripting, player, s); @@ -138,11 +139,10 @@ swfdec_external_interface__escapeXML (SwfdecAsContext *cx, { const char *s; - if (argc == 0 || - (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) { - SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (s == SWFDEC_AS_STR_EMPTY) return; - } SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, swfdec_xml_escape (s))); } @@ -155,11 +155,10 @@ swfdec_external_interface__unescapeXML (SwfdecAsContext *cx, { const char *s; - if (argc == 0 || - (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) { - SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (s == SWFDEC_AS_STR_EMPTY) return; - } SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, swfdec_xml_unescape_len (cx, s, strlen (s), FALSE))); @@ -175,11 +174,10 @@ swfdec_external_interface__jsQuoteString (SwfdecAsContext *cx, GString *str; size_t len; - if (argc == 0 || - (s = swfdec_as_value_to_string (cx, &argv[0])) == SWFDEC_AS_STR_EMPTY) { - SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_VALUE_SET_NULL (ret); + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (s == SWFDEC_AS_STR_EMPTY) return; - } str = g_string_new (""); do { diff --git a/swfdec/swfdec_file_reference.c b/swfdec/swfdec_file_reference.c index 4bbcd324..79b39930 100644 --- a/swfdec/swfdec_file_reference.c +++ b/swfdec/swfdec_file_reference.c @@ -113,13 +113,13 @@ swfdec_file_reference_construct (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_STUB ("FileReference"); - if (argc > 0 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) { - target = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); + if (argc > 0 && SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0])) { + target = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0]); } else { target = object; - if (target == NULL) - return; } + if (target == NULL) + return; swfdec_as_object_add_native_variable (target, SWFDEC_AS_STR_creationDate, swfdec_file_reference_get_creationDate, NULL); diff --git a/swfdec/swfdec_filter.c b/swfdec/swfdec_filter.c index 8bff38c4..6fa26d06 100644 --- a/swfdec/swfdec_filter.c +++ b/swfdec/swfdec_filter.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -22,9 +22,12 @@ #endif #include "swfdec_filter.h" + +#include "swfdec_blur_filter.h" +#include "swfdec_color_matrix_filter.h" #include "swfdec_debug.h" -G_DEFINE_ABSTRACT_TYPE (SwfdecFilter, swfdec_filter, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_ABSTRACT_TYPE (SwfdecFilter, swfdec_filter, SWFDEC_TYPE_AS_RELAY) static void swfdec_filter_class_init (SwfdecFilterClass *klass) @@ -36,29 +39,48 @@ swfdec_filter_init (SwfdecFilter *array) { } +SwfdecFilter * +swfdec_filter_clone (SwfdecFilter *filter) +{ + SwfdecFilter *clone; + SwfdecFilterClass *klass; + + g_return_val_if_fail (SWFDEC_IS_FILTER (filter), NULL); + + klass = SWFDEC_FILTER_GET_CLASS (filter); + clone = g_object_new (G_OBJECT_CLASS_TYPE (klass), "context", + swfdec_gc_object_get_context (filter), NULL); + klass->clone (clone, filter); + + return clone; +} + cairo_pattern_t * -swfdec_filter_apply (SwfdecFilter *filter, cairo_pattern_t *pattern) +swfdec_filter_apply (SwfdecFilter *filter, cairo_pattern_t *pattern, + double xscale, double yscale, const SwfdecRectangle *rect) { SwfdecFilterClass *klass; cairo_pattern_t *ret; g_return_val_if_fail (SWFDEC_IS_FILTER (filter), NULL); g_return_val_if_fail (pattern != NULL, NULL); + g_return_val_if_fail (rect != NULL, NULL); klass = SWFDEC_FILTER_GET_CLASS (filter); g_assert (klass->apply); - ret = klass->apply (filter, pattern); + ret = klass->apply (filter, pattern, xscale, yscale, rect); cairo_pattern_destroy (pattern); return ret; } GSList * -swfdec_filter_parse (SwfdecBits *bits) +swfdec_filter_parse (SwfdecPlayer *player, SwfdecBits *bits) { GSList *filters = NULL; guint i, n_filters, filter_id; + g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); g_return_val_if_fail (bits != NULL, NULL); n_filters = swfdec_bits_get_u8 (bits); @@ -71,8 +93,21 @@ swfdec_filter_parse (SwfdecBits *bits) swfdec_bits_skip_bytes (bits, 16); break; case 1: - SWFDEC_WARNING (" blur"); - swfdec_bits_skip_bytes (bits, 9); + { + SwfdecBlurFilter *filter; + + filter = g_object_new (SWFDEC_TYPE_BLUR_FILTER, + "context", player, NULL); + SWFDEC_LOG (" blur"); + filter->x = swfdec_bits_get_u32 (bits) / 65536.0; + filter->y = swfdec_bits_get_u32 (bits) / 65536.0; + filter->quality = swfdec_bits_getbits (bits, 5); + SWFDEC_LOG (" x = %g", filter->x); + SWFDEC_LOG (" y = %g", filter->x); + SWFDEC_LOG (" quality = %u", filter->quality); + swfdec_bits_getbits (bits, 3); + filters = g_slist_prepend (filters, filter); + } break; case 2: SWFDEC_WARNING (" glow"); @@ -100,8 +135,18 @@ swfdec_filter_parse (SwfdecBits *bits) } break; case 6: - SWFDEC_WARNING (" color matrix"); - swfdec_bits_skip_bytes (bits, 20 * 4); + { + SwfdecColorMatrixFilter *filter; + guint j; + + filter = g_object_new (SWFDEC_TYPE_COLOR_MATRIX_FILTER, + "context", player, NULL); + SWFDEC_LOG (" color matrix"); + for (j = 0; j < 20; j++) { + filter->matrix[j] = swfdec_bits_get_float (bits); + } + filters = g_slist_prepend (filters, filter); + } break; case 7: { @@ -121,3 +166,71 @@ swfdec_filter_parse (SwfdecBits *bits) return filters; } +void +swfdec_filter_skip (SwfdecBits *bits) +{ + guint i, n_filters, filter_id; + + g_return_if_fail (bits != NULL); + + n_filters = swfdec_bits_get_u8 (bits); + for (i = 0; i < n_filters && swfdec_bits_left (bits); i++) { + filter_id = swfdec_bits_get_u8 (bits); + switch (filter_id) { + case 0: + swfdec_bits_skip_bytes (bits, 16); + break; + case 1: + swfdec_bits_skip_bytes (bits, 9); + break; + case 2: + swfdec_bits_skip_bytes (bits, 15); + break; + case 3: + swfdec_bits_skip_bytes (bits, 27); + break; + case 4: + { + guint n; + n = swfdec_bits_get_u8 (bits); + swfdec_bits_skip_bytes (bits, n * 5 + 19); + } + break; + case 5: + { + guint x, y; + x = swfdec_bits_get_u8 (bits); + y = swfdec_bits_get_u8 (bits); + swfdec_bits_skip_bytes (bits, (x + y) * 4 + 13); + } + break; + case 6: + swfdec_bits_skip_bytes (bits, 20 * 4); + break; + case 7: + { + guint n; + n = swfdec_bits_get_u8 (bits); + swfdec_bits_skip_bytes (bits, n * 5 + 19); + } + break; + default: + SWFDEC_ERROR ("unknown filter id %u", filter_id); + break; + } + } +} + +void +swfdec_filter_get_rectangle (SwfdecFilter *filter, SwfdecRectangle *dest, + double xscale, double yscale, const SwfdecRectangle *source) +{ + SwfdecFilterClass *klass; + + g_return_if_fail (SWFDEC_IS_FILTER (filter)); + g_return_if_fail (dest != NULL); + g_return_if_fail (source != NULL); + + klass = SWFDEC_FILTER_GET_CLASS (filter); + klass->get_rectangle (filter, dest, xscale, yscale, source); +} diff --git a/swfdec/swfdec_filter.h b/swfdec/swfdec_filter.h index b15b9f75..ad644ddc 100644 --- a/swfdec/swfdec_filter.h +++ b/swfdec/swfdec_filter.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -21,7 +21,7 @@ #define _SWFDEC_FILTER_H_ #include <swfdec/swfdec.h> -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_bits.h> #include <swfdec/swfdec_types.h> @@ -37,23 +37,44 @@ typedef struct _SwfdecFilterClass SwfdecFilterClass; #define SWFDEC_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_FILTER, SwfdecFilterClass)) struct _SwfdecFilter { - SwfdecAsObject object; + SwfdecAsRelay relay; }; struct _SwfdecFilterClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; - SwfdecFilter * (* clone) (SwfdecFilter * filter); + void (* clone) (SwfdecFilter * dest, + SwfdecFilter * source); + void (* get_rectangle) (SwfdecFilter * filter, + SwfdecRectangle * dest, + double xscale, + double yscale, + const SwfdecRectangle *source); cairo_pattern_t * (* apply) (SwfdecFilter * filter, - cairo_pattern_t * pattern); + cairo_pattern_t * pattern, + double xscale, + double yscale, + const SwfdecRectangle *rect); }; GType swfdec_filter_get_type (void); -cairo_pattern_t * swfdec_filter_apply (SwfdecFilter * filter, - cairo_pattern_t * pattern); -GSList * swfdec_filter_parse (SwfdecBits * bits); +SwfdecFilter * swfdec_filter_clone (SwfdecFilter * filter); +cairo_pattern_t * swfdec_filter_apply (SwfdecFilter * filter, + cairo_pattern_t * pattern, + double xscale, + double yscale, + const SwfdecRectangle *source); +void swfdec_filter_get_rectangle (SwfdecFilter * filter, + SwfdecRectangle * dest, + double xscale, + double yscale, + const SwfdecRectangle *source); +GSList * swfdec_filter_parse (SwfdecPlayer * player, + SwfdecBits * bits); +void swfdec_filter_skip (SwfdecBits * bits); + G_END_DECLS #endif diff --git a/swfdec/swfdec_filter_as.c b/swfdec/swfdec_filter_as.c index 0f002114..2d61d54f 100644 --- a/swfdec/swfdec_filter_as.c +++ b/swfdec/swfdec_filter_as.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2006-2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2006-2008 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 @@ -22,26 +22,21 @@ #endif #include "swfdec_filter.h" + #include "swfdec_as_internal.h" +#include "swfdec_as_native_function.h" #include "swfdec_debug.h" -SWFDEC_AS_NATIVE (1112, 1, swfdec_filter_clone) +SWFDEC_AS_NATIVE (1112, 1, swfdec_filter_do_clone) void -swfdec_filter_clone (SwfdecAsContext *cx, SwfdecAsObject *object, +swfdec_filter_do_clone (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecFilter *filter; - SwfdecFilterClass *klass; - - if (!SWFDEC_IS_FILTER (object)) - return; - filter = SWFDEC_FILTER (object); - klass = SWFDEC_FILTER_GET_CLASS (filter); - g_assert (klass->clone); + SWFDEC_AS_CHECK (SWFDEC_TYPE_FILTER, &filter, ""); - filter = klass->clone (filter); - if (filter) - SWFDEC_AS_VALUE_SET_OBJECT (retval, SWFDEC_AS_OBJECT (filter)); + filter = swfdec_filter_clone (filter); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (filter))); } diff --git a/swfdec/swfdec_gc_object.c b/swfdec/swfdec_gc_object.c index db14c018..6e6451b7 100644 --- a/swfdec/swfdec_gc_object.c +++ b/swfdec/swfdec_gc_object.c @@ -108,7 +108,8 @@ swfdec_gc_object_constructor (GType type, guint n_construct_properties, context = object->context; swfdec_as_context_use_mem (context, swfdec_gc_object_get_size (object)); - g_hash_table_insert (context->objects, object, object); + object->next = context->gc_objects; + context->gc_objects = object; return gobject; } @@ -174,7 +175,7 @@ swfdec_gc_object_init (SwfdecGcObject *object) * save you from having to cast it manually. For language bindings, * please treat this argument as having the #SwfdecGcObject type. * - * Gets the cotext that garbage-collects this object. + * Gets the context that garbage-collects this object. * * Returns: the context this object belongs to **/ diff --git a/swfdec/swfdec_gc_object.h b/swfdec/swfdec_gc_object.h index 85531651..c18e3588 100644 --- a/swfdec/swfdec_gc_object.h +++ b/swfdec/swfdec_gc_object.h @@ -39,6 +39,7 @@ struct _SwfdecGcObject { GObject object; SwfdecAsContext * context; /* context the object belongs to - NB: object holds no reference */ /*< private >*/ + SwfdecGcObject * next; /* next GcObject in list of context's object */ guint8 flags; /* GC flags */ gsize size; /* size reserved in GC */ }; diff --git a/swfdec/swfdec_graphic_movie.c b/swfdec/swfdec_graphic_movie.c index 7fa7842b..f5e31378 100644 --- a/swfdec/swfdec_graphic_movie.c +++ b/swfdec/swfdec_graphic_movie.c @@ -56,7 +56,8 @@ swfdec_graphic_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matri SwfdecRect rect; swfdec_rect_transform (&rect, &movie->graphic->extents, matrix); - swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); } static SwfdecMovie * diff --git a/swfdec/swfdec_image.c b/swfdec/swfdec_image.c index 328d19b7..375de6a7 100644 --- a/swfdec/swfdec_image.c +++ b/swfdec/swfdec_image.c @@ -663,6 +663,7 @@ swfdec_image_create_surface_transformed (SwfdecImage *image, SwfdecRenderer *ren SwfdecColorTransform mask; SwfdecCachedImage *cached; cairo_surface_t *surface, *source; + SwfdecRectangle area; g_return_val_if_fail (SWFDEC_IS_IMAGE (image), NULL); g_return_val_if_fail (renderer == NULL || SWFDEC_IS_RENDERER (renderer), NULL); @@ -694,7 +695,10 @@ swfdec_image_create_surface_transformed (SwfdecImage *image, SwfdecRenderer *ren } } - surface = swfdec_renderer_transform (renderer, source, trans); + area.x = area.y = 0; + area.width = image->width; + area.height = image->height; + surface = swfdec_renderer_transform (renderer, source, trans, &area); cairo_surface_destroy (source); if (renderer) { surface = swfdec_renderer_create_similar (renderer, surface); diff --git a/swfdec/swfdec_initialize.as b/swfdec/swfdec_initialize.as index 1c44a98a..88ad850d 100644 --- a/swfdec/swfdec_initialize.as +++ b/swfdec/swfdec_initialize.as @@ -18,6 +18,16 @@ * Boston, MA 02110-1301 USA */ +/*** IMPORTANT NOTE ***/ + +/* Function definitions like this: + * function foo () {}; + * does not work, because those are set on the original target, and the target + * is a MovieClip, which doesn't exist when init scripts are run. + * Use this instead: + * foo = function () {}; + */ + /*** GENERAL ***/ ASSetPropFlags = ASnative (1, 0); @@ -37,10 +47,10 @@ ASSetPropFlags (Object, "addProperty", 0, 128); /*** Error ***/ -function Error (msg) { +Error = function (msg) { if (typeof (msg) != "undefined") this.message = msg; -} +}; Error.prototype.name = Error.prototype.message = "Error"; Error.prototype.toString = function () { return this.message; @@ -48,7 +58,7 @@ Error.prototype.toString = function () { /*** ASBROADCASTER ***/ -function AsBroadcaster () { }; +AsBroadcaster = function () { }; AsBroadcaster.broadcastMessage = ASnative(101, 12); @@ -198,7 +208,7 @@ XML.prototype.addRequestHeader = function (key, value) { /*** LOADVARS ***/ -function LoadVars () { }; +LoadVars = function () { }; LoadVars.prototype.contentType = "application/x-www-form-urlencoded"; @@ -256,7 +266,7 @@ ASSetPropFlags(LoadVars.prototype, null, 131); /*** Sound ***/ -Sound = ASconstructor (500, 16); +Sound = ASconstructor (500, 17); ASSetNative (Sound.prototype, 500, "getPan,getTransform,getVolume,setPan,setTransform,setVolume,stop,attachSound,start,6getDuration,6setDuration,6getPosition,6setPosition,6loadSound,6getBytesLoaded,6getBytesTotal,9areSoundsInaccessible"); ASSetNativeAccessor (Sound.prototype, 500, "checkPolicyFile", 18); ASSetPropFlags (Sound.prototype, null, 7); @@ -356,6 +366,7 @@ ASSetNative (TextSnapshot.prototype, 1067, "6getCount,6setSelected,6getSelected, /* MovieClip */ +MovieClip = function () {}; MovieClip.prototype.useHandCursor = true; MovieClip.prototype.enabled = true; @@ -625,6 +636,7 @@ ASSetPropFlags (TextField, "StyleSheet", 1027); /* Video */ +Video = function () {}; ASSetNative(Video.prototype, 667, "6attachVideo,6clear", 1); ASSetPropFlags(Video.prototype, null, 3); @@ -636,8 +648,7 @@ ASSetPropFlags (Accessibility, null, 6); /* Camera */ -function Camera () { -} +Camera = function () {}; Camera.get = function (index) { var get_func = ASnative (2102, 200); @@ -649,7 +660,7 @@ ASSetPropFlags (Camera.prototype, null, 3); /* ContextMenu */ -function ContextMenu (callback) { +ContextMenu = function (callback) { this.onSelect = callback; this.customItems = new Array (); this.builtInItems = { @@ -662,7 +673,7 @@ function ContextMenu (callback) { save: true, zoom: true }; -} +}; ContextMenu.prototype.copy = function () { var o = new ContextMenu (); @@ -696,7 +707,7 @@ ASSetPropFlags (ContextMenu.prototype, null, 1027); /* ContextMenuItem */ -function ContextMenuItem (caption, callback, separatorBefore, enabled, visible) +ContextMenuItem = function (caption, callback, separatorBefore, enabled, visible) { this.caption = caption; this.onSelect = callback; @@ -715,7 +726,7 @@ function ContextMenuItem (caption, callback, separatorBefore, enabled, visible) } else { this.visible = visible; } -} +}; ContextMenuItem.prototype.copy = function () { var o = new ContextMenuItem (); @@ -757,16 +768,14 @@ ASSetPropFlags (flash.net.FileReferenceList.prototype, null, 3); /* LocalConnection */ -function LocalConnection () { -} +LocalConnection = function () {}; ASSetNative (LocalConnection.prototype, 2200, "6connect,6send,6close,6domain"); ASSetPropFlags (LocalConnection.prototype, null, 3); /* Microphone */ -function Microphone () { -} +Microphone = function () {}; Microphone.get = function (index) { var get_func = ASnative (2104, 200); @@ -802,8 +811,7 @@ textRenderer = flash.text.TextRenderer; // awesome /* XMLSocket */ -function XMLSocket () { -} +XMLSocket = function () {}; XMLSocket.prototype.onData = function (src) { this.onXML (new XML (src)); @@ -1452,7 +1460,7 @@ ASSetPropFlags (flash.external.ExternalInterface, null, 4103); /* SharedObject */ -function SharedObject () { +SharedObject = function () { }; SharedObject.deleteAll = function () { @@ -1481,17 +1489,16 @@ ASSetPropFlags (SharedObject.prototype, null, 3); /* This function added new Error classes in Flash player 7, in Flash player 9 * it seems to be just broken, we just call new Error based on the number of * ,-characters in the given string */ -function AsSetupError (names) { +AsSetupError = function (names) { var count = names.split (",").length; for (var i = 0; i < count; i++) { var tmp = new Error (); } -} +}; /* RemoteLSOUsage */ -function RemoteLSOUsage () { -}; +RemoteLSOUsage = function () {}; RemoteLSOUsage.getURLPageSupport = function () { var o = {}; o["Implement RemoteLSOUsage.getURLPageSupport (static)"] (); diff --git a/swfdec/swfdec_initialize.h b/swfdec/swfdec_initialize.h index b2b7fe54..7537c313 100644 --- a/swfdec/swfdec_initialize.h +++ b/swfdec/swfdec_initialize.h @@ -2,15 +2,15 @@ /* compiled from swfdec_initialize.as */ static const unsigned char swfdec_initialize[] = { - 0x88, 0x51, 0x21, 0x23, 0x02, 0x41, 0x53, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x70, 0x46, 0x6C, + 0x88, 0x5E, 0x21, 0x24, 0x02, 0x41, 0x53, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x70, 0x46, 0x6C, 0x61, 0x67, 0x73, 0x00, 0x41, 0x53, 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x00, 0x41, 0x53, 0x53, 0x65, 0x74, 0x4E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x00, 0x41, 0x53, 0x53, 0x65, 0x74, 0x4E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6F, 0x72, 0x00, 0x66, 0x6C, 0x61, 0x73, 0x68, 0x00, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6C, 0x61, 0x73, 0x73, 0x00, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6F, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x00, 0x6D, 0x73, 0x67, 0x00, 0x75, 0x6E, 0x64, 0x65, 0x66, 0x69, 0x6E, 0x65, - 0x64, 0x00, 0x74, 0x68, 0x69, 0x73, 0x00, 0x6D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x00, 0x45, - 0x72, 0x72, 0x6F, 0x72, 0x00, 0x70, 0x72, 0x6F, 0x74, 0x6F, 0x74, 0x79, 0x70, 0x65, 0x00, 0x6E, + 0x72, 0x74, 0x79, 0x00, 0x45, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x6D, 0x73, 0x67, 0x00, 0x75, 0x6E, + 0x64, 0x65, 0x66, 0x69, 0x6E, 0x65, 0x64, 0x00, 0x74, 0x68, 0x69, 0x73, 0x00, 0x6D, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x00, 0x70, 0x72, 0x6F, 0x74, 0x6F, 0x74, 0x79, 0x70, 0x65, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x74, 0x6F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x00, 0x41, 0x73, 0x42, 0x72, 0x6F, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x00, 0x62, 0x72, 0x6F, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4D, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x00, 0x61, 0x64, 0x64, 0x4C, @@ -268,18 +268,18 @@ static const unsigned char swfdec_initialize[] = { 0x61, 0x6D, 0x65, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6C, 0x2C, 0x36, 0x73, 0x65, 0x74, 0x4D, 0x6F, 0x74, 0x69, 0x6F, 0x6E, 0x4C, 0x65, 0x76, 0x65, 0x6C, 0x2C, 0x36, 0x73, 0x65, 0x74, 0x4C, 0x6F, 0x6F, 0x70, 0x62, 0x61, 0x63, 0x6B, 0x2C, 0x36, 0x73, 0x65, 0x74, 0x43, 0x75, 0x72, - 0x73, 0x6F, 0x72, 0x00, 0x6F, 0x6E, 0x53, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x00, 0x63, 0x61, 0x6C, - 0x6C, 0x62, 0x61, 0x63, 0x6B, 0x00, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x49, 0x74, 0x65, 0x6D, - 0x73, 0x00, 0x62, 0x75, 0x69, 0x6C, 0x74, 0x49, 0x6E, 0x49, 0x74, 0x65, 0x6D, 0x73, 0x00, 0x66, - 0x6F, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5F, 0x62, 0x61, 0x63, 0x6B, 0x00, 0x6C, 0x6F, 0x6F, 0x70, - 0x00, 0x70, 0x6C, 0x61, 0x79, 0x00, 0x70, 0x72, 0x69, 0x6E, 0x74, 0x00, 0x71, 0x75, 0x61, 0x6C, - 0x69, 0x74, 0x79, 0x00, 0x72, 0x65, 0x77, 0x69, 0x6E, 0x64, 0x00, 0x73, 0x61, 0x76, 0x65, 0x00, - 0x7A, 0x6F, 0x6F, 0x6D, 0x00, 0x43, 0x6F, 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, 0x65, 0x6E, 0x75, + 0x73, 0x6F, 0x72, 0x00, 0x43, 0x6F, 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, 0x65, 0x6E, 0x75, 0x00, + 0x6F, 0x6E, 0x53, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x00, 0x63, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, + 0x6B, 0x00, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x49, 0x74, 0x65, 0x6D, 0x73, 0x00, 0x62, 0x75, + 0x69, 0x6C, 0x74, 0x49, 0x6E, 0x49, 0x74, 0x65, 0x6D, 0x73, 0x00, 0x66, 0x6F, 0x72, 0x77, 0x61, + 0x72, 0x64, 0x5F, 0x62, 0x61, 0x63, 0x6B, 0x00, 0x6C, 0x6F, 0x6F, 0x70, 0x00, 0x70, 0x6C, 0x61, + 0x79, 0x00, 0x70, 0x72, 0x69, 0x6E, 0x74, 0x00, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x00, + 0x72, 0x65, 0x77, 0x69, 0x6E, 0x64, 0x00, 0x73, 0x61, 0x76, 0x65, 0x00, 0x7A, 0x6F, 0x6F, 0x6D, 0x00, 0x63, 0x6F, 0x70, 0x79, 0x00, 0x68, 0x69, 0x64, 0x65, 0x42, 0x75, 0x69, 0x6C, 0x74, 0x49, - 0x6E, 0x49, 0x74, 0x65, 0x6D, 0x73, 0x00, 0x63, 0x61, 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x73, + 0x6E, 0x49, 0x74, 0x65, 0x6D, 0x73, 0x00, 0x43, 0x6F, 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, 0x65, + 0x6E, 0x75, 0x49, 0x74, 0x65, 0x6D, 0x00, 0x63, 0x61, 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6F, 0x72, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, 0x00, 0x76, - 0x69, 0x73, 0x69, 0x62, 0x6C, 0x65, 0x00, 0x43, 0x6F, 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, 0x65, - 0x6E, 0x75, 0x49, 0x74, 0x65, 0x6D, 0x00, 0x6E, 0x65, 0x74, 0x00, 0x46, 0x69, 0x6C, 0x65, 0x52, + 0x69, 0x73, 0x69, 0x62, 0x6C, 0x65, 0x00, 0x6E, 0x65, 0x74, 0x00, 0x46, 0x69, 0x6C, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6E, 0x63, 0x65, 0x00, 0x63, 0x00, 0x38, 0x62, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x2C, 0x38, 0x75, 0x70, 0x6C, 0x6F, 0x61, 0x64, 0x2C, 0x38, 0x64, 0x6F, 0x77, 0x6E, 0x6C, 0x6F, 0x61, 0x64, 0x2C, 0x38, 0x63, 0x61, 0x6E, 0x63, 0x65, 0x6C, 0x00, 0x46, 0x69, 0x6C, @@ -473,1879 +473,1878 @@ static const unsigned char swfdec_initialize[] = { 0x61, 0x67, 0x65, 0x00, 0x36, 0x63, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x2C, 0x36, 0x73, 0x65, 0x6E, 0x64, 0x2C, 0x36, 0x66, 0x6C, 0x75, 0x73, 0x68, 0x2C, 0x36, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x2C, 0x36, 0x67, 0x65, 0x74, 0x53, 0x69, 0x7A, 0x65, 0x2C, 0x36, 0x73, 0x65, 0x74, 0x46, 0x70, - 0x73, 0x2C, 0x36, 0x63, 0x6C, 0x65, 0x61, 0x72, 0x00, 0x73, 0x70, 0x6C, 0x69, 0x74, 0x00, 0x63, - 0x6F, 0x75, 0x6E, 0x74, 0x00, 0x52, 0x65, 0x6D, 0x6F, 0x74, 0x65, 0x4C, 0x53, 0x4F, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x00, 0x67, 0x65, 0x74, 0x55, 0x52, 0x4C, 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, - 0x70, 0x70, 0x6F, 0x72, 0x74, 0x00, 0x49, 0x6D, 0x70, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x20, - 0x52, 0x65, 0x6D, 0x6F, 0x74, 0x65, 0x4C, 0x53, 0x4F, 0x55, 0x73, 0x61, 0x67, 0x65, 0x2E, 0x67, - 0x65, 0x74, 0x55, 0x52, 0x4C, 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, - 0x20, 0x28, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x29, 0x00, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, - 0x00, 0x67, 0x65, 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x00, 0x38, 0x73, 0x63, 0x61, 0x6C, 0x65, - 0x39, 0x47, 0x72, 0x69, 0x64, 0x2C, 0x38, 0x66, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x73, 0x2C, 0x38, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x41, 0x73, 0x42, 0x69, 0x74, 0x6D, 0x61, 0x70, 0x2C, 0x38, 0x62, - 0x6C, 0x65, 0x6E, 0x64, 0x4D, 0x6F, 0x64, 0x65, 0x00, 0x66, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x73, - 0x00, 0x42, 0x69, 0x74, 0x6D, 0x61, 0x70, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x63, - 0x6C, 0x6F, 0x6E, 0x65, 0x00, 0x42, 0x65, 0x76, 0x65, 0x6C, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, - 0x00, 0x38, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, - 0x65, 0x2C, 0x38, 0x68, 0x69, 0x67, 0x68, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6F, 0x6C, 0x6F, - 0x72, 0x2C, 0x38, 0x68, 0x69, 0x67, 0x68, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6C, 0x70, 0x68, - 0x61, 0x2C, 0x38, 0x73, 0x68, 0x61, 0x64, 0x6F, 0x77, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, - 0x73, 0x68, 0x61, 0x64, 0x6F, 0x77, 0x41, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, 0x71, 0x75, 0x61, - 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x2C, 0x38, - 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, - 0x38, 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, 0x38, 0x74, 0x79, 0x70, 0x65, 0x00, 0x42, 0x6C, 0x75, - 0x72, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, - 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x00, 0x43, - 0x6F, 0x6C, 0x6F, 0x72, 0x4D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, - 0x00, 0x38, 0x6D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x43, 0x6F, 0x6E, 0x76, 0x6F, 0x6C, 0x75, - 0x74, 0x69, 0x6F, 0x6E, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x6D, 0x61, 0x74, 0x72, - 0x69, 0x78, 0x58, 0x2C, 0x38, 0x6D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x59, 0x2C, 0x38, 0x6D, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x2C, 0x38, 0x64, 0x69, 0x76, 0x69, 0x73, 0x6F, 0x72, 0x2C, 0x38, 0x62, - 0x69, 0x61, 0x73, 0x2C, 0x38, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x41, 0x6C, 0x70, - 0x68, 0x61, 0x2C, 0x38, 0x63, 0x6C, 0x61, 0x6D, 0x70, 0x2C, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, - 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x00, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x63, 0x65, - 0x6D, 0x65, 0x6E, 0x74, 0x4D, 0x61, 0x70, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x6D, - 0x61, 0x70, 0x42, 0x69, 0x74, 0x6D, 0x61, 0x70, 0x2C, 0x38, 0x6D, 0x61, 0x70, 0x50, 0x6F, 0x69, - 0x6E, 0x74, 0x2C, 0x38, 0x63, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x58, 0x2C, 0x38, - 0x63, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x59, 0x2C, 0x38, 0x73, 0x63, 0x61, 0x6C, - 0x65, 0x58, 0x2C, 0x38, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x59, 0x2C, 0x38, 0x6D, 0x6F, 0x64, 0x65, - 0x2C, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x00, 0x44, - 0x72, 0x6F, 0x70, 0x53, 0x68, 0x61, 0x64, 0x6F, 0x77, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, - 0x38, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, 0x65, - 0x2C, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, - 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x2C, 0x38, - 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, - 0x38, 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, 0x6E, 0x67, 0x74, 0x68, - 0x2C, 0x38, 0x68, 0x69, 0x64, 0x65, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x47, 0x6C, 0x6F, - 0x77, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, - 0x61, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, - 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, - 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, 0x38, 0x73, - 0x74, 0x72, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x00, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6E, 0x74, - 0x42, 0x65, 0x76, 0x65, 0x6C, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x64, 0x69, 0x73, - 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, 0x65, 0x2C, 0x38, 0x63, 0x6F, - 0x6C, 0x6F, 0x72, 0x73, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x73, 0x2C, 0x38, 0x72, 0x61, - 0x74, 0x69, 0x6F, 0x73, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, 0x75, - 0x72, 0x59, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x73, 0x74, 0x72, - 0x65, 0x6E, 0x67, 0x74, 0x68, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, - 0x38, 0x74, 0x79, 0x70, 0x65, 0x00, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6E, 0x74, 0x47, 0x6C, - 0x6F, 0x77, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x73, 0x65, 0x74, 0x49, 0x6E, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6C, 0x00, 0x63, 0x6C, 0x65, 0x61, 0x72, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6C, 0x00, 0x73, 0x65, 0x74, 0x54, 0x69, 0x6D, 0x65, 0x6F, 0x75, 0x74, 0x00, 0x63, 0x6C, - 0x65, 0x61, 0x72, 0x54, 0x69, 0x6D, 0x65, 0x6F, 0x75, 0x74, 0x00, 0x73, 0x68, 0x6F, 0x77, 0x52, - 0x65, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, 0x73, 0x00, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x00, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x45, 0x76, - 0x65, 0x6E, 0x74, 0x00, 0x9B, 0x0E, 0x00, 0x45, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x01, 0x00, 0x6D, - 0x73, 0x67, 0x00, 0x23, 0x00, 0x96, 0x02, 0x00, 0x08, 0x08, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, - 0x09, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x04, 0x00, 0x08, 0x0B, 0x08, 0x08, 0x1C, 0x4F, 0x9B, 0x12, 0x00, 0x41, 0x73, 0x42, 0x72, 0x6F, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x0D, 0x00, - 0x4C, 0x6F, 0x61, 0x64, 0x56, 0x61, 0x72, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x0B, 0x00, - 0x43, 0x61, 0x6D, 0x65, 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x19, 0x00, 0x43, 0x6F, - 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, 0x65, 0x6E, 0x75, 0x00, 0x01, 0x00, 0x63, 0x61, 0x6C, 0x6C, - 0x62, 0x61, 0x63, 0x6B, 0x00, 0x5E, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, - 0x08, 0xFD, 0x08, 0xFE, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x09, 0x00, 0x08, - 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x30, 0x00, 0x09, 0x00, 0x01, 0x09, 0x01, 0x01, 0x05, 0x01, 0x09, 0x02, 0x01, 0x05, 0x01, - 0x09, 0x03, 0x01, 0x05, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, 0x09, 0x05, 0x01, 0x05, 0x01, 0x09, - 0x06, 0x01, 0x05, 0x01, 0x09, 0x07, 0x01, 0x05, 0x01, 0x09, 0x08, 0x01, 0x05, 0x01, 0x07, 0x08, - 0x00, 0x00, 0x00, 0x43, 0x4F, 0x9B, 0x45, 0x00, 0x43, 0x6F, 0x6E, 0x74, 0x65, 0x78, 0x74, 0x4D, - 0x65, 0x6E, 0x75, 0x49, 0x74, 0x65, 0x6D, 0x00, 0x05, 0x00, 0x63, 0x61, 0x70, 0x74, 0x69, 0x6F, - 0x6E, 0x00, 0x63, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0x00, 0x73, 0x65, 0x70, 0x61, 0x72, - 0x61, 0x74, 0x6F, 0x72, 0x42, 0x65, 0x66, 0x6F, 0x72, 0x65, 0x00, 0x65, 0x6E, 0x61, 0x62, 0x6C, - 0x65, 0x64, 0x00, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6C, 0x65, 0x00, 0xBE, 0x00, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x0C, 0x01, 0x09, 0x0C, 0x01, 0x1C, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xFD, 0x08, 0xFE, 0x1C, 0x4F, 0x96, 0x03, 0x00, - 0x09, 0x0D, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x03, 0x49, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x0D, 0x01, 0x09, 0x0D, 0x01, 0x1C, 0x4F, 0x99, - 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0D, 0x01, - 0x05, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9F, 0x1C, 0x96, 0x01, 0x00, 0x03, 0x49, 0x9D, 0x02, - 0x00, 0x14, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x9F, 0x08, 0x9F, - 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, - 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x03, - 0x49, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, - 0x0E, 0x01, 0x09, 0x0E, 0x01, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0E, 0x01, 0x05, 0x01, 0x4F, 0x9B, 0x14, 0x00, 0x4C, 0x6F, - 0x63, 0x61, 0x6C, 0x43, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9B, 0x0F, 0x00, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x70, 0x68, 0x6F, 0x6E, 0x65, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x9B, 0x0E, 0x00, 0x58, 0x4D, 0x4C, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x11, 0x00, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4F, 0x62, - 0x6A, 0x65, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9B, 0x17, 0x00, 0x41, 0x73, 0x53, 0x65, - 0x74, 0x75, 0x70, 0x45, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x73, - 0x00, 0x5A, 0x00, 0x96, 0x0D, 0x00, 0x09, 0x01, 0x02, 0x09, 0xAE, 0x01, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0xCE, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x00, 0x02, 0x52, 0x96, 0x02, 0x00, 0x08, 0x19, - 0x4E, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, - 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x01, 0x02, 0x1C, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x1C, - 0x00, 0x96, 0x09, 0x00, 0x08, 0xCD, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0C, 0x40, 0x3C, 0x96, - 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0xD0, 0xFF, 0x9B, 0x13, 0x00, - 0x52, 0x65, 0x6D, 0x6F, 0x74, 0x65, 0x4C, 0x53, 0x4F, 0x55, 0x73, 0x61, 0x67, 0x65, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x96, 0x13, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x13, 0x00, 0x08, 0x02, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, - 0x01, 0x3D, 0x1D, 0x96, 0x13, 0x00, 0x08, 0x03, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x07, 0x00, 0x08, 0x04, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x05, 0x1C, 0x96, 0x13, 0x00, - 0x08, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x05, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0E, 0x00, - 0x07, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x08, 0x05, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0C, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0E, 0x08, 0x0C, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0B, 0x08, 0x0C, 0x87, 0x01, 0x00, 0x00, - 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0C, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x4E, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x10, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x11, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x07, 0x65, + 0x73, 0x2C, 0x36, 0x63, 0x6C, 0x65, 0x61, 0x72, 0x00, 0x41, 0x73, 0x53, 0x65, 0x74, 0x75, 0x70, + 0x45, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x73, 0x70, 0x6C, 0x69, 0x74, 0x00, 0x63, 0x6F, 0x75, 0x6E, + 0x74, 0x00, 0x52, 0x65, 0x6D, 0x6F, 0x74, 0x65, 0x4C, 0x53, 0x4F, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x00, 0x67, 0x65, 0x74, 0x55, 0x52, 0x4C, 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6F, + 0x72, 0x74, 0x00, 0x49, 0x6D, 0x70, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x20, 0x52, 0x65, 0x6D, + 0x6F, 0x74, 0x65, 0x4C, 0x53, 0x4F, 0x55, 0x73, 0x61, 0x67, 0x65, 0x2E, 0x67, 0x65, 0x74, 0x55, + 0x52, 0x4C, 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x20, 0x28, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x29, 0x00, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x00, 0x67, 0x65, + 0x74, 0x44, 0x65, 0x70, 0x74, 0x68, 0x00, 0x38, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x39, 0x47, 0x72, + 0x69, 0x64, 0x2C, 0x38, 0x66, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x73, 0x2C, 0x38, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x41, 0x73, 0x42, 0x69, 0x74, 0x6D, 0x61, 0x70, 0x2C, 0x38, 0x62, 0x6C, 0x65, 0x6E, + 0x64, 0x4D, 0x6F, 0x64, 0x65, 0x00, 0x66, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x73, 0x00, 0x42, 0x69, + 0x74, 0x6D, 0x61, 0x70, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x63, 0x6C, 0x6F, 0x6E, + 0x65, 0x00, 0x42, 0x65, 0x76, 0x65, 0x6C, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x64, + 0x69, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, 0x65, 0x2C, 0x38, + 0x68, 0x69, 0x67, 0x68, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, + 0x68, 0x69, 0x67, 0x68, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x41, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, + 0x73, 0x68, 0x61, 0x64, 0x6F, 0x77, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x73, 0x68, 0x61, + 0x64, 0x6F, 0x77, 0x41, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, + 0x79, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, + 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, + 0x75, 0x72, 0x59, 0x2C, 0x38, 0x74, 0x79, 0x70, 0x65, 0x00, 0x42, 0x6C, 0x75, 0x72, 0x46, 0x69, + 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, 0x75, + 0x72, 0x59, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x00, 0x43, 0x6F, 0x6C, 0x6F, + 0x72, 0x4D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x6D, + 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x43, 0x6F, 0x6E, 0x76, 0x6F, 0x6C, 0x75, 0x74, 0x69, 0x6F, + 0x6E, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x6D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x58, + 0x2C, 0x38, 0x6D, 0x61, 0x74, 0x72, 0x69, 0x78, 0x59, 0x2C, 0x38, 0x6D, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x2C, 0x38, 0x64, 0x69, 0x76, 0x69, 0x73, 0x6F, 0x72, 0x2C, 0x38, 0x62, 0x69, 0x61, 0x73, + 0x2C, 0x38, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x41, 0x6C, 0x70, 0x68, 0x61, 0x2C, + 0x38, 0x63, 0x6C, 0x61, 0x6D, 0x70, 0x2C, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, + 0x6C, 0x70, 0x68, 0x61, 0x00, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x6D, 0x65, 0x6E, + 0x74, 0x4D, 0x61, 0x70, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x6D, 0x61, 0x70, 0x42, + 0x69, 0x74, 0x6D, 0x61, 0x70, 0x2C, 0x38, 0x6D, 0x61, 0x70, 0x50, 0x6F, 0x69, 0x6E, 0x74, 0x2C, + 0x38, 0x63, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x58, 0x2C, 0x38, 0x63, 0x6F, 0x6D, + 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x59, 0x2C, 0x38, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x58, 0x2C, + 0x38, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x59, 0x2C, 0x38, 0x6D, 0x6F, 0x64, 0x65, 0x2C, 0x38, 0x63, + 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x00, 0x44, 0x72, 0x6F, 0x70, + 0x53, 0x68, 0x61, 0x64, 0x6F, 0x77, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x64, 0x69, + 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, 0x65, 0x2C, 0x38, 0x63, + 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x2C, 0x38, 0x71, 0x75, 0x61, + 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, + 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, + 0x75, 0x72, 0x59, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x2C, 0x38, 0x68, + 0x69, 0x64, 0x65, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x47, 0x6C, 0x6F, 0x77, 0x46, 0x69, + 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x2C, 0x38, 0x61, 0x6C, 0x70, + 0x68, 0x61, 0x2C, 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x69, 0x6E, 0x6E, + 0x65, 0x72, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x62, 0x6C, + 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, + 0x6E, 0x67, 0x74, 0x68, 0x00, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6E, 0x74, 0x42, 0x65, 0x76, + 0x65, 0x6C, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x38, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6E, + 0x63, 0x65, 0x2C, 0x38, 0x61, 0x6E, 0x67, 0x6C, 0x65, 0x2C, 0x38, 0x63, 0x6F, 0x6C, 0x6F, 0x72, + 0x73, 0x2C, 0x38, 0x61, 0x6C, 0x70, 0x68, 0x61, 0x73, 0x2C, 0x38, 0x72, 0x61, 0x74, 0x69, 0x6F, + 0x73, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x58, 0x2C, 0x38, 0x62, 0x6C, 0x75, 0x72, 0x59, 0x2C, + 0x38, 0x71, 0x75, 0x61, 0x6C, 0x69, 0x74, 0x79, 0x2C, 0x38, 0x73, 0x74, 0x72, 0x65, 0x6E, 0x67, + 0x74, 0x68, 0x2C, 0x38, 0x6B, 0x6E, 0x6F, 0x63, 0x6B, 0x6F, 0x75, 0x74, 0x2C, 0x38, 0x74, 0x79, + 0x70, 0x65, 0x00, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6E, 0x74, 0x47, 0x6C, 0x6F, 0x77, 0x46, + 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, 0x73, 0x65, 0x74, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6C, 0x00, 0x63, 0x6C, 0x65, 0x61, 0x72, 0x49, 0x6E, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6C, 0x00, + 0x73, 0x65, 0x74, 0x54, 0x69, 0x6D, 0x65, 0x6F, 0x75, 0x74, 0x00, 0x63, 0x6C, 0x65, 0x61, 0x72, + 0x54, 0x69, 0x6D, 0x65, 0x6F, 0x75, 0x74, 0x00, 0x73, 0x68, 0x6F, 0x77, 0x52, 0x65, 0x64, 0x72, + 0x61, 0x77, 0x52, 0x65, 0x67, 0x69, 0x6F, 0x6E, 0x73, 0x00, 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6E, 0x74, + 0x00, 0x96, 0x13, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x13, 0x00, 0x08, 0x02, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, + 0x1D, 0x96, 0x13, 0x00, 0x08, 0x03, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x05, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x06, + 0x07, 0x08, 0x00, 0x00, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, + 0x01, 0x3D, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x05, 0x1C, 0x96, + 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x80, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x08, 0x05, 0x1C, 0x96, 0x07, 0x00, + 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x08, 0x9B, 0x09, + 0x00, 0x00, 0x01, 0x00, 0x6D, 0x73, 0x67, 0x00, 0x23, 0x00, 0x96, 0x02, 0x00, 0x08, 0x09, 0x1C, + 0x44, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x0C, 0x08, 0x09, 0x1C, 0x4F, 0x1D, 0x96, 0x02, + 0x00, 0x08, 0x08, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0E, 0x08, + 0x08, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0C, 0x08, 0x08, 0x87, + 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x08, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0C, 0x4E, 0x3E, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x10, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, + 0x02, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x11, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x07, + 0x65, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x12, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x78, 0x00, + 0x3C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x15, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, + 0x78, 0x00, 0x8A, 0x00, 0x96, 0x04, 0x00, 0x08, 0x17, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x15, 0x4E, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x41, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x17, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x17, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, + 0x49, 0x12, 0x9D, 0x02, 0x00, 0x23, 0x00, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0x18, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x17, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x1A, 0x52, 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, + 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x9C, 0xFF, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, + 0x6F, 0x00, 0x73, 0x00, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x11, 0x07, + 0x0C, 0x00, 0x00, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x12, 0x08, 0x10, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x12, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, + 0x08, 0x14, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x1C, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x96, 0x09, + 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x08, 0x1D, 0x08, 0x1C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x4F, 0x96, 0x8C, 0x00, 0x08, 0x1E, 0x08, 0x1F, 0x07, + 0x12, 0x00, 0x00, 0x00, 0x08, 0x20, 0x07, 0x08, 0x00, 0x00, 0x00, 0x08, 0x21, 0x07, 0x14, 0x00, + 0x00, 0x00, 0x08, 0x22, 0x07, 0x11, 0x00, 0x00, 0x00, 0x08, 0x23, 0x07, 0x2E, 0x00, 0x00, 0x00, + 0x08, 0x24, 0x07, 0x28, 0x00, 0x00, 0x00, 0x08, 0x25, 0x07, 0x23, 0x00, 0x00, 0x00, 0x08, 0x26, + 0x07, 0x0D, 0x00, 0x00, 0x00, 0x08, 0x27, 0x07, 0x1B, 0x00, 0x00, 0x00, 0x08, 0x28, 0x07, 0x24, + 0x00, 0x00, 0x00, 0x08, 0x29, 0x07, 0x2D, 0x00, 0x00, 0x00, 0x08, 0x2A, 0x07, 0x25, 0x00, 0x00, + 0x00, 0x08, 0x2B, 0x07, 0x22, 0x00, 0x00, 0x00, 0x08, 0x2C, 0x07, 0x21, 0x00, 0x00, 0x00, 0x08, + 0x2D, 0x07, 0x27, 0x00, 0x00, 0x00, 0x08, 0x2E, 0x07, 0x10, 0x00, 0x00, 0x00, 0x08, 0x2F, 0x07, + 0x20, 0x00, 0x00, 0x00, 0x08, 0x30, 0x07, 0x09, 0x00, 0x00, 0x00, 0x08, 0x31, 0x07, 0x26, 0x00, + 0x00, 0x00, 0x07, 0x13, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x32, 0x07, 0x20, + 0x03, 0x00, 0x00, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, + 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, + 0x00, 0x00, 0x02, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0x33, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, + 0x00, 0x08, 0x33, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x34, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x12, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x78, 0x00, 0x3C, - 0x00, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x15, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x78, - 0x00, 0x8A, 0x00, 0x96, 0x04, 0x00, 0x08, 0x17, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x15, - 0x4E, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x41, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x17, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x17, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x49, - 0x12, 0x9D, 0x02, 0x00, 0x23, 0x00, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x18, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x17, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x1A, 0x52, 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, - 0x50, 0x1D, 0x99, 0x02, 0x00, 0x9C, 0xFF, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x6F, - 0x00, 0x73, 0x00, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x11, 0x07, 0x0C, - 0x00, 0x00, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x12, 0x08, 0x10, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x12, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, - 0x14, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, - 0x1C, 0x96, 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x96, 0x09, 0x00, - 0x07, 0x83, 0x00, 0x00, 0x00, 0x08, 0x1D, 0x08, 0x1C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x4F, 0x96, 0x8C, 0x00, 0x08, 0x1E, 0x08, 0x1F, 0x07, 0x12, - 0x00, 0x00, 0x00, 0x08, 0x20, 0x07, 0x08, 0x00, 0x00, 0x00, 0x08, 0x21, 0x07, 0x14, 0x00, 0x00, - 0x00, 0x08, 0x22, 0x07, 0x11, 0x00, 0x00, 0x00, 0x08, 0x23, 0x07, 0x2E, 0x00, 0x00, 0x00, 0x08, - 0x24, 0x07, 0x28, 0x00, 0x00, 0x00, 0x08, 0x25, 0x07, 0x23, 0x00, 0x00, 0x00, 0x08, 0x26, 0x07, - 0x0D, 0x00, 0x00, 0x00, 0x08, 0x27, 0x07, 0x1B, 0x00, 0x00, 0x00, 0x08, 0x28, 0x07, 0x24, 0x00, - 0x00, 0x00, 0x08, 0x29, 0x07, 0x2D, 0x00, 0x00, 0x00, 0x08, 0x2A, 0x07, 0x25, 0x00, 0x00, 0x00, - 0x08, 0x2B, 0x07, 0x22, 0x00, 0x00, 0x00, 0x08, 0x2C, 0x07, 0x21, 0x00, 0x00, 0x00, 0x08, 0x2D, - 0x07, 0x27, 0x00, 0x00, 0x00, 0x08, 0x2E, 0x07, 0x10, 0x00, 0x00, 0x00, 0x08, 0x2F, 0x07, 0x20, - 0x00, 0x00, 0x00, 0x08, 0x30, 0x07, 0x09, 0x00, 0x00, 0x00, 0x08, 0x31, 0x07, 0x26, 0x00, 0x00, - 0x00, 0x07, 0x13, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x32, 0x07, 0x20, 0x03, - 0x00, 0x00, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, - 0x17, 0x96, 0x02, 0x00, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, - 0x00, 0x02, 0x08, 0x1E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, - 0x17, 0x96, 0x07, 0x00, 0x08, 0x33, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, - 0x08, 0x33, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x34, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x33, - 0x1C, 0x96, 0x13, 0x00, 0x08, 0x35, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x33, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, - 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x33, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0x36, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x0E, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x37, 0x07, 0x9A, 0x02, 0x00, 0x00, 0x08, 0x36, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x64, - 0x00, 0x00, 0x00, 0x08, 0x38, 0x07, 0x9A, 0x02, 0x00, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x39, 0x07, 0xC8, - 0x00, 0x00, 0x00, 0x07, 0x34, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, - 0x1D, 0x96, 0x09, 0x00, 0x08, 0x3B, 0x07, 0x34, 0x08, 0x00, 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, - 0x96, 0x12, 0x00, 0x02, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, 0x34, 0x08, 0x00, 0x00, 0x07, 0x02, - 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x09, 0x00, 0x08, 0x3C, 0x07, 0x03, 0x00, 0x00, 0x00, - 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, - 0x96, 0x02, 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, - 0x3D, 0x08, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, 0x05, 0x00, 0x00, 0x00, 0x07, 0x34, 0x08, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x09, 0x00, 0x08, 0x3F, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x07, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x39, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x41, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x42, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x40, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x43, 0x9B, 0x0A, 0x00, 0x00, 0x01, - 0x00, 0x66, 0x6C, 0x61, 0x67, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x44, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x45, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x66, 0x6C, - 0x61, 0x67, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, - 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x46, 0x52, 0x17, 0x4F, 0x96, 0x09, 0x00, 0x08, 0x47, 0x07, 0x35, 0x08, 0x00, 0x00, 0x08, 0x40, + 0x33, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x35, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x05, 0x00, 0x00, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x33, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, + 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x33, 0x1C, 0x96, 0x07, + 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0x36, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x0E, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x37, 0x07, 0x9A, 0x02, 0x00, 0x00, 0x08, 0x36, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, + 0x64, 0x00, 0x00, 0x00, 0x08, 0x38, 0x07, 0x9A, 0x02, 0x00, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x07, + 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x39, 0x07, + 0xC8, 0x00, 0x00, 0x00, 0x07, 0x34, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, + 0x3D, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x3B, 0x07, 0x34, 0x08, 0x00, 0x00, 0x08, 0x39, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, + 0x17, 0x96, 0x12, 0x00, 0x02, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, 0x34, 0x08, 0x00, 0x00, 0x07, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x09, 0x00, 0x08, 0x3C, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, + 0x17, 0x96, 0x02, 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, + 0x08, 0x3D, 0x08, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, 0x05, 0x00, 0x00, 0x00, 0x07, 0x34, + 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x09, 0x00, 0x08, 0x3F, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x39, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x48, 0x07, 0x35, 0x08, - 0x00, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, - 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, - 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, - 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4A, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, - 0x08, 0x4B, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4C, 0x07, 0x03, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4D, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x41, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, + 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x42, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x40, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x43, 0x9B, 0x0A, 0x00, 0x00, + 0x01, 0x00, 0x66, 0x6C, 0x61, 0x67, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x44, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x45, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x66, + 0x6C, 0x61, 0x67, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x46, 0x52, 0x17, 0x4F, 0x96, 0x09, 0x00, 0x08, 0x47, 0x07, 0x35, 0x08, 0x00, 0x00, 0x08, + 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, + 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x48, 0x07, 0x35, + 0x08, 0x00, 0x00, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, + 0x02, 0x08, 0x40, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x49, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, + 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4A, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, + 0x00, 0x08, 0x4B, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4C, 0x07, 0x03, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4D, 0x07, 0x04, 0x00, 0x00, 0x00, + 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4E, 0x07, + 0x05, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, + 0x00, 0x08, 0x0F, 0x07, 0x06, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4F, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x50, 0x07, 0x08, 0x00, 0x00, 0x00, + 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x13, + 0x00, 0x08, 0x51, 0x07, 0x09, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x10, 0x00, 0x08, + 0x0D, 0x08, 0x52, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x49, 0x40, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x53, 0x3A, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x0D, 0x08, 0x51, + 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, + 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, + 0x08, 0x55, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x13, 0x00, 0x08, 0x56, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x57, 0x07, 0x0A, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4E, 0x07, 0x05, + 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x58, 0x07, 0x0B, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, - 0x08, 0x0F, 0x07, 0x06, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x13, 0x00, 0x08, 0x4F, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x49, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x50, 0x07, 0x08, 0x00, 0x00, 0x00, 0x07, - 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x13, 0x00, - 0x08, 0x51, 0x07, 0x09, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x10, 0x00, 0x08, 0x0D, - 0x08, 0x52, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x49, 0x40, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x53, 0x3A, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x0D, 0x08, 0x51, 0x1C, - 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, 0x00, 0x00, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, + 0x08, 0x59, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, + 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, 0x72, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x5C, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, 0x00, 0x4F, 0x96, 0x09, 0x00, 0x05, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, + 0x02, 0x00, 0x3A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, + 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x09, 0x00, 0x05, 0x01, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5E, + 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x5F, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x60, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x61, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x62, 0x9B, 0x0F, + 0x00, 0x00, 0x02, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x21, 0x01, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x44, 0x96, 0x02, 0x00, + 0x08, 0x0A, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x09, 0x00, 0x08, 0x63, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x09, 0x00, + 0x07, 0x83, 0x00, 0x00, 0x00, 0x08, 0x63, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x44, 0x96, 0x02, 0x00, + 0x08, 0x66, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x67, + 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x90, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x64, 0x1C, 0x54, 0x12, 0x9D, 0x02, 0x00, 0x78, 0x00, + 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, + 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x47, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x47, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x62, + 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x47, 0x1D, 0x99, 0x02, 0x00, 0x93, 0xFF, 0x99, 0x02, 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, + 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, + 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, + 0x69, 0x08, 0x6A, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x55, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x2D, + 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x56, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, - 0x55, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x13, 0x00, 0x08, 0x56, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x57, 0x07, 0x0A, 0x00, 0x00, 0x00, 0x07, 0xFD, - 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x58, 0x07, 0x0B, 0x00, - 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, - 0x59, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, + 0x6B, 0x07, 0x03, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, + 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, 0x9B, - 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, 0x72, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, - 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, 0x00, 0x4F, 0x96, 0x09, 0x00, 0x05, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, 0x02, - 0x00, 0x3A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, 0x01, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x09, 0x00, 0x05, 0x01, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5E, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x5F, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x60, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x61, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x51, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x62, 0x9B, 0x0F, 0x00, - 0x00, 0x02, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x21, 0x01, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x44, 0x96, 0x02, 0x00, 0x08, - 0x09, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x09, - 0x00, 0x08, 0x63, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x09, 0x00, 0x07, - 0x83, 0x00, 0x00, 0x00, 0x08, 0x63, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, - 0x66, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, - 0x44, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x90, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x64, 0x1C, 0x54, 0x12, 0x9D, 0x02, 0x00, 0x78, 0x00, 0x96, - 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x47, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x47, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x62, 0x52, - 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x47, 0x1D, 0x99, 0x02, 0x00, 0x93, 0xFF, 0x99, 0x02, 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, - 0x08, 0x69, 0x08, 0x6A, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x55, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, - 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x56, 0x07, 0x02, - 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, - 0x08, 0x6B, 0x07, 0x03, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, - 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, 0x64, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, - 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x19, 0x00, 0x96, 0x09, 0x00, 0x05, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, - 0x02, 0x00, 0x2C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6B, 0x52, 0x17, 0x96, 0x09, 0x00, 0x05, - 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x96, 0x07, 0x00, 0x08, 0x6C, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x46, 0x87, 0x01, 0x00, 0x00, - 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x4F, 0x00, 0x96, 0x04, 0x00, 0x08, 0x13, 0x04, - 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0x6D, 0x3D, 0x96, 0x02, 0x00, 0x08, 0x6E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x6D, - 0x3D, 0x47, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x16, 0x52, 0x17, 0x99, 0x02, 0x00, 0xA3, 0xFF, 0x96, 0x09, 0x00, 0x08, 0x6F, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x70, 0x52, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5E, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x5F, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x60, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x61, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x62, 0x9B, 0x0F, 0x00, - 0x00, 0x02, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x21, 0x01, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x44, 0x96, 0x02, 0x00, 0x08, - 0x09, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x09, - 0x00, 0x08, 0x63, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x09, 0x00, 0x07, - 0x83, 0x00, 0x00, 0x00, 0x08, 0x63, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, - 0x66, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, - 0x44, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x90, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x64, 0x1C, 0x54, 0x12, 0x9D, 0x02, 0x00, 0x78, 0x00, 0x96, - 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x47, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x47, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x62, 0x52, - 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x47, 0x1D, 0x99, 0x02, 0x00, 0x93, 0xFF, 0x99, 0x02, 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, - 0x4F, 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, - 0x13, 0x00, 0x08, 0x71, 0x07, 0x10, 0x00, 0x00, 0x00, 0x07, 0xF4, 0x01, 0x00, 0x00, 0x07, 0x02, - 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x72, 0x07, 0xF4, 0x01, 0x00, - 0x00, 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x12, 0x00, 0x00, 0x00, 0x08, 0x48, - 0x07, 0xF4, 0x01, 0x00, 0x00, 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, - 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, - 0x00, 0x00, 0x02, 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0x73, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x74, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x74, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x75, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0x00, 0x00, - 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x74, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x75, - 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x74, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x75, 0x3A, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x76, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2A, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, - 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x77, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x3B, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x4F, 0x96, 0x0E, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x78, 0x07, 0x3B, 0x08, 0x00, 0x00, - 0x08, 0x73, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, - 0x09, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x08, 0x79, 0x08, 0x73, 0x1C, 0x96, 0x07, 0x00, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x09, - 0x00, 0x08, 0x7A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, - 0x09, 0x00, 0x08, 0x7B, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x7A, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, - 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, - 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x7D, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7E, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x7D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x7F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x00, 0x00, - 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x7D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x1B, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x81, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x82, 0x9B, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, - 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x83, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x84, 0x9B, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, - 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x85, 0x52, - 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x86, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, - 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x87, 0x52, 0x17, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x88, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, - 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x89, 0x52, 0x17, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x8A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, - 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8B, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x8C, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8D, 0x52, 0x17, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x02, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, - 0x00, 0x08, 0x73, 0x1C, 0x96, 0x27, 0x00, 0x08, 0x8E, 0x08, 0x8F, 0x08, 0x8F, 0x08, 0x90, 0x08, - 0x90, 0x08, 0x91, 0x08, 0x91, 0x08, 0x92, 0x08, 0x92, 0x08, 0x93, 0x08, 0x93, 0x08, 0x94, 0x08, - 0x94, 0x08, 0x95, 0x08, 0x95, 0x08, 0x96, 0x08, 0x96, 0x07, 0x08, 0x00, 0x00, 0x00, 0x43, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x09, - 0x00, 0x08, 0x97, 0x07, 0x0D, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, - 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, - 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x98, - 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x27, 0x00, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x99, 0x08, 0x99, 0x1C, 0x4F, 0x96, 0x08, - 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x9A, 0x07, 0xBC, 0x02, 0x00, - 0x00, 0x08, 0x98, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, - 0x98, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x9B, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2B, - 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x0E, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0x9C, 0x07, 0x2B, 0x04, 0x00, 0x00, 0x08, 0x9B, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, - 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, - 0x9E, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x04, 0x00, 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xA0, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x6D, - 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x5B, 0x00, 0x96, 0x09, 0x00, 0x08, 0xA3, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x08, 0xA1, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA2, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, - 0xA3, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA4, 0x49, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, - 0x08, 0xA3, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA5, 0x49, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x05, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x99, 0x02, 0x00, 0x09, 0x00, 0x96, 0x05, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x3E, 0x99, 0x02, 0x00, 0x09, 0x00, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, - 0x00, 0x00, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0xA6, 0x9B, 0x17, 0x00, 0x00, 0x03, 0x00, 0x75, 0x72, 0x6C, 0x00, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x97, 0x00, 0x96, - 0x02, 0x00, 0x08, 0x99, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0x09, 0x49, 0x12, 0x9D, 0x02, 0x00, - 0x08, 0x00, 0x96, 0x04, 0x00, 0x08, 0x99, 0x08, 0x52, 0x1D, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, - 0xA1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0xA0, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x3E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x15, 0x00, 0x96, 0x02, 0x00, 0x08, - 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x99, 0x1C, 0x9A, 0x01, 0x00, 0x02, 0x99, 0x02, 0x00, 0x10, - 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x99, 0x1C, 0x9A, 0x01, 0x00, - 0x01, 0x99, 0x02, 0x00, 0x10, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x99, 0x1C, 0x9A, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xA9, 0x9B, 0x10, 0x00, 0x00, 0x02, 0x00, 0x75, 0x72, - 0x6C, 0x00, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x99, 0x00, 0x96, 0x04, 0x00, 0x08, 0xA7, - 0x08, 0xA1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0xA0, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x20, 0x96, 0x02, 0x00, 0x08, - 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x4A, 0x00, - 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x49, 0x9D, - 0x02, 0x00, 0x1B, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0xC2, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, - 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, - 0x4E, 0x9A, 0x01, 0x00, 0xC1, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0xC0, - 0x8B, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0xAB, 0x9B, 0x10, 0x00, 0x00, 0x02, 0x00, 0x75, 0x72, 0x6C, 0x00, - 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x99, 0x00, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0xA1, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xA0, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x20, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x4A, 0x00, 0x96, 0x02, - 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, - 0x1B, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0x42, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, - 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, - 0x01, 0x00, 0x41, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0x40, 0x8B, 0x01, - 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0xAC, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x20, 0x96, 0x04, 0x00, 0x08, 0x52, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, - 0x4E, 0x9A, 0x01, 0x00, 0x40, 0x8B, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xAD, 0x9B, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0x9B, 0x40, 0x3E, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x08, 0xAD, - 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x08, 0xAE, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, + 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, 0x9B, + 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, 0x64, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x04, 0x00, 0x08, 0x5D, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, + 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x19, 0x00, 0x96, 0x09, 0x00, 0x05, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, 0x02, + 0x00, 0x2C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6B, 0x52, 0x17, 0x96, 0x09, 0x00, 0x05, 0x01, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x96, 0x07, 0x00, 0x08, 0x6C, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, + 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x4F, 0x00, 0x96, 0x04, 0x00, 0x08, 0x13, 0x04, 0x00, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0x6D, 0x3D, 0x96, 0x02, 0x00, 0x08, 0x6E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x6D, 0x3D, + 0x47, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x16, 0x52, 0x17, 0x99, 0x02, 0x00, 0xA3, 0xFF, 0x96, 0x09, 0x00, 0x08, 0x6F, 0x07, 0x01, 0x00, + 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x70, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5E, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x5F, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x60, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x61, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x68, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x62, 0x9B, 0x0F, 0x00, 0x00, + 0x02, 0x00, 0x6B, 0x65, 0x79, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x21, 0x01, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x44, 0x96, 0x02, 0x00, 0x08, 0x0A, + 0x49, 0x12, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x09, 0x00, + 0x08, 0x63, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x83, + 0x00, 0x00, 0x00, 0x08, 0x63, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0x66, + 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x44, + 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x90, 0x00, 0x96, 0x02, 0x00, 0x08, 0x65, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x64, 0x1C, 0x54, 0x12, 0x9D, 0x02, 0x00, 0x78, 0x00, 0x96, 0x07, + 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, + 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x47, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x4B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x65, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x47, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x62, 0x52, 0x17, + 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x47, + 0x1D, 0x99, 0x02, 0x00, 0x93, 0xFF, 0x99, 0x02, 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x65, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x63, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x4F, + 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0x68, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, + 0x00, 0x08, 0x71, 0x07, 0x11, 0x00, 0x00, 0x00, 0x07, 0xF4, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x72, 0x07, 0xF4, 0x01, 0x00, 0x00, + 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x12, 0x00, 0x00, 0x00, 0x08, 0x48, 0x07, + 0xF4, 0x01, 0x00, 0x00, 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, + 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x02, 0x08, 0x71, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0x73, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x74, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x74, + 0x4E, 0x96, 0x13, 0x00, 0x08, 0x75, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0B, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x74, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x75, 0x52, + 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x74, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x75, 0x3A, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x76, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x2A, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x13, 0x00, 0x08, 0x77, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x3B, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, + 0x96, 0x0E, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x78, 0x07, 0x3B, 0x08, 0x00, 0x00, 0x08, + 0x73, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x09, + 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x08, 0x79, 0x08, 0x73, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x09, 0x00, + 0x08, 0x7A, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x09, + 0x00, 0x08, 0x7B, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7A, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, + 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x7C, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, + 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x7D, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x7E, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x7D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x13, 0x00, 0x08, 0x7F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x7A, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x7D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x1B, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x81, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x82, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, + 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x83, + 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x84, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x85, 0x52, 0x17, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x86, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, + 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x87, 0x52, 0x17, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x88, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, + 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x89, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x8A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, + 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8B, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x73, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x8C, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8D, 0x52, 0x17, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x02, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x80, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, + 0x08, 0x73, 0x1C, 0x96, 0x27, 0x00, 0x08, 0x8E, 0x08, 0x8F, 0x08, 0x8F, 0x08, 0x90, 0x08, 0x90, + 0x08, 0x91, 0x08, 0x91, 0x08, 0x92, 0x08, 0x92, 0x08, 0x93, 0x08, 0x93, 0x08, 0x94, 0x08, 0x94, + 0x08, 0x95, 0x08, 0x95, 0x08, 0x96, 0x08, 0x96, 0x07, 0x08, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x09, 0x00, + 0x08, 0x97, 0x07, 0x0D, 0x00, 0x00, 0x00, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, + 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x73, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x8E, 0x4E, 0x96, 0x07, + 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x98, 0x9B, + 0x0C, 0x00, 0x00, 0x01, 0x00, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x27, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x99, 0x08, 0x99, 0x1C, 0x4F, 0x96, 0x08, 0x00, + 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x3D, 0x17, 0x1D, 0x96, 0x09, 0x00, 0x08, 0x9A, 0x07, 0xBC, 0x02, 0x00, 0x00, + 0x08, 0x98, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x08, 0x98, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0x9B, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x2B, 0x04, + 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x0E, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0x9C, 0x07, 0x2B, 0x04, 0x00, 0x00, 0x08, 0x9B, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, + 0x02, 0x00, 0x08, 0x9D, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x02, 0x00, + 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x9E, 0x05, 0x01, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, + 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0xA0, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x6D, 0x65, 0x74, 0x68, + 0x6F, 0x64, 0x00, 0x5B, 0x00, 0x96, 0x09, 0x00, 0x08, 0xA3, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, + 0xA1, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA2, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA3, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xA4, 0x49, 0x9D, 0x02, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA3, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xA5, 0x49, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x3E, 0x99, 0x02, 0x00, 0x09, 0x00, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x3E, 0x99, 0x02, 0x00, 0x09, 0x00, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x3E, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0xA6, 0x9B, 0x17, 0x00, 0x00, 0x03, 0x00, 0x75, 0x72, 0x6C, 0x00, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x00, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x97, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x99, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x08, 0x00, 0x96, + 0x04, 0x00, 0x08, 0x99, 0x08, 0x52, 0x1D, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0xA1, 0x1C, 0x96, + 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA0, 0x52, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x9D, 0x02, 0x00, 0x3E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x15, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x99, 0x1C, 0x9A, 0x01, 0x00, 0x02, 0x99, 0x02, 0x00, 0x10, 0x00, 0x96, 0x02, + 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x99, 0x1C, 0x9A, 0x01, 0x00, 0x01, 0x99, 0x02, + 0x00, 0x10, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x99, 0x1C, 0x9A, + 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0xA9, 0x9B, 0x10, 0x00, 0x00, 0x02, 0x00, 0x75, 0x72, 0x6C, 0x00, 0x6D, + 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x99, 0x00, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0xA1, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA0, + 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x20, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, + 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x4A, 0x00, 0x96, 0x02, 0x00, + 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x1B, + 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0xC2, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, + 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, + 0x00, 0xC1, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0xC0, 0x8B, 0x01, 0x00, + 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0xAB, 0x9B, 0x10, 0x00, 0x00, 0x02, 0x00, 0x75, 0x72, 0x6C, 0x00, 0x6D, 0x65, 0x74, + 0x68, 0x6F, 0x64, 0x00, 0x99, 0x00, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0xA1, 0x1C, 0x96, 0x07, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA0, 0x52, 0x3C, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x20, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x05, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x4A, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, + 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x96, + 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, + 0x4E, 0x9A, 0x01, 0x00, 0x42, 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0x41, + 0x99, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA8, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, 0x00, 0x40, 0x8B, 0x01, 0x00, 0x00, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0xAC, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x20, + 0x96, 0x04, 0x00, 0x08, 0x52, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xAA, 0x4E, 0x9A, 0x01, + 0x00, 0x40, 0x8B, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xAD, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x9B, + 0x40, 0x3E, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x08, 0xAD, 0x08, 0x9D, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x09, 0x00, 0x08, 0xAE, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, + 0x17, 0x96, 0x0E, 0x00, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x08, 0xAF, 0x07, 0x84, 0x03, 0x00, 0x00, + 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, + 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x2C, 0x01, 0x00, 0x00, 0x08, 0xB0, 0x07, + 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, + 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x91, 0x01, 0x00, + 0x00, 0x08, 0xB1, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, + 0x07, 0xA1, 0x01, 0x00, 0x00, 0x08, 0xB2, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, + 0x17, 0x96, 0x0E, 0x00, 0x07, 0xF4, 0x01, 0x00, 0x00, 0x08, 0xB3, 0x07, 0x84, 0x03, 0x00, 0x00, + 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, + 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x08, 0xB4, 0x07, 0x85, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, - 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x08, 0xAF, 0x07, 0x84, + 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, 0xB5, 0x07, 0x85, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x2C, 0x01, 0x00, 0x00, - 0x08, 0xB0, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0xB6, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x07, 0x68, + 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x08, 0x00, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, + 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0xB7, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, + 0x3D, 0x1D, 0x96, 0x0E, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x08, 0xB8, 0x07, 0x70, 0x00, 0x00, + 0x00, 0x08, 0xB7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, + 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xB7, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x02, 0x08, 0xB7, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0xB9, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x68, 0x00, 0x00, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, + 0x96, 0x13, 0x00, 0x08, 0xBA, 0x07, 0xC9, 0x00, 0x00, 0x00, 0x07, 0x68, 0x00, 0x00, 0x00, 0x07, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x0E, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, + 0x08, 0xBB, 0x07, 0x68, 0x00, 0x00, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, + 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, + 0x00, 0x00, 0x02, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x2C, 0x01, 0x00, 0x00, + 0x08, 0xBC, 0x07, 0x68, 0x00, 0x00, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, - 0x91, 0x01, 0x00, 0x00, 0x08, 0xB1, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, + 0xC8, 0x00, 0x00, 0x00, 0x08, 0xBD, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, - 0x96, 0x0E, 0x00, 0x07, 0xA1, 0x01, 0x00, 0x00, 0x08, 0xB2, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, - 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, - 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0xF4, 0x01, 0x00, 0x00, 0x08, 0xB3, 0x07, 0x84, - 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x08, 0xB4, 0x07, 0x85, 0x03, - 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x0C, 0x00, 0x00, 0x00, 0x08, - 0xB5, 0x07, 0x85, 0x03, 0x00, 0x00, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x9D, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0xB6, 0x07, 0xC8, 0x00, 0x00, - 0x00, 0x07, 0x68, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, - 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x9D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, - 0x08, 0xB7, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x0E, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x08, 0xB8, 0x07, - 0x70, 0x00, 0x00, 0x00, 0x08, 0xB7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xB7, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x02, - 0x08, 0xB7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0xB9, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x68, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, - 0x08, 0xB9, 0x1C, 0x96, 0x13, 0x00, 0x08, 0xBA, 0x07, 0xC9, 0x00, 0x00, 0x00, 0x07, 0x68, 0x00, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x0E, 0x00, 0x07, 0x64, - 0x00, 0x00, 0x00, 0x08, 0xBB, 0x07, 0x68, 0x00, 0x00, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, - 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x08, 0x00, - 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x2C, - 0x01, 0x00, 0x00, 0x08, 0xBC, 0x07, 0x68, 0x00, 0x00, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, - 0x0E, 0x00, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x08, 0xBD, 0x07, 0x84, 0x03, 0x00, 0x00, 0x08, 0xB9, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, - 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0xB9, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0xBE, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x6E, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, - 0x3A, 0x3D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x13, 0x00, 0x08, 0xBF, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x71, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xC0, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x00, - 0x67, 0x00, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x12, - 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, 0x96, 0x07, 0x00, 0x08, 0xC2, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x46, 0x87, 0x01, 0x00, - 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x27, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, - 0x04, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xC2, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x4E, 0x4F, 0x99, 0x02, 0x00, - 0xCB, 0xFF, 0x96, 0x02, 0x00, 0x08, 0xC2, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0xC4, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x07, 0x00, 0x08, 0xC5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x07, 0x00, 0x08, 0xC6, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x07, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC7, 0x52, 0x17, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xC8, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, - 0x65, 0x00, 0x25, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC0, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0xC9, 0x9B, 0x10, 0x00, 0x00, 0x02, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x73, 0x74, 0x79, 0x6C, - 0x65, 0x00, 0x79, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, - 0x12, 0x12, 0x9D, 0x02, 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, - 0x08, 0xC5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCA, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xC0, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCB, 0x52, 0x17, 0x96, 0x07, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC7, 0x52, 0x17, 0x4F, 0x96, 0x02, + 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0xB9, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x13, 0x00, 0x08, 0xBE, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x6E, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, + 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x13, 0x00, 0x08, 0xBF, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x71, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0xCC, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x96, 0x04, 0x00, - 0x08, 0xCD, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x3C, 0x96, 0x07, 0x00, 0x08, - 0xCE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xCD, 0x46, 0x87, 0x01, - 0x00, 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x25, 0x00, 0x96, 0x04, 0x00, 0x08, - 0xC3, 0x04, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0xCE, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x99, 0x02, 0x00, 0xCD, - 0xFF, 0x96, 0x02, 0x00, 0x08, 0xCE, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xCB, - 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x5C, 0x00, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC6, 0x4E, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x12, 0x00, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xC6, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC6, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCF, 0x52, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0xCF, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x73, 0x74, 0x79, 0x6C, 0x65, 0x00, 0x9D, 0x03, 0x96, - 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, - 0x96, 0x01, 0x00, 0x02, 0x3E, 0x96, 0x09, 0x00, 0x08, 0xD0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0xBE, 0x40, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD1, 0x4E, 0x12, - 0x9D, 0x02, 0x00, 0x15, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD2, - 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD1, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xD3, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xD4, 0x49, 0x9D, 0x02, 0x00, 0x2B, - 0x00, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD3, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0xD5, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, - 0x04, 0x00, 0x08, 0xD4, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, - 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD4, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xD6, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x41, 0x00, 0x96, 0x04, 0x00, 0x08, - 0xCD, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD6, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD7, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, - 0xCD, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, - 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD6, 0x08, 0xCD, 0x1C, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD8, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, - 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD9, 0x4E, 0x12, 0x9D, - 0x02, 0x00, 0x26, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xDA, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD9, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDB, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xDC, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, - 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xDD, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDC, 0x4E, - 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xE0, 0x49, 0x9D, 0x02, - 0x00, 0x2B, 0x00, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDF, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0xD5, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, - 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE0, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, - 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE0, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xE2, 0x49, 0x9D, 0x02, - 0x00, 0x4F, 0x00, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0xE3, 0x49, 0x9D, 0x02, 0x00, 0x25, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, - 0x96, 0x04, 0x00, 0x08, 0xE1, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, - 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE1, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, - 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE1, 0x05, 0x01, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE4, 0x4E, 0x12, 0x9D, 0x02, 0x00, - 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE4, 0x08, 0xCA, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xE4, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, - 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE5, 0x4E, 0x12, 0x9D, - 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE6, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE5, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE7, 0x4E, - 0x12, 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, - 0xE7, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE7, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xE8, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, - 0x00, 0x08, 0xE9, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE8, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0xEA, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x3B, 0x00, 0x96, 0x04, 0x00, 0x08, 0xCD, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xEA, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0xDE, 0x3D, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0xCD, 0x1C, 0x48, - 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, - 0xEB, 0x08, 0xCD, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xEC, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0xED, 0x49, 0x9D, 0x02, 0x00, 0x2B, 0x00, 0x96, 0x02, 0x00, 0x08, - 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xEC, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x3E, 0x49, 0x12, 0x9D, - 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xED, 0x05, - 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, - 0x08, 0xED, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0xEE, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x63, 0x73, 0x73, 0x00, 0xDA, 0x00, - 0x96, 0x04, 0x00, 0x08, 0xF1, 0x08, 0xEF, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xF0, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, - 0x44, 0x96, 0x02, 0x00, 0x08, 0xF2, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, - 0x05, 0x00, 0x3E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x12, - 0x12, 0x9D, 0x02, 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x08, - 0xC5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x46, 0x87, 0x01, - 0x00, 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x56, 0x00, 0x96, 0x04, 0x00, 0x08, - 0xC3, 0x04, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xC3, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0xC0, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCB, 0x52, 0x17, 0x99, 0x02, 0x00, - 0x9C, 0xFF, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0xC7, 0x52, 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, - 0x08, 0xF3, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0xEE, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, - 0x72, 0x63, 0x00, 0x6B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, - 0x12, 0x9D, 0x02, 0x00, 0x19, 0x00, 0x96, 0x09, 0x00, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, 0x02, 0x00, 0x41, 0x00, 0x96, - 0x04, 0x00, 0x08, 0xF1, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xF3, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x04, 0x00, 0x08, 0x5D, 0x08, 0xF1, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, - 0x4F, 0x96, 0x0E, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x08, 0xF4, 0x07, 0x71, 0x00, 0x00, 0x00, + 0x96, 0x02, 0x00, 0x08, 0xC0, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x96, + 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x44, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x12, 0x12, 0x9D, 0x02, + 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, 0x96, 0x07, 0x00, 0x08, 0xC2, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, 0x01, + 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x27, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, 0x3C, + 0x96, 0x02, 0x00, 0x08, 0xC2, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x4E, 0x4F, 0x99, 0x02, 0x00, 0xCB, 0xFF, 0x96, + 0x02, 0x00, 0x08, 0xC2, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xC4, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, + 0xC5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, + 0x00, 0x08, 0xC6, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC7, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, - 0x04, 0x00, 0x00, 0x02, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, - 0x09, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x08, 0xBF, 0x08, 0xB9, 0x1C, 0x96, 0x07, 0x00, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0E, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x08, 0xF6, 0x07, 0x9B, 0x02, 0x00, 0x00, 0x08, 0xF5, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0xF5, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, - 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0xF7, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x09, 0x00, 0x08, 0xF8, 0x07, 0xCF, 0x07, 0x00, 0x00, - 0x08, 0xF7, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, - 0x08, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x02, 0x08, 0xF7, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xF9, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0xA5, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x00, 0x2A, 0x00, - 0x96, 0x13, 0x00, 0x08, 0xFA, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x07, 0x36, 0x08, 0x00, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xFB, 0x1C, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xFA, 0x3D, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, - 0xC9, 0x00, 0x00, 0x00, 0x07, 0x36, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x3D, 0x96, 0x09, 0x00, 0x08, 0xCE, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0xF9, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x09, 0x00, 0x08, 0xFC, 0x07, 0x36, 0x08, 0x00, 0x00, 0x08, - 0xF9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, - 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0xF9, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x09, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x0A, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0xC5, 0x00, 0x96, 0x0A, 0x00, - 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x01, 0x40, 0x3C, 0x96, 0x02, 0x00, 0x08, - 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xFD, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFD, 0x4E, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x09, 0x00, 0x08, 0xFF, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, - 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xFF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x45, 0x00, 0x96, - 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFF, 0x4E, + 0x02, 0x00, 0x08, 0xC8, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x25, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0E, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xC0, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xC9, 0x9B, 0x10, + 0x00, 0x00, 0x02, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x73, 0x74, 0x79, 0x6C, 0x65, 0x00, 0x79, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x12, 0x12, 0x9D, + 0x02, 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xC5, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0xC5, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x07, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC0, 0x52, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCB, 0x52, 0x17, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC7, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0xCC, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x96, 0x04, 0x00, 0x08, 0xCD, 0x08, + 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x3C, 0x96, 0x07, 0x00, 0x08, 0xCE, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xCD, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, + 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x25, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0xCE, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x99, 0x02, 0x00, 0xCD, 0xFF, 0x96, 0x02, + 0x00, 0x08, 0xCE, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xCB, 0x9B, 0x0A, 0x00, + 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x5C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xC6, 0x4E, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xC6, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC6, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0E, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0E, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xCF, 0x52, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xCF, 0x9B, 0x0B, + 0x00, 0x00, 0x01, 0x00, 0x73, 0x74, 0x79, 0x6C, 0x65, 0x00, 0x9D, 0x03, 0x96, 0x02, 0x00, 0x08, + 0xCA, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, + 0x02, 0x3E, 0x96, 0x09, 0x00, 0x08, 0xD0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0xBE, 0x40, 0x3C, + 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD1, 0x4E, 0x12, 0x9D, 0x02, 0x00, + 0x15, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD2, 0x08, 0xCA, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xD1, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xD3, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xD4, 0x49, 0x9D, 0x02, 0x00, 0x2B, 0x00, 0x96, 0x02, + 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD3, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xD5, 0x49, + 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, + 0xD4, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, + 0x04, 0x00, 0x08, 0xD4, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xD6, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x41, 0x00, 0x96, 0x04, 0x00, 0x08, 0xCD, 0x08, 0xCA, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD6, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD7, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xCD, 0x1C, 0x96, + 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, + 0x1C, 0x96, 0x04, 0x00, 0x08, 0xD6, 0x08, 0xCD, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, + 0x96, 0x04, 0x00, 0x08, 0xD8, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD9, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x26, + 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xDA, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xD9, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xDB, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xDC, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, + 0x04, 0x00, 0x08, 0xDD, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDC, 0x4E, 0x96, 0x07, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xDF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xE0, 0x49, 0x9D, 0x02, 0x00, 0x2B, 0x00, + 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xDF, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0xD5, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, + 0x00, 0x08, 0xE0, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, + 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE0, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, 0x02, 0x00, 0x08, 0xE2, 0x49, 0x9D, 0x02, 0x00, 0x4F, 0x00, + 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0xE3, 0x49, 0x9D, 0x02, 0x00, 0x25, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, + 0x08, 0xE1, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE1, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, + 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE1, 0x05, 0x00, 0x4F, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, + 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE1, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE4, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, + 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE4, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xE4, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE5, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x20, + 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE6, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xE5, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE7, 0x4E, 0x12, 0x9D, 0x02, + 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE7, 0x08, 0xCA, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE7, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE8, 0x4E, 0x12, + 0x9D, 0x02, 0x00, 0x20, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xE9, + 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE8, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x08, 0xDE, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xEA, + 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x3B, 0x00, 0x96, 0x04, 0x00, 0x08, 0xCD, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xEA, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xDE, 0x3D, + 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0xCD, 0x1C, 0x48, 0x12, 0x9D, 0x02, + 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xEB, 0x08, 0xCD, + 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xEC, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0xED, 0x49, 0x9D, 0x02, 0x00, 0x2B, 0x00, 0x96, 0x02, 0x00, 0x08, 0xCA, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xEC, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x3E, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x0E, + 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xED, 0x05, 0x00, 0x4F, 0x99, + 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xED, 0x05, + 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xD0, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0xEE, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x63, 0x73, 0x73, 0x00, 0xDA, 0x00, 0x96, 0x04, 0x00, + 0x08, 0xF1, 0x08, 0xEF, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xF0, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x44, 0x96, 0x02, + 0x00, 0x08, 0xF2, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x12, 0x12, 0x9D, 0x02, + 0x00, 0x12, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xC5, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, + 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x56, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC5, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0xC3, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC0, + 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xCB, 0x52, 0x17, 0x99, 0x02, 0x00, 0x9C, 0xFF, 0x96, + 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC7, 0x52, + 0x17, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0xF3, 0x08, + 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0xEE, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x13, 0x00, 0x08, 0x54, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x2D, 0x01, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, + 0x6B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, + 0x00, 0x19, 0x00, 0x96, 0x09, 0x00, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x99, 0x02, 0x00, 0x41, 0x00, 0x96, 0x04, 0x00, 0x08, + 0xF1, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xF3, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, + 0x5D, 0x08, 0xF1, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x5A, 0x52, 0x17, 0x4F, 0x96, 0x0E, + 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x08, 0xF4, 0x07, 0x71, 0x00, 0x00, 0x00, 0x08, 0xB9, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, + 0x02, 0x08, 0xB9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xBF, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, + 0x03, 0x04, 0x00, 0x00, 0x08, 0xBF, 0x08, 0xB9, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xF5, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x1D, 0x96, 0x0E, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xF6, 0x07, 0x9B, 0x02, + 0x00, 0x00, 0x08, 0xF5, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, + 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, + 0x08, 0xF5, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x07, 0x00, 0x08, 0xF7, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, + 0x1D, 0x96, 0x09, 0x00, 0x08, 0xF8, 0x07, 0xCF, 0x07, 0x00, 0x00, 0x08, 0xF7, 0x1C, 0x96, 0x07, + 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x06, 0x00, + 0x00, 0x00, 0x02, 0x08, 0xF7, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xF9, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, + 0x96, 0x02, 0x00, 0x08, 0xF9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA5, 0x9B, 0x0B, 0x00, 0x00, 0x01, + 0x00, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x00, 0x2A, 0x00, 0x96, 0x13, 0x00, 0x08, 0xFA, 0x07, 0xC8, + 0x00, 0x00, 0x00, 0x07, 0x36, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0xFB, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0xFA, 0x3D, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, 0xC9, 0x00, 0x00, 0x00, 0x07, 0x36, 0x08, + 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x09, 0x00, 0x08, 0xCE, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0xF9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x09, + 0x00, 0x08, 0xFC, 0x07, 0x36, 0x08, 0x00, 0x00, 0x08, 0xF9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0xF9, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, + 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0xFD, + 0x9B, 0x0E, 0x00, 0x00, 0x01, 0x00, 0x63, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0x00, 0x5F, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0xFE, 0x08, 0xFF, 0x1C, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x0A, 0x00, 0x09, 0x00, 0x01, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x30, 0x00, 0x09, 0x01, + 0x01, 0x09, 0x02, 0x01, 0x05, 0x01, 0x09, 0x03, 0x01, 0x05, 0x01, 0x09, 0x04, 0x01, 0x05, 0x01, + 0x09, 0x05, 0x01, 0x05, 0x01, 0x09, 0x06, 0x01, 0x05, 0x01, 0x09, 0x07, 0x01, 0x05, 0x01, 0x09, + 0x08, 0x01, 0x05, 0x01, 0x09, 0x09, 0x01, 0x05, 0x01, 0x07, 0x08, 0x00, 0x00, 0x00, 0x43, 0x4F, + 0x1D, 0x96, 0x02, 0x00, 0x08, 0xFD, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x0A, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x96, 0x09, 0x00, 0x08, 0x1C, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0xFD, 0x40, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, + 0x04, 0x00, 0x08, 0xFE, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFE, 0x4E, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x0A, 0x00, 0x09, 0x00, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x64, 0x40, 0x4F, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x00, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x47, 0x00, 0x96, 0x07, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x00, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x01, 0x52, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFF, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, - 0x02, 0x00, 0x9C, 0xFF, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x00, 0x01, - 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x00, 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, - 0x1C, 0x3E, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x09, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x00, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, + 0x99, 0x02, 0x00, 0x99, 0xFF, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x01, + 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x01, 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x1C, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xFD, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0B, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x30, 0x00, 0x09, 0x00, 0x01, 0x09, 0x01, 0x01, 0x05, 0x00, 0x09, - 0x02, 0x01, 0x05, 0x00, 0x09, 0x03, 0x01, 0x05, 0x00, 0x09, 0x04, 0x01, 0x05, 0x00, 0x09, 0x05, - 0x01, 0x05, 0x00, 0x09, 0x06, 0x01, 0x05, 0x00, 0x09, 0x07, 0x01, 0x05, 0x00, 0x09, 0x08, 0x01, - 0x05, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x03, 0x04, - 0x00, 0x00, 0x02, 0x09, 0x09, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x0F, 0x01, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x01, 0x9B, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x85, 0x00, 0x96, 0x0A, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0F, - 0x01, 0x40, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0C, 0x01, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x0C, 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, - 0x96, 0x04, 0x00, 0x08, 0xFD, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFD, 0x4E, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x0D, 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, - 0x9F, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x9F, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, - 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0E, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x01, - 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x03, 0x04, - 0x00, 0x00, 0x02, 0x09, 0x0F, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x30, 0x00, 0x09, 0x01, 0x01, 0x09, 0x02, 0x01, 0x05, 0x00, 0x09, + 0x03, 0x01, 0x05, 0x00, 0x09, 0x04, 0x01, 0x05, 0x00, 0x09, 0x05, 0x01, 0x05, 0x00, 0x09, 0x06, + 0x01, 0x05, 0x00, 0x09, 0x07, 0x01, 0x05, 0x00, 0x09, 0x08, 0x01, 0x05, 0x00, 0x09, 0x09, 0x01, + 0x05, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x03, 0x04, + 0x00, 0x00, 0x02, 0x08, 0xFD, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x0C, 0x01, 0x9B, 0x36, + 0x00, 0x00, 0x05, 0x00, 0x63, 0x61, 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x63, 0x61, 0x6C, 0x6C, + 0x62, 0x61, 0x63, 0x6B, 0x00, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6F, 0x72, 0x42, 0x65, + 0x66, 0x6F, 0x72, 0x65, 0x00, 0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x64, 0x00, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x6C, 0x65, 0x00, 0xBE, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, + 0x09, 0x0D, 0x01, 0x09, 0x0D, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, + 0x00, 0x08, 0xFE, 0x08, 0xFF, 0x1C, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x01, 0x1C, 0x96, 0x01, + 0x00, 0x03, 0x49, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, + 0x00, 0x09, 0x0E, 0x01, 0x09, 0x0E, 0x01, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0E, 0x01, 0x05, 0x00, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x9F, 0x1C, 0x96, 0x01, 0x00, 0x03, 0x49, 0x9D, 0x02, 0x00, 0x14, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x9F, 0x08, 0x9F, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x0E, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, + 0x03, 0x00, 0x09, 0x0F, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x03, 0x49, 0x9D, 0x02, 0x00, 0x16, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x0F, 0x01, 0x09, 0x0F, 0x01, 0x1C, + 0x4F, 0x99, 0x02, 0x00, 0x0F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, + 0x0F, 0x01, 0x05, 0x01, 0x4F, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x0C, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x85, + 0x00, 0x96, 0x0A, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x01, 0x40, 0x3C, + 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0D, 0x01, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x0D, 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, + 0x08, 0xFE, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xFE, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x1C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x0E, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x0E, + 0x01, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x9F, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x9F, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x05, + 0x00, 0x09, 0x0F, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x0F, 0x01, 0x4E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x4F, 0x96, 0x09, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x02, + 0x09, 0x0C, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, 0x00, 0x09, + 0x10, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x3E, 0x00, 0x96, 0x14, 0x00, 0x09, 0x12, 0x01, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x07, + 0x9C, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x3C, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x12, 0x01, 0x3D, 0x17, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x42, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, + 0x0A, 0x00, 0x09, 0x13, 0x01, 0x07, 0x9C, 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x08, 0x00, 0x09, 0x10, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x96, 0x14, 0x00, 0x09, 0x12, 0x01, 0x07, 0xC8, 0x00, - 0x00, 0x00, 0x07, 0x9C, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x3C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x12, - 0x01, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x42, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, - 0x52, 0x17, 0x96, 0x0A, 0x00, 0x09, 0x13, 0x01, 0x07, 0x9C, 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, - 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x01, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x0A, 0x00, - 0x09, 0x15, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x14, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x0A, 0x00, 0x09, 0x16, - 0x01, 0x07, 0x9D, 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x14, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x02, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x14, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0B, 0x00, 0x09, 0x18, 0x01, 0x07, 0x98, 0x08, 0x00, 0x00, - 0x09, 0x17, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, - 0x17, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xA5, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x00, 0x2A, 0x00, 0x96, - 0x13, 0x00, 0x08, 0xFA, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x07, 0x38, 0x08, 0x00, 0x00, 0x07, 0x02, - 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xFB, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0xFA, 0x3D, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, 0xC9, - 0x00, 0x00, 0x00, 0x07, 0x38, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, - 0x96, 0x0A, 0x00, 0x08, 0xCE, 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x0B, 0x00, 0x09, 0x1A, 0x01, 0x07, 0x38, 0x08, 0x00, 0x00, - 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, - 0x19, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x14, 0x00, 0x09, 0x1B, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x6F, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x10, - 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x09, 0x1C, 0x01, 0x07, 0x6F, 0x00, 0x00, 0x00, 0x09, 0x1B, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, - 0x08, 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x02, 0x09, 0x1B, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x09, 0x1D, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, - 0x96, 0x0B, 0x00, 0x09, 0x1E, 0x01, 0x07, 0x58, 0x02, 0x00, 0x00, 0x09, 0x1D, 0x01, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x1D, - 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x1B, 0x52, 0x17, 0x96, 0x09, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x09, 0x1D, 0x01, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x1F, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x14, 0x00, - 0x09, 0x20, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x66, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, - 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x21, - 0x01, 0x07, 0x66, 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x20, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x22, 0x01, 0x07, 0x66, - 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x20, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, - 0x96, 0x0F, 0x00, 0x07, 0x0A, 0x00, 0x00, 0x00, 0x09, 0x23, 0x01, 0x07, 0x66, 0x08, 0x00, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x20, 0x01, - 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x05, 0x00, - 0x09, 0x24, 0x01, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x20, 0x01, 0x4E, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x25, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x5B, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, - 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0x51, 0x40, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x26, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x0B, 0x00, 0x09, 0x27, 0x01, 0x07, 0x90, - 0x01, 0x00, 0x00, 0x09, 0x25, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x02, 0x09, 0x25, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x01, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x0A, 0x00, 0x09, 0x15, 0x01, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x40, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x07, 0x00, 0x08, 0x15, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x0A, 0x00, 0x09, 0x16, 0x01, 0x07, 0x9D, + 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x14, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x10, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x17, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1D, 0x96, 0x0B, 0x00, 0x09, 0x18, 0x01, 0x07, 0x98, 0x08, 0x00, 0x00, 0x09, 0x17, 0x01, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, + 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, 0x17, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, + 0x17, 0x96, 0x03, 0x00, 0x09, 0x19, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, + 0x96, 0x03, 0x00, 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA5, 0x9B, 0x0B, 0x00, 0x00, + 0x01, 0x00, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x00, 0x2A, 0x00, 0x96, 0x13, 0x00, 0x08, 0xFA, 0x07, + 0xC8, 0x00, 0x00, 0x00, 0x07, 0x38, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x3D, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xFB, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0xFA, 0x3D, 0x3E, 0x4F, 0x96, 0x12, 0x00, 0x02, 0x07, 0xC9, 0x00, 0x00, 0x00, 0x07, 0x38, + 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x96, 0x0A, 0x00, 0x08, 0xCE, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, + 0x96, 0x0B, 0x00, 0x09, 0x1A, 0x01, 0x07, 0x38, 0x08, 0x00, 0x00, 0x09, 0x19, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, + 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, 0x19, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, + 0x96, 0x14, 0x00, 0x09, 0x1B, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x6F, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x10, 0x00, 0x07, 0x64, 0x00, 0x00, + 0x00, 0x09, 0x1C, 0x01, 0x07, 0x6F, 0x00, 0x00, 0x00, 0x09, 0x1B, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, + 0x09, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x02, 0x09, 0x1B, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x08, + 0x00, 0x09, 0x1D, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x1D, 0x96, 0x0B, 0x00, 0x09, 0x1E, + 0x01, 0x07, 0x58, 0x02, 0x00, 0x00, 0x09, 0x1D, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x1D, 0x01, 0x1C, 0x96, 0x07, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, + 0x09, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x02, 0x09, 0x1D, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, - 0x00, 0x09, 0x28, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x9B, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x19, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x38, - 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x2A, 0x01, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x4E, 0x4F, 0x99, 0x02, 0x00, 0x23, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x07, 0x00, 0x08, 0x13, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x08, 0x00, 0x09, 0x2B, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2C, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x61, 0x00, 0x62, - 0x00, 0x20, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2E, 0x01, 0x52, 0x96, 0x02, 0x00, 0x08, - 0x19, 0x4E, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2F, 0x01, 0x9B, 0x0F, - 0x00, 0x00, 0x03, 0x00, 0x61, 0x00, 0x62, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x7B, 0x00, - 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, - 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x0C, - 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x30, 0x01, 0x9B, 0x12, 0x00, 0x00, 0x02, 0x00, 0x6C, 0x65, 0x6E, 0x67, - 0x74, 0x68, 0x00, 0x61, 0x6E, 0x67, 0x6C, 0x65, 0x00, 0x5C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x19, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x32, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x34, 0x01, 0x52, 0x0C, 0x96, 0x02, 0x00, 0x08, - 0x19, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x32, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x33, 0x01, 0x52, 0x0C, 0x96, 0x07, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x01, 0x00, 0x02, 0x9B, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x49, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x47, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x35, 0x01, 0x52, 0x3E, 0x96, 0x09, 0x00, - 0x08, 0x19, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x36, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, 0x68, 0x65, 0x72, - 0x00, 0x50, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x09, 0x1F, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x20, 0x01, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x66, 0x08, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, + 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x21, 0x01, 0x07, 0x66, 0x08, 0x00, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x20, + 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, + 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x22, 0x01, 0x07, 0x66, 0x08, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x20, 0x01, 0x4E, 0x96, + 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x0A, + 0x00, 0x00, 0x00, 0x09, 0x23, 0x01, 0x07, 0x66, 0x08, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x20, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x05, 0x00, 0x09, 0x24, 0x01, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x1F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x20, 0x01, 0x4E, 0x1D, + 0x96, 0x03, 0x00, 0x09, 0x25, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, + 0x03, 0x00, 0x09, 0x25, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x5B, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x73, 0x72, 0x63, 0x00, 0x24, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x5C, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x51, 0x40, 0x96, 0x07, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x26, 0x01, 0x52, + 0x17, 0x4F, 0x96, 0x0B, 0x00, 0x09, 0x27, 0x01, 0x07, 0x90, 0x01, 0x00, 0x00, 0x09, 0x25, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, + 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, 0x25, 0x01, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, + 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x28, 0x01, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, + 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x96, 0x05, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x38, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, + 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x4E, 0x4F, 0x99, 0x02, + 0x00, 0x23, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x13, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x2B, 0x01, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2C, + 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x61, 0x00, 0x62, 0x00, 0x20, 0x00, 0x96, 0x03, 0x00, + 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x6C, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x2E, 0x01, 0x52, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x3E, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2F, 0x01, 0x9B, 0x0F, 0x00, 0x00, 0x03, 0x00, 0x61, 0x00, + 0x62, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x7B, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2D, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, + 0x2D, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2D, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x0C, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, + 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x30, 0x01, + 0x9B, 0x12, 0x00, 0x00, 0x02, 0x00, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x00, 0x61, 0x6E, 0x67, + 0x6C, 0x65, 0x00, 0x5C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x19, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x32, + 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x34, 0x01, 0x52, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x32, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x33, 0x01, 0x52, 0x0C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, + 0x3E, 0x4F, 0x96, 0x01, 0x00, 0x02, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x0C, 0x47, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x35, 0x01, 0x52, 0x3E, 0x96, 0x09, 0x00, 0x08, 0x19, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x36, 0x01, 0x9B, + 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x50, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x13, 0x4E, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, + 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x39, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, + 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x68, 0x00, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x29, 0x01, 0x4E, 0x54, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, + 0x3E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, + 0x1D, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x49, 0x3E, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3A, + 0x01, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, 0x00, 0x71, 0x00, + 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, + 0x4E, 0x48, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x96, 0x05, + 0x00, 0x09, 0x3B, 0x01, 0x08, 0x19, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x19, 0x4E, 0x0D, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x13, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3B, 0x01, 0x1C, + 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x2B, 0x01, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3B, 0x01, 0x1C, 0x0C, + 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x2E, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x50, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3C, + 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x78, 0x00, 0x79, 0x00, 0x39, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, + 0x47, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, + 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x96, 0x05, + 0x00, 0x09, 0x3D, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x3E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, + 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x9B, + 0x16, 0x00, 0x00, 0x04, 0x00, 0x78, 0x00, 0x79, 0x00, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x75, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x19, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, + 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x13, 0x08, 0x13, + 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x2B, + 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, + 0x42, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, + 0x09, 0x43, 0x01, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x13, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x41, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x38, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x96, 0x05, 0x00, 0x09, 0x3D, + 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3E, + 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, + 0x96, 0x03, 0x00, 0x09, 0x44, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x45, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, + 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x39, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0xAB, 0x00, + 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x54, 0x4C, 0x12, 0x9D, 0x02, + 0x00, 0x1B, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x49, 0x4C, 0x12, + 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x42, 0x01, 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x49, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x47, 0x01, 0x9B, 0x09, 0x00, 0x00, + 0x02, 0x00, 0x78, 0x00, 0x79, 0x00, 0x87, 0x00, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, + 0x00, 0x17, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x22, + 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, + 0x4E, 0x47, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x24, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x2B, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x48, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x39, 0x01, - 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x68, 0x00, 0x96, 0x03, - 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x54, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x06, - 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x2B, 0x01, 0x4E, 0x49, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3A, 0x01, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x6C, 0x65, 0x6E, - 0x67, 0x74, 0x68, 0x00, 0x71, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, - 0x01, 0x00, 0x03, 0x3E, 0x96, 0x05, 0x00, 0x09, 0x3B, 0x01, 0x08, 0x19, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x0D, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x04, 0x00, 0x08, 0x13, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x3B, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, - 0x00, 0x09, 0x2B, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x3B, 0x01, 0x1C, 0x0C, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2E, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, - 0x68, 0x65, 0x72, 0x00, 0x50, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4E, 0x0B, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x96, 0x07, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3C, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x78, 0x00, 0x79, - 0x00, 0x39, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x2D, 0x00, 0x96, 0x05, 0x00, 0x09, 0x3D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x13, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, - 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x40, 0x01, 0x9B, 0x16, 0x00, 0x00, 0x04, 0x00, 0x78, 0x00, 0x79, 0x00, 0x77, - 0x69, 0x64, 0x74, 0x68, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x75, 0x00, 0x96, 0x03, - 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x9D, 0x02, 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x04, 0x00, 0x08, 0x13, 0x08, 0x13, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, - 0x00, 0x09, 0x2B, 0x01, 0x09, 0x2B, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x42, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x43, 0x01, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x13, 0x00, - 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x41, - 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x38, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x57, - 0x00, 0x96, 0x05, 0x00, 0x09, 0x3D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x47, 0x96, 0x03, 0x00, 0x09, 0x3E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x44, 0x01, 0x47, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x45, - 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, - 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x39, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, - 0x65, 0x63, 0x74, 0x00, 0xAB, 0x00, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, - 0x4E, 0x54, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x13, 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x49, 0x4C, 0x12, 0x9D, 0x02, - 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x49, - 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x47, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x78, 0x00, 0x79, 0x00, 0x87, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x13, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x17, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x48, 0x12, - 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x22, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x24, 0x00, - 0x17, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, - 0x01, 0x4E, 0x47, 0x48, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x48, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x70, 0x6F, 0x69, 0x6E, - 0x74, 0x00, 0xA3, 0x00, 0x96, 0x03, 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x48, 0x12, 0x4C, - 0x12, 0x9D, 0x02, 0x00, 0x1E, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, - 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x29, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, - 0x49, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, - 0x01, 0x4E, 0x47, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x2B, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, - 0x49, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x43, 0x01, 0x4E, 0x47, 0x48, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4A, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, - 0x63, 0x74, 0x00, 0x63, 0x01, 0x96, 0x05, 0x00, 0x09, 0x4B, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, - 0x4E, 0x47, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x4C, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, - 0x47, 0x3C, 0x96, 0x06, 0x00, 0x09, 0x4D, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, - 0x47, 0x3C, 0x96, 0x06, 0x00, 0x09, 0x4E, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, - 0x4E, 0x47, 0x3C, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x48, 0x12, 0x4C, 0x12, - 0x9D, 0x02, 0x00, 0x16, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4B, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, - 0x1E, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x48, 0x12, - 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x17, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4C, 0x01, 0x1C, 0x48, 0x4C, 0x12, - 0x9D, 0x02, 0x00, 0x15, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4D, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x11, - 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x4B, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4D, 0x01, 0x1C, - 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4E, 0x01, 0x1C, 0x48, 0x4C, - 0x12, 0x9D, 0x02, 0x00, 0x11, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x4C, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x4E, 0x01, 0x1C, 0x48, 0x12, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x42, 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x15, 0x00, 0x17, 0x96, 0x07, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x48, 0x12, + 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x48, 0x01, + 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x70, 0x6F, 0x69, 0x6E, 0x74, 0x00, 0xA3, 0x00, 0x96, 0x03, + 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1E, 0x00, + 0x17, 0x96, 0x03, 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x12, + 0x9D, 0x02, 0x00, 0x29, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x48, 0x4C, 0x12, + 0x9D, 0x02, 0x00, 0x2B, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x49, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x48, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x41, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x07, 0x00, 0x08, 0x13, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x08, 0x00, 0x09, 0x2B, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x42, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x43, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x50, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0xF4, 0x01, 0x96, - 0x0A, 0x00, 0x09, 0x51, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x53, 0x3C, 0x96, 0x07, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x4C, 0x9D, - 0x02, 0x00, 0x14, 0x00, 0x17, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x12, 0x9D, 0x02, 0x00, 0x1C, 0x00, 0x96, 0x08, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x41, 0x01, - 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x3E, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, - 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x08, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x4F, - 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x46, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, - 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, - 0x51, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x51, - 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, - 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, - 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x4F, - 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x42, 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x17, 0x96, 0x08, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x48, - 0x12, 0x12, 0x9D, 0x02, 0x00, 0x14, 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x41, 0x01, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0x51, + 0x4A, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0x63, 0x01, 0x96, + 0x05, 0x00, 0x09, 0x4B, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x05, 0x00, + 0x09, 0x4C, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x06, 0x00, 0x09, + 0x4D, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x06, 0x00, 0x09, + 0x4E, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x03, 0x00, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x16, 0x00, 0x17, + 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x4B, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x1E, 0x00, 0x17, 0x96, 0x03, 0x00, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x17, + 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x4C, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x15, 0x00, 0x17, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x4D, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x11, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, + 0x4B, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4D, 0x01, 0x1C, 0x48, 0x12, 0x4C, 0x12, 0x9D, 0x02, + 0x00, 0x16, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x4E, 0x01, 0x1C, 0x48, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x11, 0x00, + 0x17, 0x96, 0x03, 0x00, 0x09, 0x4C, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4E, 0x01, 0x1C, 0x48, + 0x12, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x4F, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x48, 0x12, 0x4C, + 0x9D, 0x02, 0x00, 0x15, 0x00, 0x17, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x48, 0x12, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x41, 0x01, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x13, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x2B, + 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, + 0x09, 0x42, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x08, 0x00, 0x09, 0x43, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x50, 0x01, 0x9B, 0x0A, 0x00, 0x00, + 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0xF4, 0x01, 0x96, 0x0A, 0x00, 0x09, 0x51, 0x01, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x40, 0x01, 0x53, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x4C, 0x9D, 0x02, 0x00, 0x14, 0x00, 0x17, 0x96, + 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, + 0x01, 0x52, 0x12, 0x9D, 0x02, 0x00, 0x1C, 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x41, 0x01, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, + 0x51, 0x01, 0x1C, 0x3E, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, + 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, + 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, + 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, + 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, + 0x43, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, + 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x48, 0x12, 0x4C, + 0x9D, 0x02, 0x00, 0x16, 0x00, 0x17, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x51, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x48, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x14, + 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x41, 0x01, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0x51, 0x01, 0x1C, 0x3E, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x54, 0x01, 0x9B, 0x0A, + 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0x27, 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x50, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, + 0x12, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x55, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0xB3, 0x01, + 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, + 0x01, 0x52, 0x12, 0x9D, 0x02, 0x00, 0x14, 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x52, 0x3E, 0x96, 0x08, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x12, + 0x9D, 0x02, 0x00, 0x13, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x52, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x55, 0x01, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x40, 0x01, 0x53, 0x3C, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x08, + 0x13, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, + 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, + 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, + 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x53, 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, + 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x42, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x06, 0x00, + 0x09, 0x43, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, + 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0x55, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x54, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x63, 0x74, 0x00, 0x27, - 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x50, 0x01, 0x52, 0x96, - 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x12, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x72, - 0x65, 0x63, 0x74, 0x00, 0xB3, 0x01, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x4F, 0x01, 0x52, 0x12, 0x9D, 0x02, 0x00, 0x14, 0x00, 0x96, 0x08, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, - 0x52, 0x3E, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x4F, 0x01, 0x52, 0x12, 0x9D, 0x02, 0x00, 0x13, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x52, 0x3E, 0x96, 0x0A, - 0x00, 0x09, 0x55, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x53, 0x3C, 0x96, 0x03, 0x00, 0x09, 0x55, - 0x01, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x08, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, - 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x46, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x53, 0x01, 0x52, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, - 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, - 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, 0x52, 0x96, 0x03, 0x00, - 0x09, 0x55, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x03, 0x00, 0x09, - 0x55, 0x01, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x46, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, - 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x08, - 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x52, 0x01, - 0x52, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, - 0x4F, 0x96, 0x03, 0x00, 0x09, 0x55, 0x01, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x3C, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x02, 0x00, - 0x64, 0x78, 0x00, 0x64, 0x79, 0x00, 0x3A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x56, 0x01, 0x1C, 0x47, 0x96, 0x02, 0x00, - 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x57, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x58, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x5A, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x64, 0x78, 0x00, 0x64, 0x79, - 0x00, 0x82, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x56, 0x01, 0x1C, 0x0B, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x08, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x56, 0x01, 0x1C, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, - 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x57, 0x01, 0x1C, 0x0B, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, - 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x57, 0x01, 0x1C, 0x0C, 0x47, 0x96, 0x03, 0x00, - 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x5B, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x9C, 0x00, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x59, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, - 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, - 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, - 0x01, 0x4E, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x4F, 0x9B, 0x0A, 0x00, - 0x00, 0x01, 0x00, 0x6C, 0x65, 0x66, 0x74, 0x00, 0x3B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x5C, 0x01, 0x1C, 0x0B, 0x47, 0x96, 0x03, 0x00, - 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, - 0x09, 0x5C, 0x01, 0x1C, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5C, 0x01, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x07, 0x52, 0x17, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x72, 0x69, 0x67, 0x68, 0x74, 0x00, 0x1E, - 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x5D, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x9B, - 0x05, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, - 0x47, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5D, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x09, 0x00, 0x00, 0x01, - 0x00, 0x74, 0x6F, 0x70, 0x00, 0x3D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, - 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x5E, 0x01, 0x1C, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, - 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, - 0x5E, 0x01, 0x1C, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5E, 0x01, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x07, 0x52, 0x17, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x62, 0x6F, 0x74, 0x74, 0x6F, 0x6D, 0x00, - 0x1F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x5F, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, - 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x43, 0x01, 0x4E, 0x47, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5F, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x09, 0x3C, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x64, 0x78, 0x00, 0x64, 0x79, 0x00, + 0x3A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x56, 0x01, 0x1C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x57, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x0D, - 0x00, 0x00, 0x01, 0x00, 0x74, 0x6F, 0x70, 0x4C, 0x65, 0x66, 0x74, 0x00, 0x92, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x60, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x60, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, - 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x60, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, - 0x00, 0x09, 0x2B, 0x01, 0x09, 0x60, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x4F, - 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x60, - 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x07, 0x52, 0x17, 0x9B, 0x11, 0x00, 0x00, 0x01, 0x00, 0x62, 0x6F, 0x74, 0x74, 0x6F, 0x6D, - 0x52, 0x69, 0x67, 0x68, 0x74, 0x00, 0x4A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, - 0x00, 0x09, 0x42, 0x01, 0x09, 0x61, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x61, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, - 0x0B, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, - 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x61, 0x01, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, - 0x52, 0x17, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x73, 0x69, 0x7A, 0x65, 0x00, 0x2D, 0x00, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x42, 0x01, 0x08, 0xEB, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x13, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x43, - 0x01, 0x08, 0xEB, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x4F, 0x9B, 0x05, 0x00, 0x00, - 0x00, 0x00, 0x34, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x07, - 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x96, 0x09, 0x00, 0x08, 0xEB, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x62, 0x01, 0x9B, 0x19, 0x00, 0x00, 0x06, 0x00, 0x70, 0x61, 0x00, 0x70, 0x62, 0x00, 0x70, - 0x63, 0x00, 0x70, 0x64, 0x00, 0x70, 0x74, 0x78, 0x00, 0x70, 0x74, 0x79, 0x00, 0x90, 0x00, 0x96, - 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x12, 0x9D, 0x02, 0x00, - 0x6A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x6C, 0x09, 0x64, 0x01, - 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2D, 0x01, 0x09, 0x65, - 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x12, 0x01, 0x09, - 0x66, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x59, 0x01, - 0x09, 0x67, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x68, - 0x01, 0x09, 0x69, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, - 0x6A, 0x01, 0x09, 0x6B, 0x01, 0x1C, 0x4F, 0x99, 0x02, 0x00, 0x13, 0x00, 0x96, 0x07, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x52, 0x17, 0x4F, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x58, 0x01, 0x9B, 0x07, 0x00, + 0x00, 0x01, 0x00, 0x64, 0x00, 0x47, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, + 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, + 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x5A, 0x01, 0x9B, + 0x0B, 0x00, 0x00, 0x02, 0x00, 0x64, 0x78, 0x00, 0x64, 0x79, 0x00, 0x82, 0x00, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x56, 0x01, + 0x1C, 0x0B, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, + 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, + 0x56, 0x01, 0x1C, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x57, + 0x01, 0x1C, 0x0B, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x09, 0x57, 0x01, 0x1C, 0x0C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, - 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, - 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x53, 0x3E, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6C, 0x01, - 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x9E, 0x02, 0x96, 0x04, - 0x00, 0x08, 0x6C, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x0C, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x59, - 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0C, 0x3C, 0x96, 0x08, 0x00, 0x09, 0x2D, - 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x08, 0x00, 0x09, 0x12, 0x01, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x68, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x68, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, - 0x0C, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, - 0x3C, 0x96, 0x05, 0x00, 0x09, 0x6A, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0C, - 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x47, 0x3C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x17, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x19, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, - 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x49, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x19, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x37, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x0F, 0x01, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4C, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x03, - 0x00, 0x09, 0x59, 0x01, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, - 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, - 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0C, 0x47, 0x1D, - 0x96, 0x05, 0x00, 0x09, 0x12, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x0C, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, + 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x5B, 0x01, + 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x9C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x4C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, + 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, + 0x01, 0x4E, 0x0B, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x4F, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x6C, 0x65, 0x66, + 0x74, 0x00, 0x3B, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x42, + 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x5C, 0x01, 0x1C, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x5C, 0x01, 0x1C, 0x4F, 0x9B, + 0x05, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x13, 0x4E, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5C, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x0B, 0x00, + 0x00, 0x01, 0x00, 0x72, 0x69, 0x67, 0x68, 0x74, 0x00, 0x1E, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x5D, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1B, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x3E, 0x96, 0x0A, 0x00, 0x09, + 0x5D, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x74, 0x6F, 0x70, 0x00, 0x3D, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x5E, 0x01, 0x1C, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x5E, 0x01, 0x1C, 0x4F, 0x9B, 0x05, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x2B, 0x01, 0x4E, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x5E, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x0C, 0x00, + 0x00, 0x01, 0x00, 0x62, 0x6F, 0x74, 0x74, 0x6F, 0x6D, 0x00, 0x1F, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x43, 0x01, 0x09, 0x5F, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x3E, 0x96, + 0x0A, 0x00, 0x09, 0x5F, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x0D, 0x00, 0x00, 0x01, 0x00, 0x74, 0x6F, + 0x70, 0x4C, 0x65, 0x66, 0x74, 0x00, 0x92, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, + 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x13, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x60, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0B, + 0x47, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, + 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x60, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, + 0x01, 0x4E, 0x0B, 0x47, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x13, 0x09, 0x60, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, + 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2B, 0x01, 0x09, 0x60, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, + 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x29, 0x01, 0x53, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x60, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x11, + 0x00, 0x00, 0x01, 0x00, 0x62, 0x6F, 0x74, 0x74, 0x6F, 0x6D, 0x52, 0x69, 0x67, 0x68, 0x74, 0x00, + 0x4A, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x42, 0x01, 0x09, 0x61, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x0B, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, + 0x43, 0x01, 0x09, 0x61, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0B, 0x4F, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x4F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x47, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, + 0x01, 0x53, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0x61, 0x01, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x9B, 0x0A, 0x00, 0x00, + 0x01, 0x00, 0x73, 0x69, 0x7A, 0x65, 0x00, 0x2D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x05, 0x00, 0x09, 0x42, 0x01, 0x08, 0xEB, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x43, 0x01, 0x08, 0xEB, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x4F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, + 0x53, 0x3E, 0x96, 0x09, 0x00, 0x08, 0xEB, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x40, 0x01, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x07, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x9B, 0x19, 0x00, + 0x00, 0x06, 0x00, 0x70, 0x61, 0x00, 0x70, 0x62, 0x00, 0x70, 0x63, 0x00, 0x70, 0x64, 0x00, 0x70, + 0x74, 0x78, 0x00, 0x70, 0x74, 0x79, 0x00, 0x90, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x12, 0x9D, 0x02, 0x00, 0x6A, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x6C, 0x09, 0x64, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2D, 0x01, 0x09, 0x65, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x12, 0x01, 0x09, 0x66, 0x01, 0x1C, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x59, 0x01, 0x09, 0x67, 0x01, 0x1C, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x68, 0x01, 0x09, 0x69, 0x01, 0x1C, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, 0x01, 0x09, 0x6B, 0x01, 0x1C, + 0x4F, 0x99, 0x02, 0x00, 0x13, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x38, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x67, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x2D, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, + 0x07, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6C, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, + 0x6F, 0x74, 0x68, 0x65, 0x72, 0x00, 0x9E, 0x02, 0x96, 0x04, 0x00, 0x08, 0x6C, 0x08, 0x0B, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x6C, 0x4E, 0x0C, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x59, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x59, 0x01, 0x4E, 0x0C, 0x3C, 0x96, 0x08, 0x00, 0x09, 0x2D, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x3C, 0x96, 0x08, 0x00, 0x09, 0x12, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x05, 0x00, + 0x09, 0x68, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x37, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x37, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x6A, + 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x47, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x4C, + 0x9D, 0x02, 0x00, 0x19, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x4C, 0x9D, + 0x02, 0x00, 0x19, 0x00, 0x17, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x12, 0x9D, 0x02, + 0x00, 0x0F, 0x01, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x12, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4C, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x05, + 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x05, 0x00, 0x09, 0x12, 0x01, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x12, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4C, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, - 0x68, 0x01, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x0C, - 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x0C, 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, - 0x00, 0x08, 0x6C, 0x08, 0x6C, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, - 0x09, 0x2D, 0x01, 0x09, 0x2D, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, - 0x00, 0x09, 0x12, 0x01, 0x09, 0x12, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, - 0x06, 0x00, 0x09, 0x59, 0x01, 0x09, 0x59, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x06, 0x00, 0x09, 0x68, 0x01, 0x09, 0x68, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, 0x01, 0x09, 0x6A, 0x01, 0x1C, 0x4F, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6D, 0x01, 0x9B, 0x20, 0x00, - 0x00, 0x05, 0x00, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x58, 0x00, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x59, - 0x00, 0x72, 0x6F, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x78, 0x00, 0x79, 0x00, 0xC6, 0x00, - 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, - 0x01, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0x6E, 0x01, 0x1C, 0x96, - 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6F, 0x01, - 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0x71, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x70, 0x01, 0x1C, - 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x72, - 0x01, 0x52, 0x17, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x68, 0x01, 0x08, 0x13, 0x1C, 0x4F, 0x96, 0x08, 0x00, 0x07, - 0x04, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, - 0x9D, 0x02, 0x00, 0x11, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, - 0x01, 0x09, 0x2B, 0x01, 0x1C, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x6A, 0x01, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x37, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x0C, + 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x6C, 0x08, 0x6C, 0x1C, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2D, 0x01, 0x09, 0x2D, 0x01, + 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x12, 0x01, 0x09, 0x12, + 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x59, 0x01, 0x09, + 0x59, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x68, 0x01, + 0x09, 0x68, 0x01, 0x1C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, + 0x01, 0x09, 0x6A, 0x01, 0x1C, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x73, 0x01, 0x9B, 0x1F, 0x00, 0x00, 0x05, 0x00, 0x77, 0x69, 0x64, - 0x74, 0x68, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x72, 0x6F, 0x74, 0x61, 0x74, 0x69, - 0x6F, 0x6E, 0x00, 0x78, 0x00, 0x79, 0x00, 0xE0, 0x00, 0x96, 0x08, 0x00, 0x07, 0x04, 0x00, 0x00, - 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, - 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, - 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x0D, 0x47, 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x2A, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, - 0x0D, 0x47, 0x96, 0x08, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0x6E, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x43, 0x01, 0x1C, 0x96, 0x09, 0x00, 0x06, 0x99, 0x99, 0x99, 0x40, 0x9A, 0x99, 0x99, - 0x99, 0x0D, 0x96, 0x03, 0x00, 0x09, 0x42, 0x01, 0x1C, 0x96, 0x09, 0x00, 0x06, 0x99, 0x99, 0x99, - 0x40, 0x9A, 0x99, 0x99, 0x99, 0x0D, 0x96, 0x07, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6D, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x74, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, - 0x70, 0x00, 0x89, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, - 0x4E, 0x0C, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, - 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x9B, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x04, 0x00, 0x08, - 0x6C, 0x08, 0x0A, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x59, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x87, - 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x12, 0x01, 0x08, - 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x68, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x6A, - 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6D, 0x01, 0x9B, 0x20, 0x00, 0x00, 0x05, 0x00, 0x73, 0x63, 0x61, + 0x6C, 0x65, 0x58, 0x00, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x59, 0x00, 0x72, 0x6F, 0x74, 0x61, 0x74, + 0x69, 0x6F, 0x6E, 0x00, 0x78, 0x00, 0x79, 0x00, 0xC6, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x52, 0x17, 0x96, 0x08, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, + 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, + 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0x6E, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6F, 0x01, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, + 0x71, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x70, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x72, 0x01, 0x52, 0x17, 0x96, 0x08, 0x00, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, + 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, + 0x68, 0x01, 0x08, 0x13, 0x1C, 0x4F, 0x96, 0x08, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x2A, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x11, 0x00, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, 0x01, 0x09, 0x2B, 0x01, 0x1C, 0x4F, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x73, + 0x01, 0x9B, 0x1F, 0x00, 0x00, 0x05, 0x00, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x00, 0x72, 0x6F, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x78, 0x00, 0x79, + 0x00, 0xE0, 0x00, 0x96, 0x08, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x43, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x47, + 0x96, 0x08, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x19, 0x4E, 0x48, 0x9D, 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x42, + 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x47, 0x96, 0x08, 0x00, 0x07, + 0x02, 0x00, 0x00, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x9D, + 0x02, 0x00, 0x0D, 0x00, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x07, + 0x00, 0x96, 0x03, 0x00, 0x09, 0x6E, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x43, 0x01, 0x1C, 0x96, + 0x09, 0x00, 0x06, 0x99, 0x99, 0x99, 0x40, 0x9A, 0x99, 0x99, 0x99, 0x0D, 0x96, 0x03, 0x00, 0x09, + 0x42, 0x01, 0x1C, 0x96, 0x09, 0x00, 0x06, 0x99, 0x99, 0x99, 0x40, 0x9A, 0x99, 0x99, 0x99, 0x0D, + 0x96, 0x07, 0x00, 0x07, 0x05, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6D, + 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x74, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x89, 0x00, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x47, 0x96, 0x07, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x6C, 0x08, 0x0B, 0x1C, 0x96, 0x08, + 0x00, 0x09, 0x59, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, + 0x00, 0x04, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, + 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x12, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, + 0x68, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x6A, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, - 0x02, 0x00, 0x04, 0x00, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x76, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x98, 0x02, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x4C, 0x12, 0x9D, 0x02, 0x00, 0x17, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x12, 0x9D, 0x02, 0x00, 0xBD, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x09, - 0x00, 0x08, 0x6C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, - 0x4E, 0x0D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x0A, 0x00, 0x09, 0x59, 0x01, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0D, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0A, 0x1C, 0x96, - 0x08, 0x00, 0x09, 0x12, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, - 0x02, 0x00, 0x04, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x68, - 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, - 0xFF, 0xFF, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, - 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x6A, 0x01, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, - 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x0C, 0x4F, - 0x96, 0x01, 0x00, 0x03, 0x3E, 0x96, 0x04, 0x00, 0x08, 0x6C, 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x6C, 0x4E, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x2D, 0x01, 0x4E, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x12, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x12, 0x01, 0x4E, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x59, 0x01, 0x08, 0x0A, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x3C, 0x96, 0x05, 0x00, 0x09, 0x77, 0x01, 0x08, 0x6C, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x1C, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x12, 0x01, 0x1C, 0x0C, 0x0B, 0x3C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x96, - 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, - 0x52, 0x17, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x96, 0x0B, 0x00, 0x09, 0x77, 0x01, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, - 0x00, 0x08, 0x6C, 0x09, 0x59, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x2D, 0x01, 0x09, 0x2D, 0x01, 0x1C, - 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, - 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x12, 0x01, 0x09, 0x12, - 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x77, - 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x59, 0x01, - 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x05, 0x00, 0x09, - 0x75, 0x01, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, - 0x01, 0x53, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x74, 0x01, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x68, - 0x01, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, - 0xFF, 0xFF, 0xFF, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, - 0x01, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, - 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6F, 0x01, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x61, 0x6D, 0x6F, - 0x75, 0x6E, 0x74, 0x00, 0x97, 0x00, 0x96, 0x06, 0x00, 0x09, 0x33, 0x01, 0x09, 0x78, 0x01, 0x1C, - 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x33, 0x01, 0x52, 0x3C, 0x96, 0x06, 0x00, 0x09, 0x34, 0x01, 0x09, 0x78, 0x01, 0x1C, 0x96, 0x08, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x34, 0x01, - 0x52, 0x3C, 0x96, 0x0D, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x33, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x34, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, - 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x34, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x33, 0x01, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x53, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6C, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, - 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x72, 0x01, 0x9B, 0x09, - 0x00, 0x00, 0x02, 0x00, 0x78, 0x00, 0x79, 0x00, 0x4D, 0x00, 0x96, 0x0D, 0x00, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, 0x0C, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x06, + 0x02, 0x00, 0x04, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x4F, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x76, 0x01, + 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x98, 0x02, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x4C, 0x12, + 0x9D, 0x02, 0x00, 0x17, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x12, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x9D, 0x02, 0x00, + 0xBD, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x09, 0x00, 0x08, 0x6C, 0x07, 0x01, 0x00, + 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x0D, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x0A, 0x00, 0x09, 0x59, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x0D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x05, 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x12, 0x01, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x04, 0x00, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x68, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x02, 0x00, + 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x6A, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, + 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x0C, 0x4F, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x96, + 0x04, 0x00, 0x08, 0x6C, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x3C, 0x96, 0x05, + 0x00, 0x09, 0x2D, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x3C, 0x96, + 0x05, 0x00, 0x09, 0x12, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x3C, + 0x96, 0x05, 0x00, 0x09, 0x59, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, + 0x3C, 0x96, 0x05, 0x00, 0x09, 0x77, 0x01, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, + 0x1C, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x1C, + 0x0C, 0x0B, 0x3C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x63, 0x01, 0x52, 0x17, 0x96, 0x01, 0x00, 0x03, + 0x3E, 0x96, 0x0B, 0x00, 0x09, 0x77, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x77, 0x01, 0x1C, + 0x0D, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x08, 0x6C, 0x09, 0x59, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x06, 0x00, 0x09, 0x2D, 0x01, 0x09, 0x2D, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, + 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x12, 0x01, 0x09, 0x12, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, + 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x05, 0x00, 0x09, 0x59, 0x01, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x77, 0x01, 0x1C, 0x0C, 0x4F, 0x96, 0x05, 0x00, 0x09, 0x75, 0x01, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x68, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x96, 0x07, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x74, 0x01, 0x52, 0x3C, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x68, 0x01, 0x09, 0x75, 0x01, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x13, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x06, 0x00, 0x09, 0x6A, 0x01, 0x09, 0x75, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x4F, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x6F, + 0x01, 0x9B, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x61, 0x6D, 0x6F, 0x75, 0x6E, 0x74, 0x00, 0x97, 0x00, + 0x96, 0x06, 0x00, 0x09, 0x33, 0x01, 0x09, 0x78, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, + 0x00, 0x00, 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x33, 0x01, 0x52, 0x3C, 0x96, 0x06, + 0x00, 0x09, 0x34, 0x01, 0x09, 0x78, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x09, 0x31, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x34, 0x01, 0x52, 0x3C, 0x96, 0x0D, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0x33, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x34, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x96, 0x03, 0x00, + 0x09, 0x34, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x33, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x62, 0x01, 0x53, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0A, 0x1C, 0x96, + 0x09, 0x62, 0x01, 0x53, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6C, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x79, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, - 0xA5, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x96, 0x02, - 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, - 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x47, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, 0x96, 0x07, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x7A, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x64, 0x78, - 0x00, 0x64, 0x79, 0x00, 0x3C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, - 0x09, 0x68, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x56, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, - 0x68, 0x01, 0x4D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x6A, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x57, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, - 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x96, 0x05, 0x00, 0x09, 0x7B, 0x01, - 0x08, 0x0A, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7C, 0x01, - 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x47, 0x96, - 0x03, 0x00, 0x09, 0x7D, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x12, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7F, 0x01, 0x47, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, 0x96, 0x03, - 0x00, 0x09, 0x80, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, - 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x81, 0x01, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x51, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, - 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x81, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x00, 0x96, 0x05, 0x00, 0x09, 0x82, 0x01, 0x08, - 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x83, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x84, 0x01, - 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x85, 0x01, 0x4E, 0x47, 0x96, - 0x03, 0x00, 0x09, 0x86, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x87, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x88, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x89, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x8A, 0x01, 0x47, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x8B, 0x01, 0x4E, 0x47, 0x96, 0x03, - 0x00, 0x09, 0x8C, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x8D, - 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x8E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x8F, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x90, 0x01, 0x47, 0x96, - 0x02, 0x00, 0x08, 0x0A, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x91, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, - 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x92, - 0x01, 0x07, 0x51, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x81, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x65, 0x00, 0x00, - 0x00, 0x09, 0x93, 0x01, 0x07, 0x51, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x81, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x94, 0x01, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x52, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, - 0x3D, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x09, 0x95, 0x01, 0x07, 0x52, 0x04, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x94, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, - 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xD8, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0xD8, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x96, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4C, + 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x72, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x02, 0x00, 0x78, 0x00, + 0x79, 0x00, 0x4D, 0x00, 0x96, 0x0D, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x09, 0x2B, 0x01, 0x1C, 0x96, 0x0C, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x13, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, 0x53, 0x96, 0x07, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6C, 0x01, 0x52, + 0x17, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x79, 0x01, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xA5, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x13, 0x4E, 0x0C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, + 0x4E, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x75, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x13, 0x4E, 0x0C, 0x96, 0x02, 0x00, 0x08, + 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x75, 0x01, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2B, 0x01, 0x4E, 0x0C, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x29, 0x01, 0x53, + 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x62, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x7A, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x02, 0x00, 0x64, 0x78, 0x00, 0x64, 0x79, 0x00, 0x3C, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x56, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4D, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x0B, 0x1C, 0x4C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x57, 0x01, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4D, 0x4F, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x62, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x81, 0x00, 0x96, 0x05, 0x00, 0x09, 0x7B, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x6C, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7C, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2D, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7D, 0x01, 0x47, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x12, 0x01, 0x4E, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x7E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x59, + 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x7F, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x68, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x80, 0x01, 0x47, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x6A, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, + 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x28, 0x01, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x81, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x51, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, - 0x08, 0x00, 0x09, 0x97, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, - 0x00, 0x09, 0x98, 0x01, 0x07, 0x02, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, - 0x09, 0x99, 0x01, 0x07, 0x04, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x09, - 0x9A, 0x01, 0x07, 0x08, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x28, 0x00, 0x00, 0x00, - 0x09, 0x9B, 0x01, 0x07, 0x4C, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, - 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x9C, 0x01, 0x07, - 0x4C, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x96, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x09, 0x9D, - 0x01, 0x07, 0x4C, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, - 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, - 0x00, 0x09, 0x9E, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x9B, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA0, - 0x01, 0x9B, 0x1A, 0x00, 0x00, 0x03, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x69, 0x6E, 0x73, 0x74, - 0x61, 0x6E, 0x63, 0x65, 0x00, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0xC3, 0x00, 0x96, 0x02, - 0x00, 0x08, 0xA1, 0x1C, 0x12, 0x4C, 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x81, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x9B, 0x05, 0x00, 0x00, 0x00, + 0x00, 0xAC, 0x00, 0x96, 0x05, 0x00, 0x09, 0x82, 0x01, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x83, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x84, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x85, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x86, 0x01, 0x47, + 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x87, 0x01, 0x4E, 0x47, 0x96, 0x03, + 0x00, 0x09, 0x88, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x89, + 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x8A, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x8B, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x8C, 0x01, 0x47, 0x96, + 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x8D, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, + 0x09, 0x8E, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x8F, 0x01, + 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x90, 0x01, 0x47, 0x96, 0x02, 0x00, 0x08, 0x0B, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x91, 0x01, 0x4E, 0x47, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, 0x3E, 0x4F, + 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x92, 0x01, 0x07, 0x51, 0x04, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x81, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, + 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x65, 0x00, 0x00, 0x00, 0x09, 0x93, 0x01, 0x07, 0x51, + 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x81, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, + 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x28, 0x01, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x94, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x52, + 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x0F, 0x00, 0x07, + 0x65, 0x00, 0x00, 0x00, 0x09, 0x95, 0x01, 0x07, 0x52, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x28, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x94, 0x01, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x07, 0x00, 0x08, 0xD8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x14, 0x00, + 0x09, 0x96, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4C, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x09, 0x97, 0x01, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x09, 0x98, 0x01, 0x07, 0x02, + 0x00, 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x09, 0x99, 0x01, 0x07, 0x04, 0x00, + 0x00, 0x00, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x09, 0x9A, 0x01, 0x07, 0x08, 0x00, 0x00, + 0x00, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x28, 0x00, 0x00, 0x00, 0x09, 0x9B, 0x01, 0x07, 0x4C, 0x04, + 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, + 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, + 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x9C, 0x01, 0x07, 0x4C, 0x04, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, + 0x96, 0x0F, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x09, 0x9D, 0x01, 0x07, 0x4C, 0x04, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xD8, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x96, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, + 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x9E, 0x01, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA0, 0x01, 0x9B, 0x1A, 0x00, 0x00, 0x03, + 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0x69, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x6D, + 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0xC3, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA1, 0x1C, 0x12, 0x4C, + 0x9D, 0x02, 0x00, 0x1D, 0x00, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA1, 0x01, + 0x4E, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x96, 0x07, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA2, 0x01, 0x52, 0x17, 0x9B, + 0x0D, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x00, 0x35, 0x00, 0x96, + 0x03, 0x00, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xA1, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0xA3, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0xA5, 0x01, 0x52, 0x3E, 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA6, 0x01, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0xA1, 0x01, 0x4E, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, - 0x00, 0x05, 0x00, 0x3E, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0xA2, 0x01, 0x52, 0x17, 0x9B, 0x0D, 0x00, 0x00, 0x01, 0x00, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x00, 0x35, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0xA1, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xA3, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA5, 0x01, 0x52, 0x3E, 0x96, 0x02, 0x00, 0x08, 0x0E, 0x1C, - 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA6, 0x01, 0x52, - 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA7, 0x01, 0x9B, 0x0A, 0x00, 0x00, - 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x00, 0xF1, 0x02, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0xA1, 0x01, 0x4E, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, - 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA2, 0x01, 0x52, - 0x17, 0x96, 0x06, 0x00, 0x09, 0xA4, 0x01, 0x09, 0xA8, 0x01, 0x3C, 0x96, 0x0A, 0x00, 0x09, 0xAA, - 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA9, 0x01, 0x52, 0x3C, 0x96, - 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, - 0x18, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAB, 0x01, 0x47, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, - 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xAC, 0x01, 0x08, 0x0E, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, - 0xAD, 0x01, 0x47, 0x47, 0x1D, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x01, 0x00, 0x00, 0x00, 0x3C, - 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x68, 0x00, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x18, 0x1C, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, 0x00, 0x09, - 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, - 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, - 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, - 0x01, 0x52, 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, - 0x7E, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB0, 0x01, - 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, - 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x3F, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0xB1, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x02, - 0x49, 0x12, 0x9D, 0x02, 0x00, 0x15, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0xB3, 0x01, 0x47, 0x1D, 0x99, 0x02, 0x00, 0x18, 0x00, 0x96, 0x03, 0x00, 0x09, - 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB2, - 0x01, 0x47, 0x47, 0x1D, 0x96, 0x05, 0x00, 0x08, 0xF1, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xB4, 0x01, 0x52, 0x3C, 0x96, 0x02, - 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x6E, 0x00, 0x96, - 0x08, 0x00, 0x09, 0xA4, 0x01, 0x09, 0xB5, 0x01, 0x08, 0x0E, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, - 0xB6, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, + 0x96, 0x03, 0x00, 0x09, 0xA7, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, + 0x00, 0xF1, 0x02, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA1, 0x01, 0x4E, 0x12, 0x12, + 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xB7, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xB8, - 0x01, 0x47, 0x1D, 0x96, 0x05, 0x00, 0x08, 0xF1, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA2, 0x01, 0x52, 0x17, 0x96, 0x06, 0x00, 0x09, 0xA4, + 0x01, 0x09, 0xA8, 0x01, 0x3C, 0x96, 0x0A, 0x00, 0x09, 0xAA, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA9, 0x01, 0x52, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, + 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x96, 0x03, 0x00, 0x09, + 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAB, + 0x01, 0x47, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x09, + 0xAC, 0x01, 0x08, 0x0E, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0xAD, 0x01, 0x47, 0x47, 0x1D, 0x96, + 0x07, 0x00, 0x08, 0x18, 0x07, 0x01, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, + 0x02, 0x00, 0x68, 0x00, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x48, + 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xB9, 0x01, 0x52, 0x1D, 0x96, 0x02, 0x00, - 0x08, 0xF1, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, - 0x00, 0x02, 0x3E, 0x96, 0x0A, 0x00, 0x09, 0xBA, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x51, - 0x40, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xBB, 0x01, 0x05, - 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0xBA, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0xA5, 0x01, 0x9B, 0x1D, 0x00, 0x00, 0x03, 0x00, 0x69, 0x6E, 0x73, 0x74, 0x61, - 0x6E, 0x63, 0x65, 0x00, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x00, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x00, 0x96, 0x01, 0x96, 0x0A, 0x00, 0x09, 0xBA, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x51, 0x40, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xBB, - 0x01, 0x05, 0x01, 0x4F, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x04, - 0x00, 0x09, 0xBE, 0x01, 0x02, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x64, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, - 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x2A, 0x01, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x26, 0x00, 0x96, 0x06, 0x00, 0x09, 0xBE, 0x01, 0x09, - 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x1D, 0x17, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, - 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x74, 0xFF, 0x96, 0x05, 0x00, - 0x08, 0xF1, 0x09, 0xBE, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0xC1, 0x01, 0x52, 0x96, 0x03, 0x00, 0x09, 0xA3, 0x01, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0xA1, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xC2, 0x01, 0x52, 0x3C, - 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0xC3, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC4, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0xC5, 0x01, 0x49, 0x9D, 0x02, 0x00, 0x2C, 0x00, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x3E, 0x99, - 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x52, 0x47, 0x1D, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x7E, 0xFF, 0x96, 0x03, 0x00, 0x09, + 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB0, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, + 0xAA, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, + 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x3F, 0x01, 0x47, 0x1D, 0x96, + 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB1, 0x01, 0x47, 0x1D, 0x96, + 0x03, 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x15, + 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB3, 0x01, 0x47, + 0x1D, 0x99, 0x02, 0x00, 0x18, 0x00, 0x96, 0x03, 0x00, 0x09, 0xA4, 0x01, 0x4C, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0xAA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xB2, 0x01, 0x47, 0x47, 0x1D, 0x96, 0x05, + 0x00, 0x08, 0xF1, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0xC7, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x61, 0x72, 0x72, 0x61, - 0x79, 0x00, 0x9D, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, 0xC8, 0x01, 0x3C, 0x96, 0x07, - 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0xCA, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, - 0x00, 0x5F, 0x00, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xCB, - 0x01, 0x08, 0x18, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCC, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, - 0xCA, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCD, - 0x01, 0x47, 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, - 0x87, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCE, 0x01, 0x47, - 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xB7, 0x01, 0x9B, 0x0A, 0x00, 0x00, - 0x01, 0x00, 0x61, 0x72, 0x67, 0x73, 0x00, 0x84, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, - 0xCF, 0x01, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, - 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, - 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x46, 0x00, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x47, 0x1D, - 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0xA0, 0xFF, 0x96, 0x03, - 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD0, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xD1, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x62, - 0x6A, 0x00, 0x8C, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, 0xD2, 0x01, 0x3C, 0x96, 0x03, - 0x00, 0x09, 0xD3, 0x01, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, - 0x00, 0x5E, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xC9, - 0x01, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xCB, 0x01, 0x08, 0xC3, 0x1C, 0x47, 0x96, 0x03, 0x00, - 0x09, 0xCC, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, 0xD3, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, - 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, - 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCD, 0x01, 0x47, 0x47, 0x1D, 0x99, 0x02, 0x00, 0x94, - 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD4, 0x01, 0x47, 0x3E, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, - 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x71, 0x01, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0x67, - 0x1C, 0x44, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, - 0x02, 0x00, 0x24, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x09, 0x49, - 0x9D, 0x02, 0x00, 0x07, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD9, - 0x01, 0x49, 0x9D, 0x02, 0x00, 0xDE, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x01, 0x00, - 0x02, 0x49, 0x9D, 0x02, 0x00, 0xC2, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0xDD, 0x01, 0x49, 0x9D, 0x02, 0x00, 0x8E, 0x00, 0x96, 0x09, 0x00, 0x08, 0x19, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xE0, 0x01, 0x52, 0x9D, 0x02, 0x00, - 0x49, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x9D, 0x02, - 0x00, 0x0C, 0x00, 0x96, 0x03, 0x00, 0x09, 0xDC, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, - 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0xD1, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x96, 0x03, 0x00, 0x09, 0xB4, 0x01, 0x52, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x01, + 0x00, 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x6E, 0x00, 0x96, 0x08, 0x00, 0x09, 0xA4, 0x01, 0x09, + 0xB5, 0x01, 0x08, 0x0E, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0xB6, 0x01, 0x47, 0x96, 0x03, 0x00, + 0x09, 0x2A, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0xB7, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xB8, 0x01, 0x47, 0x1D, 0x96, 0x05, 0x00, + 0x08, 0xF1, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xB9, 0x01, 0x52, 0x1D, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x01, 0x00, + 0x02, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, 0x96, 0x0A, 0x00, + 0x09, 0xBA, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x51, 0x40, 0x3C, 0x96, 0x03, 0x00, 0x09, + 0xBA, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xBB, 0x01, 0x05, 0x01, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0xF1, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0xBC, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0xBD, 0x01, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xA5, 0x01, 0x9B, + 0x1D, 0x00, 0x00, 0x03, 0x00, 0x69, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x6D, 0x65, + 0x74, 0x68, 0x6F, 0x64, 0x00, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x00, 0x96, 0x01, 0x96, + 0x0A, 0x00, 0x09, 0xBA, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x51, 0x40, 0x3C, 0x96, 0x03, + 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xBB, 0x01, 0x05, 0x01, 0x4F, 0x96, 0x03, + 0x00, 0x09, 0xA4, 0x01, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xBA, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x59, 0x52, 0x17, 0x96, 0x04, 0x00, 0x09, 0xBE, 0x01, 0x02, 0x3C, + 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, + 0x00, 0x64, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x2A, 0x01, 0x49, 0x12, 0x9D, 0x02, + 0x00, 0x26, 0x00, 0x96, 0x06, 0x00, 0x09, 0xBE, 0x01, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, + 0x1C, 0x4E, 0x1D, 0x17, 0x99, 0x02, 0x00, 0x0E, 0x00, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, + 0x50, 0x1D, 0x99, 0x02, 0x00, 0x74, 0xFF, 0x96, 0x05, 0x00, 0x08, 0xF1, 0x09, 0xBE, 0x01, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC1, 0x01, 0x52, + 0x96, 0x03, 0x00, 0x09, 0xA3, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, + 0xA1, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xC2, 0x01, 0x52, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC3, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xC4, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC5, 0x01, 0x49, 0x9D, 0x02, 0x00, + 0x2C, 0x00, 0x96, 0x02, 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, + 0x00, 0x08, 0xF1, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0xAF, 0x01, 0x52, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC7, 0x01, - 0x52, 0x3E, 0x99, 0x02, 0x00, 0x1D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x9D, 0x02, 0x00, - 0x0B, 0x00, 0x96, 0x03, 0x00, 0x09, 0xDF, 0x01, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x03, 0x00, - 0x09, 0xDE, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0xDC, 0x01, 0x3E, - 0x99, 0x02, 0x00, 0x12, 0x00, 0x96, 0x05, 0x00, 0x09, 0xDA, 0x01, 0x08, 0x67, 0x1C, 0x47, 0x96, - 0x03, 0x00, 0x09, 0xDB, 0x01, 0x47, 0x3E, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, - 0xD8, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x32, 0x00, 0x96, 0x05, 0x00, 0x09, 0xD5, 0x01, 0x08, 0x67, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xD6, 0x01, - 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xD7, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, + 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x61, 0x72, 0x72, 0x61, 0x79, 0x00, 0x9D, 0x00, 0x96, 0x06, + 0x00, 0x09, 0xC9, 0x01, 0x09, 0xC8, 0x01, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x5F, 0x00, 0x96, 0x03, 0x00, + 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x05, 0x00, 0x09, 0xCB, 0x01, 0x08, 0x18, 0x1C, 0x47, 0x96, + 0x03, 0x00, 0x09, 0xCC, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0xC6, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCD, 0x01, 0x47, 0x47, 0x1D, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x87, 0xFF, 0x96, 0x03, 0x00, 0x09, + 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCE, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0xB7, 0x01, 0x9B, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x61, 0x72, 0x67, 0x73, + 0x00, 0x84, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, 0xCF, 0x01, 0x3C, 0x96, 0x07, 0x00, + 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, + 0x46, 0x00, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBE, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, + 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0xA0, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0xD0, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0xD1, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x62, 0x6A, 0x00, 0x8C, 0x00, 0x96, 0x06, + 0x00, 0x09, 0xC9, 0x01, 0x09, 0xD2, 0x01, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xD3, 0x01, 0x46, 0x87, + 0x01, 0x00, 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x5E, 0x00, 0x96, 0x04, 0x00, + 0x08, 0xC3, 0x04, 0x00, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x05, 0x00, + 0x09, 0xCB, 0x01, 0x08, 0xC3, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0xCC, 0x01, 0x47, 0x96, 0x03, + 0x00, 0x09, 0xD3, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC6, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, + 0x09, 0xCD, 0x01, 0x47, 0x47, 0x1D, 0x99, 0x02, 0x00, 0x94, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD4, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0xE1, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0xDC, - 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, - 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x9D, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE2, 0x01, 0x49, 0x12, 0x9D, 0x02, 0x00, - 0x66, 0x00, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0xC6, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, + 0x00, 0x71, 0x01, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0x67, 0x1C, 0x44, 0x3C, 0x96, 0x02, 0x00, + 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x24, 0x01, 0x96, 0x02, + 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, 0x49, 0x9D, 0x02, 0x00, 0x07, 0x01, 0x96, + 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD9, 0x01, 0x49, 0x9D, 0x02, 0x00, 0xDE, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0xC2, + 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xDD, 0x01, 0x49, 0x9D, 0x02, + 0x00, 0x8E, 0x00, 0x96, 0x09, 0x00, 0x08, 0x19, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x67, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0xE0, 0x01, 0x52, 0x9D, 0x02, 0x00, 0x49, 0x00, 0x96, 0x02, 0x00, 0x08, + 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x9D, 0x02, 0x00, 0x0C, 0x00, 0x96, 0x03, 0x00, + 0x09, 0xDC, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, + 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xD1, 0x01, 0x52, 0x3E, + 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC7, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x1D, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x9D, 0x02, 0x00, 0x0B, 0x00, 0x96, 0x03, 0x00, 0x09, + 0xDF, 0x01, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x03, 0x00, 0x09, 0xDE, 0x01, 0x3E, 0x99, 0x02, + 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0xDC, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x12, 0x00, 0x96, + 0x05, 0x00, 0x09, 0xDA, 0x01, 0x08, 0x67, 0x1C, 0x47, 0x96, 0x03, 0x00, 0x09, 0xDB, 0x01, 0x47, + 0x3E, 0x99, 0x02, 0x00, 0x07, 0x00, 0x96, 0x03, 0x00, 0x09, 0xD8, 0x01, 0x3E, 0x99, 0x02, 0x00, + 0x32, 0x00, 0x96, 0x05, 0x00, 0x09, 0xD5, 0x01, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xD6, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, + 0xD7, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE1, 0x01, 0x9B, + 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0xDC, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, + 0x00, 0x9D, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, + 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xE2, 0x01, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x66, 0x00, 0x96, 0x02, 0x00, 0x08, + 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC3, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0xAA, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, + 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x42, 0xFF, + 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0xE3, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0xDC, 0x00, 0x96, 0x07, + 0x00, 0x08, 0x6C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, + 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, + 0x12, 0x9D, 0x02, 0x00, 0x9D, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC0, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE2, 0x01, 0x49, 0x12, 0x9D, 0x02, 0x00, 0x66, 0x00, 0x96, + 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC3, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0xC3, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBA, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, + 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0xBD, 0x01, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, + 0x00, 0x42, 0xFF, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xBD, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0xC1, + 0x01, 0x96, 0x05, 0x00, 0x08, 0xA7, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xC0, 0x01, + 0x4E, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xD9, 0x01, 0x49, 0x9D, + 0x02, 0x00, 0x78, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, + 0x9D, 0x02, 0x00, 0x27, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE3, + 0x49, 0x9D, 0x02, 0x00, 0x0B, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0xE2, 0x49, 0x9D, 0x02, 0x00, 0xEF, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xF2, 0x49, 0x9D, 0x02, 0x00, 0xD4, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0A, 0x49, 0x9D, 0x02, 0x00, 0xB9, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0xC1, 0x49, 0x9D, 0x02, 0x00, 0x7B, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x49, 0x9D, 0x02, 0x00, 0x3C, 0x00, 0x96, 0x02, 0x00, 0x08, + 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xE7, 0x01, 0x49, 0x9D, 0x02, 0x00, 0x0A, 0x00, 0x96, 0x01, + 0x00, 0x03, 0x3E, 0x99, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xE5, + 0x01, 0x3D, 0x3E, 0x99, 0x02, 0x00, 0x28, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, + 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE3, 0x01, 0x52, 0x3E, + 0x99, 0x02, 0x00, 0x28, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE1, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, + 0x05, 0x00, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x99, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, + 0x3E, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, 0x01, 0x3E, 0x99, 0x02, 0x00, 0x06, + 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x99, 0x02, 0x00, 0x3B, 0x00, 0x96, 0x03, 0x00, 0x09, + 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, + 0x00, 0x00, 0x09, 0xE5, 0x01, 0x3D, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0xE6, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x26, 0x00, 0x96, 0x08, 0x00, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x0F, 0x52, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xE4, 0x01, + 0x3D, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC1, 0x01, 0x9B, 0x09, 0x00, + 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0x97, 0x00, 0x96, 0x08, 0x00, 0x09, 0xBE, 0x01, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, + 0x56, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, - 0x1D, 0x99, 0x02, 0x00, 0x42, 0xFF, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, - 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE3, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, - 0x6C, 0x00, 0xDC, 0x00, 0x96, 0x07, 0x00, 0x08, 0x6C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, - 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x9D, 0x00, 0x96, 0x03, 0x00, 0x09, - 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE2, 0x01, 0x49, 0x12, - 0x9D, 0x02, 0x00, 0x66, 0x00, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBA, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0xC3, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAA, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x18, 0x1C, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x52, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, - 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x42, 0xFF, 0x96, 0x02, 0x00, 0x08, 0x6C, 0x1C, 0x3E, + 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x52, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, + 0xBE, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, + 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x89, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, - 0x00, 0x78, 0x6D, 0x6C, 0x00, 0xC1, 0x01, 0x96, 0x05, 0x00, 0x08, 0xA7, 0x09, 0xBA, 0x01, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0xC0, 0x01, 0x4E, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0xD9, 0x01, 0x49, 0x9D, 0x02, 0x00, 0x78, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x27, 0x01, 0x96, 0x02, 0x00, 0x08, 0xA7, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE3, 0x49, 0x9D, 0x02, 0x00, 0x0B, 0x01, 0x96, 0x02, 0x00, 0x08, - 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xE2, 0x49, 0x9D, 0x02, 0x00, 0xEF, 0x00, 0x96, 0x02, 0x00, - 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xF2, 0x49, 0x9D, 0x02, 0x00, 0xD4, 0x00, 0x96, 0x02, - 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x09, 0x49, 0x9D, 0x02, 0x00, 0xB9, 0x00, 0x96, - 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x9D, 0x02, 0x00, 0x7B, 0x00, - 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x49, 0x9D, 0x02, 0x00, - 0x3C, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xE7, 0x01, 0x49, 0x9D, - 0x02, 0x00, 0x0A, 0x00, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x99, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x03, - 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x08, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x09, 0xE5, 0x01, 0x3D, 0x3E, 0x99, 0x02, 0x00, 0x28, 0x00, 0x96, 0x03, - 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE8, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, + 0x00, 0x61, 0x72, 0x72, 0x61, 0x79, 0x00, 0xAB, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, + 0xE9, 0x01, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, + 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x6D, 0x00, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, + 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x03, + 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0xEA, 0x01, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0xE3, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x28, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, - 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE1, - 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x05, 0x00, 0x96, 0x01, 0x00, 0x03, 0x3E, 0x99, 0x02, 0x00, - 0x05, 0x00, 0x96, 0x01, 0x00, 0x02, 0x3E, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, - 0x01, 0x3E, 0x99, 0x02, 0x00, 0x06, 0x00, 0x96, 0x02, 0x00, 0x05, 0x00, 0x3E, 0x99, 0x02, 0x00, - 0x3B, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBC, 0x01, 0x4E, - 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xE5, 0x01, 0x3D, 0x96, 0x07, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE6, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, - 0x26, 0x00, 0x96, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0xBC, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x52, 0x96, 0x08, 0x00, 0x07, 0x01, - 0x00, 0x00, 0x00, 0x09, 0xE4, 0x01, 0x3D, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x00, 0x09, 0xAF, 0x01, 0x52, 0x47, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, + 0x99, 0x02, 0x00, 0x79, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0xEB, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xEC, 0x01, 0x9B, + 0x09, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x62, 0x6A, 0x00, 0xB0, 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, + 0x01, 0x09, 0xED, 0x01, 0x3C, 0x96, 0x05, 0x00, 0x09, 0xEE, 0x01, 0x05, 0x00, 0x3C, 0x96, 0x03, + 0x00, 0x09, 0xD3, 0x01, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, + 0x00, 0x79, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xEE, + 0x01, 0x1C, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x05, 0x00, 0x09, 0xEE, 0x01, 0x05, 0x01, + 0x1D, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0xEF, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, 0xD3, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0xC3, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0xC1, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x78, 0x6D, 0x6C, 0x00, 0x97, 0x00, 0x96, - 0x08, 0x00, 0x09, 0xBE, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3C, 0x96, 0x07, 0x00, 0x08, - 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0xBA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x19, - 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x56, 0x00, 0x96, 0x03, 0x00, 0x09, 0xBA, 0x01, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0xBF, 0x01, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xBD, 0x01, 0x52, 0x96, 0x08, 0x00, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x16, 0x52, 0x17, - 0x96, 0x02, 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x89, 0xFF, 0x96, 0x03, - 0x00, 0x09, 0xBE, 0x01, 0x1C, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE8, - 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x61, 0x72, 0x72, 0x61, 0x79, 0x00, 0xAB, 0x00, 0x96, - 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, 0xE9, 0x01, 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xCA, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x6D, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x18, 0x1C, 0x96, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x49, 0x12, 0x12, 0x9D, - 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0xCA, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xEA, 0x01, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, + 0x09, 0xAF, 0x01, 0x52, 0x47, 0x47, 0x1D, 0x99, 0x02, 0x00, 0x79, 0xFF, 0x96, 0x03, 0x00, 0x09, + 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF0, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x76, 0x61, 0x6C, 0x75, + 0x65, 0x00, 0x00, 0x01, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, 0x67, 0x1C, 0x44, 0x3C, 0x96, 0x02, + 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, 0x9D, 0x02, 0x00, 0x93, 0x00, 0x96, + 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC1, 0x49, 0x9D, 0x02, 0x00, 0x18, 0x00, + 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x08, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xE5, + 0x01, 0x3D, 0x3E, 0x99, 0x02, 0x00, 0x65, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x64, 0x1C, 0x54, 0x9D, 0x02, 0x00, 0x2C, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, + 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xEC, 0x01, 0x52, + 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE8, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, + 0x52, 0x00, 0x96, 0x05, 0x00, 0x09, 0xF1, 0x01, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x52, 0x47, 0x1D, 0x96, 0x02, 0x00, - 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0x79, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xEB, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0xEC, 0x01, 0x9B, 0x09, 0x00, 0x00, 0x01, 0x00, 0x6F, 0x62, 0x6A, 0x00, 0xB0, - 0x00, 0x96, 0x06, 0x00, 0x09, 0xC9, 0x01, 0x09, 0xED, 0x01, 0x3C, 0x96, 0x05, 0x00, 0x09, 0xEE, - 0x01, 0x05, 0x00, 0x3C, 0x96, 0x03, 0x00, 0x09, 0xD3, 0x01, 0x46, 0x87, 0x01, 0x00, 0x00, 0x96, - 0x01, 0x00, 0x02, 0x49, 0x9D, 0x02, 0x00, 0x79, 0x00, 0x96, 0x04, 0x00, 0x08, 0xC3, 0x04, 0x00, - 0x3C, 0x96, 0x03, 0x00, 0x09, 0xEE, 0x01, 0x1C, 0x12, 0x9D, 0x02, 0x00, 0x10, 0x00, 0x96, 0x03, - 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xAE, 0x01, 0x47, 0x1D, 0x96, 0x05, - 0x00, 0x09, 0xEE, 0x01, 0x05, 0x01, 0x1D, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x4C, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xEF, 0x01, 0x47, 0x96, 0x03, 0x00, 0x09, - 0xD3, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC3, 0x1C, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x52, 0x47, 0x47, 0x1D, 0x99, 0x02, 0x00, - 0x79, 0xFF, 0x96, 0x03, 0x00, 0x09, 0xC9, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF0, 0x01, 0x47, - 0x3E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xAF, 0x01, 0x9B, 0x0B, 0x00, 0x00, - 0x01, 0x00, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x00, 0x00, 0x01, 0x96, 0x04, 0x00, 0x08, 0xA7, 0x08, - 0x67, 0x1C, 0x44, 0x3C, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x66, 0x49, - 0x9D, 0x02, 0x00, 0x93, 0x00, 0x96, 0x02, 0x00, 0x08, 0xA7, 0x1C, 0x96, 0x02, 0x00, 0x08, 0xC1, - 0x49, 0x9D, 0x02, 0x00, 0x18, 0x00, 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x08, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x09, 0xE5, 0x01, 0x3D, 0x3E, 0x99, 0x02, 0x00, 0x65, 0x00, 0x96, 0x02, - 0x00, 0x08, 0x67, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x64, 0x1C, 0x54, 0x9D, 0x02, 0x00, 0x2C, 0x00, - 0x96, 0x02, 0x00, 0x08, 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0xEC, 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, - 0x67, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE8, - 0x01, 0x52, 0x3E, 0x99, 0x02, 0x00, 0x52, 0x00, 0x96, 0x05, 0x00, 0x09, 0xF1, 0x01, 0x08, 0x67, - 0x1C, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE6, 0x01, - 0x52, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xF2, 0x01, - 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, 0xF1, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x0A, 0x00, 0x09, 0xF3, - 0x01, 0x07, 0x0E, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x09, 0xF4, 0x01, 0x07, 0x0E, + 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xE6, 0x01, 0x52, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, - 0x96, 0x08, 0x00, 0x07, 0x07, 0x10, 0x00, 0x00, 0x02, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0xF6, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF7, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x03, 0x00, 0x09, 0xF5, - 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF8, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, - 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF9, 0x01, 0x52, 0x17, 0x4F, - 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xFA, 0x01, 0x9B, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, - 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0xFB, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0xFC, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0xFD, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x0B, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x09, 0xFE, 0x01, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0B, 0x00, 0x09, 0xFF, 0x01, 0x07, 0x3A, 0x08, 0x00, 0x00, - 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, - 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, - 0xF5, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, 0x00, 0x09, 0x02, 0x02, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x03, 0x02, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x04, 0x02, 0x52, 0x17, 0x4F, 0x96, 0x0B, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x09, 0x03, 0x02, 0x09, 0x02, 0x02, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x14, 0x00, 0x09, 0x05, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x69, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x03, - 0x00, 0x09, 0x05, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x9E, - 0x05, 0x01, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x05, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x96, 0x04, 0x00, 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x05, 0x02, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x06, 0x02, 0x07, 0x03, 0x00, 0x00, 0x00, - 0x07, 0x69, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x10, - 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x07, 0x02, 0x07, 0x69, 0x00, 0x00, 0x00, 0x09, 0x05, - 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, - 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0xC8, 0x00, 0x00, 0x00, 0x08, 0xBD, 0x07, 0x84, - 0x03, 0x00, 0x00, 0x09, 0x05, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x08, 0x00, 0x09, 0x08, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x09, 0x02, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x58, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, - 0x3D, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0A, 0x02, 0x07, 0x58, 0x04, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x09, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, - 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, - 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x0B, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x53, 0x04, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0B, 0x02, 0x4E, 0x96, - 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0B, 0x02, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x02, 0x07, 0x53, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0B, 0x02, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, - 0x0D, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4E, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, - 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, - 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0D, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, - 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, - 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0D, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0E, - 0x02, 0x07, 0x4E, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x0D, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, - 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x0F, 0x02, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x56, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x0F, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, - 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x0F, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, - 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x10, 0x02, 0x07, 0x56, 0x04, 0x00, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0F, 0x02, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, - 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, - 0x96, 0x14, 0x00, 0x09, 0x11, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x55, 0x04, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x02, 0x4E, 0x96, 0x09, 0x00, - 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, - 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, - 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x02, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, - 0x00, 0x00, 0x09, 0x12, 0x02, 0x07, 0x55, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x11, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x13, 0x02, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x57, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, - 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x13, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, - 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x13, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x14, 0x02, 0x07, - 0x57, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x13, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, - 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x15, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x4D, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x15, 0x02, - 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, - 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x15, 0x02, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x16, 0x02, 0x07, 0x4D, 0x04, 0x00, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x15, 0x02, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, - 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, - 0x00, 0x09, 0x17, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4F, 0x04, 0x00, 0x00, 0x07, 0x02, - 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x17, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, - 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, - 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x17, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, - 0x09, 0x18, 0x02, 0x07, 0x4F, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, - 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x17, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, - 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x19, 0x02, 0x07, 0xE8, - 0x03, 0x00, 0x00, 0x07, 0x54, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x19, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x19, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, - 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x1A, 0x02, 0x07, 0x54, 0x04, - 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, - 0x19, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, - 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, - 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x1B, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x54, 0x04, - 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1B, 0x02, 0x4E, 0x96, - 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, - 0x08, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x53, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x1C, - 0x4D, 0x1D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, - 0x96, 0x03, 0x00, 0x09, 0x1B, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, - 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x1A, 0x02, 0x07, - 0x54, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x08, 0x02, 0x4E, 0x96, 0x03, - 0x00, 0x09, 0x1B, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, - 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x14, 0x00, 0x09, 0x1C, 0x02, 0x07, 0x00, 0x00, + 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0xF2, 0x01, 0x52, 0x47, 0x96, 0x03, 0x00, 0x09, + 0xF1, 0x01, 0x47, 0x3E, 0x4F, 0x96, 0x0A, 0x00, 0x09, 0xF3, 0x01, 0x07, 0x0E, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, + 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x0F, 0x00, + 0x07, 0x64, 0x00, 0x00, 0x00, 0x09, 0xF4, 0x01, 0x07, 0x0E, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x07, + 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x07, 0x10, + 0x00, 0x00, 0x02, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x9E, 0x01, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x9F, 0x01, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, + 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, + 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF6, 0x01, 0x9B, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, + 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF7, + 0x01, 0x52, 0x17, 0x4F, 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xF8, + 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0xF9, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x03, 0x00, 0x09, 0xF5, 0x01, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0xFA, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x96, 0x07, + 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xFB, 0x01, 0x52, 0x17, 0x4F, 0x96, 0x03, + 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xFC, 0x01, 0x9B, 0x05, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, + 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0xFD, 0x01, + 0x52, 0x17, 0x4F, 0x96, 0x0B, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0xFE, 0x01, 0x09, 0xF5, + 0x01, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0B, + 0x00, 0x09, 0xFF, 0x01, 0x07, 0x3A, 0x08, 0x00, 0x00, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, + 0x09, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x02, 0x09, 0xF5, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x03, + 0x00, 0x09, 0x00, 0x02, 0x9B, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x6E, 0x61, 0x6D, 0x65, 0x73, 0x00, + 0x5A, 0x00, 0x96, 0x0D, 0x00, 0x09, 0x02, 0x02, 0x09, 0xAE, 0x01, 0x07, 0x01, 0x00, 0x00, 0x00, + 0x08, 0xCE, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x01, 0x02, 0x52, 0x96, 0x02, 0x00, 0x08, 0x19, 0x4E, + 0x3C, 0x96, 0x07, 0x00, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x96, 0x02, 0x00, 0x08, + 0x18, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x02, 0x02, 0x1C, 0x48, 0x12, 0x9D, 0x02, 0x00, 0x1C, 0x00, + 0x96, 0x09, 0x00, 0x08, 0xCD, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x40, 0x3C, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x4C, 0x1C, 0x50, 0x1D, 0x99, 0x02, 0x00, 0xD0, 0xFF, 0x1D, 0x96, 0x03, 0x00, + 0x09, 0x03, 0x02, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x03, 0x00, 0x09, + 0x03, 0x02, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x04, 0x02, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1F, + 0x00, 0x96, 0x07, 0x00, 0x08, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x3C, 0x96, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x05, 0x02, 0x52, 0x17, + 0x4F, 0x96, 0x0B, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x09, 0x03, 0x02, 0x1C, + 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x14, 0x00, 0x09, + 0x06, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x69, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x3A, 0x3D, 0x1D, 0x96, 0x03, 0x00, 0x09, 0x06, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x9E, 0x05, 0x01, 0x4F, 0x96, 0x03, 0x00, 0x09, 0x06, 0x02, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x9F, 0x05, 0x01, 0x4F, 0x96, + 0x03, 0x00, 0x09, 0x06, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x14, 0x00, 0x09, + 0x07, 0x02, 0x07, 0x03, 0x00, 0x00, 0x00, 0x07, 0x69, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, + 0x00, 0x08, 0x01, 0x3D, 0x4F, 0x96, 0x10, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x09, 0x08, 0x02, + 0x07, 0x69, 0x00, 0x00, 0x00, 0x09, 0x06, 0x02, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, + 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x0F, 0x00, 0x07, 0xC8, + 0x00, 0x00, 0x00, 0x08, 0xBD, 0x07, 0x84, 0x03, 0x00, 0x00, 0x09, 0x06, 0x02, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x08, 0x00, 0x09, 0x09, 0x02, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, + 0x96, 0x14, 0x00, 0x09, 0x0A, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x58, 0x04, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x09, 0x0B, 0x02, 0x07, 0x58, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x02, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x0C, 0x02, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x53, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x0C, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, + 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x0C, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0D, 0x02, 0x07, 0x53, + 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x0C, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, + 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x0E, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4E, + 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x02, 0x4E, + 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, + 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x02, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0F, 0x02, 0x07, 0x4E, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0E, 0x02, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, + 0x09, 0x10, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x56, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x10, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, + 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x10, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, + 0x11, 0x02, 0x07, 0x56, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x10, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, + 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x12, 0x02, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x55, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x12, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, + 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, + 0x09, 0x12, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, + 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x13, 0x02, 0x07, 0x55, 0x04, 0x00, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x12, + 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, + 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, + 0x4E, 0x96, 0x14, 0x00, 0x09, 0x14, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x57, 0x04, 0x00, + 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x02, 0x4E, 0x96, 0x09, + 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, + 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x02, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x09, 0x15, 0x02, 0x07, 0x57, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x14, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x16, + 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x4D, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, + 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x16, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, + 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, + 0x4E, 0x96, 0x03, 0x00, 0x09, 0x16, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x17, 0x02, + 0x07, 0x4D, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x16, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x18, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x4F, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x18, + 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, + 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x18, + 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, + 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x09, 0x19, 0x02, 0x07, 0x4F, 0x04, 0x00, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x18, 0x02, 0x4E, + 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, + 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, + 0x14, 0x00, 0x09, 0x1A, 0x02, 0x07, 0xE8, 0x03, 0x00, 0x00, 0x07, 0x54, 0x04, 0x00, 0x00, 0x07, + 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1A, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, + 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, + 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, 0x53, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1A, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, 0x00, 0x00, + 0x00, 0x09, 0x1B, 0x02, 0x07, 0x54, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, + 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1A, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, + 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x02, 0x00, 0x08, + 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x14, 0x00, 0x09, 0x1C, 0x02, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x54, 0x04, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x3A, + 0x3D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, + 0x03, 0x00, 0x09, 0x1C, 0x02, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x0D, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x04, 0x1C, 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x0A, 0x02, + 0x53, 0x4C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x4D, 0x1D, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x04, 0x1C, + 0x96, 0x03, 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1C, 0x02, 0x4E, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x53, 0x3A, 0x17, 0x96, 0x0F, 0x00, 0x07, 0x01, + 0x00, 0x00, 0x00, 0x09, 0x1B, 0x02, 0x07, 0x54, 0x04, 0x00, 0x00, 0x08, 0x04, 0x1C, 0x96, 0x03, + 0x00, 0x09, 0x09, 0x02, 0x4E, 0x96, 0x03, 0x00, 0x09, 0x1C, 0x02, 0x4E, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x4E, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x03, 0x3D, 0x17, 0x96, 0x14, + 0x00, 0x09, 0x1D, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFA, 0x00, 0x00, 0x00, 0x07, 0x02, + 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x14, 0x00, 0x09, 0x1E, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFA, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, - 0x96, 0x14, 0x00, 0x09, 0x1D, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFA, 0x00, 0x00, 0x00, - 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x14, 0x00, 0x09, 0x1E, 0x02, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x07, 0xFA, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x3D, 0x1D, 0x96, 0x06, 0x00, 0x09, 0x1F, 0x02, 0x09, 0x1D, 0x02, 0x1C, 0x1D, 0x96, 0x14, 0x00, - 0x09, 0x20, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0xFD, 0x03, 0x00, 0x00, 0x07, 0x02, 0x00, - 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x14, 0x00, 0x09, 0x21, 0x02, 0x07, 0x04, 0x00, 0x00, - 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, - 0x14, 0x00, 0x09, 0x22, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x09, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x03, 0x00, 0x08, 0x1C, 0x02, 0x1D, 0x96, - 0x09, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x08, 0x04, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x09, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, - 0x08, 0x07, 0x08, 0x05, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, - 0x17, 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, 0x02, 0x08, 0x10, 0x1C, 0x96, 0x07, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x0D, 0x00, 0x07, 0x06, 0x00, 0x00, - 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x02, 0x08, 0x0A, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x00 + 0x96, 0x14, 0x00, 0x09, 0x1F, 0x02, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0xFA, 0x00, 0x00, 0x00, + 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x06, 0x00, 0x09, 0x20, 0x02, 0x09, + 0x1E, 0x02, 0x1C, 0x1D, 0x96, 0x14, 0x00, 0x09, 0x21, 0x02, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, + 0xFD, 0x03, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x14, 0x00, + 0x09, 0x22, 0x02, 0x07, 0x04, 0x00, 0x00, 0x00, 0x07, 0x64, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, + 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, 0x14, 0x00, 0x09, 0x23, 0x02, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x09, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x00, 0x08, 0x01, 0x3D, 0x1D, 0x96, + 0x03, 0x00, 0x08, 0x1C, 0x02, 0x1D, 0x96, 0x09, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x08, 0x04, + 0x08, 0x0B, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, + 0x09, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x08, 0x07, 0x08, 0x05, 0x1C, 0x96, 0x07, 0x00, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x96, 0x08, 0x00, 0x07, 0x83, 0x00, 0x00, 0x00, + 0x02, 0x08, 0x10, 0x1C, 0x96, 0x07, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, + 0x96, 0x0D, 0x00, 0x07, 0x06, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x02, 0x08, 0x0B, + 0x1C, 0x96, 0x07, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3D, 0x17, 0x00 }; diff --git a/swfdec/swfdec_interactive_object.c b/swfdec/swfdec_interactive_object.c new file mode 100644 index 00000000..3d1d1b20 --- /dev/null +++ b/swfdec/swfdec_interactive_object.c @@ -0,0 +1,39 @@ +/* Swfdec + * Copyright (C) 2008 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 + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_interactive_object.h" +#include "swfdec_debug.h" + + +G_DEFINE_TYPE (SwfdecInteractiveObject, swfdec_interactive_object, SWFDEC_TYPE_DISPLAY_OBJECT) + +static void +swfdec_interactive_object_class_init (SwfdecInteractiveObjectClass *klass) +{ +} + +static void +swfdec_interactive_object_init (SwfdecInteractiveObject *interactive_object) +{ +} + diff --git a/swfdec/swfdec_interactive_object.h b/swfdec/swfdec_interactive_object.h new file mode 100644 index 00000000..8d901c0a --- /dev/null +++ b/swfdec/swfdec_interactive_object.h @@ -0,0 +1,51 @@ +/* Swfdec + * Copyright (C) 2008 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_INTERACTIVE_OBJECT_H_ +#define _SWFDEC_INTERACTIVE_OBJECT_H_ + +#include <swfdec/swfdec_display_object.h> + +G_BEGIN_DECLS + +//typedef struct _SwfdecInteractiveObject SwfdecInteractiveObject; +typedef struct _SwfdecInteractiveObjectClass SwfdecInteractiveObjectClass; + +#define SWFDEC_TYPE_INTERACTIVE_OBJECT (swfdec_interactive_object_get_type()) +#define SWFDEC_IS_INTERACTIVE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_INTERACTIVE_OBJECT)) +#define SWFDEC_IS_INTERACTIVE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_INTERACTIVE_OBJECT)) +#define SWFDEC_INTERACTIVE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_INTERACTIVE_OBJECT, SwfdecInteractiveObject)) +#define SWFDEC_INTERACTIVE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_INTERACTIVE_OBJECT, SwfdecInteractiveObjectClass)) +#define SWFDEC_INTERACTIVE_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_INTERACTIVE_OBJECT, SwfdecInteractiveObjectClass)) + +struct _SwfdecInteractiveObject +{ + SwfdecDisplayObject display_object; +}; + +struct _SwfdecInteractiveObjectClass +{ + SwfdecDisplayObjectClass display_object_class; +}; + +GType swfdec_interactive_object_get_type (void); + + +G_END_DECLS +#endif diff --git a/swfdec/swfdec_internal.h b/swfdec/swfdec_internal.h index d42af096..e9dd3016 100644 --- a/swfdec/swfdec_internal.h +++ b/swfdec/swfdec_internal.h @@ -33,8 +33,6 @@ G_BEGIN_DECLS void swfdec_player_preinit_global (SwfdecAsContext * context); void swfdec_net_stream_init_context (SwfdecPlayer * player); -void swfdec_sprite_movie_init_context (SwfdecPlayer * player); -void swfdec_video_movie_init_context (SwfdecPlayer * player); /* functions that shouldn't go into public headers */ diff --git a/swfdec/swfdec_interval.c b/swfdec/swfdec_interval.c index dd0c3903..dcbd2feb 100644 --- a/swfdec/swfdec_interval.c +++ b/swfdec/swfdec_interval.c @@ -33,7 +33,7 @@ #include "swfdec_player_internal.h" #include "swfdec_resource.h" -G_DEFINE_TYPE (SwfdecInterval, swfdec_interval, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecInterval, swfdec_interval, SWFDEC_TYPE_GC_OBJECT) static void swfdec_interval_mark (SwfdecGcObject *object) @@ -41,11 +41,10 @@ swfdec_interval_mark (SwfdecGcObject *object) guint i; SwfdecInterval *interval = SWFDEC_INTERVAL (object); - swfdec_gc_object_mark (interval->object); swfdec_gc_object_mark (interval->sandbox); if (interval->fun_name) swfdec_as_string_mark (interval->fun_name); - for (i = 0; i < interval->n_args; i++) { + for (i = 0; i < interval->n_args + 1; i++) { swfdec_as_value_mark (&interval->args[i]); } @@ -56,17 +55,18 @@ static void swfdec_interval_dispose (GObject *object) { SwfdecInterval *interval = SWFDEC_INTERVAL (object); + SwfdecAsContext *cx = swfdec_gc_object_get_context (interval); - if (interval->n_args) { - swfdec_as_context_unuse_mem (swfdec_gc_object_get_context (interval), - interval->n_args * sizeof (SwfdecAsValue)); - g_free (interval->args); + if (interval->args) { + swfdec_as_context_unuse_mem (cx, + (interval->n_args + 1) * sizeof (SwfdecAsValue)); + g_slice_free1 ((interval->n_args + 1) * sizeof (SwfdecAsValue), interval->args); interval->args = NULL; interval->n_args = 0; } /* needed here when GC'ed by closing the player */ if (interval->timeout.callback != NULL) { - swfdec_player_remove_timeout (SWFDEC_PLAYER (swfdec_gc_object_get_context (object)), &interval->timeout); + swfdec_player_remove_timeout (SWFDEC_PLAYER (cx), &interval->timeout); interval->timeout.callback = NULL; } @@ -100,32 +100,37 @@ swfdec_interval_trigger (SwfdecTimeout *timeout) if (interval->repeat) { timeout->timestamp += SWFDEC_MSECS_TO_TICKS (interval->msecs); - swfdec_player_add_timeout (SWFDEC_PLAYER (context), timeout); + swfdec_player_add_timeout (player, timeout); } else { player->priv->intervals = g_list_remove (player->priv->intervals, interval); interval->timeout.callback = NULL; } swfdec_sandbox_use (interval->sandbox); if (interval->fun_name) { - swfdec_as_object_call (interval->object, - interval->fun_name, interval->n_args, interval->args, &ret); + SwfdecAsObject *object = swfdec_as_value_to_object (context, interval->args[0]); + if (object) { + swfdec_as_object_call (object, + interval->fun_name, interval->n_args, interval->args, &ret); + } } else { - swfdec_as_function_call (SWFDEC_AS_FUNCTION (interval->object), NULL, - interval->n_args, interval->args, &ret); + /* we check that the relay's type is correct upon adding the interval */ + swfdec_as_function_call (SWFDEC_AS_FUNCTION ( + SWFDEC_AS_VALUE_GET_OBJECT (interval->args[0])->relay), + NULL, interval->n_args, &interval->args[1], &ret); } swfdec_sandbox_unuse (interval->sandbox); } static guint swfdec_interval_new (SwfdecPlayer *player, guint msecs, gboolean repeat, - SwfdecAsObject *object, const char *fun_name, + const SwfdecAsValue *src, const char *fun_name, guint n_args, const SwfdecAsValue *args) { SwfdecAsContext *context; SwfdecInterval *interval; context = SWFDEC_AS_CONTEXT (player); - if (n_args && !swfdec_as_context_try_use_mem (context, n_args * sizeof (SwfdecAsValue))) { + if (!swfdec_as_context_try_use_mem (context, (n_args + 1) * sizeof (SwfdecAsValue))) { swfdec_as_context_abort (context, "Too many arguments passed to setInterval/setTimeout"); return 0; @@ -133,13 +138,15 @@ swfdec_interval_new (SwfdecPlayer *player, guint msecs, gboolean repeat, interval = g_object_new (SWFDEC_TYPE_INTERVAL, "context", context, NULL); interval->id = ++player->priv->interval_id; - interval->sandbox = SWFDEC_SANDBOX (context->global); + interval->sandbox = swfdec_sandbox_get (player); interval->msecs = msecs; interval->repeat = repeat; - interval->object = object; interval->fun_name = fun_name; interval->n_args = n_args; - interval->args = g_memdup (args, n_args * sizeof (SwfdecAsValue)); + interval->args = g_slice_alloc ((n_args + 1) * sizeof (SwfdecAsValue)); + interval->args[0] = *src; + if (n_args) + memcpy (&interval->args[1], args, n_args * sizeof (SwfdecAsValue)); interval->timeout.timestamp = player->priv->time + SWFDEC_MSECS_TO_TICKS (interval->msecs); interval->timeout.callback = swfdec_interval_trigger; swfdec_player_add_timeout (player, &interval->timeout); @@ -154,22 +161,26 @@ guint swfdec_interval_new_function (SwfdecPlayer *player, guint msecs, gboolean repeat, SwfdecAsFunction *fun, guint n_args, const SwfdecAsValue *args) { + SwfdecAsValue val; + g_return_val_if_fail (SWFDEC_IS_PLAYER (player), 0); g_return_val_if_fail (msecs > 0, 0); g_return_val_if_fail (SWFDEC_IS_AS_FUNCTION (fun), 0); g_return_val_if_fail (n_args == 0 || args != NULL, 0); - return swfdec_interval_new (player, msecs, repeat, SWFDEC_AS_OBJECT (fun), NULL, n_args, args); + SWFDEC_AS_VALUE_SET_OBJECT (&val, + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (fun))); + return swfdec_interval_new (player, msecs, repeat, &val, NULL, n_args, args); } guint swfdec_interval_new_object (SwfdecPlayer *player, guint msecs, gboolean repeat, - SwfdecAsObject *thisp, const char *fun_name, + const SwfdecAsValue *thisp, const char *fun_name, guint n_args, const SwfdecAsValue *args) { g_return_val_if_fail (SWFDEC_IS_PLAYER (player), 0); g_return_val_if_fail (msecs > 0, 0); - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (thisp), 0); + g_return_val_if_fail (thisp != NULL, 0); g_return_val_if_fail (fun_name != NULL, 0); g_return_val_if_fail (n_args == 0 || args != NULL, 0); diff --git a/swfdec/swfdec_interval.h b/swfdec/swfdec_interval.h index 8e825110..2199695f 100644 --- a/swfdec/swfdec_interval.h +++ b/swfdec/swfdec_interval.h @@ -20,8 +20,8 @@ #ifndef _SWFDEC_INTERVAL_H_ #define _SWFDEC_INTERVAL_H_ -#include <swfdec/swfdec_as_object.h> #include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_gc_object.h> #include <swfdec/swfdec_player_internal.h> #include <swfdec/swfdec_sandbox.h> @@ -38,7 +38,7 @@ typedef struct _SwfdecIntervalClass SwfdecIntervalClass; #define SWFDEC_INTERVAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_INTERVAL, SwfdecIntervalClass)) struct _SwfdecInterval { - SwfdecAsObject asobject; + SwfdecGcObject gc_object; SwfdecTimeout timeout; SwfdecSandbox * sandbox; /* sandbox we run the script in */ @@ -46,7 +46,6 @@ struct _SwfdecInterval { guint msecs; /* interval in milliseconds */ gboolean repeat; /* TRUE for calling in intervals, FALSE for single-shot */ /* if calling named function */ - SwfdecAsObject * object; /* this object or function to call (depending on fun_name) */ const char * fun_name; /* name of function or NULL if object is function */ guint n_args; /* number of arguments to call function with */ @@ -54,7 +53,7 @@ struct _SwfdecInterval { }; struct _SwfdecIntervalClass { - SwfdecAsObjectClass asobject_class; + SwfdecGcObjectClass gc_object_class; }; GType swfdec_interval_get_type (void); @@ -68,7 +67,7 @@ guint swfdec_interval_new_function (SwfdecPlayer * player, guint swfdec_interval_new_object (SwfdecPlayer * player, guint msecs, gboolean repeat, - SwfdecAsObject * thisp, + const SwfdecAsValue * thisp, const char * fun_name, guint n_args, const SwfdecAsValue * args); diff --git a/swfdec/swfdec_key_as.c b/swfdec/swfdec_key_as.c index f89b2b88..2c349e21 100644 --- a/swfdec/swfdec_key_as.c +++ b/swfdec/swfdec_key_as.c @@ -34,7 +34,7 @@ swfdec_key_getAscii (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - SWFDEC_AS_VALUE_SET_INT (retval, player->priv->last_character); + *retval = swfdec_as_value_from_integer (cx, player->priv->last_character); } SWFDEC_AS_NATIVE (800, 1, swfdec_key_getCode) @@ -44,7 +44,7 @@ swfdec_key_getCode (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - SWFDEC_AS_VALUE_SET_INT (retval, player->priv->last_keycode); + *retval = swfdec_as_value_from_integer (cx, player->priv->last_keycode); } SWFDEC_AS_NATIVE (800, 2, swfdec_key_isDown) @@ -58,7 +58,7 @@ swfdec_key_isDown (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc < 1) return; - id = swfdec_as_value_to_integer (cx, &argv[0]); + id = swfdec_as_value_to_integer (cx, argv[0]); if (id >= 256) { SWFDEC_FIXME ("id %u too big for a keycode", id); id %= 256; diff --git a/swfdec/swfdec_load_object.c b/swfdec/swfdec_load_object.c index cc75a586..339b145b 100644 --- a/swfdec/swfdec_load_object.c +++ b/swfdec/swfdec_load_object.c @@ -38,7 +38,7 @@ static SwfdecPlayer * swfdec_load_object_stream_target_get_player (SwfdecStreamTarget *target) { - return SWFDEC_PLAYER (swfdec_gc_object_get_context (SWFDEC_LOAD_OBJECT (target)->target)); + return SWFDEC_PLAYER (swfdec_gc_object_get_context (target)); } static gboolean @@ -47,10 +47,11 @@ swfdec_load_object_stream_target_parse (SwfdecStreamTarget *target, { SwfdecLoader *loader = SWFDEC_LOADER (stream); SwfdecLoadObject *load_object = SWFDEC_LOAD_OBJECT (target); + SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (target)); if (load_object->progress != NULL) { swfdec_sandbox_use (load_object->sandbox); - load_object->progress (load_object->target, + load_object->progress (player, &load_object->target, swfdec_loader_get_loaded (loader), swfdec_loader_get_size (loader)); swfdec_sandbox_unuse (load_object->sandbox); } @@ -63,6 +64,7 @@ swfdec_load_object_stream_target_error (SwfdecStreamTarget *target, { SwfdecLoader *loader = SWFDEC_LOADER (stream); SwfdecLoadObject *load_object = SWFDEC_LOAD_OBJECT (target); + SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (load_object->sandbox)); /* break reference to the loader */ swfdec_stream_set_target (SWFDEC_STREAM (loader), NULL); @@ -71,18 +73,18 @@ swfdec_load_object_stream_target_error (SwfdecStreamTarget *target, /* call finish */ swfdec_sandbox_use (load_object->sandbox); - load_object->finish (load_object->target, NULL); + load_object->finish (player, &load_object->target, NULL); swfdec_sandbox_unuse (load_object->sandbox); /* unroot */ - swfdec_player_unroot (SWFDEC_PLAYER ( - swfdec_gc_object_get_context (load_object->sandbox)), load_object); + swfdec_player_unroot (player, load_object); } static void swfdec_load_object_stream_target_close (SwfdecStreamTarget *target, SwfdecStream *stream) { + SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (target)); SwfdecLoadObject *load_object = SWFDEC_LOAD_OBJECT (target); char *text; @@ -92,21 +94,19 @@ swfdec_load_object_stream_target_close (SwfdecStreamTarget *target, /* break reference to the loader */ swfdec_stream_set_target (stream, NULL); load_object->loader = NULL; - g_object_unref (stream); /* call finish */ swfdec_sandbox_use (load_object->sandbox); if (text != NULL) { - load_object->finish (load_object->target, - swfdec_as_context_give_string (swfdec_gc_object_get_context (load_object->target), text)); + load_object->finish (player, &load_object->target, + swfdec_as_context_give_string (SWFDEC_AS_CONTEXT (player), text)); } else { - load_object->finish (load_object->target, SWFDEC_AS_STR_EMPTY); + load_object->finish (player, &load_object->target, SWFDEC_AS_STR_EMPTY); } swfdec_sandbox_unuse (load_object->sandbox); /* unroot */ - swfdec_player_unroot (SWFDEC_PLAYER ( - swfdec_gc_object_get_context (load_object->sandbox)), load_object); + swfdec_player_unroot (player, load_object); } static void @@ -120,7 +120,7 @@ swfdec_load_object_stream_target_init (SwfdecStreamTargetInterface *iface) /*** SWFDEC_LOAD_OBJECT ***/ -G_DEFINE_TYPE_WITH_CODE (SwfdecLoadObject, swfdec_load_object, G_TYPE_OBJECT, +G_DEFINE_TYPE_WITH_CODE (SwfdecLoadObject, swfdec_load_object, SWFDEC_TYPE_GC_OBJECT, G_IMPLEMENT_INTERFACE (SWFDEC_TYPE_STREAM_TARGET, swfdec_load_object_stream_target_init)) static void @@ -167,7 +167,7 @@ swfdec_load_object_load (SwfdecPlayer *player, gboolean allow, gpointer obj) /* call finish */ swfdec_sandbox_use (load->sandbox); - load->finish (load->target, NULL); + load->finish (player, &load->target, NULL); swfdec_sandbox_unuse (load->sandbox); /* unroot */ @@ -205,33 +205,35 @@ static void swfdec_load_object_mark (gpointer object, gpointer player) { SwfdecLoadObject *load = object; + + /* need to mark ourself, becuase we're not a real GcObject */ + swfdec_gc_object_mark (load); swfdec_gc_object_mark (load->sandbox); if (load->url) swfdec_as_string_mark (load->url); - swfdec_gc_object_mark (load->target); + swfdec_as_value_mark (&load->target); } void -swfdec_load_object_create (SwfdecAsObject *target, const char *url, - SwfdecBuffer *data, guint header_count, char **header_names, +swfdec_load_object_create (SwfdecPlayer *player, const SwfdecAsValue *target, + const char *url, SwfdecBuffer *data, guint header_count, char **header_names, char **header_values, SwfdecLoadObjectProgress progress, SwfdecLoadObjectFinish finish) { - SwfdecPlayer *player; SwfdecLoadObject *load; - g_return_if_fail (SWFDEC_IS_AS_OBJECT (target)); + g_return_if_fail (SWFDEC_IS_PLAYER (player)); + g_return_if_fail (target != NULL); g_return_if_fail (url != NULL); g_return_if_fail (header_count == 0 || header_names != NULL); g_return_if_fail (header_count == 0 || header_values != NULL); g_return_if_fail (finish != NULL); - player = SWFDEC_PLAYER (swfdec_gc_object_get_context (target)); - load = g_object_new (SWFDEC_TYPE_LOAD_OBJECT, NULL); - swfdec_player_root_full (player, load, swfdec_load_object_mark, g_object_unref); + load = g_object_new (SWFDEC_TYPE_LOAD_OBJECT, "context", player, NULL); + swfdec_player_root_full (player, load, swfdec_load_object_mark, NULL); - load->target = target; + load->target = *target; load->url = url; load->buffer = data; load->header_count = header_count; @@ -241,7 +243,7 @@ swfdec_load_object_create (SwfdecAsObject *target, const char *url, load->finish = finish; /* get the current security */ g_assert (SWFDEC_AS_CONTEXT (player)->frame); - load->sandbox = SWFDEC_SANDBOX (SWFDEC_AS_CONTEXT (player)->global); + load->sandbox = swfdec_sandbox_get (player); load->version = SWFDEC_AS_CONTEXT (player)->version; swfdec_player_request_resource (player, swfdec_load_object_request, load, NULL); } diff --git a/swfdec/swfdec_load_object.h b/swfdec/swfdec_load_object.h index c44c9bed..34813f20 100644 --- a/swfdec/swfdec_load_object.h +++ b/swfdec/swfdec_load_object.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS typedef struct _SwfdecLoadObject SwfdecLoadObject; typedef struct _SwfdecLoadObjectClass SwfdecLoadObjectClass; -typedef void (* SwfdecLoadObjectProgress) (SwfdecAsObject *target, - glong loaded, glong size); -typedef void (* SwfdecLoadObjectFinish) (SwfdecAsObject *target, - const char *text); +typedef void (* SwfdecLoadObjectProgress) (SwfdecPlayer *player, + const SwfdecAsValue *target, glong loaded, glong size); +typedef void (* SwfdecLoadObjectFinish) (SwfdecPlayer *player, + const SwfdecAsValue *target, const char *text); #define SWFDEC_TYPE_LOAD_OBJECT (swfdec_load_object_get_type()) #define SWFDEC_IS_LOAD_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_LOAD_OBJECT)) @@ -44,7 +44,7 @@ typedef void (* SwfdecLoadObjectFinish) (SwfdecAsObject *target, #define SWFDEC_LOAD_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_LOAD_OBJECT, SwfdecLoadObjectClass)) struct _SwfdecLoadObject { - GObject object; + SwfdecGcObject object; const char * url; /* GC'ed url to request */ SwfdecBuffer * buffer; /* data to send */ @@ -55,18 +55,19 @@ struct _SwfdecLoadObject { SwfdecSandbox * sandbox; /* sandbox that inited the loading */ guint version; /* version used when initiating the load - for parsing the data */ - SwfdecAsObject * target; /* target object */ + SwfdecAsValue target; /* target (either movie or object) */ SwfdecLoadObjectProgress progress; /* progress callback */ SwfdecLoadObjectFinish finish; /* finish callback */ }; struct _SwfdecLoadObjectClass { - GObjectClass object_class; + SwfdecGcObjectClass object_class; }; GType swfdec_load_object_get_type (void); -void swfdec_load_object_create (SwfdecAsObject * target, +void swfdec_load_object_create (SwfdecPlayer * player, + const SwfdecAsValue * target, const char * url, SwfdecBuffer * data, guint header_count, diff --git a/swfdec/swfdec_load_object_as.c b/swfdec/swfdec_load_object_as.c index a1a7956e..97eb14ef 100644 --- a/swfdec/swfdec_load_object_as.c +++ b/swfdec/swfdec_load_object_as.c @@ -31,35 +31,45 @@ #include "swfdec_player_internal.h" static void -swfdec_load_object_on_finish (SwfdecAsObject *target, const char *text) +swfdec_load_object_on_finish (SwfdecPlayer *player, const SwfdecAsValue *target, const char *text) { + SwfdecAsObject *object; SwfdecAsValue val; + object = SWFDEC_AS_VALUE_GET_COMPOSITE (*target); + if (object == NULL) + return; + if (text != NULL) { SWFDEC_AS_VALUE_SET_STRING (&val, text); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (&val); } - swfdec_as_object_call (target, SWFDEC_AS_STR_onData, 1, &val, NULL); + swfdec_as_object_call (object, SWFDEC_AS_STR_onData, 1, &val, NULL); } static void -swfdec_load_object_on_progress (SwfdecAsObject *target, glong size, - glong loaded) +swfdec_load_object_on_progress (SwfdecPlayer *player, const SwfdecAsValue *target, + glong size, glong loaded) { + SwfdecAsContext *cx = SWFDEC_AS_CONTEXT (player); + SwfdecAsObject *object; SwfdecAsValue val; - SWFDEC_AS_VALUE_SET_NUMBER (&val, loaded); - swfdec_as_object_set_variable_and_flags (target, SWFDEC_AS_STR__bytesLoaded, + object = SWFDEC_AS_VALUE_GET_COMPOSITE (*target); + if (object == NULL) + return; + val = swfdec_as_value_from_number (cx, loaded); + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR__bytesLoaded, &val, SWFDEC_AS_VARIABLE_HIDDEN); if (size >= 0) { - SWFDEC_AS_VALUE_SET_NUMBER (&val, size); + val = swfdec_as_value_from_number (cx, size); } else { - SWFDEC_AS_VALUE_SET_NUMBER (&val, loaded); + val = swfdec_as_value_from_number (cx, loaded); } - swfdec_as_object_set_variable_and_flags (target, SWFDEC_AS_STR__bytesTotal, + swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR__bytesTotal, &val, SWFDEC_AS_VARIABLE_HIDDEN); } @@ -72,12 +82,15 @@ swfdec_load_object_as_load (SwfdecAsContext *cx, SwfdecAsObject *object, guint a const char *url; SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); - SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_OBJECT, &object, "s", &url); + SWFDEC_AS_CHECK (0, NULL, "s", &url); + if (object == NULL) + return; - swfdec_load_object_create (object, url, NULL, 0, NULL, NULL, + SWFDEC_AS_VALUE_SET_COMPOSITE (&val, object); + swfdec_load_object_create (SWFDEC_PLAYER (cx), &val, url, NULL, 0, NULL, NULL, swfdec_load_object_on_progress, swfdec_load_object_on_finish); - SWFDEC_AS_VALUE_SET_INT (&val, 0); + val = swfdec_as_value_from_integer (cx, 0); swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR__bytesLoaded, &val, SWFDEC_AS_VARIABLE_HIDDEN); SWFDEC_AS_VALUE_SET_UNDEFINED (&val); @@ -112,7 +125,7 @@ swfdec_load_object_as_get_headers (SwfdecAsObject *object, guint *header_count, const char *name; SwfdecAsContext *cx; - cx = swfdec_gc_object_get_context (object); + cx = object->context; array_names = g_ptr_array_new (); array_values = g_ptr_array_new (); @@ -121,20 +134,20 @@ swfdec_load_object_as_get_headers (SwfdecAsObject *object, guint *header_count, { g_ptr_array_add (array_names, g_strdup (SWFDEC_AS_STR_Content_Type)); g_ptr_array_add (array_values, - g_strdup (swfdec_as_value_to_string (cx, &val))); + g_strdup (swfdec_as_value_to_string (cx, val))); } if (!swfdec_as_object_get_variable (object, SWFDEC_AS_STR__customHeaders, &val)) goto end; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (val)) { SWFDEC_WARNING ("_customHeaders is not an object"); goto end; } - list = SWFDEC_AS_VALUE_GET_OBJECT (&val); + list = SWFDEC_AS_VALUE_GET_COMPOSITE (val); swfdec_as_object_get_variable (list, SWFDEC_AS_STR_length, &val); - length = swfdec_as_value_to_integer (cx, &val); + length = swfdec_as_value_to_integer (cx, val); /* FIXME: solve this with foreach, so it gets faster for weird cases */ name = NULL; @@ -142,9 +155,9 @@ swfdec_load_object_as_get_headers (SwfdecAsObject *object, guint *header_count, swfdec_as_object_get_variable (list, swfdec_as_integer_to_string (cx, i), &val); if (name == NULL) { - name = swfdec_as_value_to_string (cx, &val); + name = swfdec_as_value_to_string (cx, val); } else { - const char *value = swfdec_as_value_to_string (cx, &val); + const char *value = swfdec_as_value_to_string (cx, val); for (j = 0; j < G_N_ELEMENTS (disallowed_names); j++) { if (g_ascii_strcasecmp (name, disallowed_names[j]) == 0) break; @@ -188,10 +201,12 @@ swfdec_load_object_as_send (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecBuffer *buffer; SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); - SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_OBJECT, &object, "s|ss", &url, &target, &method); + SWFDEC_AS_CHECK (0, NULL, "s|ss", &url, &target, &method); + if (object == NULL) + return; - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - data = swfdec_as_value_to_string (cx, &val); + SWFDEC_AS_VALUE_SET_COMPOSITE (&val, object); + data = swfdec_as_value_to_string (cx, val); if (method == NULL || g_ascii_strcasecmp (method, "GET") == 0) { url = swfdec_as_context_give_string (cx, @@ -223,29 +238,32 @@ swfdec_load_object_as_sendAndLoad (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecAsValue val; SwfdecBuffer *buffer; - SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_OBJECT, &object, "so|s", &url, &target, + SWFDEC_AS_CHECK (0, NULL, "so|s", &url, &target, &method); + if (object == NULL) + return; - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - data = swfdec_as_value_to_string (cx, &val); + SWFDEC_AS_VALUE_SET_COMPOSITE (&val, object); + data = swfdec_as_value_to_string (cx, val); - if (method == NULL || g_ascii_strcasecmp (method, "GET") == 0) { + if (method != NULL && g_ascii_strcasecmp (method, "GET") == 0) { url = swfdec_as_context_give_string (cx, g_strjoin (NULL, url, "?", data, NULL)); buffer = NULL; } else { + gsize len = strlen (data); // don't send the nul-byte - buffer = swfdec_buffer_new_for_data (g_memdup (data, strlen (data)), - strlen (data)); + buffer = swfdec_buffer_new_for_data (g_memdup (data, len), len); } swfdec_load_object_as_get_headers (object, &header_count, &header_names, &header_values); - swfdec_load_object_create (target, url, buffer, header_count, header_names, + SWFDEC_AS_VALUE_SET_COMPOSITE (&val, target); + swfdec_load_object_create (SWFDEC_PLAYER (cx), &val, url, buffer, header_count, header_names, header_values, swfdec_load_object_on_progress, swfdec_load_object_on_finish); - SWFDEC_AS_VALUE_SET_INT (&val, 0); + val = swfdec_as_value_from_integer (cx, 0); swfdec_as_object_set_variable_and_flags (target, SWFDEC_AS_STR__bytesLoaded, &val, SWFDEC_AS_VARIABLE_HIDDEN); SWFDEC_AS_VALUE_SET_UNDEFINED (&val); diff --git a/swfdec/swfdec_load_sound.c b/swfdec/swfdec_load_sound.c index eec790f2..7fa60b4f 100644 --- a/swfdec/swfdec_load_sound.c +++ b/swfdec/swfdec_load_sound.c @@ -91,7 +91,7 @@ swfdec_load_sound_sound_provider_init (SwfdecSoundProviderInterface *iface) static SwfdecPlayer * swfdec_load_sound_stream_target_get_player (SwfdecStreamTarget *target) { - return SWFDEC_PLAYER (swfdec_gc_object_get_context (SWFDEC_LOAD_SOUND (target)->target)); + return SWFDEC_PLAYER (SWFDEC_LOAD_SOUND (target)->target->context); } static gboolean @@ -404,13 +404,13 @@ swfdec_load_sound_new (SwfdecAsObject *target, const char *url) SwfdecAsContext *context; char *missing; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (target), NULL); + g_return_val_if_fail (target != NULL, NULL); g_return_val_if_fail (url != NULL, NULL); - context = swfdec_gc_object_get_context (target); + context = target->context; sound = g_object_new (SWFDEC_TYPE_LOAD_SOUND, NULL); sound->target = target; - sound->sandbox = SWFDEC_SANDBOX (context->global); + sound->sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (context)); sound->url = g_strdup (url); g_assert (sound->sandbox); swfdec_player_allow_by_matrix (SWFDEC_PLAYER (context), sound->sandbox, diff --git a/swfdec/swfdec_loadvars_as.c b/swfdec/swfdec_loadvars_as.c index 75febf76..b242a98c 100644 --- a/swfdec/swfdec_loadvars_as.c +++ b/swfdec/swfdec_loadvars_as.c @@ -47,5 +47,5 @@ swfdec_loadvars_decode (SwfdecAsContext *cx, SwfdecAsObject *obj, return; } - swfdec_as_object_decode (obj, swfdec_as_value_to_string (cx, &argv[0])); + swfdec_as_object_decode (obj, swfdec_as_value_to_string (cx, argv[0])); } diff --git a/swfdec/swfdec_morph_movie.c b/swfdec/swfdec_morph_movie.c index c057c54e..de0b0a8c 100644 --- a/swfdec/swfdec_morph_movie.c +++ b/swfdec/swfdec_morph_movie.c @@ -96,7 +96,8 @@ swfdec_morph_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix, SwfdecRect rect; swfdec_rect_transform (&rect, &movie->original_extents, matrix); - swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); } static void diff --git a/swfdec/swfdec_mouse_as.c b/swfdec/swfdec_mouse_as.c index 88ee046d..8b9ed9c8 100644 --- a/swfdec/swfdec_mouse_as.c +++ b/swfdec/swfdec_mouse_as.c @@ -34,7 +34,7 @@ swfdec_mouse_show (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - SWFDEC_AS_VALUE_SET_INT (retval, player->priv->mouse_visible ? 1 : 0); + *retval = swfdec_as_value_from_integer (cx, player->priv->mouse_visible ? 1 : 0); player->priv->mouse_visible = TRUE; } @@ -45,7 +45,7 @@ swfdec_mouse_hide (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecPlayer *player = SWFDEC_PLAYER (cx); - SWFDEC_AS_VALUE_SET_INT (retval, player->priv->mouse_visible ? 1 : 0); + *retval = swfdec_as_value_from_integer (cx, player->priv->mouse_visible ? 1 : 0); player->priv->mouse_visible = FALSE; } diff --git a/swfdec/swfdec_movie.c b/swfdec/swfdec_movie.c index adbe5a74..735cf781 100644 --- a/swfdec/swfdec_movie.c +++ b/swfdec/swfdec_movie.c @@ -34,6 +34,7 @@ #include "swfdec_debug.h" #include "swfdec_draw.h" #include "swfdec_event.h" +#include "swfdec_filter.h" #include "swfdec_graphic.h" #include "swfdec_image.h" #include "swfdec_loader_internal.h" @@ -42,6 +43,7 @@ #include "swfdec_sprite_movie.h" #include "swfdec_renderer_internal.h" #include "swfdec_resource.h" +#include "swfdec_sandbox.h" #include "swfdec_system.h" #include "swfdec_text_field_movie.h" #include "swfdec_utils.h" @@ -65,12 +67,12 @@ enum { static guint signals[LAST_SIGNAL] = { 0, }; -G_DEFINE_ABSTRACT_TYPE (SwfdecMovie, swfdec_movie, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_ABSTRACT_TYPE (SwfdecMovie, swfdec_movie, SWFDEC_TYPE_AS_RELAY) static void swfdec_movie_init (SwfdecMovie * movie) { - movie->blend_mode = 1; + movie->blend_mode = SWFDEC_BLEND_MODE_NORMAL; movie->xscale = 100; movie->yscale = 100; @@ -369,8 +371,8 @@ swfdec_movie_do_remove (SwfdecMovie *movie, gboolean destroy) SwfdecActor *actor = SWFDEC_ACTOR (movie); swfdec_movie_unset_actor (player, actor); if ((actor->events && - swfdec_event_list_has_conditions (actor->events, SWFDEC_AS_OBJECT (movie), SWFDEC_EVENT_UNLOAD, 0)) || - swfdec_as_object_has_variable (SWFDEC_AS_OBJECT (movie), SWFDEC_AS_STR_onUnload)) { + swfdec_event_list_has_conditions (actor->events, SWFDEC_EVENT_UNLOAD, 0)) || + swfdec_as_object_has_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)), SWFDEC_AS_STR_onUnload)) { swfdec_actor_queue_script (actor, SWFDEC_EVENT_UNLOAD); destroy = FALSE; } @@ -442,41 +444,12 @@ swfdec_movie_destroy (SwfdecMovie *movie) if (movie->invalidate_last) player->priv->invalid_pending = g_slist_remove (player->priv->invalid_pending, movie); movie->state = SWFDEC_MOVIE_STATE_DESTROYED; - /* unset prototype here, so we don't work in AS anymore */ - SWFDEC_AS_OBJECT (movie)->prototype = NULL; - g_object_unref (movie); -} - -/** - * swfdec_movie_resolve: - * @movie: movie to resolve - * - * Resolves a movie clip to its real version. Since movie clips can be - * explicitly destroyed, they have problems with references to them. In the - * case of destruction, these references will remain as "dangling pointers". - * However, if a movie with the same name is later created again, the reference - * will point to that movie. This function does this resolving. - * - * Returns: The movie clip @movie resolves to or %NULL if none. - **/ -SwfdecMovie * -swfdec_movie_resolve (SwfdecMovie *movie) -{ - SwfdecMovie *parent; - - g_return_val_if_fail (SWFDEC_IS_MOVIE (movie), NULL); - - if (movie->state != SWFDEC_MOVIE_STATE_DESTROYED) - return movie; - if (movie->parent == NULL) { - SWFDEC_FIXME ("figure out how to resolve root movies"); - return NULL; + /* remove as value, so we can't be scripted anymore */ + if (movie->as_value) { + movie->as_value->movie = NULL; + movie->as_value = NULL; } - parent = swfdec_movie_resolve (movie->parent); - if (parent == NULL) - return NULL; - /* FIXME: include unnamed ones? */ - return swfdec_movie_get_by_name (parent, movie->original_name, FALSE); + g_object_unref (movie); } guint @@ -500,21 +473,13 @@ swfdec_movie_local_to_global (SwfdecMovie *movie, double *x, double *y) void swfdec_movie_rect_local_to_global (SwfdecMovie *movie, SwfdecRect *rect) { + cairo_matrix_t matrix; + g_return_if_fail (SWFDEC_IS_MOVIE (movie)); g_return_if_fail (rect != NULL); - swfdec_movie_local_to_global (movie, &rect->x0, &rect->y0); - swfdec_movie_local_to_global (movie, &rect->x1, &rect->y1); - if (rect->x0 > rect->x1) { - double tmp = rect->x1; - rect->x1 = rect->x0; - rect->x0 = tmp; - } - if (rect->y0 > rect->y1) { - double tmp = rect->y1; - rect->y1 = rect->y0; - rect->y0 = tmp; - } + swfdec_movie_local_to_global_matrix (movie, &matrix); + swfdec_rect_transform (rect, rect, &matrix); } void @@ -690,18 +655,33 @@ swfdec_movie_do_contains (SwfdecMovie *movie, double x, double y, gboolean event return NULL; } -static gboolean +/* NB: order is important */ +typedef enum { + SWFDEC_GROUP_NONE = 0, + SWFDEC_GROUP_NORMAL, + SWFDEC_GROUP_CACHED, + SWFDEC_GROUP_FILTERS +} SwfdecGroup; + +static SwfdecGroup swfdec_movie_needs_group (SwfdecMovie *movie) { - return (movie->blend_mode > 1); + /* yes, masked movies don't get filters applied */ + if (movie->filters && movie->masked_by == NULL) + return SWFDEC_GROUP_FILTERS; + if (movie->cache_as_bitmap) + return SWFDEC_GROUP_CACHED; + if (movie->blend_mode > 1) + return SWFDEC_GROUP_NORMAL; + return SWFDEC_GROUP_NONE; } static cairo_operator_t swfdec_movie_get_operator_for_blend_mode (guint blend_mode) { switch (blend_mode) { + case SWFDEC_BLEND_MODE_NONE: case SWFDEC_BLEND_MODE_NORMAL: - SWFDEC_ERROR ("shouldn't need to get operator without blend mode?!"); case SWFDEC_BLEND_MODE_LAYER: return CAIRO_OPERATOR_OVER; case SWFDEC_BLEND_MODE_ADD: @@ -727,6 +707,36 @@ swfdec_movie_get_operator_for_blend_mode (guint blend_mode) } } +static cairo_pattern_t * +swfdec_movie_apply_filters (SwfdecMovie *movie, cairo_pattern_t *pattern) +{ + SwfdecRectangle area; + SwfdecPlayer *player; + SwfdecRect rect; + GSList *walk; + double xscale, yscale; + + if (movie->filters == NULL) + return pattern; + + player = SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)); + rect = movie->original_extents; + swfdec_movie_rect_local_to_global (movie, &rect); + swfdec_rect_transform (&rect, &rect, + &player->priv->global_to_stage); + swfdec_rectangle_init_rect (&area, &rect); + /* FIXME: hack to make textfield borders work - looks like Adobe does this, too */ + area.width++; + area.height++; + xscale = player->priv->global_to_stage.xx * SWFDEC_TWIPS_SCALE_FACTOR; + yscale = player->priv->global_to_stage.yy * SWFDEC_TWIPS_SCALE_FACTOR; + for (walk = movie->filters; walk; walk = walk->next) { + pattern = swfdec_filter_apply (walk->data, pattern, xscale, yscale, &area); + swfdec_filter_get_rectangle (walk->data, &area, xscale, yscale, &area); + } + return pattern; +} + /** * swfdec_movie_mask: * @movie: The movie to act as the mask @@ -767,7 +777,8 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr, { SwfdecMovieClass *klass; SwfdecColorTransform trans; - gboolean group; + SwfdecGroup group; + gboolean needs_mask; g_return_if_fail (SWFDEC_IS_MOVIE (movie)); g_return_if_fail (cr != NULL); @@ -782,14 +793,21 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr, return; } - if (movie->masked_by != NULL) { - cairo_push_group (cr); - } group = swfdec_movie_needs_group (movie); - if (group) { + if (group == SWFDEC_GROUP_NORMAL) { SWFDEC_DEBUG ("pushing group for blend mode %u", movie->blend_mode); cairo_push_group (cr); + } else if (group != SWFDEC_GROUP_NONE) { + SWFDEC_FIXME ("implement cache-as-bitmap here"); + cairo_push_group (cr); + } + /* yes, movie with filters, don't get masked */ + needs_mask = movie->masked_by != NULL && movie->filters == NULL; + if (needs_mask) { + cairo_push_group (cr); } + + /* do extra save/restore so the render vfunc can mess with cr */ cairo_save (cr); SWFDEC_LOG ("transforming movie, transform: %g %g %g %g %g %g", @@ -805,31 +823,24 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr, #if 0 /* code to draw a red rectangle around the area occupied by this movie clip */ { - double x = 1.0, y = 0.0; - cairo_transform (cr, &movie->inverse_transform); - cairo_user_to_device_distance (cr, &x, &y); - cairo_set_source_rgb (cr, 1.0, 0.0, 0.0); - cairo_set_line_width (cr, 1 / sqrt (x * x + y * y)); - cairo_rectangle (cr, object->extents.x0 + 10, object->extents.y0 + 10, - object->extents.x1 - object->extents.x0 - 20, - object->extents.y1 - object->extents.y0 - 20); + cairo_save (cr); + cairo_transform (cr, &movie->inverse_matrix); + cairo_rectangle (cr, movie->extents.x0, movie->extents.y0, + movie->extents.x1 - movie->extents.x0, + movie->extents.y1 - movie->extents.y0); + swfdec_renderer_reset_matrix (cr); + cairo_set_source_rgb (cr, 0.0, 0.0, 1.0); + cairo_set_line_width (cr, 2.0); cairo_stroke (cr); + cairo_restore (cr); } #endif if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { g_warning ("error rendering with cairo: %s", cairo_status_to_string (cairo_status (cr))); } cairo_restore (cr); - if (group) { - cairo_pattern_t *pattern; - pattern = cairo_pop_group (cr); - cairo_set_source (cr, pattern); - cairo_set_operator (cr, swfdec_movie_get_operator_for_blend_mode (movie->blend_mode)); - cairo_paint (cr); - cairo_pattern_destroy (pattern); - } - if (movie->masked_by) { + if (needs_mask) { cairo_pattern_t *mask; cairo_matrix_t mat; if (movie->parent) @@ -847,6 +858,29 @@ swfdec_movie_render (SwfdecMovie *movie, cairo_t *cr, cairo_mask (cr, mask); cairo_pattern_destroy (mask); } + if (group == SWFDEC_GROUP_FILTERS) { + cairo_pattern_t *pattern; + + pattern = cairo_pop_group (cr); + cairo_save (cr); + swfdec_renderer_reset_matrix (cr); + { + cairo_matrix_t mat; + cairo_get_matrix (cr, &mat); + cairo_matrix_invert (&mat); + cairo_pattern_set_matrix (pattern, &mat); + } + pattern = swfdec_movie_apply_filters (movie, pattern); + cairo_set_source (cr, pattern); + cairo_set_operator (cr, swfdec_movie_get_operator_for_blend_mode (movie->blend_mode)); + cairo_paint (cr); + cairo_pattern_destroy (pattern); + cairo_restore (cr); + } else if (group != SWFDEC_GROUP_NONE) { + cairo_pop_group_to_source (cr); + cairo_set_operator (cr, swfdec_movie_get_operator_for_blend_mode (movie->blend_mode)); + cairo_paint (cr); + } } static void @@ -896,15 +930,8 @@ swfdec_movie_set_property (GObject *object, guint param_id, const GValue *value, movie->name = g_value_get_string (value); if (movie->name) { movie->name = swfdec_as_context_get_string (cx, movie->name); - movie->original_name = movie->name; } else { - movie->original_name = SWFDEC_AS_STR_EMPTY; - if (SWFDEC_IS_SPRITE_MOVIE (movie) || SWFDEC_IS_BUTTON_MOVIE (movie)) { - movie->name = swfdec_as_context_give_string (cx, - g_strdup_printf ("instance%u", ++SWFDEC_PLAYER (cx)->priv->unnamed_count)); - } else { - movie->name = SWFDEC_AS_STR_EMPTY; - } + movie->name = SWFDEC_AS_STR_EMPTY; } break; case PROP_PARENT: @@ -918,20 +945,12 @@ swfdec_movie_set_property (GObject *object, guint param_id, const GValue *value, /* invalidate the parent, so it gets visible */ swfdec_movie_queue_update (movie->parent, SWFDEC_MOVIE_INVALID_CHILDREN); } else { - SwfdecAsValue val; SwfdecPlayerPrivate *priv = SWFDEC_PLAYER (cx)->priv; priv->roots = g_list_insert_sorted (priv->roots, movie, swfdec_movie_compare_depths); - SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (cx, priv->system->version)); - swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (movie), SWFDEC_AS_STR__version, &val); } break; case PROP_RESOURCE: movie->resource = g_value_get_object (value); - /* NB: the resource assumes it can access the player via the movie */ - if (movie->resource->movie == NULL) { - g_assert (SWFDEC_IS_SPRITE_MOVIE (movie)); - movie->resource->movie = SWFDEC_SPRITE_MOVIE (movie); - } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); @@ -973,19 +992,18 @@ static void swfdec_movie_mark (SwfdecGcObject *object) { SwfdecMovie *movie = SWFDEC_MOVIE (object); - GList *walk; GSList *iter; if (movie->parent) swfdec_gc_object_mark (movie->parent); - swfdec_as_string_mark (movie->original_name); + if (movie->as_value) + swfdec_as_movie_value_mark (movie->as_value); swfdec_as_string_mark (movie->name); - for (walk = movie->list; walk; walk = walk->next) { - swfdec_gc_object_mark (walk->data); - } + g_list_foreach (movie->list, (GFunc) swfdec_gc_object_mark, NULL); + g_slist_foreach (movie->filters, (GFunc) swfdec_gc_object_mark, NULL); + for (iter = movie->variable_listeners; iter != NULL; iter = iter->next) { SwfdecMovieVariableListener *listener = iter->data; - swfdec_gc_object_mark (listener->object); swfdec_as_string_mark (listener->name); } swfdec_gc_object_mark (movie->resource); @@ -1007,6 +1025,8 @@ swfdec_movie_mark (SwfdecGcObject *object) gboolean swfdec_movie_is_scriptable (SwfdecMovie *movie) { + /* FIXME: It would be much easier if we'd just check that there's no as_value + * for non-scriptable movies */ return (SWFDEC_IS_ACTOR (movie) || SWFDEC_IS_VIDEO_MOVIE (movie)) && (swfdec_movie_get_version (movie) > 5 || !SWFDEC_IS_TEXT_FIELD_MOVIE (movie)); } @@ -1020,20 +1040,27 @@ swfdec_movie_get_by_name (SwfdecMovie *movie, const char *name, gboolean unnamed guint version = swfdec_gc_object_get_context (movie)->version; SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)); + if (name[0] == '\0') + return NULL; + i = swfdec_player_get_level (player, name, version); if (i >= 0) return SWFDEC_MOVIE (swfdec_player_get_movie_at_level (player, i)); for (walk = movie->list; walk; walk = walk->next) { SwfdecMovie *cur = walk->data; - if (cur->original_name == SWFDEC_AS_STR_EMPTY && !unnamed) - continue; if (swfdec_strcmp (version, cur->name, name) == 0) { if (swfdec_movie_is_scriptable (cur)) return cur; else return movie; } + if (unnamed && cur->name == SWFDEC_AS_STR_EMPTY && cur->as_value) { + if (swfdec_strcmp (version, cur->as_value->names[cur->as_value->n_names - 1], name) == 0) { + /* unnamed movies are always scriptable */ + return cur; + } + } } return NULL; } @@ -1058,48 +1085,8 @@ swfdec_movie_get_root (SwfdecMovie *movie) return movie; } -static gboolean -swfdec_movie_get_variable (SwfdecAsObject *object, SwfdecAsObject *orig, - const char *variable, SwfdecAsValue *val, guint *flags) -{ - SwfdecMovie *movie, *ret; - guint prop_id; - - movie = SWFDEC_MOVIE (object); - movie = swfdec_movie_resolve (movie); - if (movie == NULL) - return FALSE; - object = SWFDEC_AS_OBJECT (movie); - - if (SWFDEC_AS_OBJECT_CLASS (swfdec_movie_parent_class)->get (object, orig, variable, val, flags)) - return TRUE; - - /* FIXME: check that this is correct */ - if (swfdec_gc_object_get_context (object)->version > 5 && variable == SWFDEC_AS_STR__global) { - SWFDEC_AS_VALUE_SET_OBJECT (val, SWFDEC_AS_OBJECT (movie->resource->sandbox)); - *flags = 0; - return TRUE; - } - - ret = swfdec_movie_get_by_name (movie, variable, FALSE); - if (ret) { - SWFDEC_AS_VALUE_SET_OBJECT (val, SWFDEC_AS_OBJECT (ret)); - *flags = 0; - return TRUE; - } - - prop_id = swfdec_movie_property_lookup (variable); - if (prop_id != G_MAXUINT) { - swfdec_movie_property_get (movie, prop_id, val); - *flags = 0; - return TRUE; - } - - return FALSE; -} - void -swfdec_movie_add_variable_listener (SwfdecMovie *movie, SwfdecAsObject *object, +swfdec_movie_add_variable_listener (SwfdecMovie *movie, gpointer data, const char *name, const SwfdecMovieVariableListenerFunction function) { SwfdecMovieVariableListener *listener; @@ -1108,15 +1095,13 @@ swfdec_movie_add_variable_listener (SwfdecMovie *movie, SwfdecAsObject *object, for (iter = movie->variable_listeners; iter != NULL; iter = iter->next) { listener = iter->data; - if (listener->object == object && listener->name == name && + if (listener->data == data && listener->name == name && listener->function == function) - break; + return; } - if (iter != NULL) - return; listener = g_new0 (SwfdecMovieVariableListener, 1); - listener->object = object; + listener->data = data; listener->name = name; listener->function = function; @@ -1126,7 +1111,7 @@ swfdec_movie_add_variable_listener (SwfdecMovie *movie, SwfdecAsObject *object, void swfdec_movie_remove_variable_listener (SwfdecMovie *movie, - SwfdecAsObject *object, const char *name, + gpointer data, const char *name, const SwfdecMovieVariableListenerFunction function) { GSList *iter; @@ -1134,7 +1119,7 @@ swfdec_movie_remove_variable_listener (SwfdecMovie *movie, for (iter = movie->variable_listeners; iter != NULL; iter = iter->next) { SwfdecMovieVariableListener *listener = iter->data; - if (listener->object == object && listener->name == name && + if (listener->data == data && listener->name == name && listener->function == function) break; } @@ -1146,7 +1131,7 @@ swfdec_movie_remove_variable_listener (SwfdecMovie *movie, g_slist_remove (movie->variable_listeners, iter->data); } -static void +void swfdec_movie_call_variable_listeners (SwfdecMovie *movie, const char *name, const SwfdecAsValue *val) { @@ -1160,60 +1145,8 @@ swfdec_movie_call_variable_listeners (SwfdecMovie *movie, const char *name, !swfdec_str_case_equal (listener->name, name))) continue; - listener->function (listener->object, name, val); - } -} - -static void -swfdec_movie_set_variable (SwfdecAsObject *object, const char *variable, - const SwfdecAsValue *val, guint flags) -{ - SwfdecMovie *movie = SWFDEC_MOVIE (object); - guint prop_id; - - movie = swfdec_movie_resolve (movie); - if (movie == NULL) - return; - object = SWFDEC_AS_OBJECT (movie); - - prop_id = swfdec_movie_property_lookup (variable); - if (prop_id != G_MAXUINT) { - swfdec_movie_property_set (movie, prop_id, val); - return; + listener->function (listener->data, name, val); } - - swfdec_movie_call_variable_listeners (movie, variable, val); - - SWFDEC_AS_OBJECT_CLASS (swfdec_movie_parent_class)->set (object, variable, val, flags); -} - -static gboolean -swfdec_movie_foreach_variable (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) -{ - SwfdecMovie *movie = SWFDEC_MOVIE (object); - SwfdecAsValue val; - GList *walk; - gboolean ret; - - ret = SWFDEC_AS_OBJECT_CLASS (swfdec_movie_parent_class)->foreach (object, func, data); - - for (walk = movie->list; walk && ret; walk = walk->next) { - SwfdecMovie *cur = walk->data; - if (cur->original_name == SWFDEC_AS_STR_EMPTY) - continue; - SWFDEC_AS_VALUE_SET_OBJECT (&val, walk->data); - ret &= func (object, cur->name, &val, 0, data); - } - - return ret; -} - -static char * -swfdec_movie_get_debug (SwfdecAsObject *object) -{ - SwfdecMovie *movie = SWFDEC_MOVIE (object); - - return swfdec_movie_get_path (movie, TRUE); } typedef struct { @@ -1340,7 +1273,8 @@ swfdec_movie_do_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix, gb } swfdec_rect_union (&rect, &rect, &movie->draw_extents); swfdec_rect_transform (&rect, &rect, matrix); - swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); for (walk = movie->list; walk; walk = walk->next) { swfdec_movie_invalidate (walk->data, matrix, last); @@ -1351,16 +1285,49 @@ static GObject * swfdec_movie_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GObject *object; SwfdecPlayerPrivate *priv; + SwfdecAsContext *cx; + SwfdecAsObject *o; + SwfdecMovie *movie; + GObject *object; + const char *name; object = G_OBJECT_CLASS (swfdec_movie_parent_class)->constructor (type, n_construct_properties, construct_properties); + movie = SWFDEC_MOVIE (object); - priv = SWFDEC_PLAYER (swfdec_gc_object_get_context (object))->priv; + cx = swfdec_gc_object_get_context (movie); + priv = SWFDEC_PLAYER (cx)->priv; /* the movie is created invalid */ priv->invalid_pending = g_slist_prepend (priv->invalid_pending, object); + if (movie->name == SWFDEC_AS_STR_EMPTY && + (swfdec_movie_is_scriptable (movie) || SWFDEC_IS_ACTOR (movie))) { + name = swfdec_as_context_give_string (cx, + g_strdup_printf ("instance%u", ++priv->unnamed_count)); + } else { + name = movie->name; + } + if (name != SWFDEC_AS_STR_EMPTY) + movie->as_value = swfdec_as_movie_value_new (movie, name); + + /* make the resource ours if it doesn't belong to anyone yet */ + if (SWFDEC_AS_VALUE_IS_UNDEFINED (movie->resource->movie)) { + g_assert (SWFDEC_IS_SPRITE_MOVIE (movie)); + SWFDEC_AS_VALUE_SET_MOVIE (&movie->resource->movie, movie); + } + + /* create AsObject */ + o = swfdec_as_object_new_empty (cx); + o->movie = TRUE; + swfdec_as_object_set_relay (o, SWFDEC_AS_RELAY (movie)); + + /* set $version variable */ + if (movie->parent == NULL) { + SwfdecAsValue val; + SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (cx, priv->system->version)); + swfdec_as_object_set_variable (o, SWFDEC_AS_STR__version, &val); + } return object; } @@ -1369,7 +1336,6 @@ swfdec_movie_class_init (SwfdecMovieClass * movie_class) { GObjectClass *object_class = G_OBJECT_CLASS (movie_class); SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (movie_class); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (movie_class); object_class->constructor = swfdec_movie_constructor; object_class->dispose = swfdec_movie_dispose; @@ -1378,11 +1344,6 @@ swfdec_movie_class_init (SwfdecMovieClass * movie_class) gc_class->mark = swfdec_movie_mark; - asobject_class->get = swfdec_movie_get_variable; - asobject_class->set = swfdec_movie_set_variable; - asobject_class->foreach = swfdec_movie_foreach_variable; - asobject_class->debug = swfdec_movie_get_debug; - signals[MATRIX_CHANGED] = g_signal_new ("matrix-changed", G_TYPE_FROM_CLASS (movie_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -1607,7 +1568,7 @@ swfdec_movie_duplicate (SwfdecMovie *movie, const char *name, int depth) copy->draw_y = movie->draw_y; g_assert (copy->cache_state >= SWFDEC_MOVIE_INVALID_EXTENTS); - sandbox = SWFDEC_SANDBOX (swfdec_gc_object_get_context (movie)->global); + sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie))); swfdec_sandbox_unuse (sandbox); if (SWFDEC_IS_SPRITE_MOVIE (copy)) { SwfdecActor *actor = SWFDEC_ACTOR (copy); @@ -1630,7 +1591,13 @@ swfdec_movie_get_path (SwfdecMovie *movie, gboolean dot) s = g_string_new (""); do { if (movie->parent) { - g_string_prepend (s, movie->name); + if (movie->name != SWFDEC_AS_STR_EMPTY) { + g_string_prepend (s, movie->name); + } else if (movie->as_value) { + g_string_prepend (s, movie->as_value->names[movie->as_value->n_names - 1]); + } else { + g_assert_not_reached (); + } g_string_prepend_c (s, (dot ? '.' : '/')); } else { char *ret; @@ -1703,33 +1670,31 @@ swfdec_movie_get_own_resource (SwfdecMovie *movie) if (!SWFDEC_IS_SPRITE_MOVIE (movie)) return NULL; - if (movie->resource->movie != SWFDEC_SPRITE_MOVIE (movie)) + if (SWFDEC_AS_VALUE_GET_MOVIE (movie->resource->movie) != movie) return NULL; return movie->resource; } void -swfdec_movie_property_set (SwfdecMovie *movie, guint id, const SwfdecAsValue *val) +swfdec_movie_property_set (SwfdecMovie *movie, guint id, SwfdecAsValue val) { SwfdecMovieClass *klass; g_return_if_fail (SWFDEC_IS_MOVIE (movie)); - g_return_if_fail (val != NULL); klass = SWFDEC_MOVIE_GET_CLASS (movie); klass->property_set (movie, id, val); } -void -swfdec_movie_property_get (SwfdecMovie *movie, guint id, SwfdecAsValue *val) +SwfdecAsValue +swfdec_movie_property_get (SwfdecMovie *movie, guint id) { SwfdecMovieClass *klass; - g_return_if_fail (SWFDEC_IS_MOVIE (movie)); - g_return_if_fail (val != NULL); + g_return_val_if_fail (SWFDEC_IS_MOVIE (movie), SWFDEC_AS_VALUE_UNDEFINED); klass = SWFDEC_MOVIE_GET_CLASS (movie); - klass->property_get (movie, id, val); + return klass->property_get (movie, id); } diff --git a/swfdec/swfdec_movie.h b/swfdec/swfdec_movie.h index 512abf00..c0c1d7ad 100644 --- a/swfdec/swfdec_movie.h +++ b/swfdec/swfdec_movie.h @@ -22,6 +22,7 @@ #include <glib-object.h> #include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_movie_value.h> #include <swfdec/swfdec_color.h> #include <swfdec/swfdec.h> #include <swfdec/swfdec_event.h> @@ -78,6 +79,7 @@ typedef enum { SWFDEC_MOVIE_PROPERTY_YMOUSE = 21 } SwfdecMovieProperty; +#define SWFDEC_BLEND_MODE_NONE 0 #define SWFDEC_BLEND_MODE_NORMAL 1 #define SWFDEC_BLEND_MODE_LAYER 2 #define SWFDEC_BLEND_MODE_MULTIPLY 3 @@ -107,20 +109,20 @@ typedef enum { SWFDEC_MOVIE_INVALID_EXTENTS, /* recalculate extents */ } SwfdecMovieCacheState; -typedef void (*SwfdecMovieVariableListenerFunction) (SwfdecAsObject *object, +typedef void (*SwfdecMovieVariableListenerFunction) (gpointer data, const char *name, const SwfdecAsValue *val); typedef struct { - SwfdecAsObject * object; + gpointer data; const char * name; SwfdecMovieVariableListenerFunction function; } SwfdecMovieVariableListener; struct _SwfdecMovie { - SwfdecAsObject object; + SwfdecAsRelay relay; SwfdecGraphic * graphic; /* graphic represented by this movie or NULL if script-created */ - const char * name; /* name of movie - GC'd */ + const char * name; /* name of movie - GC'd */ GList * list; /* our contained movie clips (ordered by depth) */ int depth; /* depth of movie (equals content->depth unless explicitly set) */ SwfdecMovieCacheState cache_state; /* whether we are up to date */ @@ -128,11 +130,13 @@ struct _SwfdecMovie { GSList *variable_listeners; /* textfield's listening to changes in variables - SwfdecMovieVariableListener */ /* static properties (set by PlaceObject tags) */ - const char * original_name; /* the original name - GC'd and static */ cairo_matrix_t original_transform; /* initial transform used */ guint original_ratio; /* ratio used in this movie */ int clip_depth; /* up to which movie this movie clips */ + /* scripting stuff */ + SwfdecAsMovieValue * as_value; /* This movie's value in the script engine or %NULL if not accessible by scripts */ + /* parenting information */ SwfdecMovie * parent; /* movie that contains us or NULL for root movies */ gboolean lockroot; /* when looking for _root we should use this movie, even if it has a parent */ @@ -156,6 +160,8 @@ struct _SwfdecMovie { /* drawing state */ SwfdecMovie * mask_of; /* movie this movie is a mask of or NULL if none */ SwfdecMovie * masked_by; /* movie we are masked by or NULL if none */ + GSList * filters; /* filters to apply to movie */ + gboolean cache_as_bitmap; /* the movie should be cached */ /* FIXME: could it be that shape drawing (SwfdecGraphicMovie etc) uses these same objects? */ SwfdecImage * image; /* image loaded via loadMovie */ SwfdecRect draw_extents; /* extents of the items in the following list */ @@ -176,17 +182,16 @@ struct _SwfdecMovie { }; struct _SwfdecMovieClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; /* general vfuncs */ void (* init_movie) (SwfdecMovie * movie); void (* finish_movie) (SwfdecMovie * movie); - void (* property_get) (SwfdecMovie * movie, - guint prop_id, - SwfdecAsValue * value); + SwfdecAsValue (* property_get) (SwfdecMovie * movie, + guint prop_id); void (* property_set) (SwfdecMovie * movie, guint prop_id, - const SwfdecAsValue * value); + SwfdecAsValue value); void (* replace) (SwfdecMovie * movie, SwfdecGraphic * graphic); void (* set_ratio) (SwfdecMovie * movie); @@ -225,10 +230,13 @@ SwfdecMovie * swfdec_movie_get_by_name (SwfdecMovie * movie, SwfdecMovie * swfdec_movie_get_root (SwfdecMovie * movie); void swfdec_movie_property_set (SwfdecMovie * movie, guint id, + SwfdecAsValue val); +SwfdecAsValue swfdec_movie_property_get (SwfdecMovie * movie, + guint id); +void swfdec_movie_call_variable_listeners + (SwfdecMovie * movie, + const char * name, const SwfdecAsValue * val); -void swfdec_movie_property_get (SwfdecMovie * movie, - guint id, - SwfdecAsValue * val); void swfdec_movie_remove (SwfdecMovie * movie); void swfdec_movie_destroy (SwfdecMovie * movie); void swfdec_movie_set_static_properties @@ -283,7 +291,6 @@ void swfdec_movie_render (SwfdecMovie * movie, cairo_t * cr, const SwfdecColorTransform *trans); gboolean swfdec_movie_is_scriptable (SwfdecMovie * movie); -SwfdecMovie * swfdec_movie_resolve (SwfdecMovie * movie); guint swfdec_movie_get_version (SwfdecMovie * movie); int swfdec_movie_compare_depths (gconstpointer a, @@ -295,17 +302,16 @@ SwfdecDepthClass guint swfdec_movie_property_lookup (const char * name); void swfdec_movie_property_do_set (SwfdecMovie * movie, guint id, - const SwfdecAsValue * val); -void swfdec_movie_property_do_get (SwfdecMovie * movie, - guint id, - SwfdecAsValue * val); + SwfdecAsValue val); +SwfdecAsValue swfdec_movie_property_do_get (SwfdecMovie * movie, + guint id); void swfdec_movie_add_variable_listener (SwfdecMovie * movie, - SwfdecAsObject * object, + gpointer data, const char * name, const SwfdecMovieVariableListenerFunction function); void swfdec_movie_remove_variable_listener (SwfdecMovie * movie, - SwfdecAsObject * object, + gpointer data, const char * name, const SwfdecMovieVariableListenerFunction function); SwfdecResource *swfdec_movie_get_own_resource (SwfdecMovie * movie); diff --git a/swfdec/swfdec_movie_as_drawing.c b/swfdec/swfdec_movie_as_drawing.c index 7cc28a13..851d444a 100644 --- a/swfdec/swfdec_movie_as_drawing.c +++ b/swfdec/swfdec_movie_as_drawing.c @@ -88,7 +88,7 @@ swfdec_sprite_movie_beginFill (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|ii", &color, &alpha); movie->draw_fill = NULL; - if (argc == 0 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) { + if (argc == 0 || SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) { color = 0; } else { color = color & 0xFFFFFF; @@ -106,7 +106,7 @@ swfdec_sprite_movie_gradient_fill_get_length (SwfdecAsObject *o) SwfdecAsValue val; swfdec_as_object_get_variable (o, SWFDEC_AS_STR_length, &val); - length = swfdec_as_value_to_integer (swfdec_gc_object_get_context (o), &val); + length = swfdec_as_value_to_integer (o->context, val); return MAX (length, 0); } @@ -126,27 +126,27 @@ swfdec_sprite_movie_gradient_fill_check_length (SwfdecAsObject *colors, SwfdecAs static void swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat) { - SwfdecAsContext *cx = swfdec_gc_object_get_context (o); + SwfdecAsContext *cx = o->context; SwfdecAsValue val; /* FIXME: This function does not call valueOf in the right order */ if (swfdec_as_object_get_variable (o, SWFDEC_AS_STR_matrixType, &val)) { - const char *s = swfdec_as_value_to_string (cx, &val); + const char *s = swfdec_as_value_to_string (cx, val); cairo_matrix_init_translate (mat, SWFDEC_TWIPS_SCALE_FACTOR / 2.0, SWFDEC_TWIPS_SCALE_FACTOR / 2.0); cairo_matrix_scale (mat, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0); if (s == SWFDEC_AS_STR_box) { double x, y, w, h, r; cairo_matrix_t input; swfdec_as_object_get_variable (o, SWFDEC_AS_STR_x, &val); - x = swfdec_as_value_to_number (cx, &val); + x = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_y, &val); - y = swfdec_as_value_to_number (cx, &val); + y = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_w, &val); - w = swfdec_as_value_to_number (cx, &val); + w = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val); - h = swfdec_as_value_to_number (cx, &val); + h = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_r, &val); - r = swfdec_as_value_to_number (cx, &val); + r = swfdec_as_value_to_number (cx, val); cairo_matrix_init_translate (&input, (x + w) / 2, (y + h) / 2); cairo_matrix_scale (&input, w, h); cairo_matrix_rotate (&input, r); @@ -160,17 +160,17 @@ swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat) } else { cairo_matrix_t input; swfdec_as_object_get_variable (o, SWFDEC_AS_STR_a, &val); - input.xx = swfdec_as_value_to_number (cx, &val); + input.xx = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_b, &val); - input.yx = swfdec_as_value_to_number (cx, &val); + input.yx = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_d, &val); - input.xy = swfdec_as_value_to_number (cx, &val); + input.xy = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_e, &val); - input.yy = swfdec_as_value_to_number (cx, &val); + input.yy = swfdec_as_value_to_number (cx, val); swfdec_as_object_get_variable (o, SWFDEC_AS_STR_g, &val); - input.x0 = swfdec_as_value_to_number (cx, &val) * SWFDEC_TWIPS_SCALE_FACTOR; + input.x0 = swfdec_as_value_to_number (cx, val) * SWFDEC_TWIPS_SCALE_FACTOR; swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val); - input.y0 = swfdec_as_value_to_number (cx, &val) * SWFDEC_TWIPS_SCALE_FACTOR; + input.y0 = swfdec_as_value_to_number (cx, val) * SWFDEC_TWIPS_SCALE_FACTOR; cairo_matrix_init_scale (mat, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0); cairo_matrix_multiply (mat, mat, &input); } @@ -219,23 +219,23 @@ swfdec_sprite_movie_beginGradientFill (SwfdecAsContext *cx, SwfdecAsObject *obje if (check > i) { const char *name = swfdec_as_integer_to_string (cx, i); if (swfdec_as_object_get_variable (colors, name, &v) - && SWFDEC_AS_VALUE_IS_NUMBER (&v)) - c = swfdec_as_value_to_integer (cx, &v); + && SWFDEC_AS_VALUE_IS_NUMBER (v)) + c = swfdec_as_value_to_integer (cx, v); else c = 0; if (!swfdec_as_object_get_variable (alphas, name, &v)) { a = c; - } else if (!SWFDEC_AS_VALUE_IS_NUMBER (&v)) { + } else if (!SWFDEC_AS_VALUE_IS_NUMBER (v)) { a = 0; } else { - a = swfdec_as_value_to_integer (cx, &v); + a = swfdec_as_value_to_integer (cx, v); } if (!swfdec_as_object_get_variable (ratios, name, &v)) r = CLAMP (a, 0, 255); - else if (!SWFDEC_AS_VALUE_IS_NUMBER (&v)) + else if (!SWFDEC_AS_VALUE_IS_NUMBER (v)) r = 0; else - r = swfdec_as_value_to_integer (cx, &v); + r = swfdec_as_value_to_integer (cx, v); } else { c = a = r = 0; } @@ -360,7 +360,7 @@ swfdec_sprite_movie_lineStyle (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "i|ii", &width, &color, &alpha); movie->draw_line = NULL; - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; if (argc > 3) { SWFDEC_FIXME ("implement Flash 8 arguments to lineStyle"); @@ -433,7 +433,7 @@ swfdec_sprite_movie_beginBitmapFill (SwfdecAsContext *cx, SwfdecAsValue *rval) { SwfdecMovie *movie; - SwfdecBitmapData *bitmap; + SwfdecAsObject *bitmap; SwfdecPattern *pattern; SwfdecDraw *draw; SwfdecAsObject *mat = NULL; @@ -443,10 +443,10 @@ swfdec_sprite_movie_beginBitmapFill (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "O|Obb", &bitmap, &mat, &repeat, &smoothing); movie->draw_fill = NULL; - if (!SWFDEC_IS_BITMAP_DATA (bitmap)) + if (!SWFDEC_IS_BITMAP_DATA (bitmap->relay)) return; - pattern = swfdec_bitmap_pattern_new (bitmap); + pattern = swfdec_bitmap_pattern_new (SWFDEC_BITMAP_DATA (bitmap->relay)); /* NB: This signal assumes that the pattern is destroyed before the movie is, * because it is never removed anywhere */ g_signal_connect_swapped (pattern, "invalidate", G_CALLBACK (swfdec_movie_invalidate_last), movie); diff --git a/swfdec/swfdec_movie_asprops.c b/swfdec/swfdec_movie_asprops.c index 2a885a40..7d018abc 100644 --- a/swfdec/swfdec_movie_asprops.c +++ b/swfdec/swfdec_movie_asprops.c @@ -26,6 +26,7 @@ #include <math.h> #include "swfdec_movie.h" +#include "swfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_bits.h" #include "swfdec_debug.h" @@ -36,22 +37,24 @@ #include "swfdec_sprite_movie.h" #include "swfdec_resource.h" -static void -mc_x_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_x_get (SwfdecMovie *movie) { double d; + SwfdecAsValue rval; swfdec_movie_update (movie); d = SWFDEC_TWIPS_TO_DOUBLE (movie->matrix.x0); - SWFDEC_AS_VALUE_SET_NUMBER (rval, d); + rval = swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), d); + return rval; } static void -mc_x_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_x_set (SwfdecMovie *movie, SwfdecAsValue val) { SwfdecTwips x; - if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), val, FALSE, &x)) + if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), &val, FALSE, &x)) return; movie->modified = TRUE; if (x != movie->matrix.x0) { @@ -61,22 +64,22 @@ mc_x_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_y_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_y_get (SwfdecMovie *movie) { double d; swfdec_movie_update (movie); d = SWFDEC_TWIPS_TO_DOUBLE (movie->matrix.y0); - SWFDEC_AS_VALUE_SET_NUMBER (rval, d); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), d); } static void -mc_y_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_y_set (SwfdecMovie *movie, SwfdecAsValue val) { SwfdecTwips y; - if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), val, FALSE, &y)) + if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), &val, FALSE, &y)) return; movie->modified = TRUE; if (y != movie->matrix.y0) { @@ -86,14 +89,14 @@ mc_y_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_xscale_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_xscale_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_NUMBER (rval, movie->xscale); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), movie->xscale); } static void -mc_xscale_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_xscale_set (SwfdecMovie *movie, SwfdecAsValue val) { double d; @@ -110,14 +113,14 @@ mc_xscale_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_yscale_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_yscale_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_NUMBER (rval, movie->yscale); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), movie->yscale); } static void -mc_yscale_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_yscale_set (SwfdecMovie *movie, SwfdecAsValue val) { double d; @@ -134,27 +137,27 @@ mc_yscale_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_name_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_name_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_STRING (rval, movie->name); + return SWFDEC_AS_VALUE_FROM_STRING (movie->name); } static void -mc_name_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_name_set (SwfdecMovie *movie, SwfdecAsValue val) { movie->name = swfdec_as_value_to_string (swfdec_gc_object_get_context (movie), val); } -static void -mc_alpha_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_alpha_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_NUMBER (rval, + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), movie->color_transform.aa * 100.0 / 256.0); } static void -mc_alpha_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_alpha_set (SwfdecMovie *movie, SwfdecAsValue val) { double d; int alpha; @@ -171,14 +174,14 @@ mc_alpha_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_visible_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_visible_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_BOOLEAN (rval, movie->visible); + return SWFDEC_AS_VALUE_FROM_BOOLEAN (movie->visible); } static void -mc_visible_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_visible_set (SwfdecMovie *movie, SwfdecAsValue val) { gboolean b; @@ -189,19 +192,19 @@ mc_visible_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_width_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_width_get (SwfdecMovie *movie) { double d; swfdec_movie_update (movie); d = rint (movie->extents.x1 - movie->extents.x0); d = SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) d); - SWFDEC_AS_VALUE_SET_NUMBER (rval, d); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), d); } static void -mc_width_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_width_set (SwfdecMovie *movie, SwfdecAsValue val) { double d, cur; @@ -231,19 +234,19 @@ mc_width_set (SwfdecMovie *movie, const SwfdecAsValue *val) swfdec_movie_end_update_matrix (movie); } -static void -mc_height_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_height_get (SwfdecMovie *movie) { double d; swfdec_movie_update (movie); d = rint (movie->extents.y1 - movie->extents.y0); d = SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) d); - SWFDEC_AS_VALUE_SET_NUMBER (rval, d); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), d); } static void -mc_height_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_height_set (SwfdecMovie *movie, SwfdecAsValue val) { double d, cur; @@ -273,14 +276,14 @@ mc_height_set (SwfdecMovie *movie, const SwfdecAsValue *val) swfdec_movie_end_update_matrix (movie); } -static void -mc_rotation_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_rotation_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_NUMBER (rval, movie->rotation); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), movie->rotation); } static void -mc_rotation_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_rotation_set (SwfdecMovie *movie, SwfdecAsValue val) { double d; @@ -308,45 +311,45 @@ mc_rotation_set (SwfdecMovie *movie, const SwfdecAsValue *val) } } -static void -mc_xmouse_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_xmouse_get (SwfdecMovie *movie) { double x, y; swfdec_movie_get_mouse (movie, &x, &y); x = SWFDEC_TWIPS_TO_DOUBLE (rint (x)); - SWFDEC_AS_VALUE_SET_NUMBER (rval, x); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), x); } -static void -mc_ymouse_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_ymouse_get (SwfdecMovie *movie) { double x, y; swfdec_movie_get_mouse (movie, &x, &y); y = SWFDEC_TWIPS_TO_DOUBLE (rint (y)); - SWFDEC_AS_VALUE_SET_NUMBER (rval, y); + return swfdec_as_value_from_number (swfdec_gc_object_get_context (movie), y); } -static void -mc_parent (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_parent (SwfdecMovie *movie) { if (movie->parent) { - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (movie->parent)); + return SWFDEC_AS_VALUE_FROM_MOVIE (movie->parent); } else { - SWFDEC_AS_VALUE_SET_UNDEFINED (rval); + return SWFDEC_AS_VALUE_UNDEFINED; } } -static void -mc_root (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_root (SwfdecMovie *movie) { movie = swfdec_movie_get_root (movie); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (movie)); + return SWFDEC_AS_VALUE_FROM_MOVIE (movie); } -static void -mc_target_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_target_get (SwfdecMovie *movie) { GString *s; @@ -357,31 +360,31 @@ mc_target_get (SwfdecMovie *movie, SwfdecAsValue *rval) movie = movie->parent; } if (s->len == 0) { - SWFDEC_AS_VALUE_SET_STRING (rval, SWFDEC_AS_STR_SLASH); g_string_free (s, TRUE); + return SWFDEC_AS_VALUE_FROM_STRING (SWFDEC_AS_STR_SLASH); } else { - SWFDEC_AS_VALUE_SET_STRING (rval, swfdec_as_context_give_string ( + return SWFDEC_AS_VALUE_FROM_STRING (swfdec_as_context_give_string ( swfdec_gc_object_get_context (movie), g_string_free (s, FALSE))); } } -static void -mc_url_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_url_get (SwfdecMovie *movie) { - SWFDEC_AS_VALUE_SET_STRING (rval, swfdec_as_context_get_string ( + return SWFDEC_AS_VALUE_FROM_STRING (swfdec_as_context_get_string ( swfdec_gc_object_get_context (movie), swfdec_url_get_url (swfdec_loader_get_url (movie->resource->loader)))); } -static void -mc_focusrect_get (SwfdecMovie *movie, SwfdecAsValue *rval) +static SwfdecAsValue +mc_focusrect_get (SwfdecMovie *movie) { SwfdecAsContext *cx; SwfdecActor *actor; if (!SWFDEC_IS_ACTOR (movie)) { SWFDEC_FIXME ("should not be possible to get _focusrect on non-actors"); - return; + return SWFDEC_AS_VALUE_UNDEFINED; } actor = SWFDEC_ACTOR (movie); cx = swfdec_gc_object_get_context (actor); @@ -389,26 +392,27 @@ mc_focusrect_get (SwfdecMovie *movie, SwfdecAsValue *rval) switch (actor->focusrect) { case SWFDEC_FLASH_YES: if (cx->version > 5) - SWFDEC_AS_VALUE_SET_BOOLEAN (rval, TRUE); + return SWFDEC_AS_VALUE_TRUE; else - SWFDEC_AS_VALUE_SET_INT (rval, 1); + return swfdec_as_value_from_integer (cx, 1); break; case SWFDEC_FLASH_NO: if (cx->version > 5) - SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); + return SWFDEC_AS_VALUE_FALSE; else - SWFDEC_AS_VALUE_SET_INT (rval, 0); + return swfdec_as_value_from_integer (cx, 0); break; case SWFDEC_FLASH_MAYBE: - SWFDEC_AS_VALUE_SET_NULL (rval); + return SWFDEC_AS_VALUE_NULL; break; default: g_assert_not_reached(); + return SWFDEC_AS_VALUE_UNDEFINED; } } static void -mc_focusrect_set (SwfdecMovie *movie, const SwfdecAsValue *val) +mc_focusrect_set (SwfdecMovie *movie, SwfdecAsValue val) { SwfdecAsContext *cx; SwfdecActor *actor; @@ -447,9 +451,9 @@ mc_focusrect_set (SwfdecMovie *movie, const SwfdecAsValue *val) } struct { - const char *name; - void (* get) (SwfdecMovie *movie, SwfdecAsValue *ret); - void (* set) (SwfdecMovie *movie, const SwfdecAsValue *val); + const char * name; + SwfdecAsValue (* get) (SwfdecMovie *movie); + void (* set) (SwfdecMovie *movie, SwfdecAsValue val); } swfdec_movieclip_props[] = { { SWFDEC_AS_STR__x, mc_x_get, mc_x_set }, { SWFDEC_AS_STR__y, mc_y_get, mc_y_set }, @@ -489,21 +493,20 @@ swfdec_movie_property_lookup (const char *name) return G_MAXUINT; } -void -swfdec_movie_property_do_get (SwfdecMovie *movie, guint id, - SwfdecAsValue *val) +SwfdecAsValue +swfdec_movie_property_do_get (SwfdecMovie *movie, guint id) { if (id >= G_N_ELEMENTS (swfdec_movieclip_props) || swfdec_movieclip_props[id].get == NULL) { - SWFDEC_AS_VALUE_SET_UNDEFINED (val); + return SWFDEC_AS_VALUE_UNDEFINED; } else { - swfdec_movieclip_props[id].get (movie, val); + return swfdec_movieclip_props[id].get (movie); } } void swfdec_movie_property_do_set (SwfdecMovie *movie, guint id, - const SwfdecAsValue *val) + SwfdecAsValue val) { if (id < G_N_ELEMENTS (swfdec_movieclip_props) && swfdec_movieclip_props[id].set != NULL) { diff --git a/swfdec/swfdec_movie_clip_loader.c b/swfdec/swfdec_movie_clip_loader.c index c56aec15..2916a08c 100644 --- a/swfdec/swfdec_movie_clip_loader.c +++ b/swfdec/swfdec_movie_clip_loader.c @@ -31,7 +31,7 @@ #include "swfdec_resource.h" -G_DEFINE_TYPE (SwfdecMovieClipLoader, swfdec_movie_clip_loader, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecMovieClipLoader, swfdec_movie_clip_loader, SWFDEC_TYPE_AS_RELAY) static void swfdec_movie_clip_loader_class_init (SwfdecMovieClipLoaderClass *klass) @@ -43,23 +43,29 @@ swfdec_movie_clip_loader_init (SwfdecMovieClipLoader *movie_clip_loader) { } -SWFDEC_AS_CONSTRUCTOR (112, 0, swfdec_movie_clip_loader_construct, swfdec_movie_clip_loader_get_type) +SWFDEC_AS_NATIVE (112, 0, swfdec_movie_clip_loader_construct) void swfdec_movie_clip_loader_construct (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecAsValue val; SwfdecAsObject *array; + SwfdecMovieClipLoader *loader; if (!swfdec_as_context_is_constructing (cx)) return; + loader = g_object_new (SWFDEC_TYPE_MOVIE_CLIP_LOADER, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (loader)); + array = swfdec_as_array_new (cx); SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &val); + swfdec_as_array_push (array, &val); SWFDEC_AS_VALUE_SET_OBJECT (&val, array); swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR__listeners, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } SWFDEC_AS_NATIVE (112, 100, swfdec_movie_clip_loader_loadClip) @@ -113,11 +119,11 @@ swfdec_movie_clip_loader_getProgress (SwfdecAsContext *cx, SwfdecAsObject *objec SWFDEC_AS_VALUE_SET_OBJECT (rval, ret); resource = swfdec_movie_get_own_resource (movie); if (resource == NULL || resource->decoder == NULL) { - SWFDEC_AS_VALUE_SET_INT (&loaded, 0); - SWFDEC_AS_VALUE_SET_INT (&total, 0); + loaded = swfdec_as_value_from_integer (cx, 0); + total = swfdec_as_value_from_integer (cx, 0); } else { - SWFDEC_AS_VALUE_SET_INT (&loaded, resource->decoder->bytes_loaded); - SWFDEC_AS_VALUE_SET_INT (&total, resource->decoder->bytes_total); + loaded = swfdec_as_value_from_integer (cx, resource->decoder->bytes_loaded); + total = swfdec_as_value_from_integer (cx, resource->decoder->bytes_total); } swfdec_as_object_set_variable (ret, SWFDEC_AS_STR_bytesLoaded, &loaded); swfdec_as_object_set_variable (ret, SWFDEC_AS_STR_bytesTotal, &total); diff --git a/swfdec/swfdec_movie_clip_loader.h b/swfdec/swfdec_movie_clip_loader.h index 5bf7aae1..38bf13e7 100644 --- a/swfdec/swfdec_movie_clip_loader.h +++ b/swfdec/swfdec_movie_clip_loader.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -20,7 +20,7 @@ #ifndef _SWFDEC_MOVIE_CLIP_LOADER_H_ #define _SWFDEC_MOVIE_CLIP_LOADER_H_ -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -36,12 +36,12 @@ typedef struct _SwfdecMovieClipLoaderClass SwfdecMovieClipLoaderClass; struct _SwfdecMovieClipLoader { - SwfdecAsObject object; + SwfdecAsRelay relay; }; struct _SwfdecMovieClipLoaderClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_movie_clip_loader_get_type (void); diff --git a/swfdec/swfdec_net_connection.c b/swfdec/swfdec_net_connection.c index 234ca5fd..25da84ba 100644 --- a/swfdec/swfdec_net_connection.c +++ b/swfdec/swfdec_net_connection.c @@ -33,15 +33,15 @@ /*** SwfdecNetConnection ***/ -G_DEFINE_TYPE (SwfdecNetConnection, swfdec_net_connection, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecNetConnection, swfdec_net_connection, SWFDEC_TYPE_AS_RELAY) static void swfdec_net_connection_dispose (GObject *object) { - SwfdecNetConnection *net_connection = SWFDEC_NET_CONNECTION (object); + SwfdecNetConnection *conn = SWFDEC_NET_CONNECTION (object); - g_free (net_connection->url); - net_connection->url = NULL; + g_free (conn->url); + conn->url = NULL; G_OBJECT_CLASS (swfdec_net_connection_parent_class)->dispose (object); } @@ -66,7 +66,7 @@ swfdec_net_connection_onstatus (SwfdecNetConnection *conn, const char *code, SwfdecAsValue value; SwfdecAsObject *info; - info = swfdec_as_object_new (swfdec_gc_object_get_context (conn)); + info = swfdec_as_object_new (swfdec_gc_object_get_context (conn), SWFDEC_AS_STR_Object, NULL); SWFDEC_AS_VALUE_SET_STRING (&value, code); swfdec_as_object_set_variable (info, SWFDEC_AS_STR_code, &value); SWFDEC_AS_VALUE_SET_STRING (&value, level); @@ -76,7 +76,7 @@ swfdec_net_connection_onstatus (SwfdecNetConnection *conn, const char *code, swfdec_as_object_set_variable (info, SWFDEC_AS_STR_description, &value); } SWFDEC_AS_VALUE_SET_OBJECT (&value, info); - swfdec_as_object_call (SWFDEC_AS_OBJECT (conn), SWFDEC_AS_STR_onStatus, 1, &value, NULL); + swfdec_as_relay_call (SWFDEC_AS_RELAY(conn), SWFDEC_AS_STR_onStatus, 1, &value, NULL); } void @@ -87,7 +87,7 @@ swfdec_net_connection_connect (SwfdecNetConnection *conn, const char *url) g_free (conn->url); conn->url = g_strdup (url); if (url) { - SWFDEC_ERROR ("FIXME: using NetConnection with non-null URLs is not implemented"); + SWFDEC_FIXME ("NetConnection with non-null URL %s (aka RTMP) not implemented", url); } swfdec_net_connection_onstatus (conn, SWFDEC_AS_STR_NetConnection_Connect_Success, SWFDEC_AS_STR_status, NULL); @@ -106,12 +106,13 @@ swfdec_net_connection_do_connect (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_NET_CONNECTION, &conn, "v", &val); - if (SWFDEC_AS_VALUE_IS_STRING (&val)) { - url = SWFDEC_AS_VALUE_GET_STRING (&val); - } else if (SWFDEC_AS_VALUE_IS_NULL (&val)) { + if (SWFDEC_AS_VALUE_IS_STRING (val)) { + url = SWFDEC_AS_VALUE_GET_STRING (val); + } else if (SWFDEC_AS_VALUE_IS_NULL (val)) { url = NULL; } else { - SWFDEC_FIXME ("untested argument to NetConnection.connect: type %u", val.type); + SWFDEC_FIXME ("untested argument to NetConnection.connect: type %u", + SWFDEC_AS_VALUE_GET_TYPE (val)); url = NULL; } swfdec_net_connection_connect (conn, url); @@ -160,10 +161,17 @@ swfdec_net_connection_get_usingTLS (SwfdecAsContext *cx, } // not actually the constructor, but called from the constructor -SWFDEC_AS_CONSTRUCTOR (2100, 200, swfdec_net_connection_construct, swfdec_net_connection_get_type) +SWFDEC_AS_NATIVE (2100, 200, swfdec_net_connection_construct) void swfdec_net_connection_construct (SwfdecAsContext *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { + SwfdecNetConnection *conn; + + if (obj == NULL) + return; + + conn = g_object_new (SWFDEC_TYPE_NET_CONNECTION, "context", cx, NULL); // FIXME: Set contentType and possible do some other stuff too + swfdec_as_object_set_relay (obj, SWFDEC_AS_RELAY (conn)); } diff --git a/swfdec/swfdec_net_connection.h b/swfdec/swfdec_net_connection.h index 6ab26b83..79d5ee82 100644 --- a/swfdec/swfdec_net_connection.h +++ b/swfdec/swfdec_net_connection.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -20,7 +20,7 @@ #ifndef _SWFDEC_NET_CONNECTION_H_ #define _SWFDEC_NET_CONNECTION_H_ -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -36,13 +36,13 @@ typedef struct _SwfdecNetConnectionClass SwfdecNetConnectionClass; #define SWFDEC_NET_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_NET_CONNECTION, SwfdecNetConnectionClass)) struct _SwfdecNetConnection { - SwfdecAsObject object; + SwfdecAsRelay relay; char * url; /* url for this net_connection or NULL for none */ }; struct _SwfdecNetConnectionClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_net_connection_get_type (void); diff --git a/swfdec/swfdec_net_stream.c b/swfdec/swfdec_net_stream.c index 601576d8..4a6f6c3a 100644 --- a/swfdec/swfdec_net_stream.c +++ b/swfdec/swfdec_net_stream.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -26,6 +26,7 @@ #include "swfdec_access.h" #include "swfdec_amf.h" #include "swfdec_as_frame_internal.h" +#include "swfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_audio_flv.h" #include "swfdec_cached_video.h" @@ -44,9 +45,11 @@ swfdec_net_stream_onstatus (SwfdecNetStream *stream, const char *code, const cha { SwfdecAsValue val; SwfdecAsObject *object; + SwfdecAsContext *cx; + cx = swfdec_gc_object_get_context (stream); swfdec_sandbox_use (stream->sandbox); - object = swfdec_as_object_new (swfdec_gc_object_get_context (stream)); + object = swfdec_as_object_new (cx, SWFDEC_AS_STR_Object, NULL); SWFDEC_INFO ("emitting onStatus for %s %s", level, code); SWFDEC_AS_VALUE_SET_STRING (&val, code); swfdec_as_object_set_variable (object, SWFDEC_AS_STR_code, &val); @@ -54,18 +57,18 @@ swfdec_net_stream_onstatus (SwfdecNetStream *stream, const char *code, const cha swfdec_as_object_set_variable (object, SWFDEC_AS_STR_level, &val); SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - if (!swfdec_as_object_call (SWFDEC_AS_OBJECT (stream), + if (!swfdec_as_relay_call (SWFDEC_AS_RELAY (stream), SWFDEC_AS_STR_onStatus, 1, &val, NULL)) { // if it's an error message and the stream object didn't have onStatus // handler, call System.onStatus if (level == SWFDEC_AS_STR_error) { SwfdecAsValue system; - swfdec_as_object_get_variable (swfdec_gc_object_get_context (stream)->global, + swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_System, &system); - if (SWFDEC_AS_VALUE_IS_OBJECT (&system)) { - swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (&system), - SWFDEC_AS_STR_onStatus, 1, &val, NULL); + if (SWFDEC_AS_VALUE_IS_COMPOSITE (system) && + (object = SWFDEC_AS_VALUE_GET_COMPOSITE (system)) != NULL) { + swfdec_as_object_call (object, SWFDEC_AS_STR_onStatus, 1, &val, NULL); } } } @@ -100,11 +103,62 @@ swfdec_net_stream_decode_video (SwfdecVideoDecoder *decoder, SwfdecBuffer *buffe decoder->width -= wsub; decoder->height -= hsub; } + } else if (decoder->codec == SWFDEC_VIDEO_CODEC_H264) { + SwfdecBits bits; + guint type; + SwfdecBuffer *data; + swfdec_bits_init (&bits, buffer); + type = swfdec_bits_get_u8 (&bits); + /* composition_time_offset = */ swfdec_bits_get_bu24 (&bits); + switch (type) { + case 0: + SWFDEC_ERROR ("new data stream?!"); + break; + case 1: + data = swfdec_bits_get_buffer (&bits, -1); + if (data) { + swfdec_video_decoder_decode (decoder, data); + } else { + SWFDEC_ERROR ("no data in H264 buffer?"); + } + break; + case 2: + break; + default: + SWFDEC_ERROR ("H264 data type %u not supported", type); + break; + } } else { swfdec_video_decoder_decode (decoder, buffer); } } +/* returns TRUE if the buffer was consumed */ +static gboolean +swfdec_net_stream_new_video_decoder (SwfdecNetStream *stream, guint format, SwfdecBuffer *buffer) +{ + if (format == SWFDEC_VIDEO_CODEC_H264) { + SwfdecBits bits; + + swfdec_bits_init (&bits, buffer); + if (swfdec_bits_get_u8 (&bits) == 0) { + SwfdecBuffer *data; + /* composition_time_offset = */ swfdec_bits_get_bu24 (&bits); + data = swfdec_bits_get_buffer (&bits, -1); + stream->decoder = swfdec_video_decoder_new (format, data); + if (data) + swfdec_buffer_unref (data); + return TRUE; + } else { + stream->decoder = swfdec_video_decoder_new (format, NULL); + return FALSE; + } + } else { + stream->decoder = swfdec_video_decoder_new (format, NULL); + return FALSE; + } +} + static void swfdec_net_stream_update_playing (SwfdecNetStream *stream); static void swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) @@ -112,7 +166,7 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) SwfdecBuffer *buffer; guint format; cairo_surface_t *old; - gboolean process_events; + gboolean process_events, skip; guint process_events_from; SWFDEC_LOG ("goto %ums", timestamp); @@ -140,18 +194,22 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) g_object_unref (stream->decoder); stream->decoder = NULL; } +#if 0 if (stream->decoder != NULL && (stream->decoder_time >= stream->current_time)) { g_object_unref (stream->decoder); stream->decoder = NULL; } +#endif + skip = FALSE; if (stream->decoder == NULL) { buffer = swfdec_flv_decoder_get_video (stream->flvdecoder, stream->current_time, TRUE, &format, &stream->decoder_time, &next); - stream->decoder = swfdec_video_decoder_new (format); - } else { + skip = !swfdec_net_stream_new_video_decoder (stream, format, buffer); + } + if (!skip) { swfdec_flv_decoder_get_video (stream->flvdecoder, stream->decoder_time, FALSE, NULL, NULL, &next); if (next != stream->current_time) { @@ -182,9 +240,10 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) for (;;) { if (format != swfdec_video_decoder_get_codec (stream->decoder)) { g_object_unref (stream->decoder); - stream->decoder = swfdec_video_decoder_new (format); + skip = swfdec_net_stream_new_video_decoder (stream, format, buffer); } - swfdec_net_stream_decode_video (stream->decoder, buffer); + if (!skip) + swfdec_net_stream_decode_video (stream->decoder, buffer); if (stream->decoder_time >= stream->current_time) break; @@ -219,8 +278,8 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) SWFDEC_AMF_STRING, &name, SWFDEC_AMF_MIXED_ARRAY, &value) != 2) { SWFDEC_ERROR ("could not parse data tag"); } else { - swfdec_as_object_call (SWFDEC_AS_OBJECT (stream), - SWFDEC_AS_VALUE_GET_STRING (&name), 1, &value, NULL); + swfdec_as_relay_call (SWFDEC_AS_RELAY (stream), + SWFDEC_AS_VALUE_GET_STRING (name), 1, &value, NULL); } swfdec_sandbox_unuse (stream->sandbox); } @@ -446,7 +505,7 @@ swfdec_net_stream_video_provider_init (SwfdecVideoProviderInterface *iface) /*** SWFDEC_NET_STREAM ***/ -G_DEFINE_TYPE_WITH_CODE (SwfdecNetStream, swfdec_net_stream, SWFDEC_TYPE_AS_OBJECT, +G_DEFINE_TYPE_WITH_CODE (SwfdecNetStream, swfdec_net_stream, SWFDEC_TYPE_AS_RELAY, G_IMPLEMENT_INTERFACE (SWFDEC_TYPE_STREAM_TARGET, swfdec_net_stream_stream_target_init) G_IMPLEMENT_INTERFACE (SWFDEC_TYPE_VIDEO_PROVIDER, swfdec_net_stream_video_provider_init)) @@ -472,68 +531,6 @@ swfdec_net_stream_dispose (GObject *object) G_OBJECT_CLASS (swfdec_net_stream_parent_class)->dispose (object); } -static gboolean -swfdec_net_stream_get_variable (SwfdecAsObject *object, SwfdecAsObject *orig, - const char *variable, SwfdecAsValue *val, guint *flags) -{ - SwfdecNetStream *stream; - - if (SWFDEC_AS_OBJECT_CLASS (swfdec_net_stream_parent_class)->get (object, orig, variable, val, flags)) - return TRUE; - - stream = SWFDEC_NET_STREAM (object); - /* FIXME: need case insensitive comparisons? */ - if (variable == SWFDEC_AS_STR_time) { - guint msecs; - if (stream->flvdecoder == NULL || - !swfdec_flv_decoder_get_video_info (stream->flvdecoder, &msecs, NULL)) { - SWFDEC_AS_VALUE_SET_INT (val, 0); - } else { - if (msecs >= stream->current_time) - msecs = 0; - else - msecs = stream->current_time - msecs; - SWFDEC_AS_VALUE_SET_NUMBER (val, msecs / 1000.); - } - *flags = 0; - return TRUE; - } else if (variable == SWFDEC_AS_STR_bytesLoaded) { - if (stream->loader == NULL) - SWFDEC_AS_VALUE_SET_INT (val, 0); - else - SWFDEC_AS_VALUE_SET_NUMBER (val, swfdec_loader_get_loaded (stream->loader)); - *flags = 0; - return TRUE; - } else if (variable == SWFDEC_AS_STR_bytesTotal) { - glong bytes; - if (stream->loader == NULL) { - bytes = 0; - } else { - bytes = swfdec_loader_get_size (stream->loader); - if (bytes < 0) - bytes = swfdec_loader_get_loaded (stream->loader); - } - SWFDEC_AS_VALUE_SET_NUMBER (val, bytes); - *flags = 0; - return TRUE; - } else if (variable == SWFDEC_AS_STR_bufferLength) { - SWFDEC_STUB ("Netstream.bufferLength (get)"); - } else if (variable == SWFDEC_AS_STR_bufferTime) { - SWFDEC_STUB ("Netstream.bufferTime (get)"); - } else if (variable == SWFDEC_AS_STR_audiocodec) { - SWFDEC_STUB ("Netstream.audiocodec (get)"); - } else if (variable == SWFDEC_AS_STR_currentFps) { - SWFDEC_STUB ("Netstream.currentFps (get)"); - } else if (variable == SWFDEC_AS_STR_decodedFrames) { - SWFDEC_STUB ("Netstream.decodedFrames (get)"); - } else if (variable == SWFDEC_AS_STR_liveDelay) { - SWFDEC_STUB ("Netstream.liveDelay (get)"); - } else if (variable == SWFDEC_AS_STR_videoCodec) { - SWFDEC_STUB ("Netstream.videoCodec (get)"); - } - return FALSE; -} - static void swfdec_net_stream_mark (SwfdecGcObject *object) { @@ -552,13 +549,10 @@ swfdec_net_stream_class_init (SwfdecNetStreamClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); object_class->dispose = swfdec_net_stream_dispose; gc_class->mark = swfdec_net_stream_mark; - - asobject_class->get = swfdec_net_stream_get_variable; } static void @@ -614,7 +608,7 @@ swfdec_net_stream_set_url (SwfdecNetStream *stream, const char *url_string) return; } stream->requested_url = g_strdup (url_string); - stream->sandbox = SWFDEC_SANDBOX (SWFDEC_AS_CONTEXT (player)->global); + stream->sandbox = swfdec_sandbox_get (player); swfdec_player_allow_by_matrix (player, stream->sandbox, url_string, swfdec_net_stream_matrix, swfdec_net_stream_load, stream); @@ -703,10 +697,12 @@ swfdec_net_stream_seek (SwfdecNetStream *stream, double secs) SWFDEC_ERROR ("FIXME: implement seeking in audio only NetStream"); return; } +#if 0 if (stream->decoder) { g_object_unref (stream->decoder); stream->decoder = NULL; } +#endif msecs = secs * 1000; msecs += first; if (msecs > last) diff --git a/swfdec/swfdec_net_stream.h b/swfdec/swfdec_net_stream.h index d198b52f..078b9e96 100644 --- a/swfdec/swfdec_net_stream.h +++ b/swfdec/swfdec_net_stream.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -21,7 +21,7 @@ #define _SWFDEC_NET_STREAM_H_ #include <swfdec/swfdec.h> -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_net_connection.h> #include <swfdec/swfdec_flv_decoder.h> #include <swfdec/swfdec_player_internal.h> @@ -43,7 +43,7 @@ typedef struct _SwfdecNetStreamClass SwfdecNetStreamClass; struct _SwfdecNetStream { - SwfdecAsObject object; + SwfdecAsRelay relay; SwfdecNetConnection * conn; /* connection used for opening streams */ char * requested_url; /* URL we have requested that isn't loaded yet */ @@ -72,7 +72,7 @@ struct _SwfdecNetStream struct _SwfdecNetStreamClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_net_stream_get_type (void); diff --git a/swfdec/swfdec_net_stream_as.c b/swfdec/swfdec_net_stream_as.c index 72a7f01d..9167430e 100644 --- a/swfdec/swfdec_net_stream_as.c +++ b/swfdec/swfdec_net_stream_as.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -69,7 +69,7 @@ swfdec_net_stream_pause (SwfdecAsContext *cx, SwfdecAsObject *object, if (argc == 0) { playing = !swfdec_net_stream_get_playing (stream); } else { - playing = !swfdec_as_value_to_boolean (cx, &argv[0]); + playing = !swfdec_as_value_to_boolean (cx, argv[0]); } SWFDEC_LOG ("%s stream %p", playing ? "playing" : "pausing", stream); swfdec_net_stream_set_playing (stream, playing); @@ -140,7 +140,7 @@ swfdec_net_stream_do_seek (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_NET_STREAM, &stream, "n", &d); - cur = SWFDEC_SANDBOX (cx->global); + cur = swfdec_sandbox_get (SWFDEC_PLAYER (cx)); swfdec_sandbox_unuse (cur); /* FIXME: perform security check if seeking is allowed here? */ swfdec_net_stream_seek (stream, d); @@ -148,6 +148,139 @@ swfdec_net_stream_do_seek (SwfdecAsContext *cx, SwfdecAsObject *object, } static void +swfdec_net_stream_get_time (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecNetStream *stream; + guint msecs; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_NET_STREAM, &stream, ""); + + if (stream->flvdecoder == NULL || + !swfdec_flv_decoder_get_video_info (stream->flvdecoder, &msecs, NULL)) { + *ret = swfdec_as_value_from_integer (cx, 0); + } else { + if (msecs >= stream->current_time) + msecs = 0; + else + msecs = stream->current_time - msecs; + *ret = swfdec_as_value_from_number (cx, msecs / 1000.); + } +} + +static void +swfdec_net_stream_get_bytesLoaded (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecNetStream *stream; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_NET_STREAM, &stream, ""); + + if (stream->loader == NULL) + *ret = swfdec_as_value_from_integer (cx, 0); + else + *ret = swfdec_as_value_from_number (cx, swfdec_loader_get_loaded (stream->loader)); +} + +static void +swfdec_net_stream_get_bytesTotal (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SwfdecNetStream *stream; + glong bytes; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_NET_STREAM, &stream, ""); + + if (stream->loader == NULL) { + bytes = 0; + } else { + bytes = swfdec_loader_get_size (stream->loader); + if (bytes < 0) + bytes = swfdec_loader_get_loaded (stream->loader); + } + *ret = swfdec_as_value_from_number (cx, bytes); +} + +static void +swfdec_net_stream_get_bufferLength (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.bufferLength (get)"); +} + +static void +swfdec_net_stream_get_bufferTime (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.bufferTime (get)"); +} + +static void +swfdec_net_stream_get_audiocodec (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.audiocodec (get)"); +} + +static void +swfdec_net_stream_get_currentFps (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.currentFps (get)"); +} + +static void +swfdec_net_stream_get_decodedFrames (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.decodedFrames (get)"); +} + +static void +swfdec_net_stream_get_liveDelay (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.liveDelay (get)"); +} + +static void +swfdec_net_stream_get_videoCodec (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + SWFDEC_STUB ("Netstream.videoCodec (get)"); +} + +SWFDEC_AS_NATIVE (2101, 200, swfdec_net_stream_setup) +void +swfdec_net_stream_setup (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + if (object == NULL) + return; + + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_time, + swfdec_net_stream_get_time, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_bytesLoaded, + swfdec_net_stream_get_bytesLoaded, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_bytesTotal, + swfdec_net_stream_get_bytesTotal, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_bufferLength, + swfdec_net_stream_get_bufferLength, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_bufferTime, + swfdec_net_stream_get_bufferTime, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_audiocodec, + swfdec_net_stream_get_audiocodec, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_currentFps, + swfdec_net_stream_get_currentFps, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_decodedFrames, + swfdec_net_stream_get_decodedFrames, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_liveDelay, + swfdec_net_stream_get_liveDelay, NULL); + swfdec_as_object_add_native_variable (object, SWFDEC_AS_STR_videoCodec, + swfdec_net_stream_get_videoCodec, NULL); +} + +static void swfdec_net_stream_construct (SwfdecAsContext *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecNetStream *stream; @@ -157,14 +290,18 @@ swfdec_net_stream_construct (SwfdecAsContext *cx, SwfdecAsObject *obj, guint arg SWFDEC_FIXME ("What do we do if not constructing?"); return; } - stream = SWFDEC_NET_STREAM (obj); + stream = g_object_new (SWFDEC_TYPE_NET_STREAM, "context", cx, NULL); + swfdec_as_object_set_relay (obj, SWFDEC_AS_RELAY (stream)); + + swfdec_net_stream_setup (cx, obj, 0, NULL, rval); if (argc == 0 || - !SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) || - !SWFDEC_IS_NET_CONNECTION ((conn = (SwfdecNetConnection *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[0])))) { + !SWFDEC_AS_VALUE_IS_OBJECT (argv[0]) || + !SWFDEC_IS_NET_CONNECTION ((conn = (SwfdecNetConnection *) SWFDEC_AS_VALUE_GET_OBJECT (argv[0])))) { SWFDEC_WARNING ("no connection passed to NetStream ()"); return; } stream->conn = conn; + SWFDEC_AS_VALUE_SET_OBJECT (rval, obj); } void @@ -178,9 +315,9 @@ swfdec_net_stream_init_context (SwfdecPlayer *player) context = SWFDEC_AS_CONTEXT (player); proto = swfdec_as_object_new_empty (context); - stream = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global, - SWFDEC_AS_STR_NetStream, SWFDEC_TYPE_NET_STREAM, - swfdec_net_stream_construct, proto)); + stream = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY ( + swfdec_as_object_add_function (context->global, + SWFDEC_AS_STR_NetStream, swfdec_net_stream_construct))); /* set the right properties on the NetStream.prototype object */ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_pause, swfdec_net_stream_pause); swfdec_as_object_add_function (proto, SWFDEC_AS_STR_play, swfdec_net_stream_play); @@ -188,8 +325,15 @@ swfdec_net_stream_init_context (SwfdecPlayer *player) SWFDEC_AS_VALUE_SET_OBJECT (&val, stream); swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, &val, - SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_Object, &val); + if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { + swfdec_as_object_get_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), + SWFDEC_AS_STR_prototype, &val); + swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, &val, + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); + swfdec_as_object_set_variable_and_flags (stream, SWFDEC_AS_STR_prototype, &val, + SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + } } diff --git a/swfdec/swfdec_player.c b/swfdec/swfdec_player.c index 2d89527f..0696cb45 100644 --- a/swfdec/swfdec_player.c +++ b/swfdec/swfdec_player.c @@ -28,6 +28,7 @@ #include "swfdec_player_internal.h" #include "swfdec_as_frame_internal.h" +#include "swfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_audio_internal.h" #include "swfdec_button_movie.h" /* for mouse cursor */ @@ -35,12 +36,14 @@ #include "swfdec_debug.h" #include "swfdec_enums.h" #include "swfdec_event.h" +#include "swfdec_filter.h" #include "swfdec_internal.h" #include "swfdec_loader_internal.h" #include "swfdec_marshal.h" #include "swfdec_movie.h" #include "swfdec_renderer_internal.h" #include "swfdec_resource.h" +#include "swfdec_sandbox.h" #include "swfdec_script_internal.h" #include "swfdec_sprite_movie.h" #include "swfdec_text_field_movie.h" @@ -518,8 +521,9 @@ swfdec_player_do_action (SwfdecPlayer *player) if (action) { if (action->script) { SwfdecSandbox *sandbox = SWFDEC_MOVIE (action->actor)->resource->sandbox; + SwfdecAsObject *object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (action->actor)); swfdec_sandbox_use (sandbox); - swfdec_as_object_run (SWFDEC_AS_OBJECT (action->actor), action->script); + swfdec_as_object_run (object, action->script); swfdec_sandbox_unuse (sandbox); } else { swfdec_actor_execute (action->actor, action->event, action->key); @@ -931,7 +935,7 @@ swfdec_player_update_scale (SwfdecPlayer *player) for (walk = priv->roots; walk; walk = walk->next) { g_signal_emit_by_name (walk->data, "matrix-changed"); } - swfdec_player_invalidate (player, NULL); + swfdec_player_invalidate (player, NULL, NULL); if (!swfdec_player_is_locked (player)) swfdec_player_emit_signals (player); } @@ -1055,6 +1059,7 @@ swfdec_player_dispose (GObject *object) G_OBJECT_CLASS (swfdec_player_parent_class)->dispose (object); /* must happen after disposing context, some objects unroot themselves */ swfdec_function_list_clear (&priv->rooted); + g_assert (priv->xml_sockets == NULL); /* xml sockets do remove themselves */ swfdec_player_remove_all_external_actions (player, player); #ifndef G_DISABLE_ASSERT @@ -1132,12 +1137,14 @@ swfdec_player_broadcast (SwfdecPlayer *player, const char *object_name, /* FIXME: sandbox ordering? */ for (walk = player->priv->sandboxes; walk; walk = walk->next) { SwfdecSandbox *sandbox = walk->data; - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (sandbox), object_name, &vals[0]); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&vals[0])) + swfdec_sandbox_use (sandbox); + swfdec_as_object_get_variable (SWFDEC_AS_CONTEXT (player)->global, object_name, &vals[0]); + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (vals[0])) + return; + obj = SWFDEC_AS_VALUE_GET_COMPOSITE (vals[0]); + if (obj == NULL) return; - obj = SWFDEC_AS_VALUE_GET_OBJECT (&vals[0]); SWFDEC_AS_VALUE_SET_STRING (&vals[0], signal_name); - swfdec_sandbox_use (sandbox); swfdec_as_object_call (obj, SWFDEC_AS_STR_broadcastMessage, argc + 1, vals, NULL); swfdec_sandbox_unuse (sandbox); } @@ -1155,7 +1162,7 @@ swfdec_player_invalidate_focusrect (SwfdecPlayer *player) if (swfdec_rect_is_empty (&priv->focusrect)) return; - swfdec_player_invalidate (player, &priv->focusrect); + swfdec_player_invalidate (player, NULL, &priv->focusrect); swfdec_rect_init_empty (&priv->focusrect); } @@ -1189,18 +1196,18 @@ swfdec_player_grab_focus (SwfdecPlayer *player, SwfdecActor *actor) } prev = priv->focus; if (prev) { - SWFDEC_AS_VALUE_SET_OBJECT (&vals[0], SWFDEC_AS_OBJECT (prev)); + SWFDEC_AS_VALUE_SET_MOVIE (&vals[0], SWFDEC_MOVIE (prev)); } else { SWFDEC_AS_VALUE_SET_NULL (&vals[0]); } if (actor) { - SWFDEC_AS_VALUE_SET_OBJECT (&vals[1], SWFDEC_AS_OBJECT (actor)); + SWFDEC_AS_VALUE_SET_MOVIE (&vals[1], SWFDEC_MOVIE (actor)); } else { SWFDEC_AS_VALUE_SET_NULL (&vals[1]); } if (prev) { swfdec_sandbox_use (SWFDEC_MOVIE (prev)->resource->sandbox); - swfdec_as_object_call (SWFDEC_AS_OBJECT (prev), SWFDEC_AS_STR_onKillFocus, + swfdec_as_relay_call (SWFDEC_AS_RELAY (prev), SWFDEC_AS_STR_onKillFocus, 1, &vals[1], NULL); swfdec_sandbox_unuse (SWFDEC_MOVIE (prev)->resource->sandbox); klass = SWFDEC_ACTOR_GET_CLASS (prev); @@ -1212,7 +1219,7 @@ swfdec_player_grab_focus (SwfdecPlayer *player, SwfdecActor *actor) swfdec_player_invalidate_focusrect (player); if (actor) { swfdec_sandbox_use (SWFDEC_MOVIE (actor)->resource->sandbox); - swfdec_as_object_call (SWFDEC_AS_OBJECT (actor), SWFDEC_AS_STR_onSetFocus, + swfdec_as_relay_call (SWFDEC_AS_RELAY (actor), SWFDEC_AS_STR_onSetFocus, 1, &vals[0], NULL); swfdec_sandbox_unuse (SWFDEC_MOVIE (actor)->resource->sandbox); klass = SWFDEC_ACTOR_GET_CLASS (actor); @@ -1484,6 +1491,7 @@ swfdec_player_focus_sort (gconstpointer ca, gconstpointer cb) static GList * swfdec_player_get_tab_movies (SwfdecPlayer *player, const GList *current) { + SwfdecAsObject *object; SwfdecAsValue val; const GList *walk; GList *ret = NULL; @@ -1494,17 +1502,19 @@ swfdec_player_get_tab_movies (SwfdecPlayer *player, const GList *current) if (!SWFDEC_IS_ACTOR (actor)) continue; + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (actor)); swfdec_sandbox_use (SWFDEC_MOVIE (actor)->resource->sandbox); if (SWFDEC_IS_TEXT_FIELD_MOVIE (actor)) { SwfdecTextFieldMovie *text = SWFDEC_TEXT_FIELD_MOVIE (actor); if (text->editable) ret = g_list_prepend (ret, actor); } else if (SWFDEC_MOVIE (actor)->parent != NULL) { - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (actor), SWFDEC_AS_STR_tabEnabled, &val); - if (swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), &val)) { - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (actor), SWFDEC_AS_STR_tabEnabled, &val); + swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabEnabled, &val); + if (swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), val)) { + /* Flash queries again - why not? :/ */ + swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabEnabled, &val); ret = g_list_prepend (ret, actor); - } else if (SWFDEC_AS_VALUE_IS_UNDEFINED (&val) && + } else if (SWFDEC_AS_VALUE_IS_UNDEFINED (val) && swfdec_actor_get_mouse_events (actor)) { ret = g_list_prepend (ret, actor); } @@ -1513,10 +1523,10 @@ swfdec_player_get_tab_movies (SwfdecPlayer *player, const GList *current) if (SWFDEC_MOVIE (actor)->parent == NULL) SWFDEC_AS_VALUE_SET_UNDEFINED (&val); else - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (actor), SWFDEC_AS_STR_tabChildren, &val); + swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabChildren, &val); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&val) || - swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), &val)) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (val) || + swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), val)) { GList *list; swfdec_sandbox_unuse (SWFDEC_MOVIE (actor)->resource->sandbox); list = swfdec_player_get_tab_movies (player, SWFDEC_MOVIE (actor)->list); @@ -1946,7 +1956,7 @@ swfdec_player_update_focusrect (SwfdecPlayer *player) priv->focusrect = movie->extents; if (movie->parent) swfdec_movie_rect_local_to_global (movie->parent, &priv->focusrect); - swfdec_player_invalidate (player, &priv->focusrect); + swfdec_player_invalidate (player, NULL, &priv->focusrect); } static void @@ -2054,7 +2064,14 @@ swfdec_accumulate_quit (GSignalInvocationHint *ihint, GValue *return_accu, } static void -swfdec_player_mark_string_object (gpointer key, gpointer value, gpointer data) +swfdec_player_mark_string_as_object (gpointer key, gpointer value, gpointer data) +{ + swfdec_as_string_mark (key); + swfdec_as_object_mark (value); +} + +static void +swfdec_player_mark_string_gc_object (gpointer key, gpointer value, gpointer data) { swfdec_as_string_mark (key); swfdec_gc_object_mark (value); @@ -2066,11 +2083,12 @@ swfdec_player_mark (SwfdecAsContext *context) SwfdecPlayer *player = SWFDEC_PLAYER (context); SwfdecPlayerPrivate *priv = player->priv; - g_hash_table_foreach (priv->registered_classes, swfdec_player_mark_string_object, NULL); - g_hash_table_foreach (priv->scripting_callbacks, swfdec_player_mark_string_object, NULL); + g_hash_table_foreach (priv->registered_classes, swfdec_player_mark_string_as_object, NULL); + g_hash_table_foreach (priv->scripting_callbacks, swfdec_player_mark_string_gc_object, NULL); g_list_foreach (priv->roots, (GFunc) swfdec_gc_object_mark, NULL); g_list_foreach (priv->intervals, (GFunc) swfdec_gc_object_mark, NULL); g_slist_foreach (priv->sandboxes, (GFunc) swfdec_gc_object_mark, NULL); + g_slist_foreach (priv->xml_sockets, (GFunc) swfdec_gc_object_mark, NULL); swfdec_function_list_execute (&priv->rooted, player); swfdec_gc_object_mark (priv->resource); @@ -2459,9 +2477,42 @@ swfdec_player_stop_sounds (SwfdecPlayer *player, SwfdecAudioRemoveFunc func, gpo } } -/* rect is in global coordinates */ +static void +swfdec_player_invalidate_movie (SwfdecMovie *movie, double xscale, double yscale, + SwfdecRectangle *rect) +{ + GSList *walk; + /* FIXME: We should likely always enlarge by one and not only for filters */ + gboolean enlarge = !SWFDEC_IS_TEXT_FIELD_MOVIE (movie); + + while (movie != NULL) { + for (walk = movie->filters; walk; walk = walk->next) { + if (enlarge) { + rect->width++; + rect->height++; + enlarge = FALSE; + } + swfdec_filter_get_rectangle (walk->data, rect, xscale, yscale, rect); + } + movie = movie->parent; + } +} + +/** + * swfdec_player_invalidate: + * @player: Player to invalidate in + * @movie: the movie that causes the invalidation or %NULL if the invalidation + * is not specific to a movie. The invalid region will be enhanced by + * the area required by filters. Also the "invalidate" signal will be + * emitted on the movie and all its parents. + * @rect: rectangle to invalidate in global coordiantes or %NULL for the + * whole player + * + * Invalidates the given area of the player. This causes this area to be + * emitted as part of the SwfdecPlayer::invalidate signal. + **/ void -swfdec_player_invalidate (SwfdecPlayer *player, const SwfdecRect *rect) +swfdec_player_invalidate (SwfdecPlayer *player, SwfdecMovie *movie, const SwfdecRect *rect) { SwfdecPlayerPrivate *priv; SwfdecRectangle r; @@ -2479,6 +2530,11 @@ swfdec_player_invalidate (SwfdecPlayer *player, const SwfdecRect *rect) swfdec_rect_transform (&tmp, rect, &priv->global_to_stage); swfdec_rectangle_init_rect (&r, &tmp); + swfdec_player_invalidate_movie (movie, + player->priv->global_to_stage.xx * SWFDEC_TWIPS_SCALE_FACTOR, + player->priv->global_to_stage.yy * SWFDEC_TWIPS_SCALE_FACTOR, + &r); + /* FIXME: currently we clamp the rectangle to the visible area, it might * be useful to allow out-of-bounds drawing. In that case this needs to be * changed */ @@ -2521,7 +2577,7 @@ swfdec_player_set_background_color (SwfdecPlayer *player, SwfdecColor bgcolor) SWFDEC_INFO ("setting bgcolor to %08X", bgcolor); priv->bgcolor = bgcolor; - swfdec_player_invalidate (player, NULL); + swfdec_player_invalidate (player, NULL, NULL); g_object_notify (G_OBJECT (player), "background-color"); } @@ -2572,8 +2628,6 @@ swfdec_player_create_movie_at_level (SwfdecPlayer *player, SwfdecResource *resou /* create new root movie */ s = swfdec_as_context_give_string (SWFDEC_AS_CONTEXT (player), g_strdup_printf ("_level%d", level)); movie = swfdec_movie_new (player, level - 16384, NULL, resource, NULL, s); - if (movie == NULL) - return NULL; movie->name = SWFDEC_AS_STR_EMPTY; return SWFDEC_SPRITE_MOVIE (movie); } @@ -2736,7 +2790,6 @@ swfdec_player_set_export_class (SwfdecPlayer *player, const char *name, SwfdecAs g_return_if_fail (SWFDEC_IS_PLAYER (player)); g_return_if_fail (name != NULL); - g_return_if_fail (object == NULL || SWFDEC_IS_AS_OBJECT (object)); priv = player->priv; if (object) { @@ -2878,7 +2931,7 @@ swfdec_player_set_fullscreen (SwfdecPlayer *player, gboolean fullscreen) SWFDEC_AS_VALUE_SET_BOOLEAN (&val, fullscreen); swfdec_player_update_scale (player); if (SWFDEC_AS_CONTEXT (player)->global) { - SwfdecSandbox *sandbox = SWFDEC_SANDBOX (SWFDEC_AS_CONTEXT (player)->global); + SwfdecSandbox *sandbox = swfdec_sandbox_get (player); swfdec_sandbox_unuse (sandbox); swfdec_player_update_size (player, NULL); swfdec_player_broadcast (player, SWFDEC_AS_STR_Stage, SWFDEC_AS_STR_onFullScreen, 1, &val); diff --git a/swfdec/swfdec_player_as.c b/swfdec/swfdec_player_as.c index 2455156b..8051be31 100644 --- a/swfdec/swfdec_player_as.c +++ b/swfdec/swfdec_player_as.c @@ -51,34 +51,34 @@ swfdec_player_do_set_interval (gboolean repeat, SwfdecAsContext *cx, guint argc, return; } - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) { + if (!SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0]) || + (object = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0])) == NULL) { SWFDEC_WARNING ("first argument to setInterval is not an object"); return; } - object = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - if (SWFDEC_IS_AS_FUNCTION (object)) { - msecs = swfdec_as_value_to_integer (cx, &argv[1]); + if (SWFDEC_IS_AS_FUNCTION (object->relay)) { + msecs = swfdec_as_value_to_integer (cx, argv[1]); if (msecs < MIN_INTERVAL_TIME) { SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME); msecs = MIN_INTERVAL_TIME; } id = swfdec_interval_new_function (player, msecs, repeat, - SWFDEC_AS_FUNCTION (object), argc - 2, &argv[2]); + SWFDEC_AS_FUNCTION (object->relay), argc - 2, &argv[2]); } else { const char *name; if (argc < 3) { SWFDEC_WARNING ("setInterval needs 3 arguments when not called with function"); return; } - name = swfdec_as_value_to_string (cx, &argv[1]); - msecs = swfdec_as_value_to_integer (cx, &argv[2]); + name = swfdec_as_value_to_string (cx, argv[1]); + msecs = swfdec_as_value_to_integer (cx, argv[2]); if (msecs < MIN_INTERVAL_TIME) { SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME); msecs = MIN_INTERVAL_TIME; } - id = swfdec_interval_new_object (player, msecs, repeat, object, name, argc - 3, &argv[3]); + id = swfdec_interval_new_object (player, msecs, repeat, &argv[0], name, argc - 3, &argv[3]); } - SWFDEC_AS_VALUE_SET_INT (rval, id); + *rval = swfdec_as_value_from_integer (cx, id); } SWFDEC_AS_NATIVE (2, 0, swfdec_player_ASnew) @@ -171,11 +171,7 @@ swfdec_get_asnative (SwfdecAsContext *cx, guint x, guint y) x_exists = TRUE; if (native_funcs[i].x == x && native_funcs[i].y == y) { SwfdecAsFunction *fun = swfdec_as_native_function_new (cx, native_funcs[i].name, - native_funcs[i].func, NULL); - if (native_funcs[i].get_type) { - swfdec_as_native_function_set_construct_type (SWFDEC_AS_NATIVE_FUNCTION (fun), - native_funcs[i].get_type ()); - } + native_funcs[i].func); return fun; } } @@ -183,8 +179,7 @@ swfdec_get_asnative (SwfdecAsContext *cx, guint x, guint y) if (x_exists) { SwfdecAsFunction *func; char *name = g_strdup_printf ("ASnative (%u, %u)", x, y); - func = swfdec_as_native_function_new (cx, name, swfdec_player_do_nothing, - NULL); + func = swfdec_as_native_function_new (cx, name, swfdec_player_do_nothing); g_free (name); return func; } else { @@ -198,7 +193,7 @@ swfdec_player_ASconstructor (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecAsValue val; - SwfdecAsObject *proto; + SwfdecAsObject *proto, *func_object; SwfdecAsFunction *func; guint x, y; @@ -206,18 +201,19 @@ swfdec_player_ASconstructor (SwfdecAsContext *cx, SwfdecAsObject *object, func = swfdec_get_asnative (cx, x, y); if (func) { - proto = swfdec_as_object_new (cx); + proto = swfdec_as_object_new (cx, SWFDEC_AS_STR_Object, NULL); + func_object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (func)); SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (func), + swfdec_as_object_set_variable_and_flags (func_object, SWFDEC_AS_STR_prototype, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (func)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, func_object); swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (func)); + SWFDEC_AS_VALUE_SET_OBJECT (rval, func_object); } } @@ -232,7 +228,7 @@ swfdec_player_ASnative (SwfdecAsContext *cx, SwfdecAsObject *object, func = swfdec_get_asnative (cx, x, y); if (func) { - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (func)); + SWFDEC_AS_VALUE_SET_OBJECT (rval, swfdec_as_relay_get_as_object SWFDEC_AS_RELAY (func)); } } @@ -252,7 +248,7 @@ ASSetNative (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (0, NULL, "ois", &target, &x, &s); if (argc > 3) - y = swfdec_as_value_to_integer (cx, &argv[3]); + y = swfdec_as_value_to_integer (cx, argv[3]); else y = 0; names = g_strsplit (s, ",", -1); @@ -275,7 +271,7 @@ ASSetNative (SwfdecAsContext *cx, SwfdecAsObject *object, function = swfdec_get_asnative (cx, x, y); if (function == NULL) break; - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (function)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function))); swfdec_as_object_set_variable_and_flags (target, swfdec_as_context_get_string (cx, s), &val, flags); y++; @@ -335,13 +331,13 @@ swfdec_player_object_registerClass (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (0, NULL, "s", &name); - if (argc < 2 || !SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) { + if (argc < 2 || !SWFDEC_AS_VALUE_IS_OBJECT (argv[1])) { SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); return; } swfdec_player_set_export_class (SWFDEC_PLAYER (cx), name, - SWFDEC_AS_VALUE_GET_OBJECT (&argv[1])); + SWFDEC_AS_VALUE_GET_OBJECT (argv[1])); SWFDEC_AS_VALUE_SET_BOOLEAN (rval, TRUE); } @@ -350,13 +346,28 @@ swfdec_player_object_registerClass (SwfdecAsContext *cx, SwfdecAsObject *object, void swfdec_player_preinit_global (SwfdecAsContext *context) { - /* init these two before swfdec_as_context_startup, so they won't get - * __proto__ and constructor properties */ - swfdec_as_object_add_function (context->global, SWFDEC_AS_STR_ASnative, - swfdec_player_ASnative); - swfdec_as_object_add_function (context->global, SWFDEC_AS_STR_ASconstructor, - swfdec_player_ASconstructor); - // FIXME: is this only the debug player? - swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_enableDebugConsole, swfdec_player_enableDebugConsole); + SwfdecAsObject *o; + SwfdecAsFunction *f; + SwfdecAsValue val; + + f = swfdec_as_native_function_new_bare (context, + SWFDEC_AS_STR_ASnative, swfdec_player_ASnative); + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (f)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, o); + swfdec_as_object_set_variable_and_flags (context->global, SWFDEC_AS_STR_ASnative, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + + f = swfdec_as_native_function_new_bare (context, + SWFDEC_AS_STR_ASconstructor, swfdec_player_ASconstructor); + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (f)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, o); + swfdec_as_object_set_variable_and_flags (context->global, SWFDEC_AS_STR_ASconstructor, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + + f = swfdec_as_native_function_new_bare (context, + SWFDEC_AS_STR_enableDebugConsole, swfdec_player_enableDebugConsole); + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (f)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, o); + swfdec_as_object_set_variable_and_flags (context->global, SWFDEC_AS_STR_enableDebugConsole, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } diff --git a/swfdec/swfdec_player_internal.h b/swfdec/swfdec_player_internal.h index 9f7996ac..5a8cdaf7 100644 --- a/swfdec/swfdec_player_internal.h +++ b/swfdec/swfdec_player_internal.h @@ -105,6 +105,7 @@ struct _SwfdecPlayerPrivate guint interval_id; /* id returned from setInterval call */ GList * intervals; /* all currently running intervals */ GHashTable * registered_classes; /* name => SwfdecAsObject constructor */ + GSList * xml_sockets; /* all XMLSockets currently in use */ /* rendering */ GArray * invalidations; /* fine-grained areas in need of redraw */ @@ -199,14 +200,15 @@ SwfdecSocket * swfdec_player_create_socket (SwfdecPlayer * player, const char * hostname, guint port); +void swfdec_player_invalidate (SwfdecPlayer * player, + SwfdecMovie * movie, + const SwfdecRect * rect); void swfdec_player_invalidate_focusrect (SwfdecPlayer * player); void swfdec_player_grab_focus (SwfdecPlayer * player, SwfdecActor * actor); #define swfdec_player_has_focus(player,actor) ((player)->priv->focus == (actor)) #define swfdec_player_is_key_pressed(player,key) ((player)->priv->key_pressed[(key) / 8] & (1 << ((key) % 8))) #define swfdec_player_is_mouse_pressed(player) ((player)->priv->mouse_button & 1) -void swfdec_player_invalidate (SwfdecPlayer * player, - const SwfdecRect * rect); void swfdec_player_add_timeout (SwfdecPlayer * player, SwfdecTimeout * timeout); void swfdec_player_remove_timeout (SwfdecPlayer * player, diff --git a/swfdec/swfdec_print_job.c b/swfdec/swfdec_print_job.c index 1428a6a2..5bf334ba 100644 --- a/swfdec/swfdec_print_job.c +++ b/swfdec/swfdec_print_job.c @@ -98,14 +98,14 @@ swfdec_print_job_init_properties (SwfdecAsContext *cx) g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_PrintJob, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - xml = SWFDEC_AS_VALUE_GET_OBJECT (&val); + xml = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_get_variable (xml, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_orientation, swfdec_print_job_get_orientation, NULL); diff --git a/swfdec/swfdec_renderer.c b/swfdec/swfdec_renderer.c index 39faa605..787e5927 100644 --- a/swfdec/swfdec_renderer.c +++ b/swfdec/swfdec_renderer.c @@ -402,41 +402,54 @@ swfdec_renderer_create_for_data (SwfdecRenderer *renderer, guint8 *data, cairo_surface_t * swfdec_renderer_transform (SwfdecRenderer *renderer, cairo_surface_t *surface, - const SwfdecColorTransform *trans) + const SwfdecColorTransform *trans, const SwfdecRectangle *rect) { cairo_surface_t *target; - guint w, h, x, y, sstride, tstride, color; + guint stride, color; SwfdecColor mask; - guint8 *sdata, *tdata; + guint8 *data; + cairo_t *cr; + int x, y; g_return_val_if_fail (SWFDEC_IS_RENDERER (renderer), NULL); g_return_val_if_fail (surface != NULL, NULL); g_return_val_if_fail (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE, NULL); g_return_val_if_fail (trans != NULL, NULL); g_return_val_if_fail (!swfdec_color_transform_is_mask (trans), NULL); + g_return_val_if_fail (rect != NULL, NULL); + g_return_val_if_fail (rect->x >= 0, NULL); + g_return_val_if_fail (rect->y >= 0, NULL); + g_return_val_if_fail (rect->x + rect->width <= cairo_image_surface_get_width (surface), NULL); + g_return_val_if_fail (rect->y + rect->height <= cairo_image_surface_get_height (surface), NULL); /* FIXME: This function should likely be a vfunc. * Or better: it should compile to a shader */ - w = cairo_image_surface_get_width (surface); - h = cairo_image_surface_get_height (surface); - sdata = cairo_image_surface_get_data (surface); - sstride = cairo_image_surface_get_stride (surface); - mask = cairo_surface_get_content (surface) | CAIRO_CONTENT_ALPHA ? - 0 : SWFDEC_COLOR_COMBINE (0, 0, 0, 0xFF); - - target = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h); - tdata = cairo_image_surface_get_data (target); - tstride = cairo_image_surface_get_stride (target); - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) { - color = ((guint32 *) (gpointer) sdata)[x]; + if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA) { + target = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, rect->width, rect->height); + mask = 0; + } else { + target = cairo_image_surface_create (CAIRO_FORMAT_RGB24, rect->width, rect->height); + mask = SWFDEC_COLOR_COMBINE (0, 0, 0, 0xFF); + } + cairo_surface_set_device_offset (target, -rect->x, -rect->y); + + cr = cairo_create (target); + cairo_set_source_surface (cr, surface, 0, 0); + cairo_paint (cr); + cairo_destroy (cr); + + data = cairo_image_surface_get_data (target); + stride = cairo_image_surface_get_stride (target); + for (y = 0; y < rect->height; y++) { + for (x = 0; x < rect->width; x++) { + color = ((guint32 *) (gpointer) data)[x]; color |= mask; color = swfdec_color_apply_transform_premultiplied (color, trans); - ((guint32 *) (gpointer) tdata)[x] = color; + ((guint32 *) (gpointer) data)[x] = color; } - sdata += sstride; - tdata += tstride; + data += stride; } + cairo_surface_mark_dirty (target); return target; } diff --git a/swfdec/swfdec_renderer_internal.h b/swfdec/swfdec_renderer_internal.h index 6d69ef2a..682383e6 100644 --- a/swfdec/swfdec_renderer_internal.h +++ b/swfdec/swfdec_renderer_internal.h @@ -21,8 +21,10 @@ #define _SWFDEC_RENDERER_INTERNAL_H_ #include <swfdec/swfdec_renderer.h> + #include <swfdec/swfdec_cached.h> #include <swfdec/swfdec_color.h> +#include <swfdec/swfdec_rectangle.h> G_BEGIN_DECLS @@ -57,7 +59,8 @@ cairo_surface_t * swfdec_renderer_create_for_data (SwfdecRenderer * renderer, guint rowstride); cairo_surface_t * swfdec_renderer_transform (SwfdecRenderer * renderer, cairo_surface_t * surface, - const SwfdecColorTransform *trans); + const SwfdecColorTransform *trans, + const SwfdecRectangle *rect); G_END_DECLS diff --git a/swfdec/swfdec_resource.c b/swfdec/swfdec_resource.c index 67a5c9cd..85197d0a 100644 --- a/swfdec/swfdec_resource.c +++ b/swfdec/swfdec_resource.c @@ -46,7 +46,7 @@ static void swfdec_resource_stream_target_init (SwfdecStreamTargetInterface *iface); -G_DEFINE_TYPE_WITH_CODE (SwfdecResource, swfdec_resource, SWFDEC_TYPE_AS_OBJECT, +G_DEFINE_TYPE_WITH_CODE (SwfdecResource, swfdec_resource, SWFDEC_TYPE_GC_OBJECT, G_IMPLEMENT_INTERFACE (SWFDEC_TYPE_STREAM_TARGET, swfdec_resource_stream_target_init)) /*** SWFDEC_STREAM_TARGET interface ***/ @@ -57,7 +57,7 @@ swfdec_resource_is_root (SwfdecResource *resource) g_return_val_if_fail (SWFDEC_IS_RESOURCE (resource), FALSE); return - resource->movie == SWFDEC_PLAYER (swfdec_gc_object_get_context (resource))->priv->roots->data; + resource == SWFDEC_MOVIE (SWFDEC_PLAYER (swfdec_gc_object_get_context (resource))->priv->roots->data)->resource; } static SwfdecPlayer * @@ -70,9 +70,10 @@ static void swfdec_resource_stream_target_image (SwfdecResource *instance) { SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (instance)); - SwfdecSpriteMovie *movie = instance->movie; + SwfdecSpriteMovie *movie = (SwfdecSpriteMovie *) SWFDEC_AS_VALUE_GET_MOVIE (instance->movie); - if (movie->sprite != NULL) + if (!SWFDEC_IS_SPRITE_MOVIE (movie) || movie->sprite != NULL || + swfdec_movie_get_own_resource (SWFDEC_MOVIE (movie)) != instance) return; if (SWFDEC_IS_SWF_DECODER (instance->decoder)) { @@ -88,7 +89,10 @@ swfdec_resource_stream_target_image (SwfdecResource *instance) g_assert (movie->sprite->parse_frame > 0); movie->n_frames = movie->sprite->n_frames; swfdec_movie_invalidate_last (SWFDEC_MOVIE (movie)); - swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (movie), instance->sandbox->MovieClip); + swfdec_sandbox_use (instance->sandbox); + swfdec_as_object_set_constructor_by_name (swfdec_as_relay_get_as_object ( + SWFDEC_AS_RELAY (movie)), SWFDEC_AS_STR_MovieClip, NULL); + swfdec_sandbox_unuse (instance->sandbox); if (swfdec_resource_is_root (instance)) { swfdec_player_start_ticking (player); swfdec_movie_initialize (SWFDEC_MOVIE (movie)); @@ -121,18 +125,18 @@ swfdec_resource_emit_signal (SwfdecResource *resource, const char *name, gboolea cx = swfdec_gc_object_get_context (resource->clip_loader); SWFDEC_AS_VALUE_SET_STRING (&vals[0], name); - if (resource->movie) { - movie = swfdec_movie_resolve (SWFDEC_MOVIE (resource->movie)); + if (SWFDEC_AS_VALUE_IS_MOVIE (resource->movie)) { + movie = SWFDEC_AS_VALUE_GET_MOVIE (resource->movie); if (movie == NULL) { SWFDEC_DEBUG ("no movie, not emitting signal"); return; } if (name == SWFDEC_AS_STR_onLoadInit && - movie != SWFDEC_MOVIE (resource->movie)) { + movie->as_value != SWFDEC_AS_VALUE_GET_VALUE (resource->movie)) { SWFDEC_INFO ("not emitting onLoadInit - the movie is different"); return; } - SWFDEC_AS_VALUE_SET_OBJECT (&vals[1], SWFDEC_AS_OBJECT (movie)); + SWFDEC_AS_VALUE_SET_MOVIE (&vals[1], movie); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (&vals[1]); movie = NULL; @@ -146,18 +150,18 @@ swfdec_resource_emit_signal (SwfdecResource *resource, const char *name, gboolea res = NULL; if (res && res->decoder) { SwfdecDecoder *dec = res->decoder; - SWFDEC_AS_VALUE_SET_INT (&vals[2], dec->bytes_loaded); - SWFDEC_AS_VALUE_SET_INT (&vals[3], dec->bytes_total); + vals[2] = swfdec_as_value_from_integer (cx, dec->bytes_loaded); + vals[3] = swfdec_as_value_from_integer (cx, dec->bytes_total); } else { - SWFDEC_AS_VALUE_SET_INT (&vals[2], 0); - SWFDEC_AS_VALUE_SET_INT (&vals[3], 0); + vals[2] = swfdec_as_value_from_integer (cx, 0); + vals[3] = swfdec_as_value_from_integer (cx, 0); } } if (n_args) memcpy (&vals[skip], args, sizeof (SwfdecAsValue) * n_args); /* FIXME: what's the correct sandbox here? */ swfdec_sandbox_use (resource->clip_loader_sandbox); - swfdec_as_object_call (SWFDEC_AS_OBJECT (resource->clip_loader), SWFDEC_AS_STR_broadcastMessage, + swfdec_as_relay_call (SWFDEC_AS_RELAY (resource->clip_loader), SWFDEC_AS_STR_broadcastMessage, n_args + skip, vals, NULL); swfdec_sandbox_unuse (resource->clip_loader_sandbox); } @@ -168,7 +172,7 @@ swfdec_resource_emit_error (SwfdecResource *resource, const char *message) SwfdecAsValue vals[2]; SWFDEC_AS_VALUE_SET_STRING (&vals[0], message); - SWFDEC_AS_VALUE_SET_INT (&vals[1], 0); + vals[1] = swfdec_as_value_from_integer (swfdec_gc_object_get_context (resource), 0); swfdec_resource_emit_signal (resource, SWFDEC_AS_STR_onLoadError, FALSE, vals, 2); } @@ -182,11 +186,8 @@ swfdec_resource_replace_movie (SwfdecSpriteMovie *movie, SwfdecResource *resourc copy = swfdec_movie_new (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), mov->depth, mov->parent, resource, NULL, mov->name); - if (copy == NULL) - return FALSE; swfdec_movie_begin_update_matrix (copy); copy->matrix = mov->matrix; - copy->original_name = mov->original_name; copy->modified = mov->modified; copy->xscale = mov->xscale; copy->yscale = mov->yscale; @@ -206,17 +207,25 @@ swfdec_resource_stream_target_open (SwfdecStreamTarget *target, SwfdecStream *st { SwfdecLoader *loader = SWFDEC_LOADER (stream); SwfdecResource *instance = SWFDEC_RESOURCE (target); + SwfdecAsObject *object; + SwfdecMovie *movie; const char *query; - g_assert (instance->movie); + g_assert (SWFDEC_AS_VALUE_IS_MOVIE (instance->movie)); + movie = SWFDEC_AS_VALUE_GET_MOVIE (instance->movie); + if (movie == NULL) { + SWFDEC_FIXME ("no movie, what now?"); + return; + } + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); query = swfdec_url_get_query (swfdec_loader_get_url (loader)); if (query) { SWFDEC_INFO ("set url query movie variables: %s", query); - swfdec_as_object_decode (SWFDEC_AS_OBJECT (instance->movie), query); + swfdec_as_object_decode (object, query); } if (instance->variables) { SWFDEC_INFO ("set manual movie variables: %s", instance->variables); - swfdec_as_object_decode (SWFDEC_AS_OBJECT (instance->movie), instance->variables); + swfdec_as_object_decode (object, instance->variables); } swfdec_resource_emit_signal (instance, SWFDEC_AS_STR_onLoadStart, FALSE, NULL, 0); instance->state = SWFDEC_RESOURCE_OPENED; @@ -320,14 +329,17 @@ swfdec_resource_stream_target_close (SwfdecStreamTarget *target, SwfdecStream *s swfdec_loader_set_data_type (SWFDEC_LOADER (stream), dec->data_type); } - SWFDEC_AS_VALUE_SET_INT (&val, 0); /* FIXME */ + val = swfdec_as_value_from_integer (swfdec_gc_object_get_context (resource), 0); /* FIXME */ swfdec_resource_emit_signal (resource, SWFDEC_AS_STR_onLoadComplete, FALSE, &val, 1); resource->state = SWFDEC_RESOURCE_COMPLETE; if (swfdec_resource_abort_if_not_initialized (resource)) return; - if (resource->movie != NULL) - swfdec_actor_queue_script (SWFDEC_ACTOR (resource->movie), SWFDEC_EVENT_LOAD); + if (SWFDEC_AS_VALUE_IS_MOVIE (resource->movie)) { + SwfdecMovie *movie = SWFDEC_AS_VALUE_GET_MOVIE (resource->movie); + if (movie) + swfdec_actor_queue_script (SWFDEC_ACTOR (movie), SWFDEC_EVENT_LOAD); + } } static void @@ -378,6 +390,7 @@ swfdec_resource_mark (SwfdecGcObject *object) swfdec_gc_object_mark (resource->sandbox); if (resource->target) swfdec_gc_object_mark (resource->target); + swfdec_as_value_mark (&resource->movie); SWFDEC_GC_OBJECT_CLASS (swfdec_resource_parent_class)->mark (object); } @@ -487,8 +500,7 @@ swfdec_resource_add_export (SwfdecResource *instance, SwfdecCharacter *character typedef struct _SwfdecResourceLoad SwfdecResourceLoad; struct _SwfdecResourceLoad { SwfdecSandbox * sandbox; - char * target_string; - SwfdecSpriteMovie * target_movie; + SwfdecAsValue target; char * url; SwfdecBuffer * buffer; SwfdecMovieClipLoader * loader; @@ -500,7 +512,6 @@ swfdec_resource_load_free (gpointer loadp) SwfdecResourceLoad *load = loadp; g_free (load->url); - g_free (load->target_string); if (load->buffer) swfdec_buffer_unref (load->buffer); g_slice_free (SwfdecResourceLoad, load); @@ -514,8 +525,7 @@ swfdec_resource_load_mark (gpointer loadp, gpointer playerp) swfdec_gc_object_mark (load->sandbox); if (load->loader) swfdec_gc_object_mark (load->loader); - if (load->target_movie) - swfdec_gc_object_mark (load->target_movie); + swfdec_as_value_mark (&load->target); } static gboolean @@ -524,17 +534,17 @@ swfdec_resource_create_movie (SwfdecResource *resource, SwfdecResourceLoad *load SwfdecPlayer *player; SwfdecSpriteMovie *movie; - if (resource->movie) + if (SWFDEC_AS_VALUE_IS_MOVIE (resource->movie)) return TRUE; player = SWFDEC_PLAYER (swfdec_gc_object_get_context (resource)); - if (load->target_movie) { - movie = (SwfdecSpriteMovie *) swfdec_movie_resolve (SWFDEC_MOVIE (load->target_movie)); + if (SWFDEC_AS_VALUE_IS_MOVIE (load->target)) { + movie = (SwfdecSpriteMovie *) SWFDEC_AS_VALUE_GET_MOVIE (load->target); if (SWFDEC_IS_SPRITE_MOVIE (movie)) movie = swfdec_resource_replace_movie (movie, resource); else movie = NULL; - } else { - int level = swfdec_player_get_level (player, load->target_string, 7); + } else if (SWFDEC_AS_VALUE_IS_STRING (load->target)) { + int level = swfdec_player_get_level (player, SWFDEC_AS_VALUE_GET_STRING (load->target), 7); if (level >= 0) { movie = swfdec_player_get_movie_at_level (player, level); if (movie) @@ -543,6 +553,9 @@ swfdec_resource_create_movie (SwfdecResource *resource, SwfdecResourceLoad *load } else { movie = NULL; } + } else { + /* we only set target to string or movie values */ + g_assert_not_reached (); } if (movie == NULL) { SWFDEC_WARNING ("target does not reference a movie, not loading %s", load->url); @@ -571,8 +584,10 @@ swfdec_resource_do_load (SwfdecPlayer *player, gboolean allowed, gpointer loadp) SWFDEC_WARNING ("SECURITY: no access to %s from %s", load->url, swfdec_url_get_url (load->sandbox->url)); /* FIXME: is replacing correct? */ - if (load->target_movie) { - resource->movie = SWFDEC_SPRITE_MOVIE (swfdec_movie_resolve (SWFDEC_MOVIE (load->target_movie))); + if (SWFDEC_AS_VALUE_IS_MOVIE (load->target)) { + if (SWFDEC_AS_VALUE_IS_MOVIE (load->target) && + SWFDEC_IS_SPRITE_MOVIE (SWFDEC_AS_VALUE_GET_MOVIE (load->target))) + resource->movie = load->target; swfdec_resource_emit_error (resource, SWFDEC_AS_STR_IllegalRequest); } swfdec_player_unroot (player, load); @@ -606,7 +621,11 @@ swfdec_resource_load_request (gpointer loadp, gpointer playerp) if (load->url[0] == '\0') { SwfdecSpriteMovie *movie; - movie = load->target_movie ? (SwfdecSpriteMovie *) swfdec_movie_resolve (SWFDEC_MOVIE (load->target_movie)) : NULL; + if (SWFDEC_AS_VALUE_IS_MOVIE (load->target)) { + movie = (SwfdecSpriteMovie *) SWFDEC_AS_VALUE_GET_MOVIE (load->target); + } else { + movie = NULL; + } if (SWFDEC_IS_SPRITE_MOVIE (movie)) { swfdec_resource_replace_movie (movie, SWFDEC_MOVIE (movie)->resource); } else { @@ -619,22 +638,20 @@ swfdec_resource_load_request (gpointer loadp, gpointer playerp) /* fscommand? */ if (g_ascii_strncasecmp (load->url, "FSCommand:", 10) == 0) { char *command = load->url + 10; - if (load->target_movie) { - char *target = swfdec_movie_get_path (SWFDEC_MOVIE (load->target_movie), TRUE); + const char *target = swfdec_as_value_to_string (SWFDEC_AS_CONTEXT (player), load->target); + if (SWFDEC_AS_VALUE_IS_MOVIE (load->target)) { SWFDEC_FIXME ("Adobe 9.0.124.0 and later don't emit fscommands here. " "We just do for compatibility reasons with the testsuite."); - g_signal_emit_by_name (player, "fscommand", command, target); - g_free (target); - } else { - g_signal_emit_by_name (player, "fscommand", command, load->target_string); } + g_signal_emit_by_name (player, "fscommand", command, target); swfdec_player_unroot (player, load); return; } /* LAUNCH command (aka getURL) */ - if (load->target_string && swfdec_player_get_level (player, load->target_string, 7) < 0) { - swfdec_player_launch (player, load->url, load->target_string, load->buffer); + if (SWFDEC_AS_VALUE_IS_STRING (load->target) && swfdec_player_get_level (player, + SWFDEC_AS_VALUE_GET_STRING (load->target), 7) < 0) { + swfdec_player_launch (player, load->url, SWFDEC_AS_VALUE_GET_STRING (load->target), load->buffer); swfdec_player_unroot (player, load); return; } @@ -644,10 +661,9 @@ swfdec_resource_load_request (gpointer loadp, gpointer playerp) } /* NB: must be called from a script */ -/* FIXME: 6 arguments?! */ +/* FIXME: 5 arguments?! */ static void -swfdec_resource_load_internal (SwfdecPlayer *player, - SwfdecSpriteMovie *target_movie, const char *target_string, +swfdec_resource_load_internal (SwfdecPlayer *player, const SwfdecAsValue *val, const char *url, SwfdecBuffer *buffer, SwfdecMovieClipLoader *loader) { SwfdecResourceLoad *load; @@ -655,10 +671,9 @@ swfdec_resource_load_internal (SwfdecPlayer *player, g_assert (SWFDEC_AS_CONTEXT (player)->frame != NULL); load = g_slice_new (SwfdecResourceLoad); - load->sandbox = SWFDEC_SANDBOX (SWFDEC_AS_CONTEXT (player)->global); + load->sandbox = swfdec_sandbox_get (player); load->url = g_strdup (url); - load->target_movie = target_movie; - load->target_string = g_strdup (target_string); + load->target = *val; load->buffer = buffer; load->loader = loader; @@ -671,6 +686,7 @@ swfdec_resource_load_movie (SwfdecPlayer *player, const SwfdecAsValue *target, const char *url, SwfdecBuffer *buffer, SwfdecMovieClipLoader *loader) { SwfdecMovie *movie; + SwfdecAsValue val; const char *s; g_return_val_if_fail (SWFDEC_IS_PLAYER (player), FALSE); @@ -678,45 +694,44 @@ swfdec_resource_load_movie (SwfdecPlayer *player, const SwfdecAsValue *target, g_return_val_if_fail (url != NULL, FALSE); g_return_val_if_fail (loader == NULL || SWFDEC_IS_MOVIE_CLIP_LOADER (loader), FALSE); - if (SWFDEC_AS_VALUE_IS_OBJECT (target)) { - SwfdecAsObject *object = SWFDEC_AS_VALUE_GET_OBJECT (target); - if (SWFDEC_IS_SPRITE_MOVIE (object)) { - swfdec_resource_load_internal (player, SWFDEC_SPRITE_MOVIE (object), - NULL, url, buffer, loader); + if (SWFDEC_AS_VALUE_IS_MOVIE (*target)) { + movie = SWFDEC_AS_VALUE_GET_MOVIE (*target); + if (SWFDEC_IS_SPRITE_MOVIE (movie)) { + swfdec_resource_load_internal (player, target, url, buffer, loader); return TRUE; } } if (loader) { - if (SWFDEC_AS_VALUE_IS_NUMBER (target)) { - int i = swfdec_as_double_to_integer (SWFDEC_AS_VALUE_GET_NUMBER (target)); + if (SWFDEC_AS_VALUE_IS_NUMBER (*target)) { + int i = swfdec_as_double_to_integer (SWFDEC_AS_VALUE_GET_NUMBER (*target)); if (i < 0) return FALSE; - s = swfdec_as_context_give_string (swfdec_gc_object_get_context (loader), - g_strdup_printf ("_level%d", i)); - swfdec_resource_load_internal (player, NULL, s, url, buffer, loader); + SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_give_string ( + SWFDEC_AS_CONTEXT (player), g_strdup_printf ("_level%d", i))); + swfdec_resource_load_internal (player, &val, url, buffer, loader); return TRUE; - } else if (SWFDEC_AS_VALUE_IS_STRING (target) || - (SWFDEC_AS_VALUE_IS_OBJECT (target) && SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (target)))) { - s = swfdec_as_value_to_string (SWFDEC_AS_CONTEXT (player), target); + } else if (SWFDEC_AS_VALUE_IS_STRING (*target) || SWFDEC_AS_VALUE_IS_MOVIE (*target)) { + s = swfdec_as_value_to_string (SWFDEC_AS_CONTEXT (player), *target); } else { SWFDEC_WARNING ("target does not reference a movie, not loading %s", url); return FALSE; } } else { - s = swfdec_as_value_to_string (SWFDEC_AS_CONTEXT (player), target); + s = swfdec_as_value_to_string (SWFDEC_AS_CONTEXT (player), *target); } if (swfdec_player_get_level (player, s, SWFDEC_AS_CONTEXT (player)->version) >= 0) { /* lowercase the string, so we can do case insensitive level lookups later on */ char *tmp = g_ascii_strdown (s, -1); - swfdec_resource_load_internal (player, NULL, tmp, url, buffer, NULL); - g_free (tmp); + SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_give_string ( + SWFDEC_AS_CONTEXT (player), tmp)); + swfdec_resource_load_internal (player, &val, url, buffer, NULL); return TRUE; } movie = swfdec_player_get_movie_from_string (player, s); if (SWFDEC_IS_SPRITE_MOVIE (movie)) { - swfdec_resource_load_internal (player, SWFDEC_SPRITE_MOVIE (movie), - NULL, url, buffer, loader); + SWFDEC_AS_VALUE_SET_MOVIE (&val, movie); + swfdec_resource_load_internal (player, &val, url, buffer, loader); return TRUE; } SWFDEC_WARNING ("%s does not reference a movie, not loading %s", s, url); @@ -727,11 +742,14 @@ void swfdec_resource_load (SwfdecPlayer *player, const char *target, const char *url, SwfdecBuffer *buffer) { + SwfdecAsValue val; + g_return_if_fail (SWFDEC_IS_PLAYER (player)); g_return_if_fail (target != NULL); g_return_if_fail (url != NULL); - swfdec_resource_load_internal (player, NULL, target, url, buffer, NULL); + SWFDEC_AS_VALUE_SET_STRING (&val, target); + swfdec_resource_load_internal (player, &val, url, buffer, NULL); } gboolean @@ -742,12 +760,13 @@ swfdec_resource_emit_on_load_init (SwfdecResource *resource) if (resource->state != SWFDEC_RESOURCE_COMPLETE) return FALSE; - if (resource->movie && SWFDEC_IS_IMAGE_DECODER (resource->decoder)) { + if (SWFDEC_AS_VALUE_IS_MOVIE (resource->movie) && SWFDEC_IS_IMAGE_DECODER (resource->decoder)) { SwfdecImage *image = SWFDEC_IMAGE_DECODER (resource->decoder)->image; - if (image) { - swfdec_movie_invalidate_next (SWFDEC_MOVIE (resource->movie)); - swfdec_movie_queue_update (SWFDEC_MOVIE (resource->movie), SWFDEC_MOVIE_INVALID_EXTENTS); - SWFDEC_MOVIE (resource->movie)->image = g_object_ref (image); + SwfdecMovie *movie = SWFDEC_AS_VALUE_GET_MOVIE (resource->movie); + if (image && movie) { + swfdec_movie_invalidate_next (movie); + swfdec_movie_queue_update (movie, SWFDEC_MOVIE_INVALID_EXTENTS); + movie->image = g_object_ref (image); } } swfdec_resource_emit_signal (resource, SWFDEC_AS_STR_onLoadInit, FALSE, NULL, 0); diff --git a/swfdec/swfdec_resource.h b/swfdec/swfdec_resource.h index 8a4e2e5a..a5428cd1 100644 --- a/swfdec/swfdec_resource.h +++ b/swfdec/swfdec_resource.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2006-2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2006-2008 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 @@ -20,8 +20,8 @@ #ifndef _SWFDEC_RESOURCE_H_ #define _SWFDEC_RESOURCE_H_ +#include <swfdec/swfdec_gc_object.h> #include <swfdec/swfdec_player.h> -#include <swfdec/swfdec_sandbox.h> #include <swfdec/swfdec_sprite_movie.h> G_BEGIN_DECLS @@ -45,11 +45,11 @@ typedef enum { struct _SwfdecResource { - SwfdecAsObject object; + SwfdecGcObject object; guint version; /* version of this resource */ SwfdecSandbox * sandbox; /* sandbox this resource belongs to (only NULL for a short time on very first loader) */ - SwfdecSpriteMovie * movie; /* the movie responsible for creating this instance */ + SwfdecAsValue movie; /* the movie responsible for creating this instance or undefined if none */ SwfdecLoader * loader; /* the loader providing data for the decoder */ SwfdecDecoder * decoder; /* decoder in use or NULL if broken file */ @@ -67,7 +67,7 @@ struct _SwfdecResource struct _SwfdecResourceClass { - SwfdecAsObjectClass object_class; + SwfdecGcObjectClass object_class; }; GType swfdec_resource_get_type (void); diff --git a/swfdec/swfdec_sandbox.c b/swfdec/swfdec_sandbox.c index f468a075..c605f1a0 100644 --- a/swfdec/swfdec_sandbox.c +++ b/swfdec/swfdec_sandbox.c @@ -44,22 +44,7 @@ * it as the global object. */ -G_DEFINE_TYPE (SwfdecSandbox, swfdec_sandbox, SWFDEC_TYPE_AS_OBJECT) - -static void -swfdec_sandbox_mark (SwfdecGcObject *object) -{ - SwfdecSandbox *sandbox = SWFDEC_SANDBOX (object); - - swfdec_gc_object_mark (sandbox->Function); - swfdec_gc_object_mark (sandbox->Function_prototype); - swfdec_gc_object_mark (sandbox->Object); - swfdec_gc_object_mark (sandbox->Object_prototype); - swfdec_gc_object_mark (sandbox->MovieClip); - swfdec_gc_object_mark (sandbox->Video); - - SWFDEC_GC_OBJECT_CLASS (swfdec_sandbox_parent_class)->mark (object); -} +G_DEFINE_TYPE (SwfdecSandbox, swfdec_sandbox, SWFDEC_TYPE_AS_RELAY) static void swfdec_sandbox_dispose (GObject *object) @@ -75,11 +60,8 @@ static void swfdec_sandbox_class_init (SwfdecSandboxClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); object_class->dispose = swfdec_sandbox_dispose; - - gc_class->mark = swfdec_sandbox_mark; } static void @@ -101,18 +83,11 @@ swfdec_sandbox_initialize (SwfdecSandbox *sandbox, guint version) /* reset state for initialization */ /* FIXME: have a better way to do this */ context->state = SWFDEC_AS_CONTEXT_NEW; - swfdec_sprite_movie_init_context (player); - swfdec_video_movie_init_context (player); swfdec_net_stream_init_context (player); swfdec_as_context_run_init_script (context, swfdec_initialize, sizeof (swfdec_initialize), version); - sandbox->Function = context->Function; - sandbox->Function_prototype = context->Function_prototype; - sandbox->Object = context->Object; - sandbox->Object_prototype = context->Object_prototype; - if (context->state == SWFDEC_AS_CONTEXT_NEW) context->state = SWFDEC_AS_CONTEXT_RUNNING; swfdec_sandbox_unuse (sandbox); @@ -207,6 +182,7 @@ swfdec_sandbox_get_for_url (SwfdecPlayer *player, const SwfdecURL *url, return NULL; } else { SwfdecAsContext *context = SWFDEC_AS_CONTEXT (player); + SwfdecAsObject *object; sandbox = g_object_new (SWFDEC_TYPE_SANDBOX, "context", context, NULL); sandbox->url = real; @@ -216,14 +192,34 @@ swfdec_sandbox_get_for_url (SwfdecPlayer *player, const SwfdecURL *url, if (!swfdec_sandbox_set_allow_network (sandbox, allow_network)) return NULL; + object = swfdec_as_object_new_empty (context); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (sandbox)); + swfdec_sandbox_initialize (sandbox, flash_version); } - return sandbox; } /** + * swfdec_sandbox_get: + * @player: a SwfdecPlayer + * + * Gets the currently in-use sandbox. + * + * Returns: A #SwfdecSandbox + **/ +SwfdecSandbox * +swfdec_sandbox_get (SwfdecPlayer *player) +{ + g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); + g_return_val_if_fail (SWFDEC_AS_CONTEXT (player)->global != NULL, NULL); + g_return_val_if_fail (SWFDEC_IS_SANDBOX (SWFDEC_AS_CONTEXT (player)->global->relay), NULL); + + return SWFDEC_SANDBOX (SWFDEC_AS_CONTEXT (player)->global->relay); +} + +/** * swfdec_sandbox_use: * @sandbox: the sandbox to use when executing scripts * @@ -243,12 +239,7 @@ swfdec_sandbox_use (SwfdecSandbox *sandbox) context = swfdec_gc_object_get_context (sandbox); priv = SWFDEC_PLAYER (context)->priv; - context->global = SWFDEC_AS_OBJECT (sandbox); - - context->Function = sandbox->Function; - context->Function_prototype = sandbox->Function_prototype; - context->Object = sandbox->Object; - context->Object_prototype = sandbox->Object_prototype; + context->global = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (sandbox)); } /** @@ -289,13 +280,20 @@ swfdec_sandbox_unuse (SwfdecSandbox *sandbox) SwfdecAsContext *context; g_return_if_fail (SWFDEC_IS_SANDBOX (sandbox)); - g_return_if_fail (swfdec_gc_object_get_context (sandbox)->global == SWFDEC_AS_OBJECT (sandbox)); + g_return_if_fail (swfdec_gc_object_get_context (sandbox)->global != NULL); + g_return_if_fail (swfdec_gc_object_get_context (sandbox)->global->relay == SWFDEC_AS_RELAY (sandbox)); context = swfdec_gc_object_get_context (sandbox); context->global = NULL; - context->Function = NULL; - context->Function_prototype = NULL; - context->Object = NULL; - context->Object_prototype = NULL; +} + +gboolean +swfdec_sandbox_allow (SwfdecSandbox *sandbox, SwfdecSandbox *other) +{ + g_return_val_if_fail (SWFDEC_IS_SANDBOX (sandbox), FALSE); + g_return_val_if_fail (SWFDEC_IS_SANDBOX (other), FALSE); + + SWFDEC_FIXME ("implement script sandbox interaction"); + return TRUE; } diff --git a/swfdec/swfdec_sandbox.h b/swfdec/swfdec_sandbox.h index f9332eae..27de6b9c 100644 --- a/swfdec/swfdec_sandbox.h +++ b/swfdec/swfdec_sandbox.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -20,7 +20,7 @@ #ifndef _SWFDEC_SANDBOX_H_ #define _SWFDEC_SANDBOX_H_ -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_url.h> #include <swfdec/swfdec_player.h> #include <swfdec/swfdec_types.h> @@ -47,26 +47,16 @@ typedef enum { struct _SwfdecSandbox { - SwfdecAsObject object; + SwfdecAsRelay relay; SwfdecSandboxType type; /* type of this sandbox */ SwfdecURL * url; /* URL this sandbox acts for */ guint as_version; /* Actionscript version */ - - /* global cached objects from context */ - SwfdecAsObject * Function; /* Function */ - SwfdecAsObject * Function_prototype; /* Function.prototype */ - SwfdecAsObject * Object; /* Object */ - SwfdecAsObject * Object_prototype; /* Object.prototype */ - - /* global player objects */ - SwfdecAsObject * MovieClip; /* MovieClip object */ - SwfdecAsObject * Video; /* Video object */ }; struct _SwfdecSandboxClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_sandbox_get_type (void); @@ -76,9 +66,14 @@ SwfdecSandbox * swfdec_sandbox_get_for_url (SwfdecPlayer * player, guint flash_version, gboolean allow_network); +SwfdecSandbox * swfdec_sandbox_get (SwfdecPlayer * player); void swfdec_sandbox_use (SwfdecSandbox * sandbox); gboolean swfdec_sandbox_try_use (SwfdecSandbox * sandbox); void swfdec_sandbox_unuse (SwfdecSandbox * sandbox); +gboolean swfdec_sandbox_allow (SwfdecSandbox * sandbox, + SwfdecSandbox * other); + + G_END_DECLS #endif diff --git a/swfdec/swfdec_script.c b/swfdec/swfdec_script.c index 11d28c82..eefd66ce 100644 --- a/swfdec/swfdec_script.c +++ b/swfdec/swfdec_script.c @@ -42,28 +42,6 @@ /*** SUPPORT FUNCTIONS ***/ -char * -swfdec_script_print_action (guint action, const guint8 *data, guint len) -{ - const SwfdecActionSpec *spec = swfdec_as_actions + action; - - if (action & 0x80) { - if (spec->print == NULL) { - SWFDEC_ERROR ("action %u 0x%02X %s has no print statement", - action, action, spec->name ? spec->name : "Unknown"); - return g_strdup_printf ("erroneous action %s", - spec->name ? spec->name : "Unknown"); - } - return spec->print (action, data, len); - } else { - if (spec->name == NULL) { - SWFDEC_ERROR ("action %u is unknown", action); - return g_strdup_printf ("unknown Action 0x%02X", action); - } - return g_strdup (spec->name); - } -} - static gboolean swfdec_script_foreach_internal (SwfdecBits *bits, SwfdecScriptForeachFunc func, gpointer user_data) { diff --git a/swfdec/swfdec_script_internal.h b/swfdec/swfdec_script_internal.h index 086f159b..6289978f 100644 --- a/swfdec/swfdec_script_internal.h +++ b/swfdec/swfdec_script_internal.h @@ -75,9 +75,6 @@ SwfdecScript * swfdec_script_new_from_bits (SwfdecBits * bits, gboolean swfdec_script_foreach (SwfdecScript * script, SwfdecScriptForeachFunc func, gpointer user_data); -char * swfdec_script_print_action (guint action, - const guint8 * data, - guint len); G_END_DECLS diff --git a/swfdec/swfdec_selection.c b/swfdec/swfdec_selection.c index 853f2b47..3491e876 100644 --- a/swfdec/swfdec_selection.c +++ b/swfdec/swfdec_selection.c @@ -44,13 +44,13 @@ swfdec_selection_getBeginIndex (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; if (!SWFDEC_IS_TEXT_FIELD_MOVIE (priv->focus)) { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); return; } text = SWFDEC_TEXT_FIELD_MOVIE (priv->focus); swfdec_text_buffer_get_selection (text->text, &start, &end); s = swfdec_text_buffer_get_text (text->text); - SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_pointer_to_offset (s, s + start)); + *ret = swfdec_as_value_from_integer (cx, g_utf8_pointer_to_offset (s, s + start)); } SWFDEC_AS_NATIVE (600, 1, swfdec_selection_getEndIndex) @@ -64,13 +64,13 @@ swfdec_selection_getEndIndex (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; if (!SWFDEC_IS_TEXT_FIELD_MOVIE (priv->focus)) { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); return; } text = SWFDEC_TEXT_FIELD_MOVIE (priv->focus); swfdec_text_buffer_get_selection (text->text, &start, &end); s = swfdec_text_buffer_get_text (text->text); - SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_pointer_to_offset (s, s + end)); + *ret = swfdec_as_value_from_integer (cx, g_utf8_pointer_to_offset (s, s + end)); } SWFDEC_AS_NATIVE (600, 2, swfdec_selection_getCaretIndex) @@ -83,12 +83,12 @@ swfdec_selection_getCaretIndex (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; if (!SWFDEC_IS_TEXT_FIELD_MOVIE (priv->focus)) { - SWFDEC_AS_VALUE_SET_INT (ret, -1); + *ret = swfdec_as_value_from_integer (cx, -1); return; } text = SWFDEC_TEXT_FIELD_MOVIE (priv->focus); s = swfdec_text_buffer_get_text (text->text); - SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_pointer_to_offset (s, + *ret = swfdec_as_value_from_integer (cx, g_utf8_pointer_to_offset (s, s + swfdec_text_buffer_get_cursor (text->text))); } @@ -117,10 +117,10 @@ swfdec_actor_can_grab_focus (SwfdecActor *actor) SWFDEC_IS_BUTTON_MOVIE (actor)) { if (SWFDEC_MOVIE (actor)->parent == NULL) return FALSE; - if (!swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (actor), + if (!swfdec_as_object_get_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (actor)), SWFDEC_AS_STR_focusEnabled, &val)) return swfdec_actor_get_mouse_events (actor); - return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (actor), &val); + return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (actor), val); } else if (SWFDEC_IS_TEXT_FIELD_MOVIE (actor)) { /* cool that you can select all textfields, eh? */ return TRUE; @@ -138,7 +138,7 @@ swfdec_selection_setFocus (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecSandbox *sandbox; SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE); - SWFDEC_AS_CHECK (0, NULL, "O", &actor); + SWFDEC_AS_CHECK (0, NULL, "M", &actor); if (actor != NULL) { if (!SWFDEC_IS_ACTOR (actor) || @@ -147,7 +147,7 @@ swfdec_selection_setFocus (SwfdecAsContext *cx, SwfdecAsObject *object, } /* FIXME: how is security handled here? */ - sandbox = SWFDEC_SANDBOX (cx->global); + sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (cx)); swfdec_sandbox_unuse (sandbox); swfdec_player_grab_focus (SWFDEC_PLAYER (cx), actor); swfdec_sandbox_use (sandbox); diff --git a/swfdec/swfdec_sound.c b/swfdec/swfdec_sound.c index d228e45e..75891c6c 100644 --- a/swfdec/swfdec_sound.c +++ b/swfdec/swfdec_sound.c @@ -192,7 +192,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound) if (sound->encoded == NULL) return NULL; - decoder = swfdec_audio_decoder_new (sound->codec, sound->format); + decoder = swfdec_audio_decoder_new (sound->codec, sound->format, NULL); if (decoder == NULL) return NULL; diff --git a/swfdec/swfdec_sound_object.c b/swfdec/swfdec_sound_object.c index d5f959b2..5b8793b2 100644 --- a/swfdec/swfdec_sound_object.c +++ b/swfdec/swfdec_sound_object.c @@ -36,7 +36,7 @@ /*** SwfdecSoundObject ***/ -G_DEFINE_TYPE (SwfdecSoundObject, swfdec_sound_object, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecSoundObject, swfdec_sound_object, SWFDEC_TYPE_AS_RELAY) static void swfdec_sound_object_mark (SwfdecGcObject *object) @@ -137,7 +137,7 @@ swfdec_sound_object_getPan (SwfdecAsContext *cx, SwfdecAsObject *object, if (matrix == NULL) return; - SWFDEC_AS_VALUE_SET_INT (ret, swfdec_sound_matrix_get_pan (matrix)); + *ret = swfdec_as_value_from_integer (cx, swfdec_sound_matrix_get_pan (matrix)); } SWFDEC_AS_NATIVE (500, 1, swfdec_sound_object_getTransform) @@ -156,15 +156,15 @@ swfdec_sound_object_getTransform (SwfdecAsContext *cx, SwfdecAsObject *object, if (matrix == NULL) return; - obj = swfdec_as_object_new (cx); + obj = swfdec_as_object_new (cx, SWFDEC_AS_STR_Object, NULL); - SWFDEC_AS_VALUE_SET_INT (&val, matrix->ll); + val = swfdec_as_value_from_integer (cx, matrix->ll); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_ll, &val); - SWFDEC_AS_VALUE_SET_INT (&val, matrix->lr); + val = swfdec_as_value_from_integer (cx, matrix->lr); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_lr, &val); - SWFDEC_AS_VALUE_SET_INT (&val, matrix->rl); + val = swfdec_as_value_from_integer (cx, matrix->rl); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_rl, &val); - SWFDEC_AS_VALUE_SET_INT (&val, matrix->rr); + val = swfdec_as_value_from_integer (cx, matrix->rr); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_rr, &val); SWFDEC_AS_VALUE_SET_OBJECT (ret, obj); @@ -184,7 +184,7 @@ swfdec_sound_object_getVolume (SwfdecAsContext *cx, SwfdecAsObject *object, if (matrix == NULL) return; - SWFDEC_AS_VALUE_SET_INT (ret, matrix->volume); + *ret = swfdec_as_value_from_integer (cx, matrix->volume); } SWFDEC_AS_NATIVE (500, 3, swfdec_sound_object_setPan) @@ -224,28 +224,28 @@ swfdec_sound_object_setTransform (SwfdecAsContext *cx, SwfdecAsObject *object, /* ll */ val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_ll); if (val) { - matrix->ll = swfdec_as_value_to_integer (cx, val); + matrix->ll = swfdec_as_value_to_integer (cx, *val); } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_ll) == trans) { matrix->ll = 0; } /* lr */ val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_lr); if (val) { - matrix->lr = swfdec_as_value_to_integer (cx, val); + matrix->lr = swfdec_as_value_to_integer (cx, *val); } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_lr) == trans) { matrix->lr = 0; } /* rr */ val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_rr); if (val) { - matrix->rr = swfdec_as_value_to_integer (cx, val); + matrix->rr = swfdec_as_value_to_integer (cx, *val); } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_rr) == trans) { matrix->rr = 0; } /* rl */ val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_rl); if (val) { - matrix->rl = swfdec_as_value_to_integer (cx, val); + matrix->rl = swfdec_as_value_to_integer (cx, *val); } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_rl) == trans) { matrix->rl = 0; } @@ -438,24 +438,25 @@ swfdec_sound_object_stop (SwfdecAsContext *cx, SwfdecAsObject *object, guint arg } } -SWFDEC_AS_CONSTRUCTOR (500, 16, swfdec_sound_object_construct, swfdec_sound_object_get_type) +SWFDEC_AS_NATIVE (500, 17, swfdec_sound_object_construct) void swfdec_sound_object_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecSoundObject *sound; - SwfdecPlayer *player; if (!swfdec_as_context_is_constructing (cx)) return; - sound = SWFDEC_SOUND_OBJECT (object); - player = SWFDEC_PLAYER (cx); + sound = g_object_new (SWFDEC_TYPE_SOUND_OBJECT, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (sound)); - if (argc == 0 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) { + if (argc == 0 || SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) { sound->target = NULL; } else { - sound->target = swfdec_as_value_to_string (cx, &argv[0]); + sound->target = swfdec_as_value_to_string (cx, argv[0]); } + + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } diff --git a/swfdec/swfdec_sound_object.h b/swfdec/swfdec_sound_object.h index c543410a..453a883b 100644 --- a/swfdec/swfdec_sound_object.h +++ b/swfdec/swfdec_sound_object.h @@ -20,6 +20,7 @@ #ifndef _SWFDEC_SOUND_OBJECT_H_ #define _SWFDEC_SOUND_OBJECT_H_ +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_audio.h> #include <swfdec/swfdec_load_sound.h> #include <swfdec/swfdec_movie.h> @@ -39,14 +40,14 @@ typedef struct _SwfdecSoundObjectClass SwfdecSoundObjectClass; #define SWFDEC_SOUND_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_SOUND_OBJECT, SwfdecSoundObjectClass)) struct _SwfdecSoundObject { - SwfdecAsObject object; + SwfdecAsRelay relay; const char * target; /* target or NULL if global */ SwfdecSoundProvider * provider; /* sound that we play */ }; struct _SwfdecSoundObjectClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_sound_object_get_type (void); diff --git a/swfdec/swfdec_sprite_movie.c b/swfdec/swfdec_sprite_movie.c index 451cdfa6..f53dde29 100644 --- a/swfdec/swfdec_sprite_movie.c +++ b/swfdec/swfdec_sprite_movie.c @@ -35,6 +35,7 @@ #include "swfdec_script_internal.h" #include "swfdec_sprite.h" #include "swfdec_resource.h" +#include "swfdec_sandbox.h" #include "swfdec_tag.h" /*** SWFDEC_SPRITE_MOVIE ***/ @@ -159,6 +160,7 @@ swfdec_sprite_movie_perform_place (SwfdecSpriteMovie *movie, SwfdecBits *bits, g const char *name; guint blend_mode; SwfdecGraphic *graphic; + GSList *filters; dec = SWFDEC_SWF_DECODER (mov->resource->decoder); version = dec->version; @@ -250,8 +252,9 @@ swfdec_sprite_movie_perform_place (SwfdecSpriteMovie *movie, SwfdecBits *bits, g } if (has_filter) { - GSList *filters = swfdec_filter_parse (bits); - g_slist_free (filters); + filters = swfdec_filter_parse (player, bits); + } else { + filters = NULL; } if (has_blend_mode) { @@ -327,6 +330,8 @@ swfdec_sprite_movie_perform_place (SwfdecSpriteMovie *movie, SwfdecBits *bits, g SWFDEC_FIXME ("character %u is not a graphic (does it even exist?), aborting", id); if (events) swfdec_event_list_free (events); + g_slist_foreach (filters, (GFunc) g_object_unref, NULL); + g_slist_free (filters); return FALSE; } cur = swfdec_movie_new (player, depth, mov, mov->resource, graphic, name); @@ -340,8 +345,14 @@ swfdec_sprite_movie_perform_place (SwfdecSpriteMovie *movie, SwfdecBits *bits, g } swfdec_movie_initialize (cur); } - out: + if (has_filter) { + if (cur->filters) + g_slist_free (cur->filters); + swfdec_movie_invalidate_next (cur); + cur->filters = filters; + } + if (events) swfdec_event_list_free (events); return TRUE; @@ -671,7 +682,7 @@ G_DEFINE_TYPE (SwfdecSpriteMovie, swfdec_sprite_movie, SWFDEC_TYPE_ACTOR) static void swfdec_sprite_movie_dispose (GObject *object) { - SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (object); + G_GNUC_UNUSED SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (object); g_assert (movie->sound_stream == NULL); @@ -700,8 +711,16 @@ swfdec_sprite_movie_constructor (GType type, guint n_construct_properties, movie = SWFDEC_MOVIE (object); if (movie->resource->sandbox) { - swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (movie), - movie->resource->sandbox->MovieClip); + /* FIXME: This hack is probably wrong */ + SwfdecAsObject *o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); + if (swfdec_sandbox_try_use (movie->resource->sandbox)) { + swfdec_as_object_set_constructor_by_name (o, + SWFDEC_AS_STR_MovieClip, NULL); + swfdec_sandbox_unuse (movie->resource->sandbox); + } else { + swfdec_as_object_set_constructor_by_name (o, + SWFDEC_AS_STR_MovieClip, NULL); + } } if (movie->graphic) { @@ -751,38 +770,24 @@ swfdec_sprite_movie_finish_movie (SwfdecMovie *mov) } } -static void -swfdec_sprite_movie_mark (SwfdecGcObject *object) -{ - GList *walk; - - for (walk = SWFDEC_MOVIE (object)->list; walk; walk = walk->next) { - SwfdecAsObject *child = walk->data; - g_assert (child->properties != NULL); - swfdec_gc_object_mark (child); - } - - SWFDEC_GC_OBJECT_CLASS (swfdec_sprite_movie_parent_class)->mark (object); -} - -static void -swfdec_sprite_movie_property_get (SwfdecMovie *mov, guint prop_id, SwfdecAsValue *val) +static SwfdecAsValue +swfdec_sprite_movie_property_get (SwfdecMovie *mov, guint prop_id) { SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (mov); + SwfdecAsContext *cx = swfdec_gc_object_get_context (mov); switch (prop_id) { case SWFDEC_MOVIE_PROPERTY_CURRENTFRAME: - SWFDEC_AS_VALUE_SET_INT (val, movie->frame); + return swfdec_as_value_from_integer (cx, movie->frame); break; case SWFDEC_MOVIE_PROPERTY_FRAMESLOADED: - SWFDEC_AS_VALUE_SET_INT (val, swfdec_sprite_movie_get_frames_loaded (movie)); + return swfdec_as_value_from_integer (cx, swfdec_sprite_movie_get_frames_loaded (movie)); break; case SWFDEC_MOVIE_PROPERTY_TOTALFRAMES: - SWFDEC_AS_VALUE_SET_INT (val, swfdec_sprite_movie_get_frames_total (movie)); + return swfdec_as_value_from_integer (cx, swfdec_sprite_movie_get_frames_total (movie)); break; default: - SWFDEC_MOVIE_CLASS (swfdec_sprite_movie_parent_class)->property_get (mov, prop_id, val); - break; + return SWFDEC_MOVIE_CLASS (swfdec_sprite_movie_parent_class)->property_get (mov, prop_id); } } @@ -790,15 +795,12 @@ static void swfdec_sprite_movie_class_init (SwfdecSpriteMovieClass * g_class) { GObjectClass *object_class = G_OBJECT_CLASS (g_class); - SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (g_class); SwfdecMovieClass *movie_class = SWFDEC_MOVIE_CLASS (g_class); SwfdecActorClass *actor_class = SWFDEC_ACTOR_CLASS (g_class); object_class->dispose = swfdec_sprite_movie_dispose; object_class->constructor = swfdec_sprite_movie_constructor; - gc_class->mark = swfdec_sprite_movie_mark; - movie_class->init_movie = swfdec_sprite_movie_init_movie; movie_class->finish_movie = swfdec_sprite_movie_finish_movie; movie_class->property_get = swfdec_sprite_movie_property_get; @@ -813,40 +815,6 @@ swfdec_sprite_movie_init (SwfdecSpriteMovie * movie) movie->frame = (guint) -1; } -/* cute little hack */ -extern void -swfdec_sprite_movie_clear (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval); -/** - * swfdec_sprite_movie_unload: - * @movie: a #SwfdecMovie - * - * Clears all contents from the given movie. This means deleting all - * variables and removing all children movie clips. - **/ -void -swfdec_sprite_movie_unload (SwfdecSpriteMovie *movie) -{ - SwfdecMovie *mov; - SwfdecAsValue hack; - - g_return_if_fail (SWFDEC_IS_SPRITE_MOVIE (movie)); - - mov = SWFDEC_MOVIE (movie); - swfdec_sprite_movie_clear (swfdec_gc_object_get_context (movie), - SWFDEC_AS_OBJECT (movie), 0, NULL, &hack); - /* FIXME: destroy or unload? */ - while (mov->list) - swfdec_movie_remove (mov->list->data); - swfdec_as_object_delete_all_variables (SWFDEC_AS_OBJECT (movie)); - movie->frame = (guint) -1; - movie->n_frames = 0; - movie->next_action = 0; - movie->max_action = 0; - movie->sprite = NULL; - swfdec_movie_queue_update (SWFDEC_MOVIE (movie), SWFDEC_MOVIE_INVALID_EXTENTS); -} - /** * swfdec_sprite_movie_get_frames_loaded: * @movie: a #SwfdecSpriteMovie diff --git a/swfdec/swfdec_sprite_movie.h b/swfdec/swfdec_sprite_movie.h index 6f5a0437..a2941542 100644 --- a/swfdec/swfdec_sprite_movie.h +++ b/swfdec/swfdec_sprite_movie.h @@ -66,7 +66,6 @@ int swfdec_sprite_movie_get_frames_total (SwfdecSpriteMovie * movie); void swfdec_sprite_movie_goto (SwfdecSpriteMovie * movie, guint goto_frame); -void swfdec_sprite_movie_unload (SwfdecSpriteMovie * movie); G_END_DECLS diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c index 191f83e0..a9bde255 100644 --- a/swfdec/swfdec_sprite_movie_as.c +++ b/swfdec/swfdec_sprite_movie_as.c @@ -31,8 +31,10 @@ #include "swfdec_bits.h" #include "swfdec_debug.h" #include "swfdec_decoder.h" +#include "swfdec_filter.h" #include "swfdec_internal.h" #include "swfdec_player_internal.h" +#include "swfdec_sandbox.h" #include "swfdec_sprite.h" #include "swfdec_sprite_movie.h" #include "swfdec_swf_decoder.h" @@ -143,7 +145,33 @@ void swfdec_sprite_movie_set_filters (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { - SWFDEC_STUB ("MovieClip.filters (set)"); + SwfdecAsObject *array; + SwfdecAsValue val; + SwfdecFilter *filter; + SwfdecMovie *movie; + int i, length; + GSList *list; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "o", &array); + + swfdec_movie_invalidate_next (movie); + + swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val); + length = swfdec_as_value_to_integer (cx, val); + + list = NULL; + for (i = 0; i < length; i++) { + if (!swfdec_as_object_get_variable (array, + swfdec_as_integer_to_string (cx, i), &val) || + !SWFDEC_AS_VALUE_IS_OBJECT (val) || + !SWFDEC_IS_FILTER (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay)) + continue; + filter = SWFDEC_FILTER (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay); + filter = swfdec_filter_clone (filter); + list = g_slist_prepend (list, filter); + } + g_slist_free (movie->filters); + movie->filters = list; } SWFDEC_AS_NATIVE (900, 419, swfdec_sprite_movie_get_transform) @@ -151,12 +179,13 @@ void swfdec_sprite_movie_get_transform (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { + SwfdecTransformAs *trans; SwfdecMovie *movie; SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); - SWFDEC_AS_VALUE_SET_OBJECT (rval, - SWFDEC_AS_OBJECT (swfdec_transform_as_new (cx, movie))); + trans = swfdec_transform_as_new (cx, movie); + SWFDEC_AS_VALUE_SET_OBJECT (rval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (trans))); } SWFDEC_AS_NATIVE (900, 420, swfdec_sprite_movie_set_transform) @@ -212,18 +241,18 @@ swfdec_sprite_movie_set_blendMode (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "v", &val); - if (SWFDEC_AS_VALUE_IS_NUMBER (&val)) { - blend_mode = SWFDEC_AS_VALUE_GET_NUMBER (&val); - } else if (SWFDEC_AS_VALUE_IS_STRING (&val)) { + if (SWFDEC_AS_VALUE_IS_NUMBER (val)) { + blend_mode = SWFDEC_AS_VALUE_GET_NUMBER (val); + } else if (SWFDEC_AS_VALUE_IS_STRING (val)) { blend_mode = 0; - str = SWFDEC_AS_VALUE_GET_STRING (&val); + str = SWFDEC_AS_VALUE_GET_STRING (val); for (i = 0; i < num_blend_mode_names; i++) { if (str == blend_mode_names[i]) { // case-sensitive blend_mode = i + 1; break; } } - } else if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { + } else if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { blend_mode = 0; } else { blend_mode = 1; @@ -248,19 +277,19 @@ swfdec_sprite_movie_localToGlobal (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "O", &o); xv = swfdec_as_object_peek_variable (o, SWFDEC_AS_STR_x); - if (xv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (xv)) + if (xv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (*xv)) return; yv = swfdec_as_object_peek_variable (o, SWFDEC_AS_STR_y); - if (yv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (yv)) + if (yv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (*yv)) return; - x = SWFDEC_AS_VALUE_GET_NUMBER (xv); - y = SWFDEC_AS_VALUE_GET_NUMBER (yv); + x = SWFDEC_AS_VALUE_GET_NUMBER (*xv); + y = SWFDEC_AS_VALUE_GET_NUMBER (*yv); x = swfdec_as_double_to_integer (x * SWFDEC_TWIPS_SCALE_FACTOR); y = swfdec_as_double_to_integer (y * SWFDEC_TWIPS_SCALE_FACTOR); swfdec_movie_local_to_global (movie, &x, &y); - SWFDEC_AS_VALUE_SET_NUMBER (xv, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) x)); - SWFDEC_AS_VALUE_SET_NUMBER (yv, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) y)); + *xv = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) x)); + *yv = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) y)); } SWFDEC_AS_NATIVE (900, 3, swfdec_sprite_movie_globalToLocal) @@ -276,19 +305,19 @@ swfdec_sprite_movie_globalToLocal (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "O", &o); xv = swfdec_as_object_peek_variable (o, SWFDEC_AS_STR_x); - if (xv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (xv)) + if (xv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (*xv)) return; yv = swfdec_as_object_peek_variable (o, SWFDEC_AS_STR_y); - if (yv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (yv)) + if (yv == NULL || !SWFDEC_AS_VALUE_IS_NUMBER (*yv)) return; - x = SWFDEC_AS_VALUE_GET_NUMBER (xv); - y = SWFDEC_AS_VALUE_GET_NUMBER (yv); + x = SWFDEC_AS_VALUE_GET_NUMBER (*xv); + y = SWFDEC_AS_VALUE_GET_NUMBER (*yv); x = swfdec_as_double_to_integer (x * SWFDEC_TWIPS_SCALE_FACTOR); y = swfdec_as_double_to_integer (y * SWFDEC_TWIPS_SCALE_FACTOR); swfdec_movie_global_to_local (movie, &x, &y); - SWFDEC_AS_VALUE_SET_NUMBER (xv, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) x)); - SWFDEC_AS_VALUE_SET_NUMBER (yv, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) y)); + *xv = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) x)); + *yv = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE ((SwfdecTwips) y)); } SWFDEC_AS_NATIVE (900, 8, swfdec_sprite_movie_attachAudio) @@ -319,14 +348,14 @@ swfdec_sprite_movie_getInstanceAtDepth (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "i", &depth); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; movie = swfdec_movie_find (movie, depth); if (movie != NULL) { if (!swfdec_movie_is_scriptable (movie)) movie = movie->parent; - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (movie)); + SWFDEC_AS_VALUE_SET_MOVIE (rval, movie); } } @@ -335,11 +364,11 @@ void swfdec_sprite_movie_getSWFVersion (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { - if (object != NULL && SWFDEC_IS_MOVIE (object)) { - SWFDEC_AS_VALUE_SET_INT (rval, - swfdec_movie_get_version (SWFDEC_MOVIE (object))); + if (object != NULL && object->movie) { + *rval = swfdec_as_value_from_integer (cx, + swfdec_movie_get_version (SWFDEC_MOVIE (object->relay))); } else { - SWFDEC_AS_VALUE_SET_INT (rval, -1); + *rval = swfdec_as_value_from_integer (cx, -1); } } @@ -349,7 +378,7 @@ swfdec_sprite_movie_attachBitmap (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecMovie *parent; - SwfdecBitmapData *bitmap; + SwfdecAsObject *bitmap; const char *snapping = SWFDEC_AS_STR_auto; gboolean smoothing = FALSE; int depth; @@ -358,7 +387,7 @@ swfdec_sprite_movie_attachBitmap (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &parent, "oi|sb", &bitmap, &depth, &snapping, &smoothing); - if (!SWFDEC_IS_BITMAP_DATA (bitmap)) + if (!SWFDEC_IS_BITMAP_DATA (bitmap->relay)) return; if (swfdec_depth_classify (depth) == SWFDEC_DEPTH_CLASS_EMPTY) return; @@ -367,7 +396,7 @@ swfdec_sprite_movie_attachBitmap (SwfdecAsContext *cx, SwfdecAsObject *object, if (movie) swfdec_movie_remove (movie); - swfdec_bitmap_movie_new (parent, bitmap, depth); + swfdec_bitmap_movie_new (parent, SWFDEC_BITMAP_DATA (bitmap->relay), depth); SWFDEC_LOG ("created new BitmapMovie to parent %s at depth %d", parent->name, depth); } @@ -387,7 +416,7 @@ swfdec_sprite_movie_play (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecSpriteMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, ""); movie->playing = TRUE; } @@ -399,7 +428,7 @@ swfdec_sprite_movie_stop (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecSpriteMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, ""); movie->playing = FALSE; } @@ -412,13 +441,13 @@ swfdec_sprite_movie_getBytesLoaded (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecMovie *movie; SwfdecResource *resource; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); resource = swfdec_movie_get_own_resource (movie); if (resource && resource->decoder) { - SWFDEC_AS_VALUE_SET_INT (rval, resource->decoder->bytes_loaded); + *rval = swfdec_as_value_from_integer (cx, resource->decoder->bytes_loaded); } else { - SWFDEC_AS_VALUE_SET_INT (rval, 0); + *rval = swfdec_as_value_from_integer (cx, 0); } } @@ -430,17 +459,17 @@ swfdec_sprite_movie_getBytesTotal (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecMovie *movie; SwfdecResource *resource; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); resource = swfdec_movie_get_own_resource (movie); if (resource) { if (resource->decoder) { - SWFDEC_AS_VALUE_SET_INT (rval, resource->decoder->bytes_total); + *rval = swfdec_as_value_from_integer (cx, resource->decoder->bytes_total); } else { - SWFDEC_AS_VALUE_SET_INT (rval, -1); + *rval = swfdec_as_value_from_integer (cx, -1); } } else { - SWFDEC_AS_VALUE_SET_INT (rval, 0); + *rval = swfdec_as_value_from_integer (cx, 0); } } @@ -452,7 +481,7 @@ swfdec_sprite_movie_getNextHighestDepth (SwfdecAsContext *cx, SwfdecAsObject *ob SwfdecMovie *movie; int depth; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); if (movie->list) { depth = SWFDEC_MOVIE (g_list_last (movie->list)->data)->depth + 1; @@ -461,7 +490,7 @@ swfdec_sprite_movie_getNextHighestDepth (SwfdecAsContext *cx, SwfdecAsObject *ob } else { depth = 0; } - SWFDEC_AS_VALUE_SET_INT (rval, depth); + *rval = swfdec_as_value_from_integer (cx, depth); } static void @@ -471,17 +500,16 @@ swfdec_sprite_movie_do_goto (SwfdecSpriteMovie *movie, SwfdecAsValue *target) g_return_if_fail (SWFDEC_IS_SPRITE_MOVIE (movie)); g_return_if_fail (movie->sprite != NULL); - g_return_if_fail (SWFDEC_IS_AS_VALUE (target)); - if (SWFDEC_AS_VALUE_IS_STRING (target)) { - const char *label = SWFDEC_AS_VALUE_GET_STRING (target); + if (SWFDEC_AS_VALUE_IS_STRING (*target)) { + const char *label = SWFDEC_AS_VALUE_GET_STRING (*target); frame = swfdec_sprite_get_frame (movie->sprite, label); /* FIXME: nonexisting frames? */ if (frame == -1) return; frame++; } else { - frame = swfdec_as_value_to_integer (swfdec_gc_object_get_context (movie), target); + frame = swfdec_as_value_to_integer (swfdec_gc_object_get_context (movie), *target); } /* FIXME: how to handle overflow? */ frame = CLAMP (frame, 1, (int) movie->n_frames); @@ -497,7 +525,7 @@ swfdec_sprite_movie_gotoAndPlay (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecSpriteMovie *movie; SwfdecAsValue val; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, "v", &val); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, "v", &val); if (movie->sprite == NULL) return; @@ -514,7 +542,7 @@ swfdec_sprite_movie_gotoAndStop (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecSpriteMovie *movie; SwfdecAsValue val; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, "v", &val); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, "v", &val); if (movie->sprite == NULL) return; @@ -530,7 +558,7 @@ swfdec_sprite_movie_nextFrame (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecSpriteMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, ""); swfdec_sprite_movie_goto (movie, movie->frame + 1); movie->playing = FALSE; @@ -543,7 +571,7 @@ swfdec_sprite_movie_prevFrame (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecSpriteMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, &movie, ""); swfdec_sprite_movie_goto (movie, movie->frame - 1); movie->playing = FALSE; @@ -562,12 +590,9 @@ swfdec_sprite_movie_hitTest (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecMovie *other; SwfdecRect movie_rect, other_rect; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) || - !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) { - SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); - return; - } - other = SWFDEC_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0])); + SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE); + SWFDEC_AS_CHECK (0, NULL, "m", &other); + swfdec_movie_update (movie); swfdec_movie_update (other); movie_rect = movie->extents; @@ -579,11 +604,12 @@ swfdec_sprite_movie_hitTest (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_VALUE_SET_BOOLEAN (rval, swfdec_rect_intersect (NULL, &movie_rect, &other_rect)); } else if (argc >= 2) { double x, y; - gboolean shape, ret; + gboolean shape = FALSE; + gboolean ret; - x = swfdec_as_value_to_number (cx, &argv[0]) * SWFDEC_TWIPS_SCALE_FACTOR; - y = swfdec_as_value_to_number (cx, &argv[1]) * SWFDEC_TWIPS_SCALE_FACTOR; - shape = (argc >= 3 && swfdec_as_value_to_boolean (cx, &argv[2])); + SWFDEC_AS_CHECK (0, NULL, "nn|b", &x, &y, &shape); + x *= SWFDEC_TWIPS_SCALE_FACTOR; + y *= SWFDEC_TWIPS_SCALE_FACTOR; if (shape) { if (movie->parent) @@ -611,14 +637,14 @@ swfdec_sprite_movie_startDrag (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_ACTOR, &actor, ""); if (argc > 0) { - center = swfdec_as_value_to_boolean (cx, &argv[0]); + center = swfdec_as_value_to_boolean (cx, argv[0]); } if (argc >= 5) { SwfdecRect rect; - rect.x0 = swfdec_as_value_to_number (cx, &argv[1]); - rect.y0 = swfdec_as_value_to_number (cx, &argv[2]); - rect.x1 = swfdec_as_value_to_number (cx, &argv[3]); - rect.y1 = swfdec_as_value_to_number (cx, &argv[4]); + rect.x0 = swfdec_as_value_to_number (cx, argv[1]); + rect.y0 = swfdec_as_value_to_number (cx, argv[2]); + rect.x1 = swfdec_as_value_to_number (cx, argv[3]); + rect.y1 = swfdec_as_value_to_number (cx, argv[4]); swfdec_rect_scale (&rect, &rect, SWFDEC_TWIPS_SCALE_FACTOR); swfdec_player_set_drag_movie (player, actor, center, &rect); } else { @@ -645,23 +671,22 @@ swfdec_sprite_movie_swapDepths (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecAsValue value; int depth; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, "v", &value); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "v", &value); if (movie->parent == NULL) SWFDEC_FIXME ("swapDepths on root movie, should do something weird"); - if (SWFDEC_AS_VALUE_IS_OBJECT (&value)) { - other = (SwfdecMovie *) SWFDEC_AS_VALUE_GET_OBJECT (&value); - if (!SWFDEC_IS_MOVIE (other) || - other->parent != movie->parent) + if (SWFDEC_AS_VALUE_IS_MOVIE (value)) { + other = SWFDEC_AS_VALUE_GET_MOVIE (value); + if (other == NULL || other->parent != movie->parent) return; depth = other->depth; } else { - depth = swfdec_as_value_to_integer (cx, &value); + depth = swfdec_as_value_to_integer (cx, value); if (movie->parent) { other = swfdec_movie_find (movie->parent, depth); } else { - // special case: if root movie: we won't swap just, but just set depth + // special case: if root movie: we won't swap, but just set depth other = NULL; } } @@ -683,6 +708,7 @@ swfdec_sprite_movie_createEmptyMovieClip (SwfdecAsContext *cx, SwfdecAsObject *o guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecMovie *movie, *parent; + SwfdecSandbox *sandbox; int depth; const char *name; @@ -693,18 +719,13 @@ swfdec_sprite_movie_createEmptyMovieClip (SwfdecAsContext *cx, SwfdecAsObject *o swfdec_movie_remove (movie); movie = swfdec_movie_new (SWFDEC_PLAYER (cx), depth, parent, parent->resource, NULL, name); - if (SWFDEC_IS_SPRITE_MOVIE (movie)) { - SwfdecSandbox *sandbox = SWFDEC_SANDBOX (cx->global); - SwfdecActor *actor = SWFDEC_ACTOR (movie); - swfdec_sandbox_unuse (sandbox); - swfdec_movie_initialize (movie); - swfdec_actor_execute (actor, SWFDEC_EVENT_CONSTRUCT, 0); - swfdec_sandbox_use (sandbox); - } else { - swfdec_movie_initialize (movie); - } + sandbox = swfdec_sandbox_get (SWFDEC_PLAYER (cx)); + swfdec_sandbox_unuse (sandbox); + swfdec_movie_initialize (movie); + swfdec_actor_execute (SWFDEC_ACTOR (movie), SWFDEC_EVENT_CONSTRUCT, 0); + swfdec_sandbox_use (sandbox); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (movie)); + SWFDEC_AS_VALUE_SET_MOVIE (rval, movie); } static void @@ -725,16 +746,15 @@ static gboolean swfdec_sprite_movie_foreach_copy_properties (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint flags, gpointer data) { - SwfdecAsObject *target = data; - - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (target), FALSE); + SwfdecMovie *target = SWFDEC_MOVIE (data); /* FIXME: We likely need better flag handling here. * We might even want to fix swfdec_as_object_foreach() */ if (flags & SWFDEC_AS_VARIABLE_HIDDEN) return TRUE; - swfdec_as_object_set_variable (target, variable, value); + swfdec_as_object_set_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (target)), + variable, value); return TRUE; } @@ -744,18 +764,17 @@ swfdec_sprite_movie_init_from_object (SwfdecMovie *movie, SwfdecAsObject *initObject) { g_return_if_fail (SWFDEC_IS_MOVIE (movie)); - g_return_if_fail (initObject == NULL || SWFDEC_IS_AS_OBJECT (initObject)); if (initObject != NULL) { SwfdecAsContext *cx = swfdec_gc_object_get_context (movie); if (cx->version <= 6) { swfdec_as_object_foreach (initObject, - swfdec_sprite_movie_foreach_copy_properties, SWFDEC_AS_OBJECT (movie)); + swfdec_sprite_movie_foreach_copy_properties, movie); swfdec_movie_initialize (movie); } else { swfdec_movie_initialize (movie); swfdec_as_object_foreach (initObject, - swfdec_sprite_movie_foreach_copy_properties, SWFDEC_AS_OBJECT (movie)); + swfdec_sprite_movie_foreach_copy_properties, movie); } } else { swfdec_movie_initialize (movie); @@ -779,18 +798,13 @@ swfdec_sprite_movie_attachMovie (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecMovie *movie; SwfdecMovie *ret; - SwfdecAsObject *initObject, *constructor; + SwfdecAsObject *initObject = NULL, *constructor, *o; const char *name, *export; int depth; SwfdecGraphic *sprite; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "ssi", &export, &name, &depth); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "ssi|O", &export, &name, &depth, &initObject); - if (argc > 3 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[3])) { - initObject = SWFDEC_AS_VALUE_GET_OBJECT ((&argv[3])); - } else { - initObject = NULL; - } sprite = swfdec_resource_get_export (movie->resource, export); if (!SWFDEC_IS_SPRITE (sprite)) { if (sprite == NULL) { @@ -805,18 +819,21 @@ swfdec_sprite_movie_attachMovie (SwfdecAsContext *cx, SwfdecAsObject *object, ret = swfdec_movie_find (movie, depth); if (ret) swfdec_movie_remove (ret); - ret = swfdec_movie_new (SWFDEC_PLAYER (swfdec_gc_object_get_context (object)), + ret = swfdec_movie_new (SWFDEC_PLAYER (cx), depth, movie, movie->resource, sprite, name); SWFDEC_LOG ("attached %s (%u) as %s to depth %u", export, SWFDEC_CHARACTER (sprite)->id, ret->name, ret->depth); /* run init and construct */ constructor = swfdec_player_get_export_class (SWFDEC_PLAYER (cx), export); - if (constructor == NULL) - constructor = movie->resource->sandbox->MovieClip; - swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (ret), constructor); + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (ret)); + if (constructor == NULL) { + swfdec_as_object_set_constructor_by_name (o, SWFDEC_AS_STR_MovieClip, NULL); + } else { + swfdec_as_object_set_constructor (o, constructor); + } swfdec_sprite_movie_init_from_object (ret, initObject); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (ret)); + SWFDEC_AS_VALUE_SET_MOVIE (rval, ret); } SWFDEC_AS_NATIVE (900, 18, swfdec_sprite_movie_duplicateMovieClip) @@ -829,7 +846,7 @@ swfdec_sprite_movie_duplicateMovieClip (SwfdecAsContext *cx, SwfdecAsObject *obj const char *name; int depth; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, "si", &name, &depth); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "si", &name, &depth); if (swfdec_depth_classify (depth) == SWFDEC_DEPTH_CLASS_EMPTY) return; @@ -838,7 +855,7 @@ swfdec_sprite_movie_duplicateMovieClip (SwfdecAsContext *cx, SwfdecAsObject *obj return; swfdec_sprite_movie_copy_props (new, movie); SWFDEC_LOG ("duplicated %s as %s to depth %u", movie->name, new->name, new->depth); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (new)); + SWFDEC_AS_VALUE_SET_MOVIE (rval, new); } SWFDEC_AS_NATIVE (900, 19, swfdec_sprite_movie_removeMovieClip) @@ -848,7 +865,7 @@ swfdec_sprite_movie_removeMovieClip (SwfdecAsContext *cx, SwfdecAsObject *object { SwfdecMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); if (swfdec_depth_classify (movie->depth) == SWFDEC_DEPTH_CLASS_DYNAMIC) swfdec_movie_remove (movie); @@ -861,9 +878,9 @@ swfdec_sprite_movie_getDepth (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecMovie *movie; - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, ""); - SWFDEC_AS_VALUE_SET_INT (rval, movie->depth); + *rval = swfdec_as_value_from_integer (cx, movie->depth); } SWFDEC_AS_NATIVE (900, 5, swfdec_sprite_movie_getBounds) @@ -905,13 +922,13 @@ swfdec_sprite_movie_getBounds (SwfdecAsContext *cx, SwfdecAsObject *object, x1 = rect.x1; y1 = rect.y1; } - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (x0)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (x0)); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_xMin, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (y0)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (y0)); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_yMin, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (x1)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (x1)); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_xMax, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (y1)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (y1)); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_yMax, &val); SWFDEC_AS_VALUE_SET_OBJECT (rval, obj); @@ -925,10 +942,10 @@ swfdec_sprite_movie_setMask (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecMovie *movie, *mask; /* yes, this works with regular movies */ - SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "O", &mask); + SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "M", &mask); - if (mask != NULL && !SWFDEC_IS_MOVIE (mask)) { - SWFDEC_FIXME ("mask is not a movie, what now?"); + if (argc > 0 && mask == NULL && !SWFDEC_AS_VALUE_IS_NULL (argv[0])) { + SWFDEC_FIXME ("mask is not a movie and not null, what now?"); mask = NULL; } if (movie->masked_by) @@ -962,19 +979,3 @@ swfdec_sprite_movie_setMask (SwfdecAsContext *cx, SwfdecAsObject *object, } } -void -swfdec_sprite_movie_init_context (SwfdecPlayer *player) -{ - SwfdecAsContext *context = SWFDEC_AS_CONTEXT (player); - SwfdecAsValue val; - SwfdecAsObject *proto, *movie; - - movie = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_MovieClip, NULL)); - SWFDEC_SANDBOX (context->global)->MovieClip = movie; - proto = swfdec_as_object_new (context); - SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - swfdec_as_object_set_variable_and_flags (movie, - SWFDEC_AS_STR_prototype, &val, SWFDEC_AS_VARIABLE_HIDDEN | - SWFDEC_AS_VARIABLE_PERMANENT); -}; diff --git a/swfdec/swfdec_stage_as.c b/swfdec/swfdec_stage_as.c index 88f82d2e..84feaf4a 100644 --- a/swfdec/swfdec_stage_as.c +++ b/swfdec/swfdec_stage_as.c @@ -65,9 +65,8 @@ set_scaleMode (SwfdecAsContext *cx, SwfdecAsObject *object, const char *s; SwfdecScaleMode mode; - if (argc == 0) - return; - s = swfdec_as_value_to_string (cx, &argv[0]); + SWFDEC_AS_CHECK (0, NULL, "s", &s); + if (g_ascii_strcasecmp (s, SWFDEC_AS_STR_noBorder) == 0) { mode = SWFDEC_SCALE_NO_BORDER; } else if (g_ascii_strcasecmp (s, SWFDEC_AS_STR_exactFit) == 0) { @@ -111,10 +110,8 @@ set_align (SwfdecAsContext *cx, SwfdecAsObject *object, guint flags = 0; const char *s; - if (argc == 0) - return; + SWFDEC_AS_CHECK (0, NULL, "s", &s); - s = swfdec_as_value_to_string (cx, &argv[0]); if (strchr (s, 'l') || strchr (s, 'L')) flags |= SWFDEC_ALIGN_FLAG_LEFT; if (strchr (s, 't') || strchr (s, 'T')) @@ -139,9 +136,9 @@ get_width (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecPlayerPrivate *priv = SWFDEC_PLAYER (cx)->priv; if (priv->scale_mode == SWFDEC_SCALE_NONE) - SWFDEC_AS_VALUE_SET_INT (ret, priv->internal_width); + *ret = swfdec_as_value_from_integer (cx, priv->internal_width); else - SWFDEC_AS_VALUE_SET_INT (ret, priv->width); + *ret = swfdec_as_value_from_integer (cx, priv->width); } SWFDEC_AS_NATIVE (666, 7, get_height) @@ -152,9 +149,9 @@ get_height (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecPlayerPrivate *priv = SWFDEC_PLAYER (cx)->priv; if (priv->scale_mode == SWFDEC_SCALE_NONE) - SWFDEC_AS_VALUE_SET_INT (ret, priv->internal_height); + *ret = swfdec_as_value_from_integer (cx, priv->internal_height); else - SWFDEC_AS_VALUE_SET_INT (ret, priv->height); + *ret = swfdec_as_value_from_integer (cx, priv->height); } /* FIXME: do this smarter */ diff --git a/swfdec/swfdec_style_sheet.c b/swfdec/swfdec_style_sheet.c index 2d3a249e..ed8b0b43 100644 --- a/swfdec/swfdec_style_sheet.c +++ b/swfdec/swfdec_style_sheet.c @@ -41,7 +41,7 @@ enum { LAST_SIGNAL }; -G_DEFINE_TYPE (SwfdecStyleSheet, swfdec_style_sheet, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecStyleSheet, swfdec_style_sheet, SWFDEC_TYPE_AS_RELAY) static guint signals[LAST_SIGNAL] = { 0, }; static void @@ -65,10 +65,10 @@ swfdec_style_sheet_get_selector_object (SwfdecAsObject *object, SwfdecAsValue val; SwfdecAsObject *empty; - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (name != NULL, NULL); - empty = swfdec_as_object_new_empty (swfdec_gc_object_get_context (object)); + empty = swfdec_as_object_new_empty (object->context); SWFDEC_AS_VALUE_SET_OBJECT (&val, empty); swfdec_as_object_unset_variable_flags (object, name, SWFDEC_AS_VARIABLE_CONSTANT); @@ -85,7 +85,7 @@ swfdec_style_sheet_parse_selectors (SwfdecAsContext *cx, const char *p, const char *name; g_return_val_if_fail (p != NULL && p != '\0' && !g_ascii_isspace (*p), NULL); - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); + g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (selectors != NULL, NULL); p += strspn (p, " \t\r\n,"); @@ -234,7 +234,7 @@ swfdec_style_sheet_update (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecStyleSheet *style; - SWFDEC_AS_CHECK (SWFDEC_TYPE_STYLESHEET, &style, ""); + SWFDEC_AS_CHECK (SWFDEC_TYPE_STYLE_SHEET, &style, ""); g_signal_emit (style, signals[UPDATE], 0); } @@ -246,12 +246,11 @@ swfdec_style_sheet_parseCSSInternal (SwfdecAsContext *cx, SwfdecAsValue *rval) { SwfdecAsObject *values; + const char *s; - if (argc < 1) - return; + SWFDEC_AS_CHECK (0, NULL, "s", &s); - values = - swfdec_style_sheet_parse (cx, swfdec_as_value_to_string (cx, &argv[0])); + values = swfdec_style_sheet_parse (cx, s); if (values == NULL) { SWFDEC_AS_VALUE_SET_NULL (rval); @@ -304,44 +303,43 @@ swfdec_style_sheet_parseColor (SwfdecAsContext *cx, SwfdecAsObject *object, if (*tail != '\0') return; - SWFDEC_AS_VALUE_SET_INT (rval, result); + *rval = swfdec_as_value_from_integer (cx, result); } -SWFDEC_AS_CONSTRUCTOR (113, 0, swfdec_style_sheet_construct, swfdec_style_sheet_get_type) +SWFDEC_AS_NATIVE (113, 0, swfdec_style_sheet_construct) void swfdec_style_sheet_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + SwfdecStyleSheet *sheet; + if (!swfdec_as_context_is_constructing (cx)) { SWFDEC_FIXME ("What do we do if not constructing?"); return; } - g_assert (SWFDEC_IS_STYLESHEET (object)); + sheet = g_object_new (SWFDEC_TYPE_STYLE_SHEET, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (sheet)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } static SwfdecTextFormat * swfdec_style_sheet_get_format (SwfdecStyleSheet *style, const char *name) { - SwfdecAsObject *styles; SwfdecAsValue val; - g_return_val_if_fail (SWFDEC_IS_STYLESHEET (style), NULL); + g_return_val_if_fail (SWFDEC_IS_STYLE_SHEET (style), NULL); g_return_val_if_fail (name != NULL, NULL); - swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (style), + swfdec_as_object_get_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (style)), SWFDEC_AS_STR__styles, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) - return NULL; - styles = SWFDEC_AS_VALUE_GET_OBJECT (&val); - - swfdec_as_object_get_variable (styles, name, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + swfdec_as_value_get_variable (swfdec_gc_object_get_context (style), &val, name, &val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return NULL; - if (!SWFDEC_IS_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (&val))) + if (!SWFDEC_IS_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay)) return NULL; - return SWFDEC_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (&val)); + return SWFDEC_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay); } SwfdecTextFormat * @@ -355,7 +353,7 @@ swfdec_style_sheet_get_class_format (SwfdecStyleSheet *style, const char *name) { char *name_full; - g_return_val_if_fail (SWFDEC_IS_STYLESHEET (style), NULL); + g_return_val_if_fail (SWFDEC_IS_STYLE_SHEET (style), NULL); g_return_val_if_fail (name != NULL, NULL); name_full = g_malloc (1 + strlen (name) + 1); diff --git a/swfdec/swfdec_style_sheet.h b/swfdec/swfdec_style_sheet.h index 226ff87b..d1d72923 100644 --- a/swfdec/swfdec_style_sheet.h +++ b/swfdec/swfdec_style_sheet.h @@ -18,12 +18,10 @@ * Boston, MA 02110-1301 USA */ -#ifndef _SWFDEC_STYLESHEET_H_ -#define _SWFDEC_STYLESHEET_H_ +#ifndef _SWFDEC_STYLE_SHEET_H_ +#define _SWFDEC_STYLE_SHEET_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_types.h> -#include <swfdec/swfdec_script.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_text_format.h> G_BEGIN_DECLS @@ -31,19 +29,19 @@ G_BEGIN_DECLS typedef struct _SwfdecStyleSheet SwfdecStyleSheet; typedef struct _SwfdecStyleSheetClass SwfdecStyleSheetClass; -#define SWFDEC_TYPE_STYLESHEET (swfdec_style_sheet_get_type()) -#define SWFDEC_IS_STYLESHEET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_STYLESHEET)) -#define SWFDEC_IS_STYLESHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_STYLESHEET)) -#define SWFDEC_STYLESHEET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_STYLESHEET, SwfdecStyleSheet)) -#define SWFDEC_STYLESHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_STYLESHEET, SwfdecStyleSheetClass)) -#define SWFDEC_STYLESHEET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_STYLESHEET, SwfdecStyleSheetClass)) +#define SWFDEC_TYPE_STYLE_SHEET (swfdec_style_sheet_get_type()) +#define SWFDEC_IS_STYLE_SHEET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_STYLE_SHEET)) +#define SWFDEC_IS_STYLE_SHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_STYLE_SHEET)) +#define SWFDEC_STYLE_SHEET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_STYLE_SHEET, SwfdecStyleSheet)) +#define SWFDEC_STYLE_SHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_STYLE_SHEET, SwfdecStyleSheetClass)) +#define SWFDEC_STYLE_SHEET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_STYLE_SHEET, SwfdecStyleSheetClass)) struct _SwfdecStyleSheet { - SwfdecAsObject object; + SwfdecAsRelay relay; }; struct _SwfdecStyleSheetClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_style_sheet_get_type (void); diff --git a/swfdec/swfdec_system_as.c b/swfdec/swfdec_system_as.c index a385060d..a3e7d422 100644 --- a/swfdec/swfdec_system_as.c +++ b/swfdec/swfdec_system_as.c @@ -172,19 +172,19 @@ swfdec_system_manufacturer (SwfdecPlayer *player, SwfdecAsValue *ret) static void swfdec_system_screen_width (SwfdecPlayer *player, SwfdecAsValue *ret) { - SWFDEC_AS_VALUE_SET_INT (ret, player->priv->system->screen_width); + *ret = swfdec_as_value_from_integer (SWFDEC_AS_CONTEXT (player), player->priv->system->screen_width); } static void swfdec_system_screen_height (SwfdecPlayer *player, SwfdecAsValue *ret) { - SWFDEC_AS_VALUE_SET_INT (ret, player->priv->system->screen_height); + *ret = swfdec_as_value_from_integer (SWFDEC_AS_CONTEXT (player), player->priv->system->screen_height); } static void swfdec_system_screen_dpi (SwfdecPlayer *player, SwfdecAsValue *ret) { - SWFDEC_AS_VALUE_SET_INT (ret, player->priv->system->dpi); + *ret = swfdec_as_value_from_integer (SWFDEC_AS_CONTEXT (player), player->priv->system->dpi); } static void @@ -197,7 +197,7 @@ swfdec_system_screen_color (SwfdecPlayer *player, SwfdecAsValue *ret) static void swfdec_system_screen_par (SwfdecPlayer *player, SwfdecAsValue *ret) { - SWFDEC_AS_VALUE_SET_NUMBER (ret, player->priv->system->par); + *ret = swfdec_as_value_from_number (SWFDEC_AS_CONTEXT (player), player->priv->system->par); } static void @@ -306,11 +306,11 @@ swfdec_system_query (SwfdecAsContext *cx, SwfdecAsObject *object, queries[i].get (player, &val); swfdec_as_object_set_variable (object, queries[i].name, &val); if (queries[i].name == SWFDEC_AS_STR_screenResolutionY) { - g_string_append_printf (server, "x%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (&val)); + g_string_append_printf (server, "x%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (val)); } else if (queries[i].name == SWFDEC_AS_STR_pixelAspectRatio) { char buffer[10]; g_ascii_formatd (buffer, sizeof (buffer), "%.1f", - SWFDEC_AS_VALUE_GET_NUMBER (&val)); + SWFDEC_AS_VALUE_GET_NUMBER (val)); g_string_append (server, "&AR="); g_string_append (server, buffer); } else if (queries[i].name == SWFDEC_AS_STR_manufacturer) { @@ -323,12 +323,12 @@ swfdec_system_query (SwfdecAsContext *cx, SwfdecAsObject *object, g_string_append_c (server, '&'); g_string_append (server, queries[i].server_string); g_string_append_c (server, '='); - if (SWFDEC_AS_VALUE_IS_BOOLEAN (&val)) { - g_string_append_c (server, SWFDEC_AS_VALUE_GET_BOOLEAN (&val) ? 't' : 'f'); - } else if (SWFDEC_AS_VALUE_IS_NUMBER (&val)) { - g_string_append_printf (server, "%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (&val)); - } else if (SWFDEC_AS_VALUE_IS_STRING (&val)) { - char *s = swfdec_as_string_escape (cx, SWFDEC_AS_VALUE_GET_STRING (&val)); + if (SWFDEC_AS_VALUE_IS_BOOLEAN (val)) { + g_string_append_c (server, SWFDEC_AS_VALUE_GET_BOOLEAN (val) ? 't' : 'f'); + } else if (SWFDEC_AS_VALUE_IS_NUMBER (val)) { + g_string_append_printf (server, "%d", (int) SWFDEC_AS_VALUE_GET_NUMBER (val)); + } else if (SWFDEC_AS_VALUE_IS_STRING (val)) { + char *s = swfdec_as_string_escape (cx, SWFDEC_AS_VALUE_GET_STRING (val)); g_string_append (server, s); g_free (s); } else { diff --git a/swfdec/swfdec_system_security.c b/swfdec/swfdec_system_security.c index 404f6895..b6a7a098 100644 --- a/swfdec/swfdec_system_security.c +++ b/swfdec/swfdec_system_security.c @@ -27,6 +27,7 @@ #include "swfdec_resource.h" #include "swfdec_player_internal.h" #include "swfdec_policy_file.h" +#include "swfdec_sandbox.h" // properties SWFDEC_AS_NATIVE (12, 0, swfdec_system_security_allowDomain) @@ -95,7 +96,7 @@ swfdec_system_security_get_sandboxType (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - switch (SWFDEC_SANDBOX (cx->global)->type) { + switch (swfdec_sandbox_get (SWFDEC_PLAYER (cx))->type) { case SWFDEC_SANDBOX_REMOTE: SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_remote); break; diff --git a/swfdec/swfdec_text_field_movie.c b/swfdec/swfdec_text_field_movie.c index 9864b34c..9f0f0b01 100644 --- a/swfdec/swfdec_text_field_movie.c +++ b/swfdec/swfdec_text_field_movie.c @@ -165,6 +165,7 @@ swfdec_text_field_movie_autosize (SwfdecTextFieldMovie *text) break; case SWFDEC_AUTO_SIZE_NONE: default: + x0 = 0; g_assert_not_reached (); } z0 = 0; @@ -207,8 +208,8 @@ swfdec_text_field_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *ma swfdec_rect_transform (&rect, &rect, &SWFDEC_PLAYER (swfdec_gc_object_get_context (text))->priv->stage_to_global); - swfdec_player_invalidate ( - SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); } static gboolean @@ -288,8 +289,8 @@ swfdec_text_field_movie_dispose (GObject *object) text = SWFDEC_TEXT_FIELD_MOVIE (object); if (text->style_sheet) { - if (SWFDEC_IS_STYLESHEET (text->style_sheet)) { - g_signal_handlers_disconnect_matched (text->style_sheet, + if (SWFDEC_IS_STYLE_SHEET (text->style_sheet->relay)) { + g_signal_handlers_disconnect_matched (text->style_sheet->relay, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, text); } text->style_sheet = NULL; @@ -321,7 +322,7 @@ swfdec_text_field_movie_mark (SwfdecGcObject *object) swfdec_text_buffer_mark (text->text); if (text->style_sheet != NULL) - swfdec_gc_object_mark (text->style_sheet); + swfdec_as_object_mark (text->style_sheet); if (text->style_sheet_input != NULL) swfdec_as_string_mark (text->style_sheet_input); if (text->restrict_ != NULL) @@ -395,24 +396,22 @@ swfdec_text_field_movie_init_movie (SwfdecMovie *movie) needs_unuse = swfdec_sandbox_try_use (movie->resource->sandbox); cx = swfdec_gc_object_get_context (movie); + if (movie->resource->version > 5) { + SwfdecAsObject *o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); - swfdec_text_field_movie_init_properties (cx); - - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (movie), - SWFDEC_AS_STR_TextField, NULL); + swfdec_text_field_movie_init_properties (cx); - /* create _listeners array */ - array = swfdec_as_array_new (cx); - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (movie)); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &val); - SWFDEC_AS_VALUE_SET_OBJECT (&val, array); - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (movie), SWFDEC_AS_STR__listeners, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + swfdec_as_object_set_constructor_by_name (o, + SWFDEC_AS_STR_TextField, NULL); - /* add self to listeners */ - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (movie)); - swfdec_as_object_call (SWFDEC_AS_OBJECT (movie), SWFDEC_AS_STR_addListener, - 1, &val, NULL); + /* create _listeners array containing self */ + array = swfdec_as_array_new (cx); + SWFDEC_AS_VALUE_SET_MOVIE (&val, movie); + swfdec_as_array_push (array, &val); + SWFDEC_AS_VALUE_SET_OBJECT (&val, array); + swfdec_as_object_set_variable_and_flags (o, SWFDEC_AS_STR__listeners, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + } text->border_color = SWFDEC_COLOR_COMBINE (0, 0, 0, 0); text->background_color = SWFDEC_COLOR_COMBINE (255, 255, 255, 0); @@ -546,9 +545,8 @@ swfdec_text_field_movie_parse_listen_variable (SwfdecTextFieldMovie *text, if (SWFDEC_MOVIE (text)->parent == NULL) return; - g_assert (SWFDEC_IS_AS_OBJECT (SWFDEC_MOVIE (text)->parent)); cx = swfdec_gc_object_get_context (text); - parent = SWFDEC_AS_OBJECT (SWFDEC_MOVIE (text)->parent); + parent = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (SWFDEC_MOVIE (text)->parent)); p1 = strrchr (variable, '.'); p2 = strrchr (variable, ':'); @@ -606,7 +604,7 @@ swfdec_text_field_movie_asfunction (SwfdecTextFieldMovie *text, } else { swfdec_as_object_call (object, name, 0, NULL, NULL); } - swfdec_sandbox_use (SWFDEC_MOVIE (text)->resource->sandbox); + swfdec_sandbox_unuse (SWFDEC_MOVIE (text)->resource->sandbox); g_strfreev (parts); } @@ -853,11 +851,11 @@ swfdec_text_field_movie_key_release (SwfdecActor *actor, guint keycode, guint ch //SwfdecTextFieldMovie *text = SWFDEC_TEXT_FIELD_MOVIE (actor); } -static void -swfdec_text_field_movie_property_get (SwfdecMovie *movie, guint prop_id, - SwfdecAsValue *val) +static SwfdecAsValue +swfdec_text_field_movie_property_get (SwfdecMovie *movie, guint prop_id) { SwfdecTextFieldMovie *text = SWFDEC_TEXT_FIELD_MOVIE (movie); + SwfdecAsContext *cx = swfdec_gc_object_get_context (text); double d; switch (prop_id) { @@ -865,14 +863,12 @@ swfdec_text_field_movie_property_get (SwfdecMovie *movie, guint prop_id, swfdec_text_field_movie_autosize (text); swfdec_movie_update (movie); d = SWFDEC_TWIPS_TO_DOUBLE (movie->matrix.x0 + text->extents.x0); - SWFDEC_AS_VALUE_SET_NUMBER (val, d); - return; + return swfdec_as_value_from_number (cx, d); case SWFDEC_MOVIE_PROPERTY_Y: swfdec_text_field_movie_autosize (text); swfdec_movie_update (movie); d = SWFDEC_TWIPS_TO_DOUBLE (movie->matrix.y0 + text->extents.y0); - SWFDEC_AS_VALUE_SET_NUMBER (val, d); - return; + return swfdec_as_value_from_number (cx, d); case SWFDEC_MOVIE_PROPERTY_WIDTH: case SWFDEC_MOVIE_PROPERTY_HEIGHT: swfdec_text_field_movie_autosize (text); @@ -881,12 +877,12 @@ swfdec_text_field_movie_property_get (SwfdecMovie *movie, guint prop_id, break; } - SWFDEC_MOVIE_CLASS (swfdec_text_field_movie_parent_class)->property_get (movie, prop_id, val); + return SWFDEC_MOVIE_CLASS (swfdec_text_field_movie_parent_class)->property_get (movie, prop_id); } static void swfdec_text_field_movie_property_set (SwfdecMovie *movie, guint prop_id, - const SwfdecAsValue *val) + SwfdecAsValue val) { SwfdecTextFieldMovie *text = SWFDEC_TEXT_FIELD_MOVIE (movie); SwfdecAsContext *cx = swfdec_gc_object_get_context (movie); @@ -894,7 +890,7 @@ swfdec_text_field_movie_property_set (SwfdecMovie *movie, guint prop_id, switch (prop_id) { case SWFDEC_MOVIE_PROPERTY_X: - if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), val, FALSE, &twips)) + if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), &val, FALSE, &twips)) return; movie->modified = TRUE; twips -= text->extents.x0; @@ -905,7 +901,7 @@ swfdec_text_field_movie_property_set (SwfdecMovie *movie, guint prop_id, } return; case SWFDEC_MOVIE_PROPERTY_Y: - if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), val, FALSE, &twips)) + if (!swfdec_as_value_to_twips (swfdec_gc_object_get_context (movie), &val, FALSE, &twips)) return; movie->modified = TRUE; twips -= text->extents.y0; @@ -916,7 +912,7 @@ swfdec_text_field_movie_property_set (SwfdecMovie *movie, guint prop_id, } return; case SWFDEC_MOVIE_PROPERTY_WIDTH: - if (swfdec_as_value_to_twips (cx, val, TRUE, &twips)) { + if (swfdec_as_value_to_twips (cx, &val, TRUE, &twips)) { movie->modified = TRUE; if (text->extents.x1 != text->extents.x0 + twips) { swfdec_movie_invalidate_next (movie); @@ -928,7 +924,7 @@ swfdec_text_field_movie_property_set (SwfdecMovie *movie, guint prop_id, return; case SWFDEC_MOVIE_PROPERTY_HEIGHT: movie->modified = TRUE; - if (swfdec_as_value_to_twips (cx, val, TRUE, &twips)) { + if (swfdec_as_value_to_twips (cx, &val, TRUE, &twips)) { movie->modified = TRUE; if (text->extents.y1 != text->extents.y0 + twips) { swfdec_movie_invalidate_next (movie); @@ -1031,16 +1027,13 @@ swfdec_text_field_movie_set_listen_variable_text (SwfdecTextFieldMovie *text, } static void -swfdec_text_field_movie_variable_listener_callback (SwfdecAsObject *object, +swfdec_text_field_movie_variable_listener_callback (gpointer data, const char *name, const SwfdecAsValue *val) { - SwfdecTextFieldMovie *text; + SwfdecTextFieldMovie *text = SWFDEC_TEXT_FIELD_MOVIE (data); - g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (object)); - - text = SWFDEC_TEXT_FIELD_MOVIE (object); swfdec_text_field_movie_set_text (text, - swfdec_as_value_to_string (swfdec_gc_object_get_context (text), val), text->html); + swfdec_as_value_to_string (swfdec_gc_object_get_context (text), *val), text->html); } void @@ -1053,10 +1046,9 @@ swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie *text, if (text->variable != NULL) { swfdec_text_field_movie_parse_listen_variable (text, text->variable, &object, &name); - if (object != NULL && SWFDEC_IS_MOVIE (object)) { - swfdec_movie_remove_variable_listener (SWFDEC_MOVIE (object), - SWFDEC_AS_OBJECT (text), name, - swfdec_text_field_movie_variable_listener_callback); + if (object != NULL && object->movie) { + swfdec_movie_remove_variable_listener (SWFDEC_MOVIE (object->relay), + text, name, swfdec_text_field_movie_variable_listener_callback); } } @@ -1071,7 +1063,7 @@ swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie *text, &name); if (object != NULL && swfdec_as_object_get_variable (object, name, &val)) { swfdec_text_field_movie_set_text (text, - swfdec_as_value_to_string (swfdec_gc_object_get_context (text), &val), + swfdec_as_value_to_string (swfdec_gc_object_get_context (text), val), text->html); } else if (text_field != NULL && text_field->input != NULL) { // Set to the original value from the tag, not current value @@ -1081,10 +1073,9 @@ swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie *text, // FIXME: html value correct here? swfdec_text_field_movie_set_text (text, initial, text_field->html); } - if (object != NULL && SWFDEC_IS_MOVIE (object)) { - swfdec_movie_add_variable_listener (SWFDEC_MOVIE (object), - SWFDEC_AS_OBJECT (text), name, - swfdec_text_field_movie_variable_listener_callback); + if (object != NULL && object->movie) { + swfdec_movie_add_variable_listener (SWFDEC_MOVIE (object->relay), + text, name, swfdec_text_field_movie_variable_listener_callback); } } } diff --git a/swfdec/swfdec_text_field_movie_as.c b/swfdec/swfdec_text_field_movie_as.c index 81180235..fd432105 100644 --- a/swfdec/swfdec_text_field_movie_as.c +++ b/swfdec/swfdec_text_field_movie_as.c @@ -62,7 +62,7 @@ swfdec_text_field_movie_set_readonly (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); if (argc > 0) - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); } /* @@ -124,7 +124,7 @@ swfdec_text_field_movie_set_html (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); text->html = value; @@ -182,7 +182,7 @@ swfdec_text_field_movie_get_length (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_strlen (swfdec_text_buffer_get_text (text->text), -1)); + *ret = swfdec_as_value_from_integer (cx, g_utf8_strlen (swfdec_text_buffer_get_text (text->text), -1)); } /* @@ -210,7 +210,7 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); text->condense_white = value; } @@ -225,7 +225,7 @@ swfdec_text_field_movie_get_maxChars (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); if (text->max_chars != 0) { - SWFDEC_AS_VALUE_SET_INT (ret, text->max_chars); + *ret = swfdec_as_value_from_integer (cx, text->max_chars); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -243,8 +243,8 @@ swfdec_text_field_movie_set_maxChars (SwfdecAsContext *cx, if (argc < 1) return; - swfdec_as_value_to_number (cx, &argv[0]); - text->max_chars = swfdec_as_value_to_integer (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); + text->max_chars = swfdec_as_value_to_integer (cx, argv[0]); } static void @@ -269,7 +269,7 @@ swfdec_text_field_movie_set_multiline (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); text->multiline = value; } @@ -299,15 +299,15 @@ swfdec_text_field_movie_set_restrict (SwfdecAsContext *cx, const char *value; if (argc > 0) - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value); if (text->restrict_ == NULL && value == SWFDEC_AS_STR_EMPTY) return; - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { text->restrict_ = NULL; } else { text->restrict_ = value; @@ -336,7 +336,7 @@ swfdec_text_field_movie_set_selectable (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); text->selectable = value; @@ -368,13 +368,13 @@ swfdec_text_field_movie_do_set_type (SwfdecAsContext *cx, const char *value; if (argc > 0) - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value); - if (!g_strcasecmp (value, SWFDEC_AS_STR_input)) { + if (!g_ascii_strcasecmp (value, SWFDEC_AS_STR_input)) { text->editable = TRUE; - } else if (!g_strcasecmp (value, SWFDEC_AS_STR_dynamic)) { + } else if (!g_ascii_strcasecmp (value, SWFDEC_AS_STR_dynamic)) { text->editable = FALSE; } /* else ignore */ @@ -407,12 +407,12 @@ swfdec_text_field_movie_do_set_variable (SwfdecAsContext *cx, const char *value; if (argc > 0) - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0]) || value == SWFDEC_AS_STR_EMPTY) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0]) || value == SWFDEC_AS_STR_EMPTY) { value = NULL; } @@ -433,7 +433,7 @@ swfdec_text_field_movie_get_textHeight (SwfdecAsContext *cx, swfdec_movie_update (SWFDEC_MOVIE (text)); swfdec_text_field_movie_update_layout (text); - SWFDEC_AS_VALUE_SET_INT (ret, floor (text->layout_height * + *ret = swfdec_as_value_from_integer (cx, floor (text->layout_height * text->from_layout.yy / SWFDEC_TWIPS_SCALE_FACTOR)); } @@ -448,7 +448,7 @@ swfdec_text_field_movie_get_textWidth (SwfdecAsContext *cx, swfdec_movie_update (SWFDEC_MOVIE (text)); swfdec_text_field_movie_update_layout (text); - SWFDEC_AS_VALUE_SET_INT (ret, floor (text->layout_width * + *ret = swfdec_as_value_from_integer (cx, floor (text->layout_width * text->from_layout.xx / SWFDEC_TWIPS_SCALE_FACTOR)); } @@ -477,7 +477,7 @@ swfdec_text_field_movie_set_background (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); if (text->background != value) { text->background = value; @@ -494,7 +494,7 @@ swfdec_text_field_movie_get_backgroundColor (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, + *ret = swfdec_as_value_from_number (cx, SWFDEC_COLOR_RED (text->background_color) << 16 | SWFDEC_COLOR_GREEN (text->background_color) << 8 | SWFDEC_COLOR_BLUE (text->background_color)); @@ -540,7 +540,7 @@ swfdec_text_field_movie_set_border (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); if (text->border != value) { text->border = value; @@ -558,7 +558,7 @@ swfdec_text_field_movie_get_borderColor (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, + *ret = swfdec_as_value_from_number (cx, SWFDEC_COLOR_RED (text->border_color) << 16 | SWFDEC_COLOR_GREEN (text->border_color) << 8 | SWFDEC_COLOR_BLUE (text->border_color)); @@ -594,7 +594,7 @@ swfdec_text_field_movie_get_bottomScroll (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, text->scroll + text->lines_visible); + *ret = swfdec_as_value_from_number (cx, text->scroll + text->lines_visible); } static void @@ -606,7 +606,7 @@ swfdec_text_field_movie_do_get_hscroll (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, text->hscroll); + *ret = swfdec_as_value_from_number (cx, text->hscroll); } static void @@ -636,7 +636,7 @@ swfdec_text_field_movie_get_maxhscroll (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_INT (ret, swfdec_text_field_movie_get_hscroll_max (text)); + *ret = swfdec_as_value_from_integer (cx, swfdec_text_field_movie_get_hscroll_max (text)); } static void @@ -648,7 +648,7 @@ swfdec_text_field_movie_get_maxscroll (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, text->scroll_max + 1); + *ret = swfdec_as_value_from_number (cx, text->scroll_max + 1); } static void @@ -673,7 +673,7 @@ swfdec_text_field_movie_set_mouseWheelEnabled (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); text->mouse_wheel_enabled = value; } @@ -687,7 +687,7 @@ swfdec_text_field_movie_do_get_scroll (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, text->scroll + 1); + *ret = swfdec_as_value_from_number (cx, text->scroll + 1); } static void @@ -752,15 +752,15 @@ swfdec_text_field_movie_set_autoSize (SwfdecAsContext *cx, if (argc < 1) return; - if (SWFDEC_AS_VALUE_IS_BOOLEAN (&argv[0])) { - if (SWFDEC_AS_VALUE_GET_BOOLEAN (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_BOOLEAN (argv[0])) { + if (SWFDEC_AS_VALUE_GET_BOOLEAN (argv[0])) { text->auto_size = SWFDEC_AUTO_SIZE_LEFT; } else { text->auto_size = SWFDEC_AUTO_SIZE_NONE; } } else { - swfdec_as_value_to_number (cx, &argv[0]); - s = swfdec_as_value_to_string (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); + s = swfdec_as_value_to_string (cx, argv[0]); if (!g_ascii_strcasecmp (s, "left")) { text->auto_size = SWFDEC_AUTO_SIZE_LEFT; @@ -796,7 +796,7 @@ swfdec_text_field_movie_set_password (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); swfdec_text_layout_set_password (text->layout, value); swfdec_movie_invalidate_last (SWFDEC_MOVIE (text)); @@ -825,7 +825,7 @@ swfdec_text_field_movie_set_wordWrap (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); swfdec_text_layout_set_word_wrap (text->layout, value); } @@ -855,7 +855,7 @@ swfdec_text_field_movie_set_embedFonts (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value); - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); if (!text->embed_fonts && value) SWFDEC_FIXME ("Using embed fonts in TextField not supported"); @@ -875,7 +875,7 @@ swfdec_text_field_movie_get_styleSheet (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); if (text->style_sheet != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (text->style_sheet)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, text->style_sheet); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (ret); } @@ -901,12 +901,10 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx, if (argc < 1) return; - swfdec_as_value_to_number (cx, &argv[0]); + swfdec_as_value_to_number (cx, argv[0]); - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) { - value = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - if (SWFDEC_IS_MOVIE (value)) - value = NULL; + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[0])) { + value = SWFDEC_AS_VALUE_GET_OBJECT (argv[0]); } else { value = NULL; } @@ -914,19 +912,19 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx, if (text->style_sheet == value) return; - if (text->style_sheet != NULL && SWFDEC_IS_STYLESHEET (text->style_sheet)) { - g_signal_handlers_disconnect_by_func (text->style_sheet, + if (text->style_sheet != NULL && SWFDEC_IS_STYLE_SHEET (text->style_sheet->relay)) { + g_signal_handlers_disconnect_by_func (text->style_sheet->relay, swfdec_text_field_movie_style_sheet_update, text); - g_object_remove_weak_pointer (G_OBJECT (text->style_sheet), + g_object_remove_weak_pointer (G_OBJECT (text->style_sheet->relay), (gpointer) &text->style_sheet); } text->style_sheet = value; - if (SWFDEC_IS_STYLESHEET (value)) { - g_signal_connect_swapped (value, "update", + if (value && SWFDEC_IS_STYLE_SHEET (value->relay)) { + g_signal_connect_swapped (value->relay, "update", G_CALLBACK (swfdec_text_field_movie_style_sheet_update), text); - g_object_add_weak_pointer (G_OBJECT (text->style_sheet), + g_object_add_weak_pointer (G_OBJECT (text->style_sheet->relay), (gpointer) &text->style_sheet); swfdec_text_field_movie_style_sheet_update (text); @@ -942,7 +940,7 @@ swfdec_text_field_movie_get_textColor (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_NUMBER (ret, + *ret = swfdec_as_value_from_number (cx, swfdec_text_buffer_get_default_attributes (text->text)->color); } @@ -1065,16 +1063,14 @@ swfdec_text_field_movie_getNewTextFormat (SwfdecAsContext *cx, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - format = SWFDEC_TEXT_FORMAT (swfdec_text_format_new (cx)); - if (format == NULL) - return; + format = swfdec_text_format_new (cx); swfdec_text_attributes_copy (&format->attr, swfdec_text_buffer_get_default_attributes (text->text), SWFDEC_TEXT_ATTRIBUTES_MASK); format->values_set = SWFDEC_TEXT_ATTRIBUTES_MASK; - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (format)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (format))); } SWFDEC_AS_NATIVE (104, 105, swfdec_text_field_movie_setNewTextFormat) @@ -1084,13 +1080,15 @@ swfdec_text_field_movie_setNewTextFormat (SwfdecAsContext *cx, SwfdecAsValue *ret) { SwfdecTextFieldMovie *text; + SwfdecAsObject *format_object; SwfdecTextFormat *format; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "o", &format); + SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "o", &format_object); - if (!SWFDEC_IS_TEXT_FORMAT (format)) + if (!SWFDEC_IS_TEXT_FORMAT (format_object->relay)) return; + format = SWFDEC_TEXT_FORMAT (format_object->relay); swfdec_text_buffer_set_default_attributes (text->text, &format->attr, format->values_set); } @@ -1120,7 +1118,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx, end = length; i = 0; } else { - val = swfdec_as_value_to_integer (cx, &argv[0]); + val = swfdec_as_value_to_integer (cx, argv[0]); start = MAX (val, 0); start = MIN (start, length); if (argc <= 2) { @@ -1131,7 +1129,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx, } i = 1; } else { - val = swfdec_as_value_to_integer (cx, &argv[1]); + val = swfdec_as_value_to_integer (cx, argv[1]); end = MAX (val, 0); end = CLAMP (end, start, length); i = 2; @@ -1140,12 +1138,12 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx, if (start == end) return; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[i])) + if (!SWFDEC_AS_VALUE_IS_OBJECT (argv[i])) return; - if (!SWFDEC_IS_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (&argv[i]))) + if (!SWFDEC_IS_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (argv[i])->relay)) return; - format = SWFDEC_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (&argv[i])); + format = SWFDEC_TEXT_FORMAT (SWFDEC_AS_VALUE_GET_OBJECT (argv[i])->relay); start = g_utf8_offset_to_pointer (string, start) - string; end = g_utf8_offset_to_pointer (string, end) - string; @@ -1182,14 +1180,14 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx, string = swfdec_text_buffer_get_text (text->text); length = g_utf8_strlen (string, -1); - format = SWFDEC_TEXT_FORMAT (swfdec_text_format_new (cx)); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (format)); + format = swfdec_text_format_new (cx); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (format))); if (argc == 0) { start = 0; end = length; } else { - val = swfdec_as_value_to_integer (cx, &argv[0]); + val = swfdec_as_value_to_integer (cx, argv[0]); start = MAX (val, 0); start = MIN (start, length); if (argc == 1) { @@ -1199,7 +1197,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx, end = MIN (start + 1, length); } } else { - val = swfdec_as_value_to_integer (cx, &argv[1]); + val = swfdec_as_value_to_integer (cx, argv[1]); end = MAX (val, 0); end = CLAMP (end, start, length); } @@ -1273,7 +1271,7 @@ swfdec_text_field_movie_getFontList (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SwfdecAsArray *array; + SwfdecAsObject *array; SwfdecAsValue val; PangoFontFamily **families; int i, n_families; @@ -1281,7 +1279,7 @@ swfdec_text_field_movie_getFontList (SwfdecAsContext *cx, pango_font_map_list_families (pango_cairo_font_map_get_default (), &families, &n_families); - array = SWFDEC_AS_ARRAY (swfdec_as_array_new (cx)); + array = swfdec_as_array_new (cx); for (i = 0; i < n_families; i++) { SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (cx, pango_font_family_get_name (families[i]))); @@ -1296,7 +1294,7 @@ swfdec_text_field_movie_getFontList (SwfdecAsContext *cx, g_free (families); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (array)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, array); } SWFDEC_AS_NATIVE (104, 106, swfdec_text_field_movie_getDepth) @@ -1308,7 +1306,7 @@ swfdec_text_field_movie_getDepth (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); - SWFDEC_AS_VALUE_SET_INT (rval, SWFDEC_MOVIE (text)->depth); + *rval = swfdec_as_value_from_integer (cx, SWFDEC_MOVIE (text)->depth); } SWFDEC_AS_NATIVE (104, 103, swfdec_text_field_movie_removeTextField) @@ -1341,6 +1339,7 @@ swfdec_text_field_movie_createTextField (SwfdecAsContext *cx, int depth, x, y, width, height; const char *name; SwfdecAsFunction *fun; + SwfdecAsObject *fun_object, *o; SwfdecAsValue val; SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &parent, "siiiii", &name, &depth, &x, &y, &width, &height); @@ -1392,29 +1391,31 @@ swfdec_text_field_movie_createTextField (SwfdecAsContext *cx, swfdec_movie_update (movie); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_TextField, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val); - if (!SWFDEC_IS_AS_FUNCTION (fun)) + fun_object = SWFDEC_AS_VALUE_GET_OBJECT (val); + if (!SWFDEC_IS_AS_FUNCTION (fun_object->relay)) return; + fun = SWFDEC_AS_FUNCTION (fun_object->relay); /* set initial variables */ - if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (fun), + o = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)); + if (swfdec_as_object_get_variable (fun_object, SWFDEC_AS_STR_prototype, &val)) { - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (movie), + swfdec_as_object_set_variable_and_flags (o, SWFDEC_AS_STR___proto__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); } - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (fun)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, fun_object); if (cx->version < 7) { - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (movie), + swfdec_as_object_set_variable_and_flags (o, SWFDEC_AS_STR_constructor, &val, SWFDEC_AS_VARIABLE_HIDDEN); } - swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (movie), + swfdec_as_object_set_variable_and_flags (o, SWFDEC_AS_STR___constructor__, &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_VERSION_6_UP); - swfdec_as_function_call_full (fun, SWFDEC_AS_OBJECT (movie), TRUE, NULL, + swfdec_as_function_call_full (fun, o, TRUE, NULL, 0, NULL, cx->version > 7 ? rval : &val); } @@ -1431,13 +1432,13 @@ swfdec_text_field_movie_init_properties (SwfdecAsContext *cx) g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_TextField, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - object = SWFDEC_AS_VALUE_GET_OBJECT (&val); + object = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_get_variable (object, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); // text swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_text, @@ -1558,5 +1559,5 @@ swfdec_text_field_movie_construct (SwfdecAsContext *cx, SwfdecAsObject *object, // FIXME: do object.addListener (object); - SWFDEC_AS_VALUE_SET_OBJECT (ret, object); + SWFDEC_AS_VALUE_SET_COMPOSITE (ret, object); } diff --git a/swfdec/swfdec_text_field_movie_html.c b/swfdec/swfdec_text_field_movie_html.c index bcc606df..e268c771 100644 --- a/swfdec/swfdec_text_field_movie_html.c +++ b/swfdec/swfdec_text_field_movie_html.c @@ -59,8 +59,8 @@ swfdec_text_field_movie_html_parse_close_tag (ParserData *data, ParserTag *tag, g_return_if_fail (tag != NULL); if (data->multiline && !end && - ((tag->name_length == 1 && !g_strncasecmp (tag->name, "p", 1)) || - (tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)))) + ((tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "p", 1)) || + (tag->name_length == 2 && !g_ascii_strncasecmp (tag->name, "li", 2)))) { GSList *iter; @@ -68,7 +68,7 @@ swfdec_text_field_movie_html_parse_close_tag (ParserData *data, ParserTag *tag, ParserTag *f = iter->data; if (f->end_index < tag->index) break; - if (f->name_length == 4 && !g_strncasecmp (f->name, "font", 4)) { + if (f->name_length == 4 && !g_ascii_strncasecmp (f->name, "font", 4)) { ParserTag *n = g_new0 (ParserTag, 1); n->name = f->name; n->name_length = f->name_length; @@ -116,6 +116,7 @@ swfdec_text_field_movie_html_tag_set_attribute (ParserData *data, { SwfdecAsValue val; SwfdecAsObject *object; + SwfdecAsContext *cx; g_return_if_fail (data != NULL); g_return_if_fail (tag != NULL); @@ -127,57 +128,58 @@ swfdec_text_field_movie_html_tag_set_attribute (ParserData *data, if (!tag->format) return; - object = SWFDEC_AS_OBJECT (tag->format); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (tag->format)); + cx = swfdec_gc_object_get_context (tag->format); SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_give_string ( - swfdec_gc_object_get_context (object), g_strndup (value, value_length))); + cx, g_strndup (value, value_length))); - if (tag->name_length == 10 && !g_strncasecmp (tag->name, "textformat", 10)) + if (tag->name_length == 10 && !g_ascii_strncasecmp (tag->name, "textformat", 10)) { - if (name_length == 10 && !g_strncasecmp (name, "leftmargin", 10)) + if (name_length == 10 && !g_ascii_strncasecmp (name, "leftmargin", 10)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_leftMargin, &val); } - else if (name_length == 11 && !g_strncasecmp (name, "rightmargin", 11)) + else if (name_length == 11 && !g_ascii_strncasecmp (name, "rightmargin", 11)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_rightMargin, &val); } - else if (name_length == 6 && !g_strncasecmp (name, "indent", 6)) + else if (name_length == 6 && !g_ascii_strncasecmp (name, "indent", 6)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_indent, &val); } - else if (name_length == 11 && !g_strncasecmp (name, "blockindent", 11)) + else if (name_length == 11 && !g_ascii_strncasecmp (name, "blockindent", 11)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_blockIndent, &val); } - else if (name_length == 8 && !g_strncasecmp (name, "tabstops", 8)) + else if (name_length == 8 && !g_ascii_strncasecmp (name, "tabstops", 8)) { // FIXME swfdec_as_object_set_variable (object, SWFDEC_AS_STR_tabStops, &val); } } - else if (tag->name_length == 1 && !g_strncasecmp (tag->name, "p", 1)) + else if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "p", 1)) { - if (name_length == 5 && !g_strncasecmp (name, "align", 5)) + if (name_length == 5 && !g_ascii_strncasecmp (name, "align", 5)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_align, &val); } } - else if (tag->name_length == 4 && !g_strncasecmp (tag->name, "font", 4)) + else if (tag->name_length == 4 && !g_ascii_strncasecmp (tag->name, "font", 4)) { - if (name_length == 4 && !g_strncasecmp (name, "face", 4)) + if (name_length == 4 && !g_ascii_strncasecmp (name, "face", 4)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_font, &val); } - else if (name_length == 4 && !g_strncasecmp (name, "size", 4)) + else if (name_length == 4 && !g_ascii_strncasecmp (name, "size", 4)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_size, &val); } - else if (name_length == 5 && !g_strncasecmp (name, "color", 5)) + else if (name_length == 5 && !g_ascii_strncasecmp (name, "color", 5)) { SwfdecAsValue val_number; if (value_length != 7 || *value != '#') { - SWFDEC_AS_VALUE_SET_NUMBER (&val_number, 0); + val_number = swfdec_as_value_from_number (cx, 0); } else { int number; char *tail; @@ -185,36 +187,36 @@ swfdec_text_field_movie_html_tag_set_attribute (ParserData *data, number = g_ascii_strtoll (value + 1, &tail, 16); if (tail != value + 7) number = 0; - SWFDEC_AS_VALUE_SET_NUMBER (&val_number, number); + val_number = swfdec_as_value_from_number (cx, number); } swfdec_as_object_set_variable (object, SWFDEC_AS_STR_color, &val_number); } - else if (name_length == 13 && !g_strncasecmp (name, "letterspacing", 13)) + else if (name_length == 13 && !g_ascii_strncasecmp (name, "letterspacing", 13)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_letterSpacing, &val); } // special case: Don't parse kerning } - else if (tag->name_length == 1 && !g_strncasecmp (tag->name, "a", 1)) + else if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "a", 1)) { - if (name_length == 4 && !g_strncasecmp (name, "href", 4)) + if (name_length == 4 && !g_ascii_strncasecmp (name, "href", 4)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_url, &val); } - else if (name_length == 6 && !g_strncasecmp (name, "target", 6)) + else if (name_length == 6 && !g_ascii_strncasecmp (name, "target", 6)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_target, &val); } } if (data->style_sheet && - ((tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)) || - (tag->name_length == 4 && !g_strncasecmp (tag->name, "span", 4)) || - (tag->name_length == 1 && !g_strncasecmp (tag->name, "p", 1)))) + ((tag->name_length == 2 && !g_ascii_strncasecmp (tag->name, "li", 2)) || + (tag->name_length == 4 && !g_ascii_strncasecmp (tag->name, "span", 4)) || + (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "p", 1)))) { - if (name_length == 5 && !g_strncasecmp (name, "class", 5)) { + if (name_length == 5 && !g_ascii_strncasecmp (name, "class", 5)) { SwfdecTextFormat *format = swfdec_style_sheet_get_class_format ( data->style_sheet, swfdec_as_context_give_string (data->cx, g_strndup (value, value_length))); @@ -313,14 +315,14 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) if (close) { - if (name_length == 1 && !g_strncasecmp (name, "p", 1)) { + if (name_length == 1 && !g_ascii_strncasecmp (name, "p", 1)) { GSList *iter, *found; found = NULL; iter = data->tags_open; while (iter != NULL) { tag = iter->data; - if (tag->name_length == 1 && !g_strncasecmp (tag->name, "p", 1)) + if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "p", 1)) found = iter; iter = iter->next; } @@ -330,9 +332,9 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) while (iter != found) { tag = iter->data; iter = iter->next; - if ((tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)) || + if ((tag->name_length == 2 && !g_ascii_strncasecmp (tag->name, "li", 2)) || (tag->name_length == 10 && - !g_strncasecmp (tag->name, "textformat", 10))) + !g_ascii_strncasecmp (tag->name, "textformat", 10))) continue; swfdec_text_field_movie_html_parse_close_tag (data, tag, TRUE); } @@ -345,7 +347,7 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) if (data->tags_open != NULL) { tag = data->tags_open->data; if (name_length == tag->name_length && - !g_strncasecmp (name, tag->name, name_length)) + !g_ascii_strncasecmp (name, tag->name, name_length)) swfdec_text_field_movie_html_parse_close_tag (data, tag, FALSE); } } @@ -359,15 +361,15 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) SwfdecAsObject *object; SwfdecAsValue val; - if (name_length == 3 && !g_strncasecmp (name, "tab", 3)) + if (name_length == 3 && !g_ascii_strncasecmp (name, "tab", 3)) swfdec_text_buffer_append_text (data->text, "\t"); if (data->multiline) { - if (name_length == 2 && !g_strncasecmp (name, "br", 2)) + if (name_length == 2 && !g_ascii_strncasecmp (name, "br", 2)) { swfdec_text_buffer_append_text (data->text, "\n"); } - else if (name_length == 2 && !g_strncasecmp (name, "li", 1)) + else if (name_length == 2 && !g_ascii_strncasecmp (name, "li", 1)) { gsize length = swfdec_text_buffer_get_length (data->text); const char *s = swfdec_text_buffer_get_text (data->text); @@ -379,34 +381,34 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) tag = g_new0 (ParserTag, 1); tag->name = name; tag->name_length = name_length; - tag->format = SWFDEC_TEXT_FORMAT (swfdec_text_format_new (data->cx)); + tag->format = swfdec_text_format_new (data->cx); tag->index = swfdec_text_buffer_get_length (data->text); data->tags_open = g_slist_prepend (data->tags_open, tag); // set format based on tag if (tag->format != NULL) { - object = SWFDEC_AS_OBJECT (tag->format); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (tag->format)); SWFDEC_AS_VALUE_SET_BOOLEAN (&val, TRUE); - if (tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)) { + if (tag->name_length == 2 && !g_ascii_strncasecmp (tag->name, "li", 2)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_bullet, &val); - } else if (tag->name_length == 1 && !g_strncasecmp (tag->name, "b", 1)) { + } else if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "b", 1)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_bold, &val); - } else if (tag->name_length == 1 && !g_strncasecmp (tag->name, "i", 1)) { + } else if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "i", 1)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_italic, &val); - } else if (tag->name_length == 1 && !g_strncasecmp (tag->name, "u", 1)) { + } else if (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "u", 1)) { swfdec_as_object_set_variable (object, SWFDEC_AS_STR_underline, &val); } - else if (tag->name_length == 3 && !g_strncasecmp (tag->name, "img", 3)) + else if (tag->name_length == 3 && !g_ascii_strncasecmp (tag->name, "img", 3)) { SWFDEC_FIXME ("IMG tag support for TextField's HTML input missing"); } } if (data->style_sheet && - ((tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)) || - (tag->name_length == 1 && !g_strncasecmp (tag->name, "p", 1)))) { + ((tag->name_length == 2 && !g_ascii_strncasecmp (tag->name, "li", 2)) || + (tag->name_length == 1 && !g_ascii_strncasecmp (tag->name, "p", 1)))) { SwfdecTextFormat *format = swfdec_style_sheet_get_tag_format ( data->style_sheet, swfdec_as_context_give_string (data->cx, g_strndup (tag->name, tag->name_length))); @@ -497,8 +499,8 @@ swfdec_text_field_movie_html_parse (SwfdecTextFieldMovie *text, const char *str) data.cx = swfdec_gc_object_get_context (text); data.multiline = (data.cx->version < 7 || text->multiline); data.condense_white = text->condense_white; - if (text->style_sheet != NULL && SWFDEC_IS_STYLESHEET (text->style_sheet)) { - data.style_sheet = SWFDEC_STYLESHEET (text->style_sheet); + if (text->style_sheet != NULL && SWFDEC_IS_STYLE_SHEET (text->style_sheet->relay)) { + data.style_sheet = SWFDEC_STYLE_SHEET (text->style_sheet->relay); } else { data.style_sheet = NULL; } diff --git a/swfdec/swfdec_text_format.c b/swfdec/swfdec_text_format.c index 05f522e1..7ca20123 100644 --- a/swfdec/swfdec_text_format.c +++ b/swfdec/swfdec_text_format.c @@ -27,8 +27,9 @@ #include <pango/pangocairo.h> #include "swfdec_text_format.h" -#include "swfdec_as_native_function.h" #include "swfdec_as_array.h" +#include "swfdec_as_internal.h" +#include "swfdec_as_native_function.h" #include "swfdec_as_object.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" @@ -39,7 +40,7 @@ #include "swfdec_text_buffer.h" #include "swfdec_text_layout.h" -G_DEFINE_TYPE (SwfdecTextFormat, swfdec_text_format, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTextFormat, swfdec_text_format, SWFDEC_TYPE_AS_RELAY) static int property_offsets[] = { G_STRUCT_OFFSET (SwfdecTextFormat, attr.align), @@ -106,9 +107,9 @@ swfdec_text_format_get_string (SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, property)) { SWFDEC_AS_VALUE_SET_NULL (ret); @@ -127,20 +128,20 @@ swfdec_text_format_set_string (SwfdecAsObject *object, SwfdecAsContext *context; const char *s; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; context = swfdec_gc_object_get_context (format); - swfdec_as_value_to_integer (context, &argv[0]); - swfdec_as_value_to_number (context, &argv[0]); - s = swfdec_as_value_to_string (context, &argv[0]); + swfdec_as_value_to_integer (context, argv[0]); + swfdec_as_value_to_number (context, argv[0]); + s = swfdec_as_value_to_string (context, argv[0]); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { /* FIXME: reset to defaults here? */ SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, property); } else { @@ -156,9 +157,9 @@ swfdec_text_format_get_boolean (SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, property)) { SWFDEC_AS_VALUE_SET_NULL (ret); @@ -179,24 +180,24 @@ swfdec_text_format_set_boolean (SwfdecAsObject *object, SwfdecTextFormat *format; SwfdecAsContext *context; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; context = swfdec_gc_object_get_context (format); - swfdec_as_value_to_integer (context, &argv[0]); - swfdec_as_value_to_number (context, &argv[0]); - swfdec_as_value_to_string (context, &argv[0]); + swfdec_as_value_to_integer (context, argv[0]); + swfdec_as_value_to_number (context, argv[0]); + swfdec_as_value_to_string (context, argv[0]); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, property); } else { G_STRUCT_MEMBER (gboolean, format, property_offsets[property]) = - swfdec_as_value_to_boolean (context, &argv[0]); + swfdec_as_value_to_boolean (context, argv[0]); SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, property); } } @@ -207,16 +208,16 @@ swfdec_text_format_get_integer (SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, property)) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - SWFDEC_AS_VALUE_SET_NUMBER (ret, + *ret = swfdec_as_value_from_number (object->context, (double)G_STRUCT_MEMBER (int, format, property_offsets[property])); } @@ -227,9 +228,9 @@ swfdec_text_format_value_to_integer (SwfdecAsContext *cx, SwfdecAsValue *val, double d; int n; - n = swfdec_as_value_to_integer (cx, val); - d = swfdec_as_value_to_number (cx, val); - swfdec_as_value_to_string (cx, val); + n = swfdec_as_value_to_integer (cx, *val); + d = swfdec_as_value_to_number (cx, *val); + swfdec_as_value_to_string (cx, *val); if (cx->version >= 8) { if (isnan (d)) @@ -267,15 +268,15 @@ swfdec_text_format_set_integer (SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, property); } else { G_STRUCT_MEMBER (int, format, property_offsets[property]) = @@ -291,9 +292,9 @@ swfdec_text_format_do_get_align (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_ALIGN)) { SWFDEC_AS_VALUE_SET_NULL (ret); @@ -325,16 +326,16 @@ swfdec_text_format_do_set_align (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecTextFormat *format; const char *s; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; - swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_value_to_number (cx, &argv[0]); - s = swfdec_as_value_to_string (cx, &argv[0]); + swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_value_to_number (cx, argv[0]); + s = swfdec_as_value_to_string (cx, argv[0]); if (!g_ascii_strcasecmp (s, "left")) { format->attr.align = SWFDEC_TEXT_ALIGN_LEFT; @@ -402,16 +403,16 @@ swfdec_text_format_do_get_color (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR)) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - SWFDEC_AS_VALUE_SET_NUMBER (ret, format->attr.color); + *ret = swfdec_as_value_from_number (cx, format->attr.color); } static void @@ -420,20 +421,20 @@ swfdec_text_format_do_set_color (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) { + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR); } else { - format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_value_to_string (cx, &argv[0]); + format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_value_to_string (cx, argv[0]); SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR); } @@ -445,9 +446,9 @@ swfdec_text_format_do_get_display (SwfdecAsContext *cx, SwfdecAsObject *object, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_DISPLAY)) { @@ -477,14 +478,14 @@ swfdec_text_format_do_set_display (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecTextFormat *format; const char *s; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); - swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_value_to_number (cx, &argv[0]); - swfdec_as_value_to_string (cx, &argv[0]); - s = swfdec_as_value_to_string (cx, &argv[0]); // oh yes, let's call it twice + swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_value_to_number (cx, argv[0]); + swfdec_as_value_to_string (cx, argv[0]); + s = swfdec_as_value_to_string (cx, argv[0]); // oh yes, let's call it twice if (!g_ascii_strcasecmp (s, "none")) { format->attr.display = SWFDEC_TEXT_DISPLAY_NONE; @@ -592,16 +593,16 @@ swfdec_text_format_do_get_letter_spacing (SwfdecAsContext *cx, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_LETTER_SPACING)) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - SWFDEC_AS_VALUE_SET_NUMBER (ret, format->attr.letter_spacing); + *ret = swfdec_as_value_from_number (cx, format->attr.letter_spacing); } static void @@ -612,19 +613,19 @@ swfdec_text_format_do_set_letter_spacing (SwfdecAsContext *cx, SwfdecTextFormat *format; double d; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; - swfdec_as_value_to_integer (cx, &argv[0]); - d = swfdec_as_value_to_number (cx, &argv[0]); - swfdec_as_value_to_string (cx, &argv[0]); + swfdec_as_value_to_integer (cx, argv[0]); + d = swfdec_as_value_to_number (cx, argv[0]); + swfdec_as_value_to_string (cx, argv[0]); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_LETTER_SPACING); @@ -678,9 +679,9 @@ swfdec_text_format_do_get_tab_stops (SwfdecAsContext *cx, SwfdecAsValue val; SwfdecAsObject *array; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_TAB_STOPS)) { SWFDEC_AS_VALUE_SET_NULL (ret); @@ -689,8 +690,8 @@ swfdec_text_format_do_get_tab_stops (SwfdecAsContext *cx, array = swfdec_as_array_new (cx); for (i = 0; i < format->attr.n_tab_stops; i++) { - SWFDEC_AS_VALUE_SET_INT (&val, format->attr.tab_stops[i]); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &val); + val = swfdec_as_value_from_integer (cx, format->attr.tab_stops[i]); + swfdec_as_array_push (array, &val); } SWFDEC_AS_VALUE_SET_OBJECT (ret, array); } @@ -702,34 +703,34 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx, { SwfdecTextFormat *format; - if (!SWFDEC_IS_TEXT_FORMAT (object)) + if (object == NULL || !SWFDEC_IS_TEXT_FORMAT (object->relay)) return; - format = SWFDEC_TEXT_FORMAT (object); + format = SWFDEC_TEXT_FORMAT (object->relay); if (argc < 1) return; - swfdec_as_value_to_integer (cx, &argv[0]); - swfdec_as_value_to_number (cx, &argv[0]); - swfdec_as_value_to_string (cx, &argv[0]); + swfdec_as_value_to_integer (cx, argv[0]); + swfdec_as_value_to_number (cx, argv[0]); + swfdec_as_value_to_string (cx, argv[0]); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_NULL (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_NULL (argv[0])) { g_free (format->attr.tab_stops); format->attr.tab_stops = NULL; format->attr.n_tab_stops = 0; SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_TAB_STOPS); } - else if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) && - SWFDEC_IS_AS_ARRAY (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) + else if (SWFDEC_AS_VALUE_IS_OBJECT (argv[0]) && + SWFDEC_AS_VALUE_GET_OBJECT (argv[0])->array) { - SwfdecAsArray *array; + SwfdecAsObject *array; SwfdecAsValue val; guint i; int len; - array = SWFDEC_AS_ARRAY (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0])); + array = SWFDEC_AS_VALUE_GET_OBJECT (argv[0]); len = swfdec_as_array_get_length (array); if (!SWFDEC_TEXT_ATTRIBUTE_IS_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_TAB_STOPS)) { @@ -747,12 +748,12 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx, format->attr.tab_stops[i] = swfdec_text_format_value_to_integer (cx, &val, TRUE); } } - else if (SWFDEC_AS_VALUE_IS_STRING (&argv[0])) + else if (SWFDEC_AS_VALUE_IS_STRING (argv[0])) { gsize i; // special case: empty strings mean null - if (SWFDEC_AS_VALUE_GET_STRING (&argv[0]) == SWFDEC_AS_STR_EMPTY) { + if (SWFDEC_AS_VALUE_GET_STRING (argv[0]) == SWFDEC_AS_STR_EMPTY) { g_free (format->attr.tab_stops); format->attr.tab_stops = NULL; format->attr.n_tab_stops = 0; @@ -760,7 +761,7 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx, } else { int n = cx->version >= 8 ? G_MININT : 0; SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_TAB_STOPS); - format->attr.n_tab_stops = strlen (SWFDEC_AS_VALUE_GET_STRING (&argv[0])); + format->attr.n_tab_stops = strlen (SWFDEC_AS_VALUE_GET_STRING (argv[0])); format->attr.tab_stops = g_new (guint, format->attr.n_tab_stops); for (i = 0; i < format->attr.n_tab_stops; i++) { format->attr.tab_stops[i] = n; @@ -842,25 +843,25 @@ swfdec_text_format_getTextExtent (SwfdecAsContext *cx, SwfdecAsObject *object, layout = swfdec_text_layout_new (buffer); i = swfdec_text_layout_get_width (layout); - SWFDEC_AS_VALUE_SET_INT (&val, i); + val = swfdec_as_value_from_integer (cx, i); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_width, &val); if (i) i += 4; - SWFDEC_AS_VALUE_SET_INT (&val, i); + val = swfdec_as_value_from_integer (cx, i); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_textFieldWidth, &val); i = swfdec_text_layout_get_height (layout); - SWFDEC_AS_VALUE_SET_INT (&val, i); + val = swfdec_as_value_from_integer (cx, i); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_height, &val); if (i) i += 4; - SWFDEC_AS_VALUE_SET_INT (&val, i); + val = swfdec_as_value_from_integer (cx, i); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_textFieldHeight, &val); swfdec_text_layout_get_ascent_descent (layout, &i, &j); - SWFDEC_AS_VALUE_SET_INT (&val, i); + val = swfdec_as_value_from_integer (cx, i); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_ascent, &val); - SWFDEC_AS_VALUE_SET_INT (&val, j); + val = swfdec_as_value_from_integer (cx, j); swfdec_as_object_set_variable (obj, SWFDEC_AS_STR_descent, &val); SWFDEC_AS_VALUE_SET_OBJECT (ret, obj); @@ -949,13 +950,13 @@ swfdec_text_format_init_properties (SwfdecAsContext *cx) g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_TextFormat, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_get_variable (proto, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_align, swfdec_text_format_do_get_align, swfdec_text_format_do_set_align); @@ -1007,7 +1008,7 @@ swfdec_text_format_init_properties (SwfdecAsContext *cx) swfdec_text_format_do_get_url, swfdec_text_format_do_set_url); } -SWFDEC_AS_CONSTRUCTOR (110, 0, swfdec_text_format_construct, swfdec_text_format_get_type) +SWFDEC_AS_NATIVE (110, 0, swfdec_text_format_construct) void swfdec_text_format_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) @@ -1028,8 +1029,8 @@ swfdec_text_format_construct (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_STR_leading, NULL }; + SwfdecTextFormat *format; SwfdecAsFunction *function; - SwfdecAsObject *tmp; SwfdecAsValue val; guint i; @@ -1038,22 +1039,16 @@ swfdec_text_format_construct (SwfdecAsContext *cx, SwfdecAsObject *object, return; } - g_assert (SWFDEC_IS_TEXT_FORMAT (object)); - swfdec_text_format_init_properties (cx); - swfdec_text_format_clear (SWFDEC_TEXT_FORMAT (object)); + format = g_object_new (SWFDEC_TYPE_TEXT_FORMAT, "context", cx, NULL); + swfdec_text_format_clear (format); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (format)); - // FIXME: Need better way to create function without prototype/constructor - tmp = cx->Function; - cx->Function = NULL; - function = swfdec_as_native_function_new (cx, SWFDEC_AS_STR_getTextExtent, - swfdec_text_format_getTextExtent, NULL); - cx->Function = tmp; - if (function != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (function)); - swfdec_as_object_set_variable (object, SWFDEC_AS_STR_getTextExtent, &val); - } + function = swfdec_as_native_function_new_bare (cx, + SWFDEC_AS_STR_getTextExtent, swfdec_text_format_getTextExtent); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function))); + swfdec_as_object_set_variable (object, SWFDEC_AS_STR_getTextExtent, &val); for (i = 0; i < argc && arguments[i] != NULL; i++) { swfdec_as_object_set_variable (object, arguments[i], &argv[i]); @@ -1063,16 +1058,12 @@ swfdec_text_format_construct (SwfdecAsContext *cx, SwfdecAsObject *object, SwfdecTextFormat * swfdec_text_format_copy (SwfdecTextFormat *copy_from) { - SwfdecAsObject *object_to; SwfdecTextFormat *copy_to; g_return_val_if_fail (SWFDEC_IS_TEXT_FORMAT (copy_from), NULL); - object_to = swfdec_text_format_new_no_properties ( + copy_to = swfdec_text_format_new_no_properties ( swfdec_gc_object_get_context (copy_from)); - if (object_to == NULL) - return NULL; - copy_to = SWFDEC_TEXT_FORMAT (object_to); swfdec_text_attributes_copy (©_to->attr, ©_from->attr, -1); copy_to->values_set = copy_from->values_set; @@ -1080,10 +1071,11 @@ swfdec_text_format_copy (SwfdecTextFormat *copy_from) return copy_to; } -SwfdecAsObject * +SwfdecTextFormat * swfdec_text_format_new_no_properties (SwfdecAsContext *context) { - SwfdecAsObject *tmp, *ret; + SwfdecAsObject *object; + SwfdecTextFormat *ret; SwfdecAsFunction *function; SwfdecAsValue val; @@ -1091,24 +1083,21 @@ swfdec_text_format_new_no_properties (SwfdecAsContext *context) ret = g_object_new (SWFDEC_TYPE_TEXT_FORMAT, "context", context, NULL); - swfdec_text_format_clear (SWFDEC_TEXT_FORMAT (ret)); - swfdec_as_object_set_constructor_by_name (ret, SWFDEC_AS_STR_TextFormat, NULL); + swfdec_text_format_clear (ret); + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_TextFormat, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (ret)); // FIXME: Need better way to create function without prototype/constructor - tmp = context->Function; - context->Function = NULL; - function = swfdec_as_native_function_new (context, SWFDEC_AS_STR_getTextExtent, - swfdec_text_format_getTextExtent, NULL); - context->Function = tmp; - if (function != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (function)); - swfdec_as_object_set_variable (ret, SWFDEC_AS_STR_getTextExtent, &val); - } + function = swfdec_as_native_function_new_bare (context, + SWFDEC_AS_STR_getTextExtent, swfdec_text_format_getTextExtent); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (function))); + swfdec_as_object_set_variable (object, SWFDEC_AS_STR_getTextExtent, &val); return ret; } -SwfdecAsObject * +SwfdecTextFormat * swfdec_text_format_new (SwfdecAsContext *context) { g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); diff --git a/swfdec/swfdec_text_format.h b/swfdec/swfdec_text_format.h index a5f32a4e..c4ba7ad4 100644 --- a/swfdec/swfdec_text_format.h +++ b/swfdec/swfdec_text_format.h @@ -21,11 +21,9 @@ #ifndef _SWFDEC_TEXT_FORMAT_H_ #define _SWFDEC_TEXT_FORMAT_H_ -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_array.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_text_attributes.h> #include <swfdec/swfdec_types.h> -#include <swfdec/swfdec_script.h> G_BEGIN_DECLS @@ -40,7 +38,7 @@ typedef struct _SwfdecTextFormatClass SwfdecTextFormatClass; #define SWFDEC_TEXT_FORMAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_TEXT_FORMAT, SwfdecTextFormatClass)) struct _SwfdecTextFormat { - SwfdecAsObject object; + SwfdecAsRelay relay; SwfdecTextAttributes attr; @@ -48,24 +46,24 @@ struct _SwfdecTextFormat { }; struct _SwfdecTextFormatClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_text_format_get_type (void); -SwfdecAsObject * swfdec_text_format_new (SwfdecAsContext * context); -SwfdecAsObject * swfdec_text_format_new_no_properties (SwfdecAsContext * context); -void swfdec_text_format_set_defaults (SwfdecTextFormat * format); -SwfdecTextFormat * swfdec_text_format_copy (SwfdecTextFormat * copy_from); -void swfdec_text_format_add (SwfdecTextFormat * format, - const SwfdecTextFormat *from); -gboolean swfdec_text_format_equal (const SwfdecTextFormat *a, - const SwfdecTextFormat *b); -gboolean swfdec_text_format_equal_or_undefined (const SwfdecTextFormat *a, - const SwfdecTextFormat *b); -void swfdec_text_format_remove_different (SwfdecTextFormat * format, - const SwfdecTextFormat * from); -void swfdec_text_format_init_properties (SwfdecAsContext * cx); +SwfdecTextFormat * swfdec_text_format_new (SwfdecAsContext * context); +SwfdecTextFormat * swfdec_text_format_new_no_properties (SwfdecAsContext * context); +void swfdec_text_format_set_defaults (SwfdecTextFormat * format); +SwfdecTextFormat * swfdec_text_format_copy (SwfdecTextFormat * copy_from); +void swfdec_text_format_add (SwfdecTextFormat * format, + const SwfdecTextFormat *from); +gboolean swfdec_text_format_equal (const SwfdecTextFormat *a, + const SwfdecTextFormat *b); +gboolean swfdec_text_format_equal_or_undefined (const SwfdecTextFormat *a, + const SwfdecTextFormat *b); +void swfdec_text_format_remove_different (SwfdecTextFormat * format, + const SwfdecTextFormat *from); +void swfdec_text_format_init_properties (SwfdecAsContext * cx); G_END_DECLS #endif diff --git a/swfdec/swfdec_transform_as.c b/swfdec/swfdec_transform_as.c index dc4dbc54..29da1033 100644 --- a/swfdec/swfdec_transform_as.c +++ b/swfdec/swfdec_transform_as.c @@ -1,5 +1,6 @@ /* Swfdec * Copyright (C) 2007-2008 Pekka Lampila <pekka.lampila@iki.fi> + * 2008 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 @@ -24,17 +25,30 @@ #include "swfdec_transform_as.h" #include "swfdec_color_transform_as.h" -#include "swfdec_as_strings.h" #include "swfdec_as_internal.h" -#include "swfdec_as_frame_internal.h" +#include "swfdec_as_strings.h" #include "swfdec_debug.h" #include "swfdec_utils.h" -G_DEFINE_TYPE (SwfdecTransformAs, swfdec_transform_as, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTransformAs, swfdec_transform_as, SWFDEC_TYPE_AS_RELAY) + +static void +swfdec_transform_as_mark (SwfdecGcObject *object) +{ + SwfdecTransformAs *trans = SWFDEC_TRANSFORM_AS (object); + + if (trans->target != NULL) + swfdec_gc_object_mark (trans->target); + + SWFDEC_GC_OBJECT_CLASS (swfdec_transform_as_parent_class)->mark (object); +} static void swfdec_transform_as_class_init (SwfdecTransformAsClass *klass) { + SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); + + gc_class->mark = swfdec_transform_as_mark; } static void @@ -63,19 +77,19 @@ swfdec_transform_as_get_matrix (SwfdecAsContext *cx, SwfdecAsObject *object, swfdec_as_object_set_constructor_by_name (o, SWFDEC_AS_STR_flash, SWFDEC_AS_STR_geom, SWFDEC_AS_STR_Matrix, NULL); - SWFDEC_AS_VALUE_SET_NUMBER (&val, matrix->xx); + val = swfdec_as_value_from_number (cx, matrix->xx); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_a, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, matrix->yx); + val = swfdec_as_value_from_number (cx, matrix->yx); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_b, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, matrix->xy); + val = swfdec_as_value_from_number (cx, matrix->xy); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_c, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, matrix->yy); + val = swfdec_as_value_from_number (cx, matrix->yy); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_d, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, matrix->yy); + val = swfdec_as_value_from_number (cx, matrix->yy); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_d, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (matrix->x0)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (matrix->x0)); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_tx, &val); - SWFDEC_AS_VALUE_SET_NUMBER (&val, SWFDEC_TWIPS_TO_DOUBLE (matrix->y0)); + val = swfdec_as_value_from_number (cx, SWFDEC_TWIPS_TO_DOUBLE (matrix->y0)); swfdec_as_object_set_variable (o, SWFDEC_AS_STR_ty, &val); SWFDEC_AS_VALUE_SET_OBJECT (ret, o); @@ -136,15 +150,16 @@ swfdec_transform_as_get_colorTransform (SwfdecAsContext *cx, SwfdecAsValue *ret) { SwfdecTransformAs *transform; + SwfdecColorTransformAs *ctrans; SWFDEC_AS_CHECK (SWFDEC_TYPE_TRANSFORM_AS, &transform, ""); if (transform->target == NULL) return; - SWFDEC_AS_VALUE_SET_OBJECT (ret, - SWFDEC_AS_OBJECT (swfdec_color_transform_as_new_from_transform (cx, - &transform->target->color_transform))); + ctrans = swfdec_color_transform_as_new_from_transform (cx, + &transform->target->color_transform); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (ctrans))); } SWFDEC_AS_NATIVE (1106, 106, swfdec_transform_as_set_colorTransform) @@ -162,10 +177,10 @@ swfdec_transform_as_set_colorTransform (SwfdecAsContext *cx, if (self->target == NULL) return; - if (!SWFDEC_IS_COLOR_TRANSFORM_AS (color)) + if (color == NULL || !SWFDEC_IS_COLOR_TRANSFORM_AS (color->relay)) return; - transform_as = SWFDEC_COLOR_TRANSFORM_AS (color); + transform_as = SWFDEC_COLOR_TRANSFORM_AS (color->relay); swfdec_color_transform_get_transform (transform_as, &self->target->color_transform); } @@ -178,6 +193,7 @@ swfdec_transform_as_get_concatenatedColorTransform (SwfdecAsContext *cx, { SwfdecTransformAs *self; SwfdecColorTransform chain; + SwfdecColorTransformAs *ctrans; SwfdecMovie *movie; SWFDEC_AS_CHECK (SWFDEC_TYPE_TRANSFORM_AS, &self, ""); @@ -191,8 +207,8 @@ swfdec_transform_as_get_concatenatedColorTransform (SwfdecAsContext *cx, swfdec_color_transform_chain (&chain, &movie->color_transform, &chain); } - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT ( - swfdec_color_transform_as_new_from_transform (cx, &chain))); + ctrans = swfdec_color_transform_as_new_from_transform (cx, &chain); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (ctrans))); } SWFDEC_AS_NATIVE (1106, 108, swfdec_transform_as_set_concatenatedColorTransform) @@ -223,38 +239,42 @@ swfdec_transform_as_set_pixelBounds (SwfdecAsContext *cx, } // constructor -SWFDEC_AS_CONSTRUCTOR (1106, 0, swfdec_transform_as_construct, swfdec_transform_as_get_type) +SWFDEC_AS_NATIVE (1106, 0, swfdec_transform_as_construct) void swfdec_transform_as_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!cx->frame->construct) - return; + SwfdecTransformAs *trans; + SwfdecMovie *movie; - if (argc < 1 || - !SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) || - !SWFDEC_IS_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) { - SWFDEC_FIXME ("new Transform without movieclip should give undefined"); + if (!swfdec_as_context_is_constructing (cx)) return; - } - SWFDEC_TRANSFORM_AS (object)->target = - SWFDEC_MOVIE (SWFDEC_AS_VALUE_GET_OBJECT (&argv[0])); + SWFDEC_AS_CHECK (0, NULL, "M", &movie); + + trans = g_object_new (SWFDEC_TYPE_TRANSFORM_AS, "context", cx, NULL); + trans->target = SWFDEC_AS_VALUE_GET_MOVIE (argv[0]); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (trans)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } SwfdecTransformAs * swfdec_transform_as_new (SwfdecAsContext *context, SwfdecMovie *target) { SwfdecTransformAs *transform; + SwfdecAsObject *object; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (SWFDEC_IS_MOVIE (target), NULL); transform = g_object_new (SWFDEC_TYPE_TRANSFORM_AS, "context", context, NULL); + transform->target = target; - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (transform), + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_flash, SWFDEC_AS_STR_geom, SWFDEC_AS_STR_Transform, NULL); - transform->target = target; + + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (transform)); return transform; } diff --git a/swfdec/swfdec_transform_as.h b/swfdec/swfdec_transform_as.h index 8d21f497..55b3227c 100644 --- a/swfdec/swfdec_transform_as.h +++ b/swfdec/swfdec_transform_as.h @@ -1,5 +1,6 @@ /* Swfdec * Copyright (C) 2008 Pekka Lampila <pekka.lampila@iki.fi> + * 2008 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 @@ -21,8 +22,7 @@ #define _SWFDEC_TRANSFORM_H_ #include <swfdec/swfdec_movie.h> -#include <swfdec/swfdec_as_object.h> -#include <swfdec/swfdec_as_types.h> +#include <swfdec/swfdec_as_relay.h> G_BEGIN_DECLS @@ -37,13 +37,13 @@ typedef struct _SwfdecTransformAsClass SwfdecTransformAsClass; #define SWFDEC_TRANSFORM_AS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_TRANSFORM_AS, SwfdecTransformAsClass)) struct _SwfdecTransformAs { - SwfdecAsObject object; + SwfdecAsRelay relay; - SwfdecMovie * target; + SwfdecMovie * target; /* MovieClip in use or NULL if dead */ }; struct _SwfdecTransformAsClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass relay_class; }; GType swfdec_transform_as_get_type (void); diff --git a/swfdec/swfdec_types.h b/swfdec/swfdec_types.h index 0bc9bdfe..a29d50ec 100644 --- a/swfdec/swfdec_types.h +++ b/swfdec/swfdec_types.h @@ -38,12 +38,16 @@ typedef struct _SwfdecButton SwfdecButton; typedef struct _SwfdecCharacter SwfdecCharacter; typedef struct _SwfdecColorTransform SwfdecColorTransform; typedef struct _SwfdecDecoder SwfdecDecoder; +typedef struct _SwfdecDisplayObject SwfdecDisplayObject; +typedef struct _SwfdecDisplayObjectContainer SwfdecDisplayObjectContainer; typedef struct _SwfdecDraw SwfdecDraw; +typedef struct _SwfdecEventDispatcher SwfdecEventDispatcher; typedef struct _SwfdecEventList SwfdecEventList; typedef struct _SwfdecFilter SwfdecFilter; typedef struct _SwfdecFont SwfdecFont; typedef struct _SwfdecGraphic SwfdecGraphic; typedef struct _SwfdecImage SwfdecImage; +typedef struct _SwfdecInteractiveObject SwfdecInteractiveObject; typedef struct _SwfdecListener SwfdecListener; typedef struct _SwfdecMovie SwfdecMovie; typedef struct _SwfdecMovieClipLoader SwfdecMovieClipLoader; diff --git a/swfdec/swfdec_utils.c b/swfdec/swfdec_utils.c index 4108bf4a..9ce47bbb 100644 --- a/swfdec/swfdec_utils.c +++ b/swfdec/swfdec_utils.c @@ -81,35 +81,35 @@ gboolean swfdec_matrix_from_as_object (cairo_matrix_t *matrix, SwfdecAsObject *object) { SwfdecAsValue *val; - SwfdecAsContext *cx = swfdec_gc_object_get_context (object); + SwfdecAsContext *cx = object->context; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_a); if (val == NULL || - !isfinite (matrix->xx = swfdec_as_value_to_number (cx, val))) + !isfinite (matrix->xx = swfdec_as_value_to_number (cx, *val))) return FALSE; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_b); if (val == NULL || - !isfinite (matrix->yx = swfdec_as_value_to_number (cx, val))) + !isfinite (matrix->yx = swfdec_as_value_to_number (cx, *val))) return FALSE; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_c); if (val == NULL || - !isfinite (matrix->xy = swfdec_as_value_to_number (cx, val))) + !isfinite (matrix->xy = swfdec_as_value_to_number (cx, *val))) return FALSE; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_d); if (val == NULL || - !isfinite (matrix->yy = swfdec_as_value_to_number (cx, val))) + !isfinite (matrix->yy = swfdec_as_value_to_number (cx, *val))) return FALSE; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_tx); if (val == NULL) return FALSE; - matrix->x0 = swfdec_as_value_to_number (cx, val); + matrix->x0 = swfdec_as_value_to_number (cx, *val); if (!isfinite (matrix->x0)) matrix->x0 = 0; val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_ty); if (val == NULL) return FALSE; - matrix->y0 = swfdec_as_value_to_number (cx, val); + matrix->y0 = swfdec_as_value_to_number (cx, *val); if (!isfinite (matrix->y0)) matrix->y0 = 0; diff --git a/swfdec/swfdec_video_decoder.c b/swfdec/swfdec_video_decoder.c index c09a2930..43ddb985 100644 --- a/swfdec/swfdec_video_decoder.c +++ b/swfdec/swfdec_video_decoder.c @@ -65,6 +65,7 @@ swfdec_video_codec_get_format (guint codec) case SWFDEC_VIDEO_CODEC_H263: case SWFDEC_VIDEO_CODEC_VP6: case SWFDEC_VIDEO_CODEC_VP6_ALPHA: + case SWFDEC_VIDEO_CODEC_H264: return SWFDEC_VIDEO_FORMAT_I420; case SWFDEC_VIDEO_CODEC_UNDEFINED: case SWFDEC_VIDEO_CODEC_SCREEN: @@ -111,6 +112,8 @@ swfdec_video_decoder_prepare (guint codec, char **missing) /** * swfdec_video_decoder_new: * @codec: codec id + * @data: initialization data for the video codec or %NULL if none. Currently + * only used for H264 * * Creates a decoder suitable for decoding @format. If no decoder is available * for the given for mat, %NULL is returned. @@ -118,14 +121,14 @@ swfdec_video_decoder_prepare (guint codec, char **missing) * Returns: a new decoder or %NULL **/ SwfdecVideoDecoder * -swfdec_video_decoder_new (guint codec) +swfdec_video_decoder_new (guint codec, SwfdecBuffer *buffer) { SwfdecVideoDecoder *ret = NULL; GSList *walk; for (walk = video_codecs; walk; walk = walk->next) { SwfdecVideoDecoderClass *klass = g_type_class_ref (GPOINTER_TO_SIZE (walk->data)); - ret = klass->create (codec); + ret = klass->create (codec, buffer); g_type_class_unref (klass); if (ret) break; diff --git a/swfdec/swfdec_video_decoder.h b/swfdec/swfdec_video_decoder.h index 2b1b6636..091c42c6 100644 --- a/swfdec/swfdec_video_decoder.h +++ b/swfdec/swfdec_video_decoder.h @@ -32,6 +32,7 @@ G_BEGIN_DECLS #define SWFDEC_VIDEO_CODEC_VP6 4 #define SWFDEC_VIDEO_CODEC_VP6_ALPHA 5 #define SWFDEC_VIDEO_CODEC_SCREEN2 6 +#define SWFDEC_VIDEO_CODEC_H264 7 typedef enum { SWFDEC_VIDEO_FORMAT_RGBA, @@ -73,7 +74,8 @@ struct _SwfdecVideoDecoderClass /*< public >*/ gboolean (* prepare) (guint codec, char ** missing); - SwfdecVideoDecoder * (* create) (guint codec); + SwfdecVideoDecoder * (* create) (guint codec, + SwfdecBuffer * data); void (* decode) (SwfdecVideoDecoder * decoder, SwfdecBuffer * buffer); @@ -88,7 +90,8 @@ void swfdec_video_decoder_register (GType type); gboolean swfdec_video_decoder_prepare (guint codec, char ** missing); -SwfdecVideoDecoder * swfdec_video_decoder_new (guint codec); +SwfdecVideoDecoder * swfdec_video_decoder_new (guint codec, + SwfdecBuffer * buffer); void swfdec_video_decoder_decode (SwfdecVideoDecoder * decoder, SwfdecBuffer * buffer); diff --git a/swfdec/swfdec_video_decoder_gst.c b/swfdec/swfdec_video_decoder_gst.c index 893fc450..38f393d9 100644 --- a/swfdec/swfdec_video_decoder_gst.c +++ b/swfdec/swfdec_video_decoder_gst.c @@ -29,7 +29,7 @@ #include "swfdec_debug.h" static GstCaps * -swfdec_video_decoder_get_caps (guint codec) +swfdec_video_decoder_get_caps (guint codec, SwfdecBuffer *buffer) { GstCaps *caps; @@ -40,6 +40,17 @@ swfdec_video_decoder_get_caps (guint codec) case SWFDEC_VIDEO_CODEC_VP6: caps = gst_caps_from_string ("video/x-vp6-flash"); break; + case SWFDEC_VIDEO_CODEC_H264: + caps = gst_caps_from_string ("video/x-h264"); + if (buffer) { + GstBuffer *gstbuf; + + swfdec_buffer_ref (buffer); + gstbuf = swfdec_gst_buffer_new (buffer); + gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, gstbuf, NULL); + gst_buffer_unref (gstbuf); + } + break; default: return NULL; } @@ -75,7 +86,7 @@ swfdec_video_decoder_gst_prepare (guint codec, char **missing) GstCaps *caps; /* Check if we can handle the format at all. If not, no plugin will help us. */ - caps = swfdec_video_decoder_get_caps (codec); + caps = swfdec_video_decoder_get_caps (codec, NULL); if (caps == NULL) return FALSE; @@ -94,12 +105,12 @@ swfdec_video_decoder_gst_prepare (guint codec, char **missing) } static SwfdecVideoDecoder * -swfdec_video_decoder_gst_create (guint codec) +swfdec_video_decoder_gst_create (guint codec, SwfdecBuffer *buffer) { SwfdecVideoDecoderGst *player; GstCaps *srccaps, *sinkcaps; - srccaps = swfdec_video_decoder_get_caps (codec); + srccaps = swfdec_video_decoder_get_caps (codec, buffer); if (srccaps == NULL) return NULL; sinkcaps = swfdec_video_decoder_get_sink_caps (codec); diff --git a/swfdec/swfdec_video_decoder_screen.c b/swfdec/swfdec_video_decoder_screen.c index 42504b5b..c4c8be3f 100644 --- a/swfdec/swfdec_video_decoder_screen.c +++ b/swfdec/swfdec_video_decoder_screen.c @@ -34,7 +34,7 @@ swfdec_video_decoder_screen_prepare (guint codec, char **missing) } static SwfdecVideoDecoder * -swfdec_video_decoder_screen_create (guint codec) +swfdec_video_decoder_screen_create (guint codec, SwfdecBuffer *buffer) { if (codec != SWFDEC_VIDEO_CODEC_SCREEN) return NULL; diff --git a/swfdec/swfdec_video_decoder_vp6_alpha.c b/swfdec/swfdec_video_decoder_vp6_alpha.c index 8e443fcb..e7fba2c4 100644 --- a/swfdec/swfdec_video_decoder_vp6_alpha.c +++ b/swfdec/swfdec_video_decoder_vp6_alpha.c @@ -38,7 +38,7 @@ swfdec_video_decoder_vp6_alpha_prepare (guint codec, char **missing) } static SwfdecVideoDecoder * -swfdec_video_decoder_vp6_alpha_create (guint codec) +swfdec_video_decoder_vp6_alpha_create (guint codec, SwfdecBuffer *buffer) { if (codec != SWFDEC_VIDEO_CODEC_VP6_ALPHA) return NULL; @@ -128,8 +128,8 @@ swfdec_video_decoder_vp6_alpha_class_init (SwfdecVideoDecoderVp6AlphaClass *klas static void swfdec_video_decoder_vp6_alpha_init (SwfdecVideoDecoderVp6Alpha *vp6) { - vp6->image = swfdec_video_decoder_new (SWFDEC_VIDEO_CODEC_VP6); - vp6->mask = swfdec_video_decoder_new (SWFDEC_VIDEO_CODEC_VP6); + vp6->image = swfdec_video_decoder_new (SWFDEC_VIDEO_CODEC_VP6, NULL); + vp6->mask = swfdec_video_decoder_new (SWFDEC_VIDEO_CODEC_VP6, NULL); if (swfdec_video_decoder_get_error (vp6->image) || swfdec_video_decoder_get_error (vp6->mask)) { diff --git a/swfdec/swfdec_video_movie.c b/swfdec/swfdec_video_movie.c index 86aa47f2..611bdda9 100644 --- a/swfdec/swfdec_video_movie.c +++ b/swfdec/swfdec_video_movie.c @@ -27,6 +27,7 @@ #include "swfdec_player_internal.h" #include "swfdec_resource.h" #include "swfdec_renderer_internal.h" +#include "swfdec_sandbox.h" #include "swfdec_utils.h" #include "swfdec_video_provider.h" #include "swfdec_video_video_provider.h" @@ -101,81 +102,6 @@ swfdec_video_movie_set_ratio (SwfdecMovie *movie) swfdec_video_provider_set_ratio (video->provider, movie->original_ratio); } -static gboolean -swfdec_video_movie_get_variable (SwfdecAsObject *object, SwfdecAsObject *orig, - const char *variable, SwfdecAsValue *val, guint *flags) -{ - guint version = swfdec_gc_object_get_context (object)->version; - SwfdecVideoMovie *video; - - video = SWFDEC_VIDEO_MOVIE (object); - - if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_width) == 0) { - guint w; - if (video->provider) { - w = swfdec_video_provider_get_width (video->provider); - } else { - w = 0; - } - SWFDEC_AS_VALUE_SET_INT (val, w); - return TRUE; - } else if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_height) == 0) { - guint h; - if (video->provider) { - h = swfdec_video_provider_get_height (video->provider); - } else { - h = 0; - } - SWFDEC_AS_VALUE_SET_INT (val, h); - return TRUE; - } else if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_deblocking) == 0) { - SWFDEC_STUB ("Video.deblocking (get)"); - SWFDEC_AS_VALUE_SET_NUMBER (val, 0); - return TRUE; - } else if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_smoothing) == 0) { - SWFDEC_STUB ("Video.smoothing (get)"); - SWFDEC_AS_VALUE_SET_BOOLEAN (val, FALSE); - return TRUE; - } else { - return SWFDEC_AS_OBJECT_CLASS (swfdec_video_movie_parent_class)->get ( - object, orig, variable, val, flags); - } -} - -static void -swfdec_video_movie_set_variable (SwfdecAsObject *object, const char *variable, - const SwfdecAsValue *val, guint flags) -{ - guint version = swfdec_gc_object_get_context (object)->version; - - if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_deblocking) == 0) { - SWFDEC_STUB ("Video.deblocking (set)"); - } else if (swfdec_strcmp (version, variable, SWFDEC_AS_STR_smoothing) == 0) { - SWFDEC_STUB ("Video.smoothing (set)"); - } else { - SWFDEC_AS_OBJECT_CLASS (swfdec_video_movie_parent_class)->set (object, - variable, val, flags); - } -} - -static gboolean -swfdec_video_movie_foreach_variable (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) -{ - const char *native_variables[] = { SWFDEC_AS_STR_width, SWFDEC_AS_STR_height, - SWFDEC_AS_STR_smoothing, SWFDEC_AS_STR_deblocking, NULL }; - int i; - - for (i = 0; native_variables[i] != NULL; i++) { - SwfdecAsValue val; - swfdec_as_object_get_variable (object, native_variables[i], &val); - if (!func (object, native_variables[i], &val, 0, data)) - return FALSE; - } - - return SWFDEC_AS_OBJECT_CLASS (swfdec_video_movie_parent_class)->foreach ( - object, func, data); -} - static void swfdec_video_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix, gboolean last) { @@ -185,7 +111,8 @@ swfdec_video_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix, SWFDEC_TWIPS_SCALE_FACTOR * org->height }; swfdec_rect_transform (&rect, &rect, matrix); - swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), &rect); + swfdec_player_invalidate (SWFDEC_PLAYER (swfdec_gc_object_get_context (movie)), + movie, &rect); } static GObject * @@ -195,12 +122,18 @@ swfdec_video_movie_constructor (GType type, guint n_construct_properties, GObject *object; SwfdecMovie *movie; SwfdecVideo *video; + gboolean unuse; object = G_OBJECT_CLASS (swfdec_video_movie_parent_class)->constructor (type, n_construct_properties, construct_properties); movie = SWFDEC_MOVIE (object); - swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (movie), movie->resource->sandbox->Video); + unuse = swfdec_sandbox_try_use (movie->resource->sandbox); + swfdec_video_movie_init_properties (swfdec_gc_object_get_context (movie)); + swfdec_as_object_set_constructor_by_name (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (movie)), + SWFDEC_AS_STR_Video, NULL); + if (unuse) + swfdec_sandbox_unuse (movie->resource->sandbox); video = SWFDEC_VIDEO (movie->graphic); @@ -217,16 +150,11 @@ static void swfdec_video_movie_class_init (SwfdecVideoMovieClass * g_class) { GObjectClass *object_class = G_OBJECT_CLASS (g_class); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (g_class); SwfdecMovieClass *movie_class = SWFDEC_MOVIE_CLASS (g_class); object_class->constructor = swfdec_video_movie_constructor; object_class->dispose = swfdec_video_movie_dispose; - asobject_class->get = swfdec_video_movie_get_variable; - asobject_class->set = swfdec_video_movie_set_variable; - asobject_class->foreach = swfdec_video_movie_foreach_variable; - movie_class->update_extents = swfdec_video_movie_update_extents; movie_class->render = swfdec_video_movie_render; movie_class->invalidate = swfdec_video_movie_invalidate; diff --git a/swfdec/swfdec_video_movie.h b/swfdec/swfdec_video_movie.h index 36ea8205..3bdc52ac 100644 --- a/swfdec/swfdec_video_movie.h +++ b/swfdec/swfdec_video_movie.h @@ -55,5 +55,8 @@ void swfdec_video_movie_set_provider (SwfdecVideoMovie * movie, SwfdecVideoProvider * provider); void swfdec_video_movie_clear (SwfdecVideoMovie * movie); +/* in swfdec_video_movie_as.c */ +void swfdec_video_movie_init_properties (SwfdecAsContext * context); + G_END_DECLS #endif diff --git a/swfdec/swfdec_video_movie_as.c b/swfdec/swfdec_video_movie_as.c index 62492ff2..57ec895a 100644 --- a/swfdec/swfdec_video_movie_as.c +++ b/swfdec/swfdec_video_movie_as.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 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 @@ -25,7 +25,6 @@ #include "swfdec_as_internal.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" -#include "swfdec_internal.h" #include "swfdec_net_stream.h" #include "swfdec_player_internal.h" #include "swfdec_sandbox.h" @@ -40,13 +39,13 @@ swfdec_video_attach_video (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_VIDEO_MOVIE, &video, "O", &o); - if (!SWFDEC_IS_VIDEO_PROVIDER (o)) { + if (o == NULL || !SWFDEC_IS_VIDEO_PROVIDER (o->relay)) { SWFDEC_WARNING ("calling attachVideo without a NetStream object"); swfdec_video_movie_set_provider (video, NULL); return; } - swfdec_video_movie_set_provider (video, SWFDEC_VIDEO_PROVIDER (o)); + swfdec_video_movie_set_provider (video, SWFDEC_VIDEO_PROVIDER (o->relay)); } SWFDEC_AS_NATIVE (667, 2, swfdec_video_clear) @@ -61,30 +60,100 @@ swfdec_video_clear (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, swfdec_video_movie_clear (video); } +static void +swfdec_video_get_width (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SwfdecVideoMovie *video; + guint w; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_VIDEO_MOVIE, &video, ""); + + if (video->provider) { + w = swfdec_video_provider_get_width (video->provider); + } else { + w = 0; + } + *rval = swfdec_as_value_from_integer (cx, w); +} + +static void +swfdec_video_get_height (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SwfdecVideoMovie *video; + guint h; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_VIDEO_MOVIE, &video, ""); + + if (video->provider) { + h = swfdec_video_provider_get_height (video->provider); + } else { + h = 0; + } + *rval = swfdec_as_value_from_integer (cx, h); +} + +static void +swfdec_video_get_deblocking (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SWFDEC_STUB ("Video.deblocking (get)"); + *rval = swfdec_as_value_from_integer (cx, 0); +} + +static void +swfdec_video_set_deblocking (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SWFDEC_STUB ("Video.deblocking (set)"); +} + +static void +swfdec_video_get_smoothing (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SWFDEC_STUB ("Video.smoothing (get)"); + SWFDEC_AS_VALUE_SET_BOOLEAN (rval, TRUE); +} + +static void +swfdec_video_set_smoothing (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SWFDEC_STUB ("Video.smoothing (set)"); +} + void -swfdec_video_movie_init_context (SwfdecPlayer *player) +swfdec_video_movie_init_properties (SwfdecAsContext *cx) { - SwfdecAsContext *context; - SwfdecAsObject *video, *proto; SwfdecAsValue val; + SwfdecAsObject *video, *proto; + + // FIXME: We should only initialize if the prototype Object has not been + // initialized by any object's constructor with native properties + // (TextField, TextFormat, XML, XMLNode at least) + + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); - g_return_if_fail (SWFDEC_IS_PLAYER (player)); - - context = SWFDEC_AS_CONTEXT (player); - video = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_Video, NULL)); - SWFDEC_SANDBOX (context->global)->Video = video; - proto = swfdec_as_object_new_empty (context); - /* set the right properties on the Video object */ - SWFDEC_AS_VALUE_SET_OBJECT (&val, proto); - swfdec_as_object_set_variable_and_flags (video, SWFDEC_AS_STR_prototype, &val, - SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - /* set the right properties on the Video.prototype object */ - SWFDEC_AS_VALUE_SET_OBJECT (&val, video); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, - &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); - SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype); - swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, &val, - SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT); + swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_Video, &val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) + return; + video = SWFDEC_AS_VALUE_GET_OBJECT (val); + + swfdec_as_object_get_variable (video, SWFDEC_AS_STR_prototype, &val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) + return; + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); + + swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_width, + swfdec_video_get_width, NULL); + swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_height, + swfdec_video_get_height, NULL); + swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_deblocking, + swfdec_video_get_deblocking, swfdec_video_set_deblocking); + swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_smoothing, + swfdec_video_get_smoothing, swfdec_video_set_smoothing); } + diff --git a/swfdec/swfdec_video_video_provider.c b/swfdec/swfdec_video_video_provider.c index 74d6bd35..7e05d66d 100644 --- a/swfdec/swfdec_video_video_provider.c +++ b/swfdec/swfdec_video_video_provider.c @@ -99,7 +99,7 @@ swfdec_video_video_provider_get_image (SwfdecVideoProvider *prov, if (provider->decoder != NULL) { g_object_unref (provider->decoder); } - provider->decoder = swfdec_video_decoder_new (provider->video->format); + provider->decoder = swfdec_video_decoder_new (provider->video->format, NULL); if (provider->decoder == NULL) return NULL; frame = &g_array_index (provider->video->images, SwfdecVideoFrame, 0); diff --git a/swfdec/swfdec_xml.c b/swfdec/swfdec_xml.c index 988d7be7..bc7f44a8 100644 --- a/swfdec/swfdec_xml.c +++ b/swfdec/swfdec_xml.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org> * 2007 Pekka Lampila <pekka.lampila@iki.fi> * * This library is free software; you can redistribute it and/or @@ -48,6 +48,9 @@ swfdec_xml_mark (SwfdecGcObject *object) if (xml->doc_type_decl != NULL) swfdec_as_string_mark (xml->doc_type_decl); + swfdec_as_value_mark (&xml->content_type); + swfdec_as_value_mark (&xml->loaded); + SWFDEC_GC_OBJECT_CLASS (swfdec_xml_parent_class)->mark (object); } @@ -62,6 +65,8 @@ swfdec_xml_class_init (SwfdecXmlClass *klass) static void swfdec_xml_init (SwfdecXml *xml) { + SWFDEC_AS_VALUE_SET_STRING (&xml->content_type, + SWFDEC_AS_STR_application_x_www_form_urlencoded); } typedef struct { @@ -170,12 +175,12 @@ void swfdec_xml_do_escape (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + const char *s; char *escaped; - if (argc < 1) - return; + SWFDEC_AS_CHECK (0, NULL, "s", &s); - escaped = swfdec_xml_escape (swfdec_as_value_to_string (cx, &argv[0])); + escaped = swfdec_xml_escape (s); SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_as_context_give_string (cx, escaped)); } @@ -183,43 +188,40 @@ static void swfdec_xml_get_ignoreWhite (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); - SWFDEC_AS_VALUE_SET_BOOLEAN (ret, SWFDEC_XML (object)->ignore_white); + SWFDEC_AS_VALUE_SET_BOOLEAN (ret, xml->ignore_white); } static void swfdec_xml_set_ignoreWhite (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + char *ignore; - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &ignore); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - // special case, call toString of objects - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) - swfdec_as_value_to_string (cx, &argv[0]); - - SWFDEC_XML (object)->ignore_white = - swfdec_as_value_to_boolean (cx, &argv[0]); + xml->ignore_white = + swfdec_as_value_to_boolean (cx, argv[0]); } static void swfdec_xml_get_xmlDecl (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; - if (SWFDEC_XML (object)->xml_decl != NULL) { - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_XML (object)->xml_decl); + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); + + if (xml->xml_decl != NULL) { + SWFDEC_AS_VALUE_SET_STRING (ret, xml->xml_decl); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (ret); } @@ -229,28 +231,28 @@ static void swfdec_xml_set_xmlDecl (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + const char *s; - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &s); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - SWFDEC_XML (object)->xml_decl = swfdec_as_value_to_string (cx, &argv[0]); + xml->xml_decl = s; } static void swfdec_xml_get_docTypeDecl (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); - if (SWFDEC_XML (object)->doc_type_decl != NULL) { - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_XML (object)->doc_type_decl); + if (xml->doc_type_decl != NULL) { + SWFDEC_AS_VALUE_SET_STRING (ret, xml->doc_type_decl); } else { SWFDEC_AS_VALUE_SET_UNDEFINED (ret); } @@ -260,87 +262,82 @@ static void swfdec_xml_set_docTypeDecl (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + const char *s; - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &s); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - SWFDEC_XML (object)->doc_type_decl = - swfdec_as_value_to_string (cx, &argv[0]); + xml->doc_type_decl = s; } static void swfdec_xml_get_contentType (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; - *ret = SWFDEC_XML (object)->content_type; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); + + *ret = xml->content_type; } static void swfdec_xml_set_contentType (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + SwfdecAsValue val; - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "v", &val); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (val)) return; - SWFDEC_XML (object)->content_type = argv[0]; + xml->content_type = val; } static void swfdec_xml_get_loaded (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); - *ret = SWFDEC_XML (object)->loaded; + *ret = xml->loaded; } static void swfdec_xml_set_loaded (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; - - if (argc < 1) - return; + SwfdecXml *xml; + const char *ignore; - // special case, call toString of objects - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) - swfdec_as_value_to_string (cx, &argv[0]); + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &ignore); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - SWFDEC_AS_VALUE_SET_BOOLEAN (&SWFDEC_XML (object)->loaded, - swfdec_as_value_to_boolean (cx, &argv[0])); + SWFDEC_AS_VALUE_SET_BOOLEAN (&xml->loaded, + swfdec_as_value_to_boolean (cx, argv[0])); } static void swfdec_xml_get_status (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_XML (object)) - return; + SwfdecXml *xml; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, ""); - SWFDEC_AS_VALUE_SET_INT (ret, SWFDEC_XML (object)->status); + *ret = swfdec_as_value_from_integer (cx, xml->status); } static void @@ -348,23 +345,20 @@ swfdec_xml_set_status (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { double d; + SwfdecXml *xml; + const char *ignore; - if (!SWFDEC_IS_XML (object)) - return; - - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &ignore); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - swfdec_as_value_to_string (cx, &argv[0]); - d = swfdec_as_value_to_number (cx, &argv[0]); + d = swfdec_as_value_to_number (cx, argv[0]); if (!isfinite (d)) - SWFDEC_XML (object)->status = 0; + xml->status = 0; else - SWFDEC_XML (object)->status = d; + xml->status = d; } static const char * @@ -472,37 +466,39 @@ static void swfdec_xml_add_id_map (SwfdecXml *xml, SwfdecXmlNode *node, const char *id) { SwfdecAsObject *object; + SwfdecAsContext *context; SwfdecAsValue val; g_return_if_fail (SWFDEC_IS_XML (xml)); g_return_if_fail (SWFDEC_IS_XML_NODE (xml)); g_return_if_fail (id != NULL && id != SWFDEC_AS_STR_EMPTY); - if (swfdec_gc_object_get_context (xml)->version >= 8) { - if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (xml), + context = swfdec_gc_object_get_context (xml); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (xml)); + if (context->version >= 8) { + if (swfdec_as_object_get_variable (object, SWFDEC_AS_STR_idMap, &val)) { - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { - object = SWFDEC_AS_VALUE_GET_OBJECT (&val); + if (SWFDEC_AS_VALUE_IS_OBJECT (val)) { + object = SWFDEC_AS_VALUE_GET_OBJECT (val); } else { return; } } else { - object = swfdec_as_object_new_empty (swfdec_gc_object_get_context (xml)); + object = swfdec_as_object_new_empty (context); SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (xml), + swfdec_as_object_set_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (xml)), SWFDEC_AS_STR_idMap, &val); } - } else { - object = SWFDEC_AS_OBJECT (xml); } - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (node)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (node))); swfdec_as_object_set_variable (object, id, &val); } static const char * swfdec_xml_parse_attribute (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) { + SwfdecAsContext *cx; SwfdecAsValue val; const char *end, *name; char *text; @@ -517,9 +513,9 @@ swfdec_xml_parse_attribute (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) return strchr (p, '\0'); } + cx = swfdec_gc_object_get_context (node); text = g_strndup (p, end - p); - name = swfdec_as_context_give_string (swfdec_gc_object_get_context (node), - swfdec_xml_unescape (swfdec_gc_object_get_context (xml), text)); + name = swfdec_as_context_give_string (cx, swfdec_xml_unescape (cx, text)); g_free (text); p = end + strspn (end, " \r\n\t"); @@ -548,10 +544,8 @@ swfdec_xml_parse_attribute (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) char *unescaped; const char *value; - unescaped = swfdec_xml_unescape_len (swfdec_gc_object_get_context (xml), - p + 1, end - (p + 1), TRUE); - value = swfdec_as_context_give_string (swfdec_gc_object_get_context (node), - unescaped); + unescaped = swfdec_xml_unescape_len (cx, p + 1, end - (p + 1), TRUE); + value = swfdec_as_context_give_string (cx, unescaped); SWFDEC_AS_VALUE_SET_STRING (&val, value); swfdec_as_object_set_variable (node->attributes, name, &val); @@ -566,7 +560,8 @@ static const char * swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) { SwfdecAsObject *object; - SwfdecXmlNode *child = NULL; // surpress warning + SwfdecAsContext *cx; + SwfdecXmlNode *child = NULL; // supress warning char *name; const char *end; gboolean close; @@ -575,7 +570,8 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) g_return_val_if_fail (*p == '<', strchr (p, '\0')); g_return_val_if_fail (SWFDEC_IS_XML (xml), strchr (p, '\0')); - object = SWFDEC_AS_OBJECT (xml); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (xml)); + cx = swfdec_gc_object_get_context (xml); // closing tag or opening tag? if (*(p + 1) == '/') { @@ -600,21 +596,14 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) name = g_strndup (p + 1 , end - (p + 1)); - // create the new element - if (!close) { - child = swfdec_xml_node_new_no_properties ( - swfdec_gc_object_get_context (*node), SWFDEC_XML_NODE_ELEMENT, - swfdec_as_context_give_string (swfdec_gc_object_get_context (*node), - name)); - if (child == NULL) - return strchr (p, '\0'); - } - if (close) { end = strchr (end, '>'); if (end == NULL) end = strchr (p, '\0'); } else { + // create the new element + child = swfdec_xml_node_new_no_properties (cx, SWFDEC_XML_NODE_ELEMENT, + swfdec_as_context_give_string (cx, name)); end = end + strspn (end, " \r\n\t"); while (*end != '\0' && *end != '>' && (*end != '/' || *(end + 1) != '>')) { end = swfdec_xml_parse_attribute (xml, child, end); @@ -633,12 +622,10 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) } if (close) { - if ((*node)->parent != NULL && !g_ascii_strcasecmp ((*node)->name, name)) - { + if ((*node)->parent != NULL && !g_ascii_strcasecmp ((*node)->name, name)) { *node = (*node)->parent; - } - else // error - { + } else { + /* error */ SwfdecXmlNode *iter = *node; while (iter != NULL && (iter->name == NULL || g_ascii_strcasecmp (iter->name, name))) { iter = iter->parent; @@ -673,6 +660,7 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) static const char * swfdec_xml_parse_cdata (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) { + SwfdecAsContext *cx; SwfdecXmlNode *child; const char *end; char *text; @@ -693,11 +681,9 @@ swfdec_xml_parse_cdata (SwfdecXml *xml, SwfdecXmlNode *node, const char *p) text = g_strndup (p, end - p); - child = swfdec_xml_node_new_no_properties ( - swfdec_gc_object_get_context (node), SWFDEC_XML_NODE_TEXT, - swfdec_as_context_give_string (swfdec_gc_object_get_context (xml), text)); - if (child == NULL) - return strchr (p, '\0'); + cx = swfdec_gc_object_get_context (xml); + child = swfdec_xml_node_new_no_properties (cx, SWFDEC_XML_NODE_TEXT, + swfdec_as_context_give_string (cx, text)); swfdec_xml_node_appendChild (node, child); end += strlen("]]>"); @@ -725,15 +711,12 @@ swfdec_xml_parse_text (SwfdecXml *xml, SwfdecXmlNode *node, if (!ignore_white || strspn (p, " \t\r\n") < (gsize)(end - p)) { + SwfdecAsContext *cx = swfdec_gc_object_get_context (xml); text = g_strndup (p, end - p); - unescaped = swfdec_xml_unescape (swfdec_gc_object_get_context (xml), text); + unescaped = swfdec_xml_unescape (cx, text); g_free (text); - child = swfdec_xml_node_new_no_properties ( - swfdec_gc_object_get_context (node), SWFDEC_XML_NODE_TEXT, - swfdec_as_context_give_string (swfdec_gc_object_get_context (xml), - unescaped)); - if (child == NULL) - return strchr (p, '\0'); + child = swfdec_xml_node_new_no_properties (cx, SWFDEC_XML_NODE_TEXT, + swfdec_as_context_give_string (cx, unescaped)); swfdec_xml_node_appendChild (node, child); } @@ -753,7 +736,8 @@ swfdec_xml_parseXML (SwfdecXml *xml, const char *value) g_return_if_fail (SWFDEC_IS_XML (xml)); g_return_if_fail (value != NULL); - object = SWFDEC_AS_OBJECT (xml); + object = swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (xml)); + node = SWFDEC_XML_NODE (xml); swfdec_xml_node_removeChildren (SWFDEC_XML_NODE (xml)); xml->xml_decl = NULL; @@ -761,7 +745,6 @@ swfdec_xml_parseXML (SwfdecXml *xml, const char *value) xml->status = XML_PARSE_STATUS_OK; p = value; - node = SWFDEC_XML_NODE (xml); // special case: we only use the ignoreWhite set at the start ignore_white = xml->ignore_white; @@ -804,20 +787,15 @@ void swfdec_xml_do_parseXML (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { - if (!SWFDEC_IS_XML (object)) - return; - - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + SwfdecXml *xml; + const char *s; - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &s); - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - swfdec_xml_parseXML (SWFDEC_XML (object), - swfdec_as_value_to_string (cx, &argv[0])); + swfdec_xml_parseXML (xml, s); } SWFDEC_AS_NATIVE (253, 10, swfdec_xml_createElement) @@ -826,23 +804,18 @@ swfdec_xml_createElement (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecXmlNode *node; + SwfdecXml *xml; + const char *s; - if (!SWFDEC_IS_XML (object)) - return; - - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &s); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_ELEMENT, - swfdec_as_value_to_string (cx, &argv[0])); - if (node == NULL) - return; + node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_ELEMENT, s); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (node)); + SWFDEC_AS_VALUE_SET_OBJECT (rval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (node))); } SWFDEC_AS_NATIVE (253, 11, swfdec_xml_createTextNode) @@ -851,23 +824,18 @@ swfdec_xml_createTextNode (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecXmlNode *node; + SwfdecXml *xml; + const char *s; - if (!SWFDEC_IS_XML (object)) - return; - - if (argc < 1) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML, &xml, "s", &s); // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_TEXT, - swfdec_as_value_to_string (cx, &argv[0])); - if (node == NULL) - return; + node = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_TEXT, s); - SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (node)); + SWFDEC_AS_VALUE_SET_OBJECT (rval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (node))); } static void @@ -883,14 +851,14 @@ swfdec_xml_init_properties (SwfdecAsContext *cx) g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XML, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - xml = SWFDEC_AS_VALUE_GET_OBJECT (&val); + xml = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_get_variable (xml, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_ignoreWhite, swfdec_xml_get_ignoreWhite, swfdec_xml_set_ignoreWhite); @@ -907,32 +875,29 @@ swfdec_xml_init_properties (SwfdecAsContext *cx) swfdec_xml_get_loaded, swfdec_xml_set_loaded); } -SWFDEC_AS_CONSTRUCTOR (253, 9, swfdec_xml_construct, swfdec_xml_get_type) +SWFDEC_AS_NATIVE (253, 9, swfdec_xml_construct) void swfdec_xml_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + SwfdecXml *xml; + if (!swfdec_as_context_is_constructing (cx)) return; - g_assert (SWFDEC_IS_XML (object)); - swfdec_xml_init_properties (cx); - swfdec_xml_node_init_values (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE_ELEMENT, SWFDEC_AS_STR_EMPTY); - - SWFDEC_AS_VALUE_SET_STRING (&SWFDEC_XML (object)->content_type, - SWFDEC_AS_STR_application_x_www_form_urlencoded); + xml = g_object_new (SWFDEC_TYPE_XML, "context", cx, NULL); + swfdec_xml_node_init_values (SWFDEC_XML_NODE (xml), SWFDEC_XML_NODE_ELEMENT, SWFDEC_AS_STR_EMPTY); + SWFDEC_XML_NODE (xml)->name = NULL; + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (xml)); - SWFDEC_XML_NODE (object)->name = NULL; - - if (!SWFDEC_IS_VALID_XML_NODE (object)) + /* ??? */ + if (!SWFDEC_IS_VALID_XML_NODE (xml)) return; - if (argc >= 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) { - swfdec_xml_parseXML (SWFDEC_XML (object), - swfdec_as_value_to_string (cx, &argv[0])); + if (argc >= 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) { + swfdec_xml_parseXML (xml, swfdec_as_value_to_string (cx, argv[0])); } } @@ -940,20 +905,19 @@ SwfdecXml * swfdec_xml_new_no_properties (SwfdecAsContext *context, const char *str, gboolean ignore_white) { + SwfdecAsObject *object; SwfdecXml *xml; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); xml = g_object_new (SWFDEC_TYPE_XML, "context", context, NULL); - - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (xml), SWFDEC_AS_STR_XML, NULL); xml->ignore_white = ignore_white; - swfdec_xml_node_init_values (SWFDEC_XML_NODE (xml), SWFDEC_XML_NODE_ELEMENT, SWFDEC_AS_STR_EMPTY); - SWFDEC_AS_VALUE_SET_STRING (&xml->content_type, - SWFDEC_AS_STR_application_x_www_form_urlencoded); + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_XML, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (xml)); if (str != NULL) swfdec_xml_parseXML (xml, str); diff --git a/swfdec/swfdec_xml_node.c b/swfdec/swfdec_xml_node.c index 27bd0062..1d061bbf 100644 --- a/swfdec/swfdec_xml_node.c +++ b/swfdec/swfdec_xml_node.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org> * 2007 Pekka Lampila <pekka.lampila@iki.fi> * * This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ #include "swfdec_load_object.h" #include "swfdec_player_internal.h" -G_DEFINE_TYPE (SwfdecXmlNode, swfdec_xml_node, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecXmlNode, swfdec_xml_node, SWFDEC_TYPE_AS_RELAY) static void swfdec_xml_node_mark (SwfdecGcObject *object) @@ -50,11 +50,11 @@ swfdec_xml_node_mark (SwfdecGcObject *object) if (node->parent != NULL) swfdec_gc_object_mark (node->parent); if (node->children != NULL) - swfdec_gc_object_mark (node->children); + swfdec_as_object_mark (node->children); if (node->attributes != NULL) - swfdec_gc_object_mark (node->attributes); + swfdec_as_object_mark (node->attributes); if (node->child_nodes != NULL) - swfdec_gc_object_mark (node->child_nodes); + swfdec_as_object_mark (node->child_nodes); SWFDEC_GC_OBJECT_CLASS (swfdec_xml_node_parent_class)->mark (object); } @@ -95,11 +95,11 @@ swfdec_xml_node_get_child (SwfdecXmlNode *node, gint32 index_) swfdec_as_array_get_value (node->children, index_, &val); - g_return_val_if_fail (SWFDEC_AS_VALUE_IS_OBJECT (&val), NULL); + g_return_val_if_fail (SWFDEC_AS_VALUE_IS_OBJECT (val), NULL); g_return_val_if_fail (SWFDEC_IS_VALID_XML_NODE ( - SWFDEC_AS_VALUE_GET_OBJECT (&val)), NULL); + SWFDEC_AS_VALUE_GET_OBJECT (val)->relay), NULL); - return SWFDEC_XML_NODE (SWFDEC_AS_VALUE_GET_OBJECT (&val)); + return SWFDEC_XML_NODE (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay); } static gint32 @@ -129,16 +129,16 @@ swfdec_xml_node_update_child_nodes (SwfdecXmlNode *node) g_return_if_fail (SWFDEC_IS_VALID_XML_NODE (node)); // remove old - SWFDEC_AS_VALUE_SET_INT (&val, 0); - swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (node->child_nodes), + val = swfdec_as_value_from_integer (swfdec_gc_object_get_context (node), 0); + swfdec_as_object_set_variable (node->child_nodes, SWFDEC_AS_STR_length, &val); // add everything num = swfdec_xml_node_num_children (node); vals = g_malloc (sizeof (SwfdecAsValue) * num); for (i = 0; i < num; i++) { - SWFDEC_AS_VALUE_SET_OBJECT (&vals[i], - SWFDEC_AS_OBJECT (swfdec_xml_node_get_child (node, i))); + SWFDEC_AS_VALUE_SET_OBJECT (&vals[i], swfdec_as_relay_get_as_object ( + SWFDEC_AS_RELAY (swfdec_xml_node_get_child (node, i)))); } swfdec_as_array_append_with_flags (node->child_nodes, num, vals, SWFDEC_AS_VARIABLE_CONSTANT); @@ -154,7 +154,7 @@ swfdec_xml_node_get_attribute (SwfdecXmlNode *node, const char *name) g_return_val_if_fail (name != NULL, NULL); if (swfdec_as_object_get_variable (node->attributes, name, &val)) { - return swfdec_as_value_to_string (swfdec_gc_object_get_context (node), &val); + return swfdec_as_value_to_string (swfdec_gc_object_get_context (node), val); } else { return NULL; } @@ -178,8 +178,8 @@ swfdec_xml_node_getNamespaceForPrefix (SwfdecXmlNode *node, const char *prefix) do { swfdec_as_object_get_variable (node->attributes, var, &val); - if (!SWFDEC_AS_VALUE_IS_UNDEFINED (&val)) { - return swfdec_as_value_to_string (swfdec_gc_object_get_context (node), &val); + if (!SWFDEC_AS_VALUE_IS_UNDEFINED (val)) { + return swfdec_as_value_to_string (swfdec_gc_object_get_context (node), val); } node = node->parent; } while (node != NULL); @@ -210,7 +210,7 @@ swfdec_xml_node_foreach_find_namespace (SwfdecAsObject *object, return TRUE; // ok, now check if the uri is the one we are searching for - uri = swfdec_as_value_to_string (swfdec_gc_object_get_context (object), value); + uri = swfdec_as_value_to_string (object->context, *value); if (!g_ascii_strcasecmp (uri, fdata->namespace)) { fdata->variable = variable; return FALSE; @@ -255,21 +255,29 @@ static void swfdec_xml_node_get_nodeType (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - SWFDEC_AS_VALUE_SET_INT (ret, SWFDEC_XML_NODE (object)->type); + *ret = swfdec_as_value_from_integer (cx, node->type); } static void swfdec_xml_node_get_nodeValue (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->value != NULL) { - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_XML_NODE (object)->value); + if (node->value != NULL) { + SWFDEC_AS_VALUE_SET_STRING (ret, node->value); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -279,17 +287,15 @@ static void swfdec_xml_node_set_nodeValue (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + SwfdecXmlNode *node; const char *value; - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "s", &value); - if (argc < 1) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - value = swfdec_as_value_to_string (cx, &argv[0]); - - SWFDEC_XML_NODE (object)->value = value; + node->value = value; SWFDEC_AS_VALUE_SET_STRING (ret, value); } @@ -297,11 +303,15 @@ static void swfdec_xml_node_get_nodeName (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->name != NULL) { - SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_XML_NODE (object)->name); + if (node->name != NULL) { + SWFDEC_AS_VALUE_SET_STRING (ret, node->name); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -311,21 +321,19 @@ static void swfdec_xml_node_set_nodeName (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + SwfdecXmlNode *node; const char *name; - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "s", &name); - if (argc < 1) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0])) return; - name = swfdec_as_value_to_string (cx, &argv[0]); - - SWFDEC_XML_NODE (object)->name = name; + node->name = name; SWFDEC_AS_VALUE_SET_STRING (ret, name); } @@ -352,16 +360,19 @@ swfdec_xml_node_do_get_prefix (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { const char *prefix; + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); - if (!SWFDEC_IS_VALID_XML_NODE (object)) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->name == NULL) { + if (node->name == NULL) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - prefix = swfdec_xml_node_get_prefix (SWFDEC_XML_NODE (object)); + prefix = swfdec_xml_node_get_prefix (node); if (prefix != NULL) { SWFDEC_AS_VALUE_SET_STRING (ret, prefix); } else { @@ -374,16 +385,19 @@ swfdec_xml_node_get_localName (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { const char *p, *name; + SwfdecXmlNode *node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->name == NULL) { + if (node->name == NULL) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - name = SWFDEC_XML_NODE (object)->name; + name = node->name; p = strchr (name, ':'); if (p == NULL || *(p + 1) == '\0') { SWFDEC_AS_VALUE_SET_STRING (ret, name); @@ -392,7 +406,7 @@ swfdec_xml_node_get_localName (SwfdecAsContext *cx, SwfdecAsObject *object, p++; SWFDEC_AS_VALUE_SET_STRING (ret, - swfdec_as_context_give_string (cx, g_strdup (p))); + swfdec_as_context_get_string (cx, p)); } static void @@ -400,17 +414,20 @@ swfdec_xml_node_get_namespaceURI (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { const char *uri; + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); - if (!SWFDEC_IS_VALID_XML_NODE (object)) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->name == NULL) { + if (node->name == NULL) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - uri = swfdec_xml_node_getNamespaceForPrefix (SWFDEC_XML_NODE (object), - swfdec_xml_node_get_prefix (SWFDEC_XML_NODE (object))); + uri = swfdec_xml_node_getNamespaceForPrefix (node, + swfdec_xml_node_get_prefix (node)); if (uri != NULL) { SWFDEC_AS_VALUE_SET_STRING (ret, uri); } else { @@ -422,22 +439,30 @@ static void swfdec_xml_node_get_attributes (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_XML_NODE (object)->attributes); + SWFDEC_AS_VALUE_SET_OBJECT (ret, node->attributes); } static void swfdec_xml_node_get_parentNode (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (SWFDEC_XML_NODE (object)->parent != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (ret, - SWFDEC_AS_OBJECT (SWFDEC_XML_NODE (object)->parent)); + if (node->parent != NULL) { + SWFDEC_AS_VALUE_SET_OBJECT (ret, + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (node->parent))); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -465,13 +490,16 @@ swfdec_xml_node_get_previousSibling (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecXmlNode *sibling; + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); - if (!SWFDEC_IS_VALID_XML_NODE (object)) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - sibling = swfdec_xml_node_previousSibling (SWFDEC_XML_NODE (object)); + sibling = swfdec_xml_node_previousSibling (node); if (sibling != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (sibling)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (sibling))); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -496,13 +524,16 @@ swfdec_xml_node_get_nextSibling (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecXmlNode *sibling; + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); - if (!SWFDEC_IS_VALID_XML_NODE (object)) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - sibling = swfdec_xml_node_nextSibling (SWFDEC_XML_NODE (object)); + sibling = swfdec_xml_node_nextSibling (node); if (sibling != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (sibling)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (sibling))); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -513,13 +544,16 @@ swfdec_xml_node_get_firstChild (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecXmlNode *child; + SwfdecXmlNode *node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - child = swfdec_xml_node_get_child (SWFDEC_XML_NODE (object), 0); + child = swfdec_xml_node_get_child (node, 0); if (child != NULL) { - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (child)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (child))); } else { SWFDEC_AS_VALUE_SET_NULL (ret); } @@ -531,31 +565,37 @@ swfdec_xml_node_get_lastChild (SwfdecAsContext *cx, SwfdecAsObject *object, { gint32 num; SwfdecXmlNode *child; + SwfdecXmlNode *node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - num = swfdec_xml_node_num_children (SWFDEC_XML_NODE (object)); + num = swfdec_xml_node_num_children (node); if (num == 0) { SWFDEC_AS_VALUE_SET_NULL (ret); return; } - child = swfdec_xml_node_get_child (SWFDEC_XML_NODE (object), num - 1); + child = swfdec_xml_node_get_child (node, num - 1); g_assert (child != NULL); - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (child)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (child))); } static void swfdec_xml_node_get_childNodes (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - SWFDEC_AS_VALUE_SET_OBJECT (ret, - SWFDEC_AS_OBJECT (SWFDEC_XML_NODE (object)->child_nodes)); + SWFDEC_AS_VALUE_SET_OBJECT (ret, node->child_nodes); } SWFDEC_AS_NATIVE (253, 7, swfdec_xml_node_do_getNamespaceForPrefix) @@ -563,9 +603,12 @@ void swfdec_xml_node_do_getNamespaceForPrefix (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *namespace; + const char *namespace, *prefix; + SwfdecXmlNode *node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "|s", &prefix); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; if (argc < 1) { @@ -573,8 +616,7 @@ swfdec_xml_node_do_getNamespaceForPrefix (SwfdecAsContext *cx, return; } - namespace = swfdec_xml_node_getNamespaceForPrefix (SWFDEC_XML_NODE (object), - swfdec_as_value_to_string (cx, &argv[0])); + namespace = swfdec_xml_node_getNamespaceForPrefix (node, prefix); if (namespace != NULL) { SWFDEC_AS_VALUE_SET_STRING (ret, namespace); @@ -588,9 +630,12 @@ void swfdec_xml_node_do_getPrefixForNamespace (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - const char *prefix; + const char *namespace, *prefix; + SwfdecXmlNode *node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "|s", &namespace); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; if (argc < 1) { @@ -598,8 +643,7 @@ swfdec_xml_node_do_getPrefixForNamespace (SwfdecAsContext *cx, return; } - prefix = swfdec_xml_node_getPrefixForNamespace (SWFDEC_XML_NODE (object), - swfdec_as_value_to_string (cx, &argv[0])); + prefix = swfdec_xml_node_getPrefixForNamespace (node, namespace); if (prefix != NULL) { SWFDEC_AS_VALUE_SET_STRING (ret, prefix); @@ -633,8 +677,6 @@ swfdec_xml_node_clone (SwfdecAsContext *cx, SwfdecXmlNode *node, gboolean deep) g_assert (SWFDEC_IS_VALID_XML_NODE (node)); new = swfdec_xml_node_new (cx, SWFDEC_XML_NODE_ELEMENT, SWFDEC_AS_STR_EMPTY); - if (new == NULL) - return NULL; new->valid = TRUE; new->type = node->type; @@ -653,10 +695,8 @@ swfdec_xml_node_clone (SwfdecAsContext *cx, SwfdecXmlNode *node, gboolean deep) for (i = 0; i < num; i++) { child = swfdec_xml_node_get_child (node, i); child_new = swfdec_xml_node_clone (cx, child, TRUE); - if (child_new == NULL) - return NULL; child_new->parent = new; - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (child_new)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (child_new))); swfdec_as_array_push (new->children, &val); } @@ -671,23 +711,17 @@ void swfdec_xml_node_cloneNode (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - gboolean deep; - SwfdecXmlNode *new; - - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + gboolean deep = FALSE; + SwfdecXmlNode *new, *node; - if (argc >= 1) { - deep = swfdec_as_value_to_boolean (cx, &argv[0]); - } else { - deep = FALSE; - } + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "|b", &deep); - new = swfdec_xml_node_clone (cx, SWFDEC_XML_NODE (object), deep); - if (new == NULL) + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (new)); + new = swfdec_xml_node_clone (cx, node, deep); + + SWFDEC_AS_VALUE_SET_OBJECT (ret, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (new))); } void @@ -713,10 +747,14 @@ void swfdec_xml_node_do_removeNode (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - swfdec_xml_node_removeNode (SWFDEC_XML_NODE (object)); + swfdec_xml_node_removeNode (node); } void @@ -755,7 +793,7 @@ swfdec_xml_node_insertAt (SwfdecXmlNode *node, SwfdecXmlNode *child, gint32 ind) swfdec_xml_node_removeNode (child); // insert child to node's child_nodes array - SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (child)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (child))); swfdec_as_array_insert (node->children, ind, &val); swfdec_xml_node_update_child_nodes (node); @@ -770,38 +808,26 @@ swfdec_xml_node_insertBefore (SwfdecAsContext *cx, SwfdecAsObject *object, { gint32 i; SwfdecAsObject *child, *point; + SwfdecXmlNode *node, *child_node, *point_node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "oo", &child, &point); - if (argc < 2) + if (!SWFDEC_IS_VALID_XML_NODE (node) || + !SWFDEC_IS_VALID_XML_NODE (child->relay) || + !SWFDEC_IS_VALID_XML_NODE (point->relay)) return; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) - return; - - child = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - if (!SWFDEC_IS_VALID_XML_NODE (child)) - return; + child_node = SWFDEC_XML_NODE (child->relay); + point_node = SWFDEC_XML_NODE (point->relay); // special case - if (swfdec_xml_node_index_of_child (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE (child)) != -1) - return; - - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) + if (swfdec_xml_node_index_of_child (node, child_node) != -1) return; - point = SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]); - if (!SWFDEC_IS_VALID_XML_NODE (point)) - return; - - i = swfdec_xml_node_index_of_child (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE (point)); + i = swfdec_xml_node_index_of_child (node, point_node); if (i != -1) { - swfdec_xml_node_insertAt (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE (child), i); + swfdec_xml_node_insertAt (node, child_node, i); } } @@ -822,27 +848,21 @@ swfdec_xml_node_do_appendChild (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SwfdecAsObject *child; + SwfdecXmlNode *node, *child_node; - if (!SWFDEC_IS_VALID_XML_NODE (object)) - return; + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, "o", &child); - if (argc < 1) + if (!SWFDEC_IS_VALID_XML_NODE (node) || + !SWFDEC_IS_VALID_XML_NODE (child->relay)) return; - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0])) - return; - - child = SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]); - if (!SWFDEC_IS_VALID_XML_NODE (child)) - return; + child_node = SWFDEC_XML_NODE (child->relay); // special case - if (swfdec_xml_node_index_of_child (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE (child)) != -1) + if (swfdec_xml_node_index_of_child (node, child_node) != -1) return; - swfdec_xml_node_appendChild (SWFDEC_XML_NODE (object), - SWFDEC_XML_NODE (child)); + swfdec_xml_node_appendChild (node, child_node); } SWFDEC_AS_NATIVE (253, 5, swfdec_xml_node_hasChildNodes) @@ -850,14 +870,15 @@ void swfdec_xml_node_hasChildNodes (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - if (swfdec_xml_node_num_children (SWFDEC_XML_NODE (object)) > 0) { - SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE); - } else { - SWFDEC_AS_VALUE_SET_BOOLEAN (ret, FALSE); - } + SWFDEC_AS_VALUE_SET_BOOLEAN (ret, + swfdec_xml_node_num_children (node) > 0); } static gboolean @@ -871,7 +892,7 @@ swfdec_xml_node_foreach_string_append_attribute (SwfdecAsObject *object, string = g_string_append (string, variable); string = g_string_append (string, "=\""); escaped = - swfdec_xml_escape (swfdec_as_value_to_string (swfdec_gc_object_get_context (object), value)); + swfdec_xml_escape (swfdec_as_value_to_string (object->context, *value)); string = g_string_append (string, escaped); g_free (escaped); string = g_string_append (string, "\""); @@ -883,12 +904,9 @@ static const char * swfdec_xml_node_toString (SwfdecXmlNode *node) { GString *string; - SwfdecAsObject *object; g_assert (SWFDEC_IS_VALID_XML_NODE (node)); - object = SWFDEC_AS_OBJECT (node); - string = g_string_new (""); if (SWFDEC_IS_XML (node)) { if (SWFDEC_XML (node)->xml_decl != NULL) @@ -952,7 +970,7 @@ swfdec_xml_node_toString (SwfdecXmlNode *node) } } - return swfdec_as_context_give_string (swfdec_gc_object_get_context (object), + return swfdec_as_context_give_string (swfdec_gc_object_get_context (node), g_string_free (string, FALSE)); } @@ -961,27 +979,30 @@ void swfdec_xml_node_do_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (!SWFDEC_IS_VALID_XML_NODE (object)) + SwfdecXmlNode *node; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_XML_NODE, &node, ""); + + if (!SWFDEC_IS_VALID_XML_NODE (node)) return; - SWFDEC_AS_VALUE_SET_STRING (ret, - swfdec_xml_node_toString (SWFDEC_XML_NODE (object))); + SWFDEC_AS_VALUE_SET_STRING (ret, swfdec_xml_node_toString (node)); } void swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value) { - SwfdecAsObject *object; + SwfdecAsContext *cx; g_return_if_fail (SWFDEC_IS_XML_NODE (node)); g_return_if_fail (value != NULL); - object = SWFDEC_AS_OBJECT (node); + cx = swfdec_gc_object_get_context (node); node->valid = TRUE; node->parent = NULL; - node->children = SWFDEC_AS_ARRAY (swfdec_as_array_new (swfdec_gc_object_get_context (object))); - node->attributes = swfdec_as_object_new_empty (swfdec_gc_object_get_context (object)); + node->children = swfdec_as_array_new (cx); + node->attributes = swfdec_as_object_new_empty (cx); node->type = type; if (node->type == SWFDEC_XML_NODE_ELEMENT) { node->name = value; @@ -989,7 +1010,7 @@ swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value) node->value = value; } - node->child_nodes = SWFDEC_AS_ARRAY (swfdec_as_array_new (swfdec_gc_object_get_context (object))); + node->child_nodes = swfdec_as_array_new (cx); } static void @@ -1005,14 +1026,14 @@ swfdec_xml_node_init_properties (SwfdecAsContext *cx) g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx)); swfdec_as_object_get_variable (cx->global, SWFDEC_AS_STR_XMLNode, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - node = SWFDEC_AS_VALUE_GET_OBJECT (&val); + node = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_get_variable (node, SWFDEC_AS_STR_prototype, &val); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&val)) + if (!SWFDEC_AS_VALUE_IS_OBJECT (val)) return; - proto = SWFDEC_AS_VALUE_GET_OBJECT (&val); + proto = SWFDEC_AS_VALUE_GET_OBJECT (val); swfdec_as_object_add_native_variable (proto, SWFDEC_AS_STR_nodeType, swfdec_xml_node_get_nodeType, NULL); @@ -1047,13 +1068,17 @@ swfdec_xml_node_new_no_properties (SwfdecAsContext *context, SwfdecXmlNodeType type, const char* value) { SwfdecXmlNode *node; + SwfdecAsObject *object; g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (value != NULL, NULL); - node = g_object_new (SWFDEC_TYPE_XML_NODE, "context", context, NULL); - swfdec_as_object_set_constructor_by_name (SWFDEC_AS_OBJECT (node), + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, SWFDEC_AS_STR_XMLNode, NULL); + + node = g_object_new (SWFDEC_TYPE_XML_NODE, "context", context, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (node)); swfdec_xml_node_init_values (node, type, value); return node; @@ -1070,29 +1095,29 @@ swfdec_xml_node_new (SwfdecAsContext *context, SwfdecXmlNodeType type, return swfdec_xml_node_new_no_properties (context, type, value); } -SWFDEC_AS_CONSTRUCTOR (253, 0, swfdec_xml_node_construct, swfdec_xml_node_get_type) +SWFDEC_AS_NATIVE (253, 0, swfdec_xml_node_construct) void swfdec_xml_node_construct (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + SwfdecXmlNode *node; + const char *value; + int type; + if (!swfdec_as_context_is_constructing (cx)) return; - g_assert (SWFDEC_IS_XML_NODE (object)); + SWFDEC_AS_CHECK (0, NULL, "is", &type, &value); - if (argc < 2) - return; - - // special case - if (SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]) || - SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[1])) + if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) || + SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) return; swfdec_xml_node_init_properties (cx); - swfdec_xml_node_init_values (SWFDEC_XML_NODE (object), - swfdec_as_value_to_integer (cx, &argv[0]), - swfdec_as_value_to_string (cx, &argv[1])); + node = g_object_new (SWFDEC_TYPE_XML_NODE, "context", cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (node)); + swfdec_xml_node_init_values (node, type, value); SWFDEC_AS_VALUE_SET_OBJECT (ret, object); } diff --git a/swfdec/swfdec_xml_node.h b/swfdec/swfdec_xml_node.h index 49b5d48e..0b1286d0 100644 --- a/swfdec/swfdec_xml_node.h +++ b/swfdec/swfdec_xml_node.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org> * 2007 Pekka Lampila <pekka.lampila@iki.fi> * * This library is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #define _SWFDEC_XML_NODE_H_ #include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_as_relay.h> #include <swfdec/swfdec_types.h> #include <swfdec/swfdec_script.h> #include <swfdec/swfdec_player.h> @@ -53,10 +54,11 @@ typedef struct _SwfdecXmlNodeClass SwfdecXmlNodeClass; #define SWFDEC_XML_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_XML_NODE, SwfdecXmlNodeClass)) #define SWFDEC_XML_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_XML_NODE, SwfdecXmlNodeClass)) -#define SWFDEC_IS_VALID_XML_NODE(obj) (SWFDEC_IS_XML_NODE (obj) && SWFDEC_XML_NODE (obj)->valid) +#define SWFDEC_IS_VALID_XML_NODE(obj) (SWFDEC_IS_XML_NODE (obj) && SWFDEC_XML_NODE (obj)->valid) +#define SWFDEC_VALID_XML_NODE_FROM_AS_OBJECT(obj) (SWFDEC_IS_VALID_XML_NODE (SWFDEC_XML_NODE ((obj)->relay) ? SWFDEC_XML_NODE ((obj)->relay) : NULL) struct _SwfdecXmlNode { - SwfdecAsObject object; + SwfdecAsRelay relay; gboolean valid; @@ -65,17 +67,17 @@ struct _SwfdecXmlNode { const char *value; // for type != element SwfdecXmlNode *parent; - SwfdecAsArray *children; + SwfdecAsObject *children; SwfdecAsObject *attributes; // visible trough childNodes property, if modified by the user directly, the // changes are not visible in children and will get overwritten by next // internal change - SwfdecAsArray *child_nodes; + SwfdecAsObject *child_nodes; }; struct _SwfdecXmlNodeClass { - SwfdecAsObjectClass object_class; + SwfdecAsRelayClass object_class; }; GType swfdec_xml_node_get_type (void); diff --git a/swfdec/swfdec_xml_socket.c b/swfdec/swfdec_xml_socket.c index 64f7a2ee..a55ac96e 100644 --- a/swfdec/swfdec_xml_socket.c +++ b/swfdec/swfdec_xml_socket.c @@ -32,24 +32,18 @@ #include "swfdec_movie.h" #include "swfdec_player_internal.h" -static GQuark xml_socket_quark = 0; - static void swfdec_xml_socket_ensure_closed (SwfdecXmlSocket *xml) { + SwfdecPlayer *player = SWFDEC_PLAYER (swfdec_gc_object_get_context (xml)); + if (xml->socket == NULL) return; swfdec_stream_set_target (SWFDEC_STREAM (xml->socket), NULL); g_object_unref (xml->socket); xml->socket = NULL; - - swfdec_player_unroot (SWFDEC_PLAYER (swfdec_gc_object_get_context (xml)), xml); - if (xml->target_owner) { - g_object_steal_qdata (G_OBJECT (xml->target), xml_socket_quark); - xml->target_owner = FALSE; - } - xml->target = NULL; + player->priv->xml_sockets = g_slist_remove (player->priv->xml_sockets, xml); } /*** SWFDEC_STREAM_TARGET ***/ @@ -163,7 +157,7 @@ swfdec_xml_socket_stream_target_init (SwfdecStreamTargetInterface *iface) /*** SWFDEC_XML_SOCKET ***/ -G_DEFINE_TYPE_WITH_CODE (SwfdecXmlSocket, swfdec_xml_socket, SWFDEC_TYPE_AS_OBJECT, +G_DEFINE_TYPE_WITH_CODE (SwfdecXmlSocket, swfdec_xml_socket, SWFDEC_TYPE_GC_OBJECT, G_IMPLEMENT_INTERFACE (SWFDEC_TYPE_STREAM_TARGET, swfdec_xml_socket_stream_target_init)) static void @@ -171,7 +165,7 @@ swfdec_xml_socket_mark (SwfdecGcObject *object) { SwfdecXmlSocket *sock = SWFDEC_XML_SOCKET (object); - swfdec_gc_object_mark (sock->target); + swfdec_as_object_mark (sock->target); swfdec_gc_object_mark (sock->sandbox); SWFDEC_GC_OBJECT_CLASS (swfdec_xml_socket_parent_class)->mark (object); @@ -208,34 +202,23 @@ swfdec_xml_socket_init (SwfdecXmlSocket *xml) xml->queue = swfdec_buffer_queue_new (); } -static void -swfdec_xml_socket_target_gone (gpointer xmlp) -{ - SwfdecXmlSocket *xml = xmlp; - - xml->target_owner = FALSE; -} - static SwfdecXmlSocket * swfdec_xml_socket_create (SwfdecAsObject *target, SwfdecSandbox *sandbox, const char *hostname, guint port) { - SwfdecAsContext *cx = swfdec_gc_object_get_context (target); + SwfdecPlayer *player = SWFDEC_PLAYER (target->context); SwfdecXmlSocket *xml; SwfdecSocket *sock; SWFDEC_FIXME ("implement security checks please"); - sock = swfdec_player_create_socket (SWFDEC_PLAYER (cx), hostname, port); + sock = swfdec_player_create_socket (player, hostname, port); if (sock == NULL) return NULL; - xml = g_object_new (SWFDEC_TYPE_XML_SOCKET, "context", cx, NULL); - swfdec_player_root (SWFDEC_PLAYER (cx), xml, (GFunc) swfdec_gc_object_mark); + xml = g_object_new (SWFDEC_TYPE_XML_SOCKET, "context", player, NULL); + /* we prepend here, so send etc find the newest socket */ + player->priv->xml_sockets = g_slist_prepend (player->priv->xml_sockets, xml); - if (xml_socket_quark == 0) - xml_socket_quark = g_quark_from_static_string ("swfdec-xml-socket"); - g_object_set_qdata_full (G_OBJECT (target), xml_socket_quark, xml, swfdec_xml_socket_target_gone); xml->target = target; - xml->target_owner = TRUE; xml->socket = sock; xml->sandbox = sandbox; swfdec_stream_set_target (SWFDEC_STREAM (sock), SWFDEC_STREAM_TARGET (xml)); @@ -249,27 +232,29 @@ static SwfdecXmlSocket * swfdec_xml_socket_get (SwfdecAsObject *object) { SwfdecXmlSocket *xml; + SwfdecPlayer *player; + GSList *walk; if (object == NULL) { SWFDEC_WARNING ("no object to get xml socket from"); return NULL; } - if (xml_socket_quark == 0) { - SWFDEC_WARNING ("no sockets have been created yet"); - return NULL; - } - - xml = g_object_get_qdata (G_OBJECT (object), xml_socket_quark); - if (xml == NULL) { - SWFDEC_WARNING ("no xml socket on object"); - return NULL; - } - if (xml->socket == NULL) { - SWFDEC_WARNING ("xml socket not open"); - return NULL; + + player = SWFDEC_PLAYER (object->context); + for (walk = player->priv->xml_sockets; walk; walk = walk->next) { + xml = walk->data; + + if (xml->target == object) { + if (xml->socket == NULL) { + SWFDEC_WARNING ("xml socket not open"); + return NULL; + } + return xml; + } } - return xml; + SWFDEC_WARNING ("no xml socket on object"); + return NULL; } @@ -283,10 +268,10 @@ swfdec_xml_socket_connect (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (0, NULL, "si", &host, &port); - if (SWFDEC_IS_MOVIE (object) || object == NULL) + if (object == NULL || object->movie) return; - swfdec_xml_socket_create (object, SWFDEC_SANDBOX (cx->global), host, port); + swfdec_xml_socket_create (object, swfdec_sandbox_get (SWFDEC_PLAYER (cx)), host, port); } SWFDEC_AS_NATIVE (400, 1, swfdec_xml_socket_send) @@ -299,6 +284,7 @@ swfdec_xml_socket_send (SwfdecAsContext *cx, SwfdecAsObject *object, const char *send; gsize len; + SWFDEC_AS_CHECK (0, NULL, "s", &send); if (argc < 1) return; @@ -310,7 +296,6 @@ swfdec_xml_socket_send (SwfdecAsContext *cx, SwfdecAsObject *object, return; } - send = swfdec_as_value_to_string (cx, &argv[0]); len = strlen (send) + 1; buf = swfdec_buffer_new (len); memcpy (buf->data, send, len); diff --git a/swfdec/swfdec_xml_socket.h b/swfdec/swfdec_xml_socket.h index 73ac1f98..cb1afbce 100644 --- a/swfdec/swfdec_xml_socket.h +++ b/swfdec/swfdec_xml_socket.h @@ -21,7 +21,7 @@ #define _SWFDEC_XML_SOCKET_H_ #include <swfdec/swfdec.h> -#include <swfdec/swfdec_as_object.h> +#include <swfdec/swfdec_gc_object.h> #include <swfdec/swfdec_sandbox.h> G_BEGIN_DECLS @@ -38,18 +38,17 @@ typedef struct _SwfdecXmlSocketClass SwfdecXmlSocketClass; #define SWFDEC_XML_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_XML_SOCKET, SwfdecXmlSocketClass)) struct _SwfdecXmlSocket { - SwfdecAsObject object; + SwfdecGcObject object; SwfdecSocket * socket; /* the socket in use */ SwfdecSandbox * sandbox; /* the sandbox we run in */ gboolean open; /* the socket has been opened already */ SwfdecBufferQueue * queue; /* everything that belongs to the same string */ SwfdecAsObject * target; /* target object we call out to */ - gboolean target_owner; /* TRUE if we own the target */ }; struct _SwfdecXmlSocketClass { - SwfdecAsObjectClass object_class; + SwfdecGcObjectClass object_class; }; GType swfdec_xml_socket_get_type (void); diff --git a/test/.gitignore b/test/.gitignore index 16b89ee3..f4d4f5ea 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -5,4 +5,5 @@ swfdec_test_function_list.h compiler +crashfinder swfdec-test diff --git a/test/Makefile.am b/test/Makefile.am index 886f9807..1c7f0f61 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2,14 +2,6 @@ SUBDIRS = custom image sound trace various gnash noinst_PROGRAMS = swfdec-test -if WITH_GTK -swfdec_gtk_test_sources = \ - swfdec_test_http_request.c \ - swfdec_test_http_server.c -else -swfdec_gtk_test_sources = -endif - swfdec_test_sources = \ swfdec_test.c \ swfdec_test_buffer.c \ @@ -39,8 +31,6 @@ noinst_HEADERS = \ swfdec_test_buffer.h \ swfdec_test_function.h \ swfdec_test_function_list.h \ - swfdec_test_http_request.h \ - swfdec_test_http_server.h \ swfdec_test_image.h \ swfdec_test_initialize.h \ swfdec_test_plugin.h \ diff --git a/test/image/BlurFilter-rendering-5.swf b/test/image/BlurFilter-rendering-5.swf Binary files differnew file mode 100644 index 00000000..1039ba2c --- /dev/null +++ b/test/image/BlurFilter-rendering-5.swf diff --git a/test/image/BlurFilter-rendering-5.swf.png b/test/image/BlurFilter-rendering-5.swf.png Binary files differnew file mode 100644 index 00000000..1c191a21 --- /dev/null +++ b/test/image/BlurFilter-rendering-5.swf.png diff --git a/test/image/BlurFilter-rendering-6.swf b/test/image/BlurFilter-rendering-6.swf Binary files differnew file mode 100644 index 00000000..884c512c --- /dev/null +++ b/test/image/BlurFilter-rendering-6.swf diff --git a/test/image/BlurFilter-rendering-6.swf.png b/test/image/BlurFilter-rendering-6.swf.png Binary files differnew file mode 100644 index 00000000..1c191a21 --- /dev/null +++ b/test/image/BlurFilter-rendering-6.swf.png diff --git a/test/image/BlurFilter-rendering-7.swf b/test/image/BlurFilter-rendering-7.swf Binary files differnew file mode 100644 index 00000000..1fd2aa17 --- /dev/null +++ b/test/image/BlurFilter-rendering-7.swf diff --git a/test/image/BlurFilter-rendering-7.swf.png b/test/image/BlurFilter-rendering-7.swf.png Binary files differnew file mode 100644 index 00000000..02b8b773 --- /dev/null +++ b/test/image/BlurFilter-rendering-7.swf.png diff --git a/test/image/BlurFilter-rendering-8.swf b/test/image/BlurFilter-rendering-8.swf Binary files differnew file mode 100644 index 00000000..119ad0ea --- /dev/null +++ b/test/image/BlurFilter-rendering-8.swf diff --git a/test/image/BlurFilter-rendering-8.swf.png b/test/image/BlurFilter-rendering-8.swf.png Binary files differnew file mode 100644 index 00000000..ef39f1f2 --- /dev/null +++ b/test/image/BlurFilter-rendering-8.swf.png diff --git a/test/image/BlurFilter-rendering.as b/test/image/BlurFilter-rendering.as new file mode 100644 index 00000000..bf8dfe5e --- /dev/null +++ b/test/image/BlurFilter-rendering.as @@ -0,0 +1,27 @@ +// makeswf -v 7 -s 200x150 -r 1 -o BlurFilter-rendering.swf BlurFilter-rendering.as + +rectangle = function (mc, color, x, y, w, h) +{ + mc.beginFill (color); + mc.moveTo (x, y); + mc.lineTo (x, y + h); + mc.lineTo (x + w, y + h); + mc.lineTo (x + w, y); + mc.lineTo (x, y); + mc.endFill (); +}; + + +for (x = 0; x < 4; x++) { + for (y = 0; y < 3; y++) { + a = createEmptyMovieClip ("a" + getNextHighestDepth (), getNextHighestDepth ()); + rectangle (a, 0xFF, 10, 10, 30, 30); + a._x = 50 * x; + a._y = 50 * y; + a.filters = [ new flash.filters.BlurFilter (2 * y, 2 * y, x) ]; + }; +}; + +createEmptyMovieClip ("mask", 1000); +rectangle (mask, 0xFF00, 5, 5, 30, 30); +a.setMask (mask); diff --git a/test/image/Makefile.am b/test/image/Makefile.am index c063b0da..52e035d8 100644 --- a/test/image/Makefile.am +++ b/test/image/Makefile.am @@ -93,6 +93,15 @@ EXTRA_DIST = \ bitmapFill-update-8.swf \ bitmapFill-update-8.swf.png \ bitmapFill-update.as \ + BlurFilter-rendering-5.swf \ + BlurFilter-rendering-5.swf.png \ + BlurFilter-rendering-6.swf \ + BlurFilter-rendering-6.swf.png \ + BlurFilter-rendering-7.swf \ + BlurFilter-rendering-7.swf.png \ + BlurFilter-rendering-8.swf \ + BlurFilter-rendering-8.swf.png \ + BlurFilter-rendering.as \ bw.jpg \ clip-change.c \ clip-change-backward-5.swf \ @@ -462,6 +471,17 @@ EXTRA_DIST = \ replace-shape-shape-6.swf.png \ replace-shape-shape-7.swf \ replace-shape-shape-7.swf.png \ + rotated-filter-size-5.swf \ + rotated-filter-size-5.swf.png \ + rotated-filter-size-6.swf \ + rotated-filter-size-6.swf.org.png \ + rotated-filter-size-6.swf.png \ + rotated-filter-size-7.swf \ + rotated-filter-size-7.swf.org.png \ + rotated-filter-size-7.swf.png \ + rotated-filter-size-8.swf \ + rotated-filter-size-8.swf.png \ + rotated-filter-size.as \ setMask-matrices-5.swf \ setMask-matrices-5.swf.png \ setMask-matrices-6.swf \ diff --git a/test/image/bitmap-data-fillRect-5.swf b/test/image/bitmap-data-fillRect-5.swf Binary files differnew file mode 100644 index 00000000..bafe54bc --- /dev/null +++ b/test/image/bitmap-data-fillRect-5.swf diff --git a/test/image/bitmap-data-fillRect-5.swf.png b/test/image/bitmap-data-fillRect-5.swf.png Binary files differnew file mode 100644 index 00000000..98591293 --- /dev/null +++ b/test/image/bitmap-data-fillRect-5.swf.png diff --git a/test/image/bitmap-data-fillRect-6.swf b/test/image/bitmap-data-fillRect-6.swf Binary files differnew file mode 100644 index 00000000..73f31034 --- /dev/null +++ b/test/image/bitmap-data-fillRect-6.swf diff --git a/test/image/bitmap-data-fillRect-6.swf.png b/test/image/bitmap-data-fillRect-6.swf.png Binary files differnew file mode 100644 index 00000000..98591293 --- /dev/null +++ b/test/image/bitmap-data-fillRect-6.swf.png diff --git a/test/image/bitmap-data-fillRect-7.swf b/test/image/bitmap-data-fillRect-7.swf Binary files differnew file mode 100644 index 00000000..11216896 --- /dev/null +++ b/test/image/bitmap-data-fillRect-7.swf diff --git a/test/image/bitmap-data-fillRect-7.swf.png b/test/image/bitmap-data-fillRect-7.swf.png Binary files differnew file mode 100644 index 00000000..98591293 --- /dev/null +++ b/test/image/bitmap-data-fillRect-7.swf.png diff --git a/test/image/bitmap-data-fillRect-8.swf b/test/image/bitmap-data-fillRect-8.swf Binary files differnew file mode 100644 index 00000000..3f60b685 --- /dev/null +++ b/test/image/bitmap-data-fillRect-8.swf diff --git a/test/image/bitmap-data-fillRect-8.swf.png b/test/image/bitmap-data-fillRect-8.swf.png Binary files differnew file mode 100644 index 00000000..130d5300 --- /dev/null +++ b/test/image/bitmap-data-fillRect-8.swf.png diff --git a/test/image/bitmap-data-fillRect.as b/test/image/bitmap-data-fillRect.as new file mode 100644 index 00000000..a2ef5a83 --- /dev/null +++ b/test/image/bitmap-data-fillRect.as @@ -0,0 +1,16 @@ +// makeswf -v 7 -s 200x150 -r 1 -o bitmap-data-fillRect.swf bitmap-data-fillRect.as + +var RECT_SIZE = 25; + +var mc1 = createEmptyMovieClip("mc1", getNextHighestDepth()); +var b1 = new flash.display.BitmapData(RECT_SIZE, RECT_SIZE, false, 0xffff0000); +var mc2 = createEmptyMovieClip("mc2", getNextHighestDepth()); +var b2 = new flash.display.BitmapData(RECT_SIZE, RECT_SIZE, true, 0xffff0000); +b1.fillRect(b1.rectangle, 0x80000000); +b2.fillRect(b2.rectangle, 0x80000000); +mc1.attachBitmap(b1, mc1.getNextHighestDepth()); +mc2.attachBitmap(b2, mc2.getNextHighestDepth()); +mc1._x = 0; +mc1._y = 0; +mc2._x = RECT_SIZE; +mc2._y = RECT_SIZE; diff --git a/test/image/rotated-filter-size-5.swf b/test/image/rotated-filter-size-5.swf Binary files differnew file mode 100644 index 00000000..849508ec --- /dev/null +++ b/test/image/rotated-filter-size-5.swf diff --git a/test/image/rotated-filter-size-5.swf.png b/test/image/rotated-filter-size-5.swf.png Binary files differnew file mode 100644 index 00000000..1c191a21 --- /dev/null +++ b/test/image/rotated-filter-size-5.swf.png diff --git a/test/image/rotated-filter-size-6.swf b/test/image/rotated-filter-size-6.swf Binary files differnew file mode 100644 index 00000000..544cf799 --- /dev/null +++ b/test/image/rotated-filter-size-6.swf diff --git a/test/image/rotated-filter-size-6.swf.org.png b/test/image/rotated-filter-size-6.swf.org.png Binary files differnew file mode 100644 index 00000000..a44a0ddc --- /dev/null +++ b/test/image/rotated-filter-size-6.swf.org.png diff --git a/test/image/rotated-filter-size-6.swf.png b/test/image/rotated-filter-size-6.swf.png Binary files differnew file mode 100644 index 00000000..ec60d94b --- /dev/null +++ b/test/image/rotated-filter-size-6.swf.png diff --git a/test/image/rotated-filter-size-7.swf b/test/image/rotated-filter-size-7.swf Binary files differnew file mode 100644 index 00000000..01cf6c0e --- /dev/null +++ b/test/image/rotated-filter-size-7.swf diff --git a/test/image/rotated-filter-size-7.swf.org.png b/test/image/rotated-filter-size-7.swf.org.png Binary files differnew file mode 100644 index 00000000..a44a0ddc --- /dev/null +++ b/test/image/rotated-filter-size-7.swf.org.png diff --git a/test/image/rotated-filter-size-7.swf.png b/test/image/rotated-filter-size-7.swf.png Binary files differnew file mode 100644 index 00000000..ec60d94b --- /dev/null +++ b/test/image/rotated-filter-size-7.swf.png diff --git a/test/image/rotated-filter-size-8.swf b/test/image/rotated-filter-size-8.swf Binary files differnew file mode 100644 index 00000000..d3636c66 --- /dev/null +++ b/test/image/rotated-filter-size-8.swf diff --git a/test/image/rotated-filter-size-8.swf.png b/test/image/rotated-filter-size-8.swf.png Binary files differnew file mode 100644 index 00000000..91f888f3 --- /dev/null +++ b/test/image/rotated-filter-size-8.swf.png diff --git a/test/image/rotated-filter-size.as b/test/image/rotated-filter-size.as new file mode 100644 index 00000000..3d2f82e9 --- /dev/null +++ b/test/image/rotated-filter-size.as @@ -0,0 +1,25 @@ +// makeswf -v 7 -s 200x150 -r 1 -o rotated-filter-size.swf rotated-filter-size.as + +rectangle = function (mc, color, x, y, w, h) +{ + mc.beginFill (color); + mc.moveTo (x, y); + mc.lineTo (x, y + h); + mc.lineTo (x + w, y + h); + mc.lineTo (x + w, y); + mc.lineTo (x, y); + mc.endFill (); +}; + +createEmptyMovieClip ("a", 0); +rectangle (a, 0xFF, 0, 0, 50, 50); +a._x = 100; +a._y = 75; +a.filters = [ new flash.filters.ColorMatrixFilter ([0, 0, 0, 0, 255, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255])]; + +a._rotation = 120; + +//getURL ("fscommand:quit", ""); diff --git a/test/swfdec_test.c b/test/swfdec_test.c index 2da4af0c..74c0a8eb 100644 --- a/test/swfdec_test.c +++ b/test/swfdec_test.c @@ -200,13 +200,13 @@ main (int argc, char **argv) if (!g_str_has_suffix (file, ".swf")) continue; SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (context, file)); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &val); + swfdec_as_array_push (array, &val); } g_dir_close (dir); } else { for (i = 1; i < argc; i++) { SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (context, argv[i])); - swfdec_as_array_push (SWFDEC_AS_ARRAY (array), &val); + swfdec_as_array_push (array, &val); } } SWFDEC_AS_VALUE_SET_OBJECT (&val, array); @@ -214,7 +214,7 @@ main (int argc, char **argv) swfdec_as_context_get_string (context, "filenames"), &val); swfdec_as_object_run (context->global, script); if (swfdec_as_context_catch (context, &val)) { - g_print ("ERROR: %s\n", swfdec_as_value_to_string (context, &val)); + g_print ("ERROR: %s\n", swfdec_as_value_to_string (context, val)); ret = EXIT_FAILURE; } else { g_print ("SUCCESS\n"); diff --git a/test/swfdec_test_buffer.c b/test/swfdec_test_buffer.c index f9064d39..0fe124e3 100644 --- a/test/swfdec_test_buffer.c +++ b/test/swfdec_test_buffer.c @@ -28,25 +28,26 @@ #include "swfdec_test_function.h" #include "swfdec_test_utils.h" -SwfdecAsObject * +SwfdecTestBuffer * swfdec_test_buffer_new (SwfdecAsContext *context, SwfdecBuffer *buffer) { - SwfdecAsValue val; - SwfdecAsObject *ret; + SwfdecTestBuffer *ret; + SwfdecAsObject *object; ret = g_object_new (SWFDEC_TYPE_TEST_BUFFER, "context", context, NULL); - swfdec_as_object_get_variable (context->global, - swfdec_as_context_get_string (context, "Buffer"), &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (ret, SWFDEC_AS_VALUE_GET_OBJECT (&val)); + ret->buffer = buffer; + + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, + swfdec_as_context_get_string (context, "Buffer"), NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (ret)); - SWFDEC_TEST_BUFFER (ret)->buffer = buffer; return ret; } /*** SWFDEC_TEST_BUFFER ***/ -G_DEFINE_TYPE (SwfdecTestBuffer, swfdec_test_buffer, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTestBuffer, swfdec_test_buffer, SWFDEC_TYPE_AS_RELAY) static void swfdec_test_buffer_dispose (GObject *object) @@ -135,21 +136,23 @@ swfdec_test_diff_buffers (SwfdecBuffer *buf1, SwfdecBuffer *buf2, GError **error return diff; } -SWFDEC_TEST_FUNCTION ("Buffer_diff", swfdec_test_buffer_diff, 0) +SWFDEC_TEST_FUNCTION ("Buffer_diff", swfdec_test_buffer_diff) void swfdec_test_buffer_diff (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestBuffer *buffer, *compare = NULL; + SwfdecAsObject *compare_object; GError *error = NULL; char *ret; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_BUFFER, &buffer, "|o", &compare); + SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_BUFFER, &buffer, "|o", &compare_object); - if (!SWFDEC_IS_TEST_BUFFER (compare)) { + if (compare_object == NULL || !SWFDEC_IS_TEST_BUFFER (compare_object->relay)) { swfdec_test_throw (cx, "must pass a buffer to Buffer.diff"); return; } + compare = SWFDEC_TEST_BUFFER (compare_object->relay); ret = swfdec_test_diff_buffers (compare->buffer, buffer->buffer, &error); if (ret) { @@ -166,7 +169,7 @@ swfdec_test_buffer_diff (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc } } -SWFDEC_TEST_FUNCTION ("Buffer_find", swfdec_test_buffer_find, 0) +SWFDEC_TEST_FUNCTION ("Buffer_find", swfdec_test_buffer_find) void swfdec_test_buffer_find (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -177,20 +180,21 @@ swfdec_test_buffer_find (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_BUFFER, &buffer, "i", &c); - SWFDEC_AS_VALUE_SET_INT (retval, -1); found = memchr (buffer->buffer->data, c, buffer->buffer->length); if (found) - SWFDEC_AS_VALUE_SET_INT (retval, found - buffer->buffer->data); + *retval = swfdec_as_value_from_integer (cx, found - buffer->buffer->data); + else + *retval = swfdec_as_value_from_integer (cx, -1); } -SWFDEC_TEST_FUNCTION ("Buffer_load", swfdec_test_buffer_load, 0) +SWFDEC_TEST_FUNCTION ("Buffer_load", swfdec_test_buffer_load) void swfdec_test_buffer_load (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecBuffer *b; - SwfdecAsObject *buffer; + SwfdecTestBuffer *buffer; const char *filename; GError *error = NULL; @@ -204,17 +208,16 @@ swfdec_test_buffer_load (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc } buffer = swfdec_test_buffer_new (cx, b); - SWFDEC_AS_VALUE_SET_OBJECT (retval, buffer); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (buffer))); } -SWFDEC_TEST_FUNCTION ("Buffer_sub", swfdec_test_buffer_sub, 0) +SWFDEC_TEST_FUNCTION ("Buffer_sub", swfdec_test_buffer_sub) void swfdec_test_buffer_sub (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecBuffer *b; - SwfdecTestBuffer *buffer; - SwfdecAsObject *o; + SwfdecTestBuffer *buffer, *sub; guint offset, length = 0; SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_BUFFER, &buffer, "i|i", &offset, &length); @@ -227,11 +230,11 @@ swfdec_test_buffer_sub (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, length = buffer->buffer->length - offset; b = swfdec_buffer_new_subbuffer (buffer->buffer, offset, length); - o = swfdec_test_buffer_new (cx, b); - SWFDEC_AS_VALUE_SET_OBJECT (retval, o); + sub = swfdec_test_buffer_new (cx, b); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (sub))); } -SWFDEC_TEST_FUNCTION ("Buffer_toString", swfdec_test_buffer_toString, 0) +SWFDEC_TEST_FUNCTION ("Buffer_toString", swfdec_test_buffer_toString) void swfdec_test_buffer_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -266,16 +269,16 @@ swfdec_test_buffer_from_args (SwfdecAsContext *cx, guint argc, SwfdecAsValue *ar queue = swfdec_buffer_queue_new (); for (i = 0; i < argc; i++) { SwfdecBuffer *b = NULL; - if (SWFDEC_AS_VALUE_IS_OBJECT (&argv[i])) { - SwfdecAsObject *o = SWFDEC_AS_VALUE_GET_OBJECT (&argv[i]); - if (SWFDEC_IS_TEST_BUFFER (o)) - b = swfdec_buffer_ref (SWFDEC_TEST_BUFFER (o)->buffer); - } else if (SWFDEC_AS_VALUE_IS_NUMBER (&argv[i])) { + if (SWFDEC_AS_VALUE_IS_OBJECT (argv[i])) { + SwfdecAsObject *o = SWFDEC_AS_VALUE_GET_OBJECT (argv[i]); + if (SWFDEC_IS_TEST_BUFFER (o->relay)) + b = swfdec_buffer_ref (SWFDEC_TEST_BUFFER (o->relay)->buffer); + } else if (SWFDEC_AS_VALUE_IS_NUMBER (argv[i])) { b = swfdec_buffer_new (1); - b->data[0] = swfdec_as_value_to_integer (cx, &argv[i]); + b->data[0] = swfdec_as_value_to_integer (cx, argv[i]); } if (b == NULL) { - const char *s = swfdec_as_value_to_string (cx, &argv[i]); + const char *s = swfdec_as_value_to_string (cx, argv[i]); gsize len = strlen (s); /* no terminating 0 byte on purpose here - use new Buffer (string, 0); to get that */ b = swfdec_buffer_new (len); @@ -290,19 +293,21 @@ swfdec_test_buffer_from_args (SwfdecAsContext *cx, guint argc, SwfdecAsValue *ar return buffer; } -SWFDEC_TEST_FUNCTION ("Buffer", swfdec_test_buffer_create, swfdec_test_buffer_get_type) +SWFDEC_TEST_FUNCTION ("Buffer", swfdec_test_buffer_create) void swfdec_test_buffer_create (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestBuffer *buffer; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_BUFFER, &buffer, ""); - if (!swfdec_as_context_is_constructing (cx)) return; + buffer = g_object_new (SWFDEC_TYPE_TEST_BUFFER, "context", cx, NULL); buffer->buffer = swfdec_test_buffer_from_args (cx, argc, argv); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (buffer)); + + SWFDEC_AS_VALUE_SET_OBJECT (retval, object); } diff --git a/test/swfdec_test_buffer.h b/test/swfdec_test_buffer.h index 7e70f876..3d29bc25 100644 --- a/test/swfdec_test_buffer.h +++ b/test/swfdec_test_buffer.h @@ -37,24 +37,24 @@ typedef struct _SwfdecTestBufferClass SwfdecTestBufferClass; struct _SwfdecTestBuffer { - SwfdecAsObject as_object; + SwfdecAsRelay relay; SwfdecBuffer * buffer; }; struct _SwfdecTestBufferClass { - SwfdecAsObjectClass as_object_class; + SwfdecAsRelayClass relay_class; }; -GType swfdec_test_buffer_get_type (void); +GType swfdec_test_buffer_get_type (void); -SwfdecAsObject *swfdec_test_buffer_new (SwfdecAsContext * context, - SwfdecBuffer * buffer); +SwfdecTestBuffer * swfdec_test_buffer_new (SwfdecAsContext * context, + SwfdecBuffer * buffer); -SwfdecBuffer * swfdec_test_buffer_from_args (SwfdecAsContext * cx, - guint argc, - SwfdecAsValue * argv); +SwfdecBuffer * swfdec_test_buffer_from_args (SwfdecAsContext * cx, + guint argc, + SwfdecAsValue * argv); G_END_DECLS #endif diff --git a/test/swfdec_test_function.c b/test/swfdec_test_function.c index fafde52b..8f79529b 100644 --- a/test/swfdec_test_function.c +++ b/test/swfdec_test_function.c @@ -25,10 +25,6 @@ #include "swfdec_test_function_list.h" /* needed by the function list */ -#ifdef HAVE_GTK -#include "swfdec_test_http_request.h" -#include "swfdec_test_http_server.h" -#endif #include "swfdec_test_buffer.h" #include "swfdec_test_image.h" #include "swfdec_test_socket.h" @@ -38,15 +34,14 @@ /* include swfdec_test_function_list with special macro definition, so we get a nice * way to initialize it */ #undef SWFDEC_TEST_FUNCTION -#define SWFDEC_TEST_FUNCTION(name, fun, type) \ - { name, fun, type }, +#define SWFDEC_TEST_FUNCTION(name, fun) \ + { name, fun }, static const struct { const char * name; SwfdecAsNative fun; - GType (* type) (void); } functions[] = { #include "swfdec_test_function_list.h" - { NULL, NULL, NULL } + { NULL, NULL } }; #undef SWFDEC_TEST_FUNCTION @@ -57,7 +52,7 @@ swfdec_test_function_init_context (SwfdecAsContext *cx) SwfdecAsValue val; guint i; - obj = swfdec_as_object_new (cx); + obj = swfdec_as_object_new (cx, NULL); if (obj == NULL) return; SWFDEC_AS_VALUE_SET_OBJECT (&val, obj); @@ -65,10 +60,9 @@ swfdec_test_function_init_context (SwfdecAsContext *cx) swfdec_as_context_get_string (cx, "Native"), &val); for (i = 0; functions[i].name; i++) { - GType type = functions[i].type ? functions[i].type () : 0; - swfdec_as_object_add_constructor (obj, + swfdec_as_object_add_function (obj, swfdec_as_context_get_string (cx, functions[i].name), - type, functions[i].fun, NULL); + functions[i].fun); } } diff --git a/test/swfdec_test_function.h b/test/swfdec_test_function.h index a523fcd1..7868b3ae 100644 --- a/test/swfdec_test_function.h +++ b/test/swfdec_test_function.h @@ -25,7 +25,7 @@ G_BEGIN_DECLS -#define SWFDEC_TEST_FUNCTION(name, fun, type) \ +#define SWFDEC_TEST_FUNCTION(name, fun) \ void fun (SwfdecAsContext *cx, SwfdecAsObject *this, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval); void swfdec_test_function_init_context (SwfdecAsContext *cx); diff --git a/test/swfdec_test_global.c b/test/swfdec_test_global.c index 7edd8d29..1f64faaa 100644 --- a/test/swfdec_test_global.c +++ b/test/swfdec_test_global.c @@ -26,7 +26,7 @@ #include "swfdec_test_function.h" #include "swfdec_test_initialize.h" -SWFDEC_TEST_FUNCTION ("print", swfdec_test_print, 0) +SWFDEC_TEST_FUNCTION ("print", swfdec_test_print) void swfdec_test_print (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) diff --git a/test/swfdec_test_http_request.c b/test/swfdec_test_http_request.c deleted file mode 100644 index 5541e02a..00000000 --- a/test/swfdec_test_http_request.c +++ /dev/null @@ -1,347 +0,0 @@ -/* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> - * 2008 Pekka Lampila <pekka.lampila@iki.fi> - * - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> - -#include "swfdec_test_http_request.h" -#include "swfdec_test_http_server.h" -#include "swfdec_test_buffer.h" -#include "swfdec_test_function.h" -#include "swfdec_test_utils.h" - -SwfdecAsObject * -swfdec_test_http_request_new (SwfdecAsContext *context, - SwfdecTestHTTPServer *server, SoupMessage *message) -{ - SwfdecAsValue val; - SwfdecAsObject *ret; - - g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - g_return_val_if_fail (SWFDEC_IS_TEST_HTTP_SERVER (server), NULL); - g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL); - - if (!swfdec_as_context_use_mem (context, sizeof (SwfdecTestHTTPRequest))) - return NULL; - - ret = g_object_new (SWFDEC_TYPE_TEST_HTTP_REQUEST, NULL); - swfdec_as_object_add (ret, context, sizeof (SwfdecTestHTTPRequest)); - swfdec_as_object_get_variable (context->global, - swfdec_as_context_get_string (context, "HTTPRequest"), &val); - - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (ret, SWFDEC_AS_VALUE_GET_OBJECT (&val)); - - soup_message_headers_set_encoding (message->response_headers, - SOUP_ENCODING_CHUNKED); - soup_message_set_flags (message, SOUP_MESSAGE_OVERWRITE_CHUNKS); - soup_message_set_status (message, SOUP_STATUS_OK); - - SWFDEC_TEST_HTTP_REQUEST (ret)->server = server; - SWFDEC_TEST_HTTP_REQUEST (ret)->message = message; - - return ret; -} - -/*** SWFDEC_TEST_HTTP_REQUEST ***/ - -G_DEFINE_TYPE (SwfdecTestHTTPRequest, swfdec_test_http_request, SWFDEC_TYPE_AS_OBJECT) - -static void -swfdec_test_http_request_dispose (GObject *object) -{ - SwfdecTestHTTPRequest *request = SWFDEC_TEST_HTTP_REQUEST (object); - - g_object_unref (request->message); - request->message = NULL; - - G_OBJECT_CLASS (swfdec_test_http_request_parent_class)->dispose (object); -} - -static void -swfdec_test_http_request_mark (SwfdecAsObject *object) -{ - SwfdecTestHTTPRequest *request = SWFDEC_TEST_HTTP_REQUEST (object); - - swfdec_as_object_mark (SWFDEC_AS_OBJECT (request->server)); - swfdec_as_object_mark (SWFDEC_AS_OBJECT (request->headers)); - - SWFDEC_AS_OBJECT_CLASS (swfdec_test_http_request_parent_class)->mark (object); -} - -static void -swfdec_test_http_request_class_init (SwfdecTestHTTPRequestClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); - - object_class->dispose = swfdec_test_http_request_dispose; - asobject_class->mark = swfdec_test_http_request_mark; -} - -static void -swfdec_test_http_request_init (SwfdecTestHTTPRequest *this) -{ -} - -/*** AS CODE ***/ - -SWFDEC_TEST_FUNCTION ("HTTPRequest_toString", swfdec_test_http_request_toString, 0) -void -swfdec_test_http_request_toString (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - GString *string; - SoupURI *uri; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - string = g_string_new (request->message->method); - string = g_string_append (string, " "); - - uri = soup_message_get_uri (request->message); - string = g_string_append (string, soup_uri_to_string (uri, FALSE)); - - SWFDEC_AS_VALUE_SET_STRING (retval, - swfdec_as_context_give_string (cx, g_string_free (string, FALSE))); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_server", swfdec_test_http_request_get_server, 0) -void -swfdec_test_http_request_get_server (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - SWFDEC_AS_VALUE_SET_OBJECT (retval, SWFDEC_AS_OBJECT (request->server)); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_url", swfdec_test_http_request_get_url, 0) -void -swfdec_test_http_request_get_url (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - SoupURI *uri; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - uri = soup_message_get_uri (request->message); - - SWFDEC_AS_VALUE_SET_STRING (retval, - swfdec_as_context_give_string (cx, soup_uri_to_string (uri, FALSE))); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_path", swfdec_test_http_request_get_path, 0) -void -swfdec_test_http_request_get_path (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - SoupURI *uri; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - uri = soup_message_get_uri (request->message); - - SWFDEC_AS_VALUE_SET_STRING (retval, - swfdec_as_context_give_string (cx, soup_uri_to_string (uri, TRUE))); -} - -static void -swfdec_test_http_request_foreach_set_headers (const char *name, - const char *value, gpointer user_data) -{ - SwfdecTestHTTPRequest *request = user_data; - SwfdecAsContext *cx; - SwfdecAsValue val; - - g_return_if_fail (SWFDEC_IS_AS_OBJECT (request->headers)); - - cx = request->headers->context; - - SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (cx, value)); - swfdec_as_object_set_variable (request->headers, - swfdec_as_context_get_string (cx, name), &val); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_headers", swfdec_test_http_request_get_headers, 0) -void -swfdec_test_http_request_get_headers (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - if (!request->headers) { - request->headers = swfdec_as_object_new_empty (cx); - soup_message_headers_foreach (request->message->request_headers, - swfdec_test_http_request_foreach_set_headers, request); - } - - SWFDEC_AS_VALUE_SET_OBJECT (retval, request->headers); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_contentType", swfdec_test_http_request_get_contentType, 0) -void -swfdec_test_http_request_get_contentType (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - const char *value; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - value = soup_message_headers_get (request->message->response_headers, - "Content-Type"); - - if (value != NULL) { - SWFDEC_AS_VALUE_SET_STRING (retval, - swfdec_as_context_get_string (cx, value)); - } else { - SWFDEC_AS_VALUE_SET_NULL (retval); - } -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_set_contentType", swfdec_test_http_request_set_contentType, 0) -void -swfdec_test_http_request_set_contentType (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - SwfdecAsValue val; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, "v", &val); - - if (request->state > SWFDEC_TEST_HTTP_REQUEST_STATE_WAITING) { - swfdec_test_throw (cx, "Headers have already been sent"); - return; - } - - if (SWFDEC_AS_VALUE_IS_NULL (&val) || SWFDEC_AS_VALUE_IS_UNDEFINED (&val)) { - soup_message_headers_remove (request->message->response_headers, - "Content-Type"); - } else { - soup_message_headers_replace (request->message->response_headers, - "Content-Type", swfdec_as_value_to_string (cx, &val)); - } -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_get_statusCode", swfdec_test_http_request_get_statusCode, 0) -void -swfdec_test_http_request_get_statusCode (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - SWFDEC_AS_VALUE_SET_INT (retval, request->message->status_code); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_set_statusCode", swfdec_test_http_request_set_statusCode, 0) -void -swfdec_test_http_request_set_statusCode (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - int status_code; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, "i", &status_code); - - if (status_code < 0) - return; - - if (request->state > SWFDEC_TEST_HTTP_REQUEST_STATE_WAITING) { - swfdec_test_throw (cx, "Headers have already been sent"); - return; - } - - soup_message_set_status (request->message, status_code); -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_send", swfdec_test_http_request_send, 0) -void -swfdec_test_http_request_send (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - SwfdecAsValue val; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, "v", &val); - - if (request->state > SWFDEC_TEST_HTTP_REQUEST_STATE_SENDING) { - swfdec_test_throw (cx, "Reply has already been sent"); - return; - } - - if (SWFDEC_AS_VALUE_IS_OBJECT (&val) && - SWFDEC_IS_TEST_BUFFER (SWFDEC_AS_VALUE_GET_OBJECT (&val))) { - SwfdecTestBuffer *buffer = - SWFDEC_TEST_BUFFER (SWFDEC_AS_VALUE_GET_OBJECT (&val)); - soup_message_body_append (request->message->response_body, - SOUP_MEMORY_COPY, buffer->buffer->data, buffer->buffer->length); - } else { - const char *data = swfdec_as_value_to_string (cx, &val); - soup_message_body_append (request->message->response_body, - SOUP_MEMORY_COPY, data, strlen (data)); - } - - soup_server_unpause_message (request->server->server, request->message); - - swfdec_test_http_server_run (request->server); - - request->state = SWFDEC_TEST_HTTP_REQUEST_STATE_SENDING; -} - -SWFDEC_TEST_FUNCTION ("HTTPRequest_close", swfdec_test_http_request_close, 0) -void -swfdec_test_http_request_close (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPRequest *request; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &request, ""); - - if (request->state == SWFDEC_TEST_HTTP_REQUEST_STATE_SENT) { - swfdec_test_throw (cx, "Reply has already been sent"); - return; - } - - soup_message_body_complete (request->message->response_body); - soup_server_unpause_message (request->server->server, request->message); - - swfdec_test_http_server_run (request->server); - - request->state = SWFDEC_TEST_HTTP_REQUEST_STATE_SENT; -} diff --git a/test/swfdec_test_http_request.h b/test/swfdec_test_http_request.h deleted file mode 100644 index 892f0799..00000000 --- a/test/swfdec_test_http_request.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> - * 2008 Pekka Lampila <pekka.lampila@iki.fi> - * - * 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_TEST_HTTP_REQUEST_H_ -#define _SWFDEC_TEST_HTTP_REQUEST_H_ - -#include <swfdec/swfdec.h> -#include <libsoup/soup.h> - -#include "swfdec_test_http_server.h" - -G_BEGIN_DECLS - - -typedef struct _SwfdecTestHTTPRequest SwfdecTestHTTPRequest; -typedef struct _SwfdecTestHTTPRequestClass SwfdecTestHTTPRequestClass; - -typedef enum { - SWFDEC_TEST_HTTP_REQUEST_STATE_WAITING, - SWFDEC_TEST_HTTP_REQUEST_STATE_SENDING, - SWFDEC_TEST_HTTP_REQUEST_STATE_SENT -} SwfdecTestHTTPRequestState; - -#define SWFDEC_TYPE_TEST_HTTP_REQUEST (swfdec_test_http_request_get_type()) -#define SWFDEC_IS_TEST_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_TEST_HTTP_REQUEST)) -#define SWFDEC_IS_TEST_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_TEST_HTTP_REQUEST)) -#define SWFDEC_TEST_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_TEST_HTTP_REQUEST, SwfdecTestHTTPRequest)) -#define SWFDEC_TEST_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_TEST_HTTP_REQUEST, SwfdecTestHTTPRequestClass)) -#define SWFDEC_TEST_HTTP_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_TEST_HTTP_REQUEST, SwfdecTestHTTPRequestClass)) - -struct _SwfdecTestHTTPRequest -{ - SwfdecAsObject as_object; - - SwfdecTestHTTPServer * server; - SoupMessage * message; - - SwfdecTestHTTPRequestState state; - SwfdecAsObject * headers; -}; - -struct _SwfdecTestHTTPRequestClass -{ - SwfdecAsObjectClass as_object_class; -}; - -GType swfdec_test_http_request_get_type (void); - -SwfdecAsObject *swfdec_test_http_request_new (SwfdecAsContext * context, - SwfdecTestHTTPServer * server, - SoupMessage * message); - -G_END_DECLS -#endif diff --git a/test/swfdec_test_http_server.c b/test/swfdec_test_http_server.c deleted file mode 100644 index 27960bdc..00000000 --- a/test/swfdec_test_http_server.c +++ /dev/null @@ -1,215 +0,0 @@ -/* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> - * 2008 Pekka Lampila <pekka.lampila@iki.fi> - * - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <libsoup/soup.h> - -#include "swfdec_test_http_server.h" -#include "swfdec_test_http_request.h" -#include "swfdec_test_function.h" -#include "swfdec_test_utils.h" - -static void -swfdec_test_http_server_callback (SoupServer *soup_server, - SoupMessage *message, const char *path, GHashTable *query, - SoupClientContext *client, gpointer userdata) -{ - SwfdecTestHTTPServer *server = userdata; - - g_return_if_fail (server->server == soup_server); - - soup_server_pause_message (server->server, message); - - g_queue_push_head (server->messages, g_object_ref (message)); -} - -void -swfdec_test_http_server_run (SwfdecTestHTTPServer *server) -{ - while (g_main_context_iteration (server->context, FALSE)); -} - -static gboolean -swfdec_test_http_server_start (SwfdecTestHTTPServer *server) -{ - SoupAddress *address; - - g_return_val_if_fail (SWFDEC_IS_TEST_HTTP_SERVER (server), FALSE); - g_return_val_if_fail (server->server == NULL, FALSE); - - address = soup_address_new ("localhost", server->port); - if (soup_address_resolve_sync (address, NULL) != SOUP_STATUS_OK) - return FALSE; - - server->context = g_main_context_new (); - - server->server = soup_server_new (SOUP_SERVER_PORT, server->port, - SOUP_SERVER_INTERFACE, address, SOUP_SERVER_ASYNC_CONTEXT, - server->context, NULL); - if (!server->server) { - g_main_context_unref (server->context); - server->context = NULL; - return FALSE; - } - - soup_server_add_handler (server->server, NULL, - swfdec_test_http_server_callback, server, NULL); - - soup_server_run_async (server->server); - - return TRUE; -} - -SwfdecAsObject * -swfdec_test_http_server_new (SwfdecAsContext *context, guint port) -{ - SwfdecAsValue val; - SwfdecAsObject *ret; - - if (!swfdec_as_context_use_mem (context, sizeof (SwfdecTestHTTPServer))) - return NULL; - - ret = g_object_new (SWFDEC_TYPE_TEST_HTTP_SERVER, NULL); - swfdec_as_object_add (ret, context, sizeof (SwfdecTestHTTPServer)); - swfdec_as_object_get_variable (context->global, - swfdec_as_context_get_string (context, "HTTPServer"), &val); - - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (ret, SWFDEC_AS_VALUE_GET_OBJECT (&val)); - - SWFDEC_TEST_HTTP_SERVER (ret)->port = port; - - if (!swfdec_test_http_server_start (SWFDEC_TEST_HTTP_SERVER (ret))) { - swfdec_test_throw (context, "Failed to start web server for port %i", - port); - return NULL; - } - - return ret; -} - -/*** SWFDEC_TEST_HTTP_SERVER ***/ - -G_DEFINE_TYPE (SwfdecTestHTTPServer, swfdec_test_http_server, SWFDEC_TYPE_AS_OBJECT) - -static void -swfdec_test_http_server_dispose (GObject *object) -{ - SwfdecTestHTTPServer *server = SWFDEC_TEST_HTTP_SERVER (object); - - while (!g_queue_is_empty (server->messages)) { - g_object_unref (g_queue_pop_tail (server->messages)); - } - g_queue_free (server->messages); - server->messages = NULL; - - if (server->server) { - soup_server_quit (server->server); - g_object_unref (server->server); - server->server = NULL; - } - - if (server->context) { - g_main_context_unref (server->context); - server->context = NULL; - } - - G_OBJECT_CLASS (swfdec_test_http_server_parent_class)->dispose (object); -} - -static void -swfdec_test_http_server_class_init (SwfdecTestHTTPServerClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = swfdec_test_http_server_dispose; -} - -static void -swfdec_test_http_server_init (SwfdecTestHTTPServer *server) -{ - server->messages = g_queue_new (); -} - -/*** AS CODE ***/ - -SWFDEC_TEST_FUNCTION ("HTTPServer_get_port", swfdec_test_http_server_get_port, 0) -void -swfdec_test_http_server_get_port (SwfdecAsContext *cx, SwfdecAsObject *object, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPServer *server; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_REQUEST, &server, ""); - - SWFDEC_AS_VALUE_SET_INT (retval, server->port); -} - -SWFDEC_TEST_FUNCTION ("HTTPServer_getRequest", swfdec_test_http_server_get_request, 0) -void -swfdec_test_http_server_get_request (SwfdecAsContext *cx, - SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, - SwfdecAsValue *retval) -{ - SwfdecTestHTTPServer *server; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_SERVER, &server, ""); - - if (!server->server) { - swfdec_test_throw (cx, "Webserver not running"); - return; - } - - if (g_queue_is_empty (server->messages)) - swfdec_test_http_server_run (server); - - if (g_queue_is_empty (server->messages)) { - SWFDEC_AS_VALUE_SET_NULL (retval); - } else { - SwfdecAsObject *request; - - request = swfdec_test_http_request_new (cx, server, - g_queue_pop_tail (server->messages)); - - SWFDEC_AS_VALUE_SET_OBJECT (retval, request); - } -} - -SWFDEC_TEST_FUNCTION ("HTTPServer", swfdec_test_http_server_create, swfdec_test_http_server_get_type) -void -swfdec_test_http_server_create (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, - SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestHTTPServer *server; - int port; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_HTTP_SERVER, &server, "i", &port); - - if (port <= 0) - return; - - server->port = port; - - if (!swfdec_test_http_server_start (server)) - swfdec_test_throw (cx, "Failed to start web server for port %i", port); -} diff --git a/test/swfdec_test_http_server.h b/test/swfdec_test_http_server.h deleted file mode 100644 index ad6907d8..00000000 --- a/test/swfdec_test_http_server.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Swfdec - * Copyright (C) 2007 Benjamin Otte <otte@gnome.org> - * 2008 Pekka Lampila <pekka.lampila@iki.fi> - * - * 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_TEST_HTTP_SERVER_H_ -#define _SWFDEC_TEST_HTTP_SERVER_H_ - -#include <swfdec/swfdec.h> -#include <libsoup/soup.h> - -G_BEGIN_DECLS - - -typedef struct _SwfdecTestHTTPServer SwfdecTestHTTPServer; -typedef struct _SwfdecTestHTTPServerClass SwfdecTestHTTPServerClass; - -#define SWFDEC_TYPE_TEST_HTTP_SERVER (swfdec_test_http_server_get_type()) -#define SWFDEC_IS_TEST_HTTP_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_TEST_HTTP_SERVER)) -#define SWFDEC_IS_TEST_HTTP_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_TEST_HTTP_SERVER)) -#define SWFDEC_TEST_HTTP_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_TEST_HTTP_SERVER, SwfdecTestHTTPServer)) -#define SWFDEC_TEST_HTTP_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_TEST_HTTP_SERVER, SwfdecTestHTTPServerClass)) -#define SWFDEC_TEST_HTTP_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_TEST_HTTP_SERVER, SwfdecTestHTTPServerClass)) - -struct _SwfdecTestHTTPServer -{ - SwfdecAsObject as_object; - - GMainContext * context; - SoupServer * server; - guint port; - - GQueue * messages; // SoupMessage ** -}; - -struct _SwfdecTestHTTPServerClass -{ - SwfdecAsObjectClass as_object_class; -}; - -GType swfdec_test_http_server_get_type (void); - -SwfdecAsObject *swfdec_test_http_server_new (SwfdecAsContext * context, - guint port); -void swfdec_test_http_server_run (SwfdecTestHTTPServer * server); - -G_END_DECLS -#endif diff --git a/test/swfdec_test_image.c b/test/swfdec_test_image.c index 98cd5591..9c5e1250 100644 --- a/test/swfdec_test_image.c +++ b/test/swfdec_test_image.c @@ -28,26 +28,26 @@ #define SWFDEC_TEST_IMAGE_IS_VALID(image) ((image)->surface && \ cairo_surface_status ((image)->surface) == CAIRO_STATUS_SUCCESS) -SwfdecAsObject * +SwfdecTestImage * swfdec_test_image_new (SwfdecAsContext *context, guint width, guint height) { - SwfdecAsValue val; - SwfdecAsObject *ret; + SwfdecTestImage *ret; + SwfdecAsObject *object; ret = g_object_new (SWFDEC_TYPE_TEST_IMAGE, "context", context, NULL); - swfdec_as_object_get_variable (context->global, - swfdec_as_context_get_string (context, "Image"), &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (ret, SWFDEC_AS_VALUE_GET_OBJECT (&val)); + ret->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + + object = swfdec_as_object_new (context, NULL); + swfdec_as_object_set_constructor_by_name (object, + swfdec_as_context_get_string (context, "Image"), NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (ret)); - SWFDEC_TEST_IMAGE (ret)->surface = - cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); return ret; } /*** SWFDEC_TEST_IMAGE ***/ -G_DEFINE_TYPE (SwfdecTestImage, swfdec_test_image, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTestImage, swfdec_test_image, SWFDEC_TYPE_AS_RELAY) static void swfdec_test_image_dispose (GObject *object) @@ -136,20 +136,22 @@ buffer_diff_core (unsigned char *buf_a, return result; } -SWFDEC_TEST_FUNCTION ("Image_compare", swfdec_test_image_compare, 0) +SWFDEC_TEST_FUNCTION ("Image_compare", swfdec_test_image_compare) void swfdec_test_image_compare (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestImage *image, *compare, *diff; + SwfdecAsObject *o; int w, h; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_IMAGE, &image, "O", &compare); + SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_IMAGE, &image, "o", &o); - if (!SWFDEC_IS_TEST_IMAGE (compare)) + if (!SWFDEC_IS_TEST_IMAGE (o->relay)) return; + compare = SWFDEC_TEST_IMAGE (o->relay); - SWFDEC_AS_VALUE_SET_OBJECT (retval, SWFDEC_AS_OBJECT (image)); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (image))); if (!SWFDEC_TEST_IMAGE_IS_VALID (image) || !SWFDEC_TEST_IMAGE_IS_VALID (compare)) return; @@ -164,8 +166,6 @@ swfdec_test_image_compare (SwfdecAsContext *cx, SwfdecAsObject *object, guint ar if (h != cairo_image_surface_get_height (compare->surface)) return; diff = SWFDEC_TEST_IMAGE (swfdec_test_image_new (cx, w, h)); - if (!diff) - return; if (!buffer_diff_core (cairo_image_surface_get_data (image->surface), cairo_image_surface_get_data (compare->surface), @@ -174,13 +174,14 @@ swfdec_test_image_compare (SwfdecAsContext *cx, SwfdecAsObject *object, guint ar cairo_image_surface_get_stride (image->surface), cairo_image_surface_get_stride (compare->surface), cairo_image_surface_get_stride (diff->surface)) != 0) { - SWFDEC_AS_VALUE_SET_OBJECT (retval, SWFDEC_AS_OBJECT (diff)); + SWFDEC_AS_VALUE_SET_OBJECT (retval, + swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (diff))); } else { SWFDEC_AS_VALUE_SET_NULL (retval); } } -SWFDEC_TEST_FUNCTION ("Image_save", swfdec_test_image_save, 0) +SWFDEC_TEST_FUNCTION ("Image_save", swfdec_test_image_save) void swfdec_test_image_save (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -203,7 +204,7 @@ swfdec_test_image_save (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SWFDEC_AS_VALUE_SET_BOOLEAN (retval, TRUE); } -SWFDEC_TEST_FUNCTION ("Image", swfdec_test_image_create, swfdec_test_image_get_type) +SWFDEC_TEST_FUNCTION ("Image", swfdec_test_image_create) void swfdec_test_image_create (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -211,8 +212,15 @@ swfdec_test_image_create (SwfdecAsContext *cx, SwfdecAsObject *object, guint arg SwfdecTestImage *image; const char *filename; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_IMAGE, &image, "s", &filename); + if (!swfdec_as_context_is_constructing (cx)) + return; + + SWFDEC_AS_CHECK (0, NULL, "s", &filename); + image = g_object_new (SWFDEC_TYPE_TEST_IMAGE, "context", cx, NULL); image->surface = cairo_image_surface_create_from_png (filename); + + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (image)); + SWFDEC_AS_VALUE_SET_OBJECT (retval, object); } diff --git a/test/swfdec_test_image.h b/test/swfdec_test_image.h index 6de6ccc9..57919534 100644 --- a/test/swfdec_test_image.h +++ b/test/swfdec_test_image.h @@ -37,21 +37,21 @@ typedef struct _SwfdecTestImageClass SwfdecTestImageClass; struct _SwfdecTestImage { - SwfdecAsObject as_object; + SwfdecAsRelay relay; cairo_surface_t * surface; /* surface or NULL when broken image */ }; struct _SwfdecTestImageClass { - SwfdecAsObjectClass as_object_class; + SwfdecAsRelayClass relay_class; }; -GType swfdec_test_image_get_type (void); +GType swfdec_test_image_get_type (void); -SwfdecAsObject *swfdec_test_image_new (SwfdecAsContext * context, - guint width, - guint height); +SwfdecTestImage * swfdec_test_image_new (SwfdecAsContext * context, + guint width, + guint height); G_END_DECLS #endif diff --git a/test/swfdec_test_initialize.as b/test/swfdec_test_initialize.as index 753732ca..9ddc6637 100644 --- a/test/swfdec_test_initialize.as +++ b/test/swfdec_test_initialize.as @@ -30,35 +30,16 @@ Image.prototype = {}; Image.prototype.compare = Native.Image_compare; Image.prototype.save = Native.Image_save; -HTTPServer = Native.HTTPServer; -HTTPServer.prototype = {}; -HTTPServer.prototype.getRequest = Native.HTTPServer_getRequest; -HTTPServer.prototype.addProperty ("port", Native.HTTPServer_get_port, null); - -HTTPRequest = new Object (); -HTTPRequest.prototype = {}; -HTTPRequest.prototype.addProperty ("server", Native.HTTPRequest_get_server, null); -HTTPRequest.prototype.addProperty ("url", Native.HTTPRequest_get_url, null); -HTTPRequest.prototype.addProperty ("path", Native.HTTPRequest_get_path, null); -HTTPRequest.prototype.addProperty ("headers", Native.HTTPRequest_get_headers, null); -HTTPRequest.prototype.addProperty ("contentType", Native.HTTPRequest_get_contentType, Native.HTTPRequest_set_contentType); -HTTPRequest.prototype.addProperty ("statusCode", Native.HTTPRequest_get_statusCode, Native.HTTPRequest_set_statusCode); -HTTPRequest.prototype.toString = Native.HTTPRequest_toString; -HTTPRequest.prototype.send = Native.HTTPRequest_send; -HTTPRequest.prototype.close = Native.HTTPRequest_close; - Socket = function () {}; Socket.prototype = {}; Socket.prototype.close = Native.Socket_close; Socket.prototype.error = Native.Socket_error; -Socket.prototype.receive = Native.Socket_receive; Socket.prototype.send = Native.Socket_send; Socket.prototype.addProperty ("closed", Native.Socket_get_closed, null); Test = Native.Test; Test.prototype = {}; Test.prototype.advance = Native.Test_advance; -Test.prototype.getSocket = Native.Test_getSocket; Test.prototype.mouse_move = Native.Test_mouse_move; Test.prototype.mouse_press = Native.Test_mouse_press; Test.prototype.mouse_release = Native.Test_mouse_release; diff --git a/test/swfdec_test_initialize.h b/test/swfdec_test_initialize.h index d4819277..1de98906 100644 --- a/test/swfdec_test_initialize.h +++ b/test/swfdec_test_initialize.h @@ -2,7 +2,7 @@ /* compiled from swfdec_test_initialize.as */ static const unsigned char swfdec_test_initialize[] = { - 0x88, 0xBD, 0x03, 0x51, 0x00, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x00, 0x4E, 0x61, 0x74, 0x69, + 0x88, 0x08, 0x02, 0x35, 0x00, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x00, 0x4E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x00, 0x6C, 0x6F, 0x61, 0x64, 0x00, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5F, 0x6C, 0x6F, 0x61, 0x64, 0x00, 0x70, 0x72, 0x6F, 0x74, 0x6F, 0x74, 0x79, 0x70, 0x65, 0x00, 0x64, 0x69, 0x66, 0x66, 0x00, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5F, 0x64, 0x69, 0x66, 0x66, 0x00, 0x66, @@ -12,143 +12,82 @@ static const unsigned char swfdec_test_initialize[] = { 0x6F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x00, 0x49, 0x6D, 0x61, 0x67, 0x65, 0x00, 0x63, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x65, 0x00, 0x49, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x63, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x65, 0x00, 0x73, 0x61, 0x76, 0x65, 0x00, 0x49, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x73, - 0x61, 0x76, 0x65, 0x00, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x00, 0x67, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x00, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x5F, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x00, - 0x70, 0x6F, 0x72, 0x74, 0x00, 0x48, 0x54, 0x54, 0x50, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5F, - 0x67, 0x65, 0x74, 0x5F, 0x70, 0x6F, 0x72, 0x74, 0x00, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6F, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x00, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x00, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x00, 0x48, - 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x00, 0x75, 0x72, 0x6C, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x75, 0x72, 0x6C, 0x00, 0x70, 0x61, - 0x74, 0x68, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x67, - 0x65, 0x74, 0x5F, 0x70, 0x61, 0x74, 0x68, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x00, - 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x00, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, - 0x67, 0x65, 0x74, 0x5F, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x54, 0x79, 0x70, 0x65, 0x00, - 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x73, 0x65, 0x74, 0x5F, - 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x54, 0x79, 0x70, 0x65, 0x00, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x43, 0x6F, 0x64, 0x65, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6F, 0x64, - 0x65, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x73, 0x65, - 0x74, 0x5F, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6F, 0x64, 0x65, 0x00, 0x48, 0x54, 0x54, - 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x74, 0x6F, 0x53, 0x74, 0x72, 0x69, 0x6E, - 0x67, 0x00, 0x73, 0x65, 0x6E, 0x64, 0x00, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5F, 0x73, 0x65, 0x6E, 0x64, 0x00, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x00, 0x48, 0x54, - 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5F, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x00, - 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x63, 0x6C, - 0x6F, 0x73, 0x65, 0x00, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, - 0x5F, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x00, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x00, 0x53, - 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x00, 0x53, 0x6F, - 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x73, 0x65, 0x6E, 0x64, 0x00, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x64, - 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x63, 0x6C, 0x6F, 0x73, - 0x65, 0x64, 0x00, 0x54, 0x65, 0x73, 0x74, 0x00, 0x61, 0x64, 0x76, 0x61, 0x6E, 0x63, 0x65, 0x00, - 0x54, 0x65, 0x73, 0x74, 0x5F, 0x61, 0x64, 0x76, 0x61, 0x6E, 0x63, 0x65, 0x00, 0x67, 0x65, 0x74, - 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x53, - 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x00, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x6D, 0x6F, 0x76, 0x65, - 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x6D, 0x6F, 0x76, 0x65, - 0x00, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x54, 0x65, 0x73, - 0x74, 0x5F, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x6D, 0x6F, - 0x75, 0x73, 0x65, 0x5F, 0x72, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, - 0x5F, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x72, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x00, 0x72, - 0x65, 0x6E, 0x64, 0x65, 0x72, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x72, 0x65, 0x6E, 0x64, 0x65, - 0x72, 0x00, 0x72, 0x65, 0x73, 0x65, 0x74, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x72, 0x65, 0x73, - 0x65, 0x74, 0x00, 0x72, 0x61, 0x74, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, - 0x5F, 0x72, 0x61, 0x74, 0x65, 0x00, 0x71, 0x75, 0x69, 0x74, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, - 0x67, 0x65, 0x74, 0x5F, 0x71, 0x75, 0x69, 0x74, 0x00, 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x54, - 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x6C, 0x61, - 0x75, 0x6E, 0x63, 0x68, 0x65, 0x64, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, - 0x6C, 0x61, 0x75, 0x6E, 0x63, 0x68, 0x65, 0x64, 0x00, 0x70, 0x72, 0x69, 0x6E, 0x74, 0x00, 0x73, - 0x00, 0x49, 0x4E, 0x46, 0x4F, 0x3A, 0x20, 0x00, 0x45, 0x52, 0x52, 0x4F, 0x52, 0x3A, 0x20, 0x00, - 0x96, 0x04, 0x00, 0x08, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x00, 0x4E, 0x1D, 0x96, - 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x04, 0x00, 0x08, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x03, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x05, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x06, 0x4E, + 0x61, 0x76, 0x65, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x00, 0x63, 0x6C, 0x6F, 0x73, 0x65, + 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x00, 0x65, 0x72, + 0x72, 0x6F, 0x72, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x65, 0x72, 0x72, 0x6F, 0x72, + 0x00, 0x73, 0x65, 0x6E, 0x64, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, 0x73, 0x65, 0x6E, + 0x64, 0x00, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x64, 0x00, 0x53, 0x6F, 0x63, 0x6B, 0x65, 0x74, 0x5F, + 0x67, 0x65, 0x74, 0x5F, 0x63, 0x6C, 0x6F, 0x73, 0x65, 0x64, 0x00, 0x61, 0x64, 0x64, 0x50, 0x72, + 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x00, 0x54, 0x65, 0x73, 0x74, 0x00, 0x61, 0x64, 0x76, 0x61, + 0x6E, 0x63, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x61, 0x64, 0x76, 0x61, 0x6E, 0x63, 0x65, + 0x00, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x6D, 0x6F, 0x76, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, + 0x5F, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x6D, 0x6F, 0x76, 0x65, 0x00, 0x6D, 0x6F, 0x75, 0x73, + 0x65, 0x5F, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x6D, 0x6F, 0x75, + 0x73, 0x65, 0x5F, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x6D, 0x6F, 0x75, 0x73, 0x65, 0x5F, 0x72, + 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x6D, 0x6F, 0x75, 0x73, + 0x65, 0x5F, 0x72, 0x65, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x00, 0x72, 0x65, 0x6E, 0x64, 0x65, 0x72, + 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x72, 0x65, 0x6E, 0x64, 0x65, 0x72, 0x00, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x72, 0x65, 0x73, 0x65, 0x74, 0x00, 0x72, 0x61, + 0x74, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x72, 0x61, 0x74, 0x65, + 0x00, 0x71, 0x75, 0x69, 0x74, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x71, + 0x75, 0x69, 0x74, 0x00, 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, + 0x65, 0x74, 0x5F, 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x6C, 0x61, 0x75, 0x6E, 0x63, 0x68, 0x65, + 0x64, 0x00, 0x54, 0x65, 0x73, 0x74, 0x5F, 0x67, 0x65, 0x74, 0x5F, 0x6C, 0x61, 0x75, 0x6E, 0x63, + 0x68, 0x65, 0x64, 0x00, 0x70, 0x72, 0x69, 0x6E, 0x74, 0x00, 0x73, 0x00, 0x49, 0x4E, 0x46, 0x4F, + 0x3A, 0x20, 0x00, 0x45, 0x52, 0x52, 0x4F, 0x52, 0x3A, 0x20, 0x00, 0x96, 0x04, 0x00, 0x08, 0x00, + 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x00, 0x4E, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, + 0x96, 0x04, 0x00, 0x08, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x03, 0x4E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, - 0x08, 0x07, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x08, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, - 0x00, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x09, 0x08, 0x01, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x0A, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0B, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0C, - 0x4E, 0x4F, 0x96, 0x04, 0x00, 0x08, 0x0D, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, - 0x1D, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, - 0x04, 0x00, 0x08, 0x0E, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x4E, 0x4F, 0x96, 0x02, - 0x00, 0x08, 0x0D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x10, 0x08, - 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x11, 0x4E, 0x4F, 0x96, 0x04, 0x00, 0x08, 0x12, 0x08, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x12, 0x4E, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x12, 0x1C, 0x96, 0x07, - 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x12, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x13, 0x08, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x14, 0x4E, 0x4F, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x16, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x15, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x12, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x09, 0x00, 0x08, - 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x08, 0x19, 0x40, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, - 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x03, 0x00, 0x02, - 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x1A, 0x07, 0x03, - 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x17, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1D, 0x4E, - 0x96, 0x09, 0x00, 0x08, 0x1C, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1F, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x1E, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, - 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x21, 0x4E, 0x96, 0x09, - 0x00, 0x08, 0x20, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x24, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x23, 0x4E, - 0x96, 0x09, 0x00, 0x08, 0x22, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x01, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x27, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x26, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x25, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x18, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, - 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0B, 0x08, 0x01, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x28, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x29, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x2A, - 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x18, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, - 0x00, 0x08, 0x2B, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x2C, 0x4E, 0x4F, 0x96, 0x02, 0x00, - 0x08, 0x2D, 0x8E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, 0x96, 0x02, - 0x00, 0x08, 0x2D, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x2D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, - 0x2B, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x2E, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x2D, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x2F, 0x08, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x30, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x2D, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x31, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x32, 0x4E, - 0x4F, 0x96, 0x02, 0x00, 0x08, 0x2D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, - 0x08, 0x29, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x33, 0x4E, 0x4F, 0x96, 0x03, 0x00, 0x02, - 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x35, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x34, 0x07, 0x03, - 0x00, 0x00, 0x00, 0x08, 0x2D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, - 0x17, 0x52, 0x17, 0x96, 0x04, 0x00, 0x08, 0x36, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x36, - 0x4E, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, - 0x96, 0x04, 0x00, 0x08, 0x37, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x38, 0x4E, 0x4F, 0x96, - 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x39, - 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x3A, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x3B, 0x08, 0x01, 0x1C, 0x96, 0x02, - 0x00, 0x08, 0x3C, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x4E, 0x96, 0x04, 0x00, 0x08, 0x3D, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x3E, 0x4E, 0x4F, - 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, - 0x3F, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x40, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x36, - 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x41, 0x08, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x42, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, - 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x43, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x44, 0x4E, - 0x4F, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x46, 0x4E, 0x96, 0x09, - 0x00, 0x08, 0x45, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, - 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, - 0x02, 0x00, 0x08, 0x48, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x47, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, - 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x4A, 0x4E, 0x96, 0x09, 0x00, 0x08, - 0x49, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x36, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, - 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, - 0x08, 0x4C, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x4B, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x36, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x17, 0x52, 0x17, 0x96, 0x02, 0x00, - 0x08, 0x4D, 0x8E, 0x0B, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x27, 0x00, - 0x96, 0x02, 0x00, 0x08, 0x4E, 0x1C, 0x12, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x04, 0x00, 0x08, - 0x4F, 0x08, 0x4E, 0x1C, 0x47, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, 0x1C, - 0x96, 0x02, 0x00, 0x08, 0x4D, 0x52, 0x17, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x2F, 0x8E, 0x0B, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x4E, - 0x1C, 0x12, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x04, 0x00, 0x08, 0x50, 0x08, 0x4E, 0x1C, 0x47, - 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x4D, - 0x52, 0x17, 0x1D, 0x00 + 0x08, 0x05, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x06, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, + 0x00, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x07, 0x08, 0x01, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x08, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x09, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0A, + 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x00, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, + 0x00, 0x08, 0x0B, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0C, 0x4E, 0x4F, 0x96, 0x04, 0x00, + 0x08, 0x0D, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x4E, 0x1D, 0x96, 0x02, 0x00, 0x08, + 0x0D, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x0D, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x0E, 0x08, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x0F, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x0D, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x10, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x11, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x12, 0x9B, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x12, 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x12, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, + 0x96, 0x04, 0x00, 0x08, 0x13, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x14, 0x4E, 0x4F, 0x96, + 0x02, 0x00, 0x08, 0x12, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x15, + 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x16, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x12, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x17, 0x08, 0x01, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x18, 0x4E, 0x4F, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x1A, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x19, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x12, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x04, 0x00, 0x08, + 0x1C, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x4E, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x1C, + 0x1C, 0x96, 0x07, 0x00, 0x08, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, 0x43, 0x4F, 0x96, 0x02, 0x00, + 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x1D, 0x08, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x1E, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x1F, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, + 0x20, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, + 0x04, 0x00, 0x08, 0x21, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x22, 0x4E, 0x4F, 0x96, 0x02, + 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x23, 0x08, + 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x24, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, + 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x04, 0x00, 0x08, 0x25, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x26, 0x4E, 0x4F, 0x96, 0x02, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, + 0x96, 0x04, 0x00, 0x08, 0x27, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x28, 0x4E, 0x4F, 0x96, + 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x2A, 0x4E, 0x96, 0x09, 0x00, 0x08, + 0x29, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, + 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, + 0x08, 0x2C, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x2B, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, + 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x03, 0x00, + 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x2E, 0x4E, 0x96, 0x09, 0x00, 0x08, 0x2D, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, + 0x08, 0x1B, 0x52, 0x17, 0x96, 0x03, 0x00, 0x02, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x30, + 0x4E, 0x96, 0x09, 0x00, 0x08, 0x2F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x96, 0x02, + 0x00, 0x08, 0x04, 0x4E, 0x96, 0x02, 0x00, 0x08, 0x1B, 0x52, 0x17, 0x96, 0x02, 0x00, 0x08, 0x31, + 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x73, 0x00, 0x27, 0x00, 0x96, 0x02, 0x00, 0x08, 0x32, 0x1C, + 0x12, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x04, 0x00, 0x08, 0x33, 0x08, 0x32, 0x1C, 0x47, 0x96, + 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, 0x1C, 0x96, 0x02, 0x00, 0x08, 0x31, 0x52, + 0x17, 0x1D, 0x96, 0x02, 0x00, 0x08, 0x15, 0x9B, 0x07, 0x00, 0x00, 0x01, 0x00, 0x73, 0x00, 0x27, + 0x00, 0x96, 0x02, 0x00, 0x08, 0x32, 0x1C, 0x12, 0x9D, 0x02, 0x00, 0x1B, 0x00, 0x96, 0x04, 0x00, + 0x08, 0x34, 0x08, 0x32, 0x1C, 0x47, 0x96, 0x07, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, + 0x1C, 0x96, 0x02, 0x00, 0x08, 0x31, 0x52, 0x17, 0x1D, 0x00 }; diff --git a/test/swfdec_test_plugin.c b/test/swfdec_test_plugin.c index bb5a013c..679aac6d 100644 --- a/test/swfdec_test_plugin.c +++ b/test/swfdec_test_plugin.c @@ -145,7 +145,7 @@ swfdec_test_plugin_swfdec_new (SwfdecTestPlugin *plugin) plugin->data = player = g_object_new (SWFDEC_TYPE_PLAYER, "random-seed", 0, "loader-type", SWFDEC_TYPE_FILE_LOADER, "socket-type", SWFDEC_TYPE_TEST_SWFDEC_SOCKET, "max-runtime", 0, "start-time", &the_beginning, "allow-fullscreen", TRUE, - NULL); + "memory-until-gc", 0, NULL); g_object_set_data (G_OBJECT (player), "plugin", plugin); g_signal_connect (player, "fscommand", G_CALLBACK (swfdec_test_plugin_swfdec_fscommand), plugin); diff --git a/test/swfdec_test_socket.c b/test/swfdec_test_socket.c index 2b65f14b..1d51bf93 100644 --- a/test/swfdec_test_socket.c +++ b/test/swfdec_test_socket.c @@ -46,23 +46,27 @@ swfdec_test_throw (SwfdecAsContext *cx, const char *message, ...) /*** SWFDEC_TEST_SOCKET ***/ -G_DEFINE_TYPE (SwfdecTestSocket, swfdec_test_socket, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTestSocket, swfdec_test_socket, SWFDEC_TYPE_AS_RELAY) static void swfdec_test_socket_do_close (SwfdecTestSocket *sock, gboolean success) { + SwfdecAsContext *cx; + SwfdecAsValue val; + if (sock->plugin == NULL) return; + cx = swfdec_gc_object_get_context (sock); sock->plugin->finish (sock->plugin, success ? 0 : 1); sock->plugin = NULL; - if (sock->test->pending_sockets && - sock->test->pending_sockets->data == sock) { - sock->test->pending_sockets = sock->test->pending_sockets->prev; - } - sock->test->sockets = g_list_remove (sock->test->sockets, sock); + sock->test->sockets = g_slist_remove (sock->test->sockets, sock); sock->test = NULL; + + SWFDEC_AS_VALUE_SET_BOOLEAN (&val, success); + swfdec_as_relay_call (SWFDEC_AS_RELAY (sock), swfdec_as_context_get_string (cx, "onClose"), + 1, &val, NULL); } static void @@ -71,8 +75,6 @@ swfdec_test_socket_dispose (GObject *object) SwfdecTestSocket *sock = SWFDEC_TEST_SOCKET (object); swfdec_test_socket_do_close (sock, FALSE); - swfdec_buffer_queue_unref (sock->receive_queue); - sock->receive_queue = NULL; G_OBJECT_CLASS (swfdec_test_socket_parent_class)->dispose (object); } @@ -88,12 +90,11 @@ swfdec_test_socket_class_init (SwfdecTestSocketClass *klass) static void swfdec_test_socket_init (SwfdecTestSocket *sock) { - sock->receive_queue = swfdec_buffer_queue_new (); } /*** AS CODE ***/ -SWFDEC_TEST_FUNCTION ("Socket_send", swfdec_test_socket_send, 0) +SWFDEC_TEST_FUNCTION ("Socket_send", swfdec_test_socket_send) void swfdec_test_socket_send (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -112,37 +113,7 @@ swfdec_test_socket_send (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc swfdec_buffer_unref (buffer); } -SWFDEC_TEST_FUNCTION ("Socket_receive", swfdec_test_socket_receive, 0) -void -swfdec_test_socket_receive (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, - SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestSocket *sock; - SwfdecBuffer *buffer; - gsize len = 0, depth; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_SOCKET, &sock, "|i", &len); - - depth = swfdec_buffer_queue_get_depth (sock->receive_queue); - if (len > 0) { - if (depth < len) { - swfdec_test_throw (cx, "only %zu bytes available", depth); - return; - } else { - buffer = swfdec_buffer_queue_pull (sock->receive_queue, len); - } - } else { - if (depth == 0) { - SWFDEC_AS_VALUE_SET_NULL (retval); - return; - } else { - buffer = swfdec_buffer_queue_pull (sock->receive_queue, depth); - } - } - SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_test_buffer_new (cx, buffer)); -} - -SWFDEC_TEST_FUNCTION ("Socket_error", swfdec_test_socket_error, 0) +SWFDEC_TEST_FUNCTION ("Socket_error", swfdec_test_socket_error) void swfdec_test_socket_error (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -154,7 +125,7 @@ swfdec_test_socket_error (SwfdecAsContext *cx, SwfdecAsObject *object, guint arg swfdec_test_socket_do_close (sock, FALSE); } -SWFDEC_TEST_FUNCTION ("Socket_close", swfdec_test_socket_close_as, 0) +SWFDEC_TEST_FUNCTION ("Socket_close", swfdec_test_socket_close_as) void swfdec_test_socket_close_as (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -166,7 +137,7 @@ swfdec_test_socket_close_as (SwfdecAsContext *cx, SwfdecAsObject *object, guint swfdec_test_socket_do_close (sock, TRUE); } -SWFDEC_TEST_FUNCTION ("Socket_get_closed", swfdec_test_socket_get_closed, 0) +SWFDEC_TEST_FUNCTION ("Socket_get_closed", swfdec_test_socket_get_closed) void swfdec_test_socket_get_closed (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -183,10 +154,14 @@ swfdec_test_socket_plugin_send (SwfdecTestPluginSocket *plugin, unsigned char *d unsigned long length) { SwfdecTestSocket *sock = plugin->data; - SwfdecBuffer *buffer; + SwfdecAsContext *cx = swfdec_gc_object_get_context (sock); + SwfdecTestBuffer *buffer; + SwfdecAsValue val; - buffer = swfdec_buffer_new_for_data (g_memdup (data, length), length); - swfdec_buffer_queue_push (sock->receive_queue, buffer); + buffer = swfdec_test_buffer_new (cx, swfdec_buffer_new_for_data (g_memdup (data, length), length)); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (buffer))); + swfdec_as_relay_call (SWFDEC_AS_RELAY (sock), swfdec_as_context_get_string (cx, "onData"), + 1, &val, NULL); } static void @@ -195,12 +170,13 @@ swfdec_test_socket_plugin_close (SwfdecTestPluginSocket *plugin) swfdec_test_socket_do_close (plugin->data, TRUE); } -SwfdecAsObject * +SwfdecTestSocket * swfdec_test_socket_new (SwfdecTestTest *test, SwfdecTestPluginSocket *plugin) { - SwfdecAsValue val; + SwfdecAsObject *object; + SwfdecTestSocket *new; SwfdecAsContext *cx; - SwfdecAsObject *new; + SwfdecAsValue val; g_return_val_if_fail (SWFDEC_IS_TEST_TEST (test), NULL); g_return_val_if_fail (plugin != NULL, NULL); @@ -208,24 +184,24 @@ swfdec_test_socket_new (SwfdecTestTest *test, SwfdecTestPluginSocket *plugin) cx = swfdec_gc_object_get_context (test); new = g_object_new (SWFDEC_TYPE_TEST_SOCKET, "context", cx, NULL); - swfdec_as_object_get_variable (cx->global, - swfdec_as_context_get_string (cx, "Socket"), &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (new, SWFDEC_AS_VALUE_GET_OBJECT (&val)); + object = swfdec_as_object_new (cx, NULL); + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (new)); + swfdec_as_object_set_constructor_by_name (object, + swfdec_as_context_get_string (cx, "Socket"), NULL); plugin->send = swfdec_test_socket_plugin_send; plugin->close = swfdec_test_socket_plugin_close; plugin->data = new; - SWFDEC_TEST_SOCKET (new)->test = test; - SWFDEC_TEST_SOCKET (new)->plugin = plugin; - test->sockets = g_list_append (test->sockets, new); + new->test = test; + new->plugin = plugin; + test->sockets = g_slist_prepend (test->sockets, new); SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (cx, plugin->host)); - swfdec_as_object_set_variable (new, + swfdec_as_object_set_variable (object, swfdec_as_context_get_string (cx, "host"), &val); - SWFDEC_AS_VALUE_SET_INT (&val, plugin->port); - swfdec_as_object_set_variable (new, + val = swfdec_as_value_from_integer (cx, plugin->port); + swfdec_as_object_set_variable (object, swfdec_as_context_get_string (cx, "port"), &val); return new; diff --git a/test/swfdec_test_socket.h b/test/swfdec_test_socket.h index f3a7625d..46285cf0 100644 --- a/test/swfdec_test_socket.h +++ b/test/swfdec_test_socket.h @@ -39,23 +39,22 @@ typedef struct _SwfdecTestSocketClass SwfdecTestSocketClass; struct _SwfdecTestSocket { - SwfdecAsObject as_object; + SwfdecAsRelay relay; SwfdecTestPluginSocket * plugin; /* the socket we manage or NULL if closed */ SwfdecTestTest * test; /* the test that spawned us */ - SwfdecBufferQueue * receive_queue; /* queue with received data */ }; struct _SwfdecTestSocketClass { - SwfdecAsObjectClass as_object_class; + SwfdecAsRelayClass relay_class; }; -GType swfdec_test_socket_get_type (void); +GType swfdec_test_socket_get_type (void); -SwfdecAsObject *swfdec_test_socket_new (SwfdecTestTest * test, - SwfdecTestPluginSocket * sock); -void swfdec_test_socket_close (SwfdecTestSocket * sock); +SwfdecTestSocket * swfdec_test_socket_new (SwfdecTestTest * test, + SwfdecTestPluginSocket * sock); +void swfdec_test_socket_close (SwfdecTestSocket * sock); G_END_DECLS #endif diff --git a/test/swfdec_test_test.c b/test/swfdec_test_test.c index b567d322..e7771ca8 100644 --- a/test/swfdec_test_test.c +++ b/test/swfdec_test_test.c @@ -88,8 +88,14 @@ swfdec_test_test_request_socket (SwfdecTestPlugin *plugin, SwfdecTestPluginSocket *psock) { SwfdecTestTest *test = SWFDEC_TEST_TEST_FROM_PLUGIN (plugin); - - swfdec_test_socket_new (test, psock); + SwfdecAsContext *cx = swfdec_gc_object_get_context (test); + SwfdecTestSocket *sock; + SwfdecAsValue val; + + sock = swfdec_test_socket_new (test, psock); + SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (sock))); + swfdec_as_relay_call (SWFDEC_AS_RELAY (test), swfdec_as_context_get_string (cx, "onSocket"), + 1, &val, NULL); } static void @@ -143,7 +149,6 @@ swfdec_test_test_unload_plugin (SwfdecTestTest *test) /* unload all objects generated by the plugin first */ while (test->sockets) swfdec_test_socket_close (test->sockets->data); - test->pending_sockets = NULL; test->plugin.finish (&test->plugin); g_free (test->plugin.filename); @@ -158,7 +163,7 @@ swfdec_test_test_unload_plugin (SwfdecTestTest *test) /*** SWFDEC_TEST_TEST ***/ -G_DEFINE_TYPE (SwfdecTestTest, swfdec_test_test, SWFDEC_TYPE_AS_OBJECT) +G_DEFINE_TYPE (SwfdecTestTest, swfdec_test_test, SWFDEC_TYPE_AS_RELAY) static void swfdec_test_test_dispose (GObject *object) @@ -185,11 +190,24 @@ swfdec_test_test_dispose (GObject *object) } static void +swfdec_test_test_mark (SwfdecGcObject *object) +{ + SwfdecTestTest *test = SWFDEC_TEST_TEST (object); + + g_slist_foreach (test->sockets, (GFunc) swfdec_gc_object_mark, NULL); + + SWFDEC_GC_OBJECT_CLASS (swfdec_test_test_parent_class)->mark (object); +} + +static void swfdec_test_test_class_init (SwfdecTestTestClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + SwfdecGcObjectClass *gc_class = SWFDEC_GC_OBJECT_CLASS (klass); object_class->dispose = swfdec_test_test_dispose; + + gc_class->mark = swfdec_test_test_mark; } static void @@ -210,7 +228,7 @@ swfdec_test_do_reset (SwfdecTestTest *test, const char *filename) swfdec_test_test_load_plugin (test, filename); } -SWFDEC_TEST_FUNCTION ("Test_advance", swfdec_test_test_advance, 0) +SWFDEC_TEST_FUNCTION ("Test_advance", swfdec_test_test_advance) void swfdec_test_test_advance (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -230,7 +248,7 @@ swfdec_test_test_advance (SwfdecAsContext *cx, SwfdecAsObject *object, guint arg } } -SWFDEC_TEST_FUNCTION ("Test_reset", swfdec_test_test_reset, 0) +SWFDEC_TEST_FUNCTION ("Test_reset", swfdec_test_test_reset) void swfdec_test_test_reset (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -243,7 +261,7 @@ swfdec_test_test_reset (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, swfdec_test_do_reset (test, filename); } -SWFDEC_TEST_FUNCTION ("Test_mouse_move", swfdec_test_test_mouse_move, 0) +SWFDEC_TEST_FUNCTION ("Test_mouse_move", swfdec_test_test_mouse_move) void swfdec_test_test_mouse_move (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -263,7 +281,7 @@ swfdec_test_test_mouse_move (SwfdecAsContext *cx, SwfdecAsObject *object, guint } } -SWFDEC_TEST_FUNCTION ("Test_mouse_press", swfdec_test_test_mouse_press, 0) +SWFDEC_TEST_FUNCTION ("Test_mouse_press", swfdec_test_test_mouse_press) void swfdec_test_test_mouse_press (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -285,7 +303,7 @@ swfdec_test_test_mouse_press (SwfdecAsContext *cx, SwfdecAsObject *object, guint } } -SWFDEC_TEST_FUNCTION ("Test_mouse_release", swfdec_test_test_mouse_release, 0) +SWFDEC_TEST_FUNCTION ("Test_mouse_release", swfdec_test_test_mouse_release) void swfdec_test_test_mouse_release (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -303,17 +321,17 @@ swfdec_test_test_mouse_release (SwfdecAsContext *cx, SwfdecAsObject *object, gui if (test->plugin.advance) { test->plugin.mouse_release (&test->plugin, x, y, button); } else { - swfdec_test_throw (cx, "plugin doesn't implement mouse_press"); + swfdec_test_throw (cx, "plugin doesn't implement mouse_release"); } } -SWFDEC_TEST_FUNCTION ("Test_render", swfdec_test_test_render, 0) +SWFDEC_TEST_FUNCTION ("Test_render", swfdec_test_test_render) void swfdec_test_test_render (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestTest *test; - SwfdecAsObject *image; + SwfdecTestImage *image; int x = 0, y = 0, w = 0, h = 0; SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_TEST, &test, "|iiii", &x, &y, &w, &h); @@ -331,13 +349,13 @@ swfdec_test_test_render (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc test->plugin.screenshot (&test->plugin, cairo_image_surface_get_data (SWFDEC_TEST_IMAGE (image)->surface), x, y, w, h); - SWFDEC_AS_VALUE_SET_OBJECT (retval, image); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (image))); } else { - swfdec_test_throw (cx, "plugin doesn't implement mouse_press"); + swfdec_test_throw (cx, "plugin doesn't implement render"); } } -SWFDEC_TEST_FUNCTION ("Test", swfdec_test_test_new, swfdec_test_test_get_type) +SWFDEC_TEST_FUNCTION ("Test", swfdec_test_test_new) void swfdec_test_test_new (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -345,18 +363,25 @@ swfdec_test_test_new (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecTestTest *test; const char *filename = NULL; - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_TEST, &test, "|s", &filename); + if (!swfdec_as_context_is_constructing (cx)) + return; + + SWFDEC_AS_CHECK (0, NULL, "|s", &filename); + test = g_object_new (SWFDEC_TYPE_TEST_TEST, "context", cx, NULL); swfdec_test_do_reset (test, filename); + + swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (test)); + SWFDEC_AS_VALUE_SET_OBJECT (retval, object); } -SWFDEC_TEST_FUNCTION ("Test_get_launched", swfdec_test_test_get_launched, 0) +SWFDEC_TEST_FUNCTION ("Test_get_launched", swfdec_test_test_get_launched) void swfdec_test_test_get_launched (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestTest *test; - SwfdecAsObject *o; + SwfdecTestBuffer *buf; SwfdecBuffer *buffer; gsize len; @@ -364,43 +389,17 @@ swfdec_test_test_get_launched (SwfdecAsContext *cx, SwfdecAsObject *object, len = swfdec_buffer_queue_get_depth (test->launched); buffer = swfdec_buffer_queue_peek (test->launched, len); - o = swfdec_test_buffer_new (cx, buffer); - SWFDEC_AS_VALUE_SET_OBJECT (retval, o); -} - -SWFDEC_TEST_FUNCTION ("Socket_getSocket", swfdec_test_test_getSocket, 0) -void -swfdec_test_test_getSocket (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, - SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - SwfdecTestTest *test; - - SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_TEST, &test, ""); - - if (test->pending_sockets == NULL) { - if (test->sockets == NULL) { - SWFDEC_AS_VALUE_SET_NULL (retval); - } else { - test->pending_sockets = test->sockets; - SWFDEC_AS_VALUE_SET_OBJECT (retval, test->pending_sockets->data); - } - } else { - if (test->pending_sockets->next == NULL) { - SWFDEC_AS_VALUE_SET_NULL (retval); - } else { - test->pending_sockets = test->pending_sockets->next; - SWFDEC_AS_VALUE_SET_OBJECT (retval, test->pending_sockets->data); - } - } + buf = swfdec_test_buffer_new (cx, buffer); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (buf))); } -SWFDEC_TEST_FUNCTION ("Test_get_trace", swfdec_test_test_get_trace, 0) +SWFDEC_TEST_FUNCTION ("Test_get_trace", swfdec_test_test_get_trace) void swfdec_test_test_get_trace (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { SwfdecTestTest *test; - SwfdecAsObject *o; + SwfdecTestBuffer *buf; SwfdecBuffer *buffer; gsize len; @@ -408,11 +407,11 @@ swfdec_test_test_get_trace (SwfdecAsContext *cx, SwfdecAsObject *object, guint a len = swfdec_buffer_queue_get_depth (test->trace); buffer = swfdec_buffer_queue_peek (test->trace, len); - o = swfdec_test_buffer_new (cx, buffer); - SWFDEC_AS_VALUE_SET_OBJECT (retval, o); + buf = swfdec_test_buffer_new (cx, buffer); + SWFDEC_AS_VALUE_SET_OBJECT (retval, swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (buf))); } -SWFDEC_TEST_FUNCTION ("Test_get_quit", swfdec_test_test_get_quit, 0) +SWFDEC_TEST_FUNCTION ("Test_get_quit", swfdec_test_test_get_quit) void swfdec_test_test_get_quit (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -425,7 +424,7 @@ swfdec_test_test_get_quit (SwfdecAsContext *cx, SwfdecAsObject *object, guint ar SWFDEC_AS_VALUE_SET_BOOLEAN (retval, !test->plugin_loaded || test->plugin_error || test->plugin_quit); } -SWFDEC_TEST_FUNCTION ("Test_get_rate", swfdec_test_test_get_rate, 0) +SWFDEC_TEST_FUNCTION ("Test_get_rate", swfdec_test_test_get_rate) void swfdec_test_test_get_rate (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) @@ -437,6 +436,6 @@ swfdec_test_test_get_rate (SwfdecAsContext *cx, SwfdecAsObject *object, guint ar if (!test->plugin_loaded) return; - SWFDEC_AS_VALUE_SET_NUMBER (retval, test->plugin.rate / 256.0); + *retval = swfdec_as_value_from_number (cx, test->plugin.rate / 256.0); } diff --git a/test/swfdec_test_test.h b/test/swfdec_test_test.h index 19d50f34..ba3d18ba 100644 --- a/test/swfdec_test_test.h +++ b/test/swfdec_test_test.h @@ -39,7 +39,7 @@ typedef struct _SwfdecTestTestClass SwfdecTestTestClass; struct _SwfdecTestTest { - SwfdecAsObject as_object; + SwfdecAsRelay relay; SwfdecTestPlugin plugin; /* the plugin we use */ GModule * module; /* module we loaded the plugin from or NULL */ @@ -51,13 +51,12 @@ struct _SwfdecTestTest SwfdecBufferQueue * trace; /* all captured trace output */ SwfdecBufferQueue * launched; /* all launched urls */ - GList * sockets; /* list of all sockets */ - GList * pending_sockets;/* last socket handed out or NULL if none given out */ + GSList * sockets; /* list of all sockets */ }; struct _SwfdecTestTestClass { - SwfdecAsObjectClass as_object_class; + SwfdecAsRelayClass relay_class; }; extern char *swfdec_test_plugin_name; diff --git a/test/trace/BlurFilter-construct-5.swf b/test/trace/BlurFilter-construct-5.swf Binary files differnew file mode 100644 index 00000000..bb57054e --- /dev/null +++ b/test/trace/BlurFilter-construct-5.swf diff --git a/test/trace/BlurFilter-construct-5.swf.trace b/test/trace/BlurFilter-construct-5.swf.trace new file mode 100644 index 00000000..6bd7ac90 --- /dev/null +++ b/test/trace/BlurFilter-construct-5.swf.trace @@ -0,0 +1,112 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +0 args: / / +1 arg: / / +2 args: / / +3 args: / / +no new: / / +(0) (undefined): / / +(1) null (null): / / +(2) true (boolean): / / +(3) false (boolean): / / +(4) 0 (number): / / +(5) 1 (number): / / +(6) 0.5 (number): / / +(7) -1 (number): / / +(8) -0.5 (number): / / +(9) Infinity (number): / / +(10) -Infinity (number): / / +(11) NaN (number): / / +(12) (string): / / +(13) 0 (string): / / +(14) -0 (string): / / +(15) 0.0 (string): / / +(16) 1 (string): / / +(17) Hello World! (string): / / +(18) true (string): / / +(19) _level0 (string): / / +(20) äöü (string): / / +(21) _level0 (movieclip): / / +(22) [object Object] (object): / / +(23) 103584024400.25 (object): / / +(24) (object): / / +(25) (undefined): / / +(26) [type Object] (object): / / +(27) [type Object] (object): / / +(28) [object Object] (object): / / +(29) (object): / / +(30) (object): / / +(31) null (object): / / +(32) true (object): / / +(33) false (object): / / +(34) 0 (object): / / +(35) 1 (object): / / +(36) 0.5 (object): / / +(37) -1 (object): / / +(38) -0.5 (object): / / +(39) Infinity (object): / / +(40) -Infinity (object): / / +(41) NaN (object): / / +(42) (object): / / +(43) 0 (object): / / +(44) -0 (object): / / +(45) 0.0 (object): / / +(46) 1 (object): / / +(47) Hello World! (object): / / +(48) true (object): / / +(49) _level0 (object): / / +(50) äöü (object): / / +(51) _level0 (object): / / +(52) [type Object] (object): / / +(53) [type Object] (object): / / +(54) [type Object] (object): / / +(55) (object): / / +(56) [type Object] (object): / / +(57) [type Object] (object): / / +(58) [type Object] (object): / / +(59) [type Object] (object): / / +-0.2: / / +255.125: / / +15.125: / / +undefined +: / / +: / / diff --git a/test/trace/BlurFilter-construct-6.swf b/test/trace/BlurFilter-construct-6.swf Binary files differnew file mode 100644 index 00000000..fec9ca14 --- /dev/null +++ b/test/trace/BlurFilter-construct-6.swf diff --git a/test/trace/BlurFilter-construct-6.swf.trace b/test/trace/BlurFilter-construct-6.swf.trace new file mode 100644 index 00000000..a4455f43 --- /dev/null +++ b/test/trace/BlurFilter-construct-6.swf.trace @@ -0,0 +1,113 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +0 args: / / +1 arg: / / +2 args: / / +3 args: / / +no new: / / +(0) (undefined): / / +(1) null (null): / / +(2) true (boolean): / / +(3) false (boolean): / / +(4) 0 (number): / / +(5) 1 (number): / / +(6) 0.5 (number): / / +(7) -1 (number): / / +(8) -0.5 (number): / / +(9) Infinity (number): / / +(10) -Infinity (number): / / +(11) NaN (number): / / +(12) (string): / / +(13) 0 (string): / / +(14) -0 (string): / / +(15) 0.0 (string): / / +(16) 1 (string): / / +(17) Hello World! (string): / / +(18) true (string): / / +(19) _level0 (string): / / +(20) äöü (string): / / +(21) _level0 (movieclip): / / +(22) [object Object] (object): / / +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object): / / +(24) (object): / / +(25) [type Function] (function): / / +(26) [type Object] (object): / / +(27) [type Object] (object): / / +(28) [object Object] (object): / / +(29) (object): / / +(30) (object): / / +(31) null (object): / / +(32) true (object): / / +(33) false (object): / / +(34) 0 (object): / / +(35) 1 (object): / / +(36) 0.5 (object): / / +(37) -1 (object): / / +(38) -0.5 (object): / / +(39) Infinity (object): / / +(40) -Infinity (object): / / +(41) NaN (object): / / +(42) (object): / / +(43) 0 (object): / / +(44) -0 (object): / / +(45) 0.0 (object): / / +(46) 1 (object): / / +(47) Hello World! (object): / / +(48) true (object): / / +(49) _level0 (object): / / +(50) äöü (object): / / +(51) _level0 (object): / / +(52) [type Object] (object): / / +(53) [type Object] (object): / / +(54) [type Object] (object): / / +(55) [type Object] (object): / / +(56) [type Object] (object): / / +(57) [type Object] (object): / / +(58) [type Object] (object): / / +(59) [type Object] (object): / / +-0.2: / / +255.125: / / +15.125: / / +undefined +: / / +: / / diff --git a/test/trace/BlurFilter-construct-7.swf b/test/trace/BlurFilter-construct-7.swf Binary files differnew file mode 100644 index 00000000..88de706f --- /dev/null +++ b/test/trace/BlurFilter-construct-7.swf diff --git a/test/trace/BlurFilter-construct-7.swf.trace b/test/trace/BlurFilter-construct-7.swf.trace new file mode 100644 index 00000000..335f84f8 --- /dev/null +++ b/test/trace/BlurFilter-construct-7.swf.trace @@ -0,0 +1,113 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +0 args: undefined / undefined / undefined +1 arg: undefined / undefined / undefined +2 args: undefined / undefined / undefined +3 args: undefined / undefined / undefined +no new: undefined / undefined / undefined +(0) undefined (undefined): undefined / undefined / undefined +(1) null (null): undefined / undefined / undefined +(2) true (boolean): undefined / undefined / undefined +(3) false (boolean): undefined / undefined / undefined +(4) 0 (number): undefined / undefined / undefined +(5) 1 (number): undefined / undefined / undefined +(6) 0.5 (number): undefined / undefined / undefined +(7) -1 (number): undefined / undefined / undefined +(8) -0.5 (number): undefined / undefined / undefined +(9) Infinity (number): undefined / undefined / undefined +(10) -Infinity (number): undefined / undefined / undefined +(11) NaN (number): undefined / undefined / undefined +(12) (string): undefined / undefined / undefined +(13) 0 (string): undefined / undefined / undefined +(14) -0 (string): undefined / undefined / undefined +(15) 0.0 (string): undefined / undefined / undefined +(16) 1 (string): undefined / undefined / undefined +(17) Hello World! (string): undefined / undefined / undefined +(18) true (string): undefined / undefined / undefined +(19) _level0 (string): undefined / undefined / undefined +(20) äöü (string): undefined / undefined / undefined +(21) _level0 (movieclip): undefined / undefined / undefined +(22) [object Object] (object): undefined / undefined / undefined +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object): undefined / undefined / undefined +(24) (object): undefined / undefined / undefined +(25) [type Function] (function): undefined / undefined / undefined +(26) [type Object] (object): undefined / undefined / undefined +(27) [type Object] (object): undefined / undefined / undefined +(28) [object Object] (object): undefined / undefined / undefined +(29) undefined (object): undefined / undefined / undefined +(30) undefined (object): undefined / undefined / undefined +(31) null (object): undefined / undefined / undefined +(32) true (object): undefined / undefined / undefined +(33) false (object): undefined / undefined / undefined +(34) 0 (object): undefined / undefined / undefined +(35) 1 (object): undefined / undefined / undefined +(36) 0.5 (object): undefined / undefined / undefined +(37) -1 (object): undefined / undefined / undefined +(38) -0.5 (object): undefined / undefined / undefined +(39) Infinity (object): undefined / undefined / undefined +(40) -Infinity (object): undefined / undefined / undefined +(41) NaN (object): undefined / undefined / undefined +(42) (object): undefined / undefined / undefined +(43) 0 (object): undefined / undefined / undefined +(44) -0 (object): undefined / undefined / undefined +(45) 0.0 (object): undefined / undefined / undefined +(46) 1 (object): undefined / undefined / undefined +(47) Hello World! (object): undefined / undefined / undefined +(48) true (object): undefined / undefined / undefined +(49) _level0 (object): undefined / undefined / undefined +(50) äöü (object): undefined / undefined / undefined +(51) _level0 (object): undefined / undefined / undefined +(52) [type Object] (object): undefined / undefined / undefined +(53) [type Object] (object): undefined / undefined / undefined +(54) [type Object] (object): undefined / undefined / undefined +(55) [type Object] (object): undefined / undefined / undefined +(56) [type Object] (object): undefined / undefined / undefined +(57) [type Object] (object): undefined / undefined / undefined +(58) [type Object] (object): undefined / undefined / undefined +(59) [type Object] (object): undefined / undefined / undefined +-0.2: undefined / undefined / undefined +255.125: undefined / undefined / undefined +15.125: undefined / undefined / undefined +undefined +undefined: undefined / undefined / undefined +undefined: undefined / undefined / undefined diff --git a/test/trace/BlurFilter-construct-8.swf b/test/trace/BlurFilter-construct-8.swf Binary files differnew file mode 100644 index 00000000..bb97b67a --- /dev/null +++ b/test/trace/BlurFilter-construct-8.swf diff --git a/test/trace/BlurFilter-construct-8.swf.trace b/test/trace/BlurFilter-construct-8.swf.trace new file mode 100644 index 00000000..0c853e00 --- /dev/null +++ b/test/trace/BlurFilter-construct-8.swf.trace @@ -0,0 +1,209 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +0 args: 4 / 4 / 1 +1 arg: 1 / 4 / 1 +2 args: 1 / 2 / 1 +3 args: 1 / 2 / 3 +no new: undefined / undefined / undefined +(0) undefined (undefined): NaN / NaN / 0 +(1) null (null): NaN / NaN / 0 +(2) true (boolean): 1 / 1 / 1 +(3) false (boolean): 0 / 0 / 0 +(4) 0 (number): 0 / 0 / 0 +(5) 1 (number): 1 / 1 / 1 +(6) 0.5 (number): 0.5 / 0.5 / 0 +(7) -1 (number): 0 / 0 / 0 +(8) -0.5 (number): 0 / 0 / 0 +(9) Infinity (number): 255 / 255 / 0 +(10) -Infinity (number): 0 / 0 / 0 +(11) NaN (number): NaN / NaN / 0 +(12) (string): NaN / NaN / 0 +(13) 0 (string): 0 / 0 / 0 +(14) -0 (string): 0 / 0 / 0 +(15) 0.0 (string): 0 / 0 / 0 +(16) 1 (string): 1 / 1 / 1 +(17) Hello World! (string): NaN / NaN / 0 +(18) true (string): NaN / NaN / 0 +(19) _level0 (string): NaN / NaN / 0 +(20) äöü (string): NaN / NaN / 0 +(21) _level0 (movieclip): NaN / NaN / 0 +(22) [object Object] (object): NaN / NaN / 0 +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object): 255 / 255 / 15 +(24) (object): NaN / NaN / 0 +(25) [type Function] (function): NaN / NaN / 0 +valueOf called +valueOf called +valueOf called +(26) [type Object] (object): NaN / NaN / 0 +(27) [type Object] (object): NaN / NaN / 0 +valueOf called with +valueOf called with +valueOf called with +(28) [object Object] (object): NaN / NaN / 0 +(29) undefined (object): NaN / NaN / 0 +0: valueOf! +0: valueOf! +0: valueOf! +(30) undefined (object): NaN / NaN / 0 +1: valueOf! +1: valueOf! +1: valueOf! +(31) null (object): NaN / NaN / 0 +2: valueOf! +2: valueOf! +2: valueOf! +(32) true (object): 1 / 1 / 1 +3: valueOf! +3: valueOf! +3: valueOf! +(33) false (object): 0 / 0 / 0 +4: valueOf! +4: valueOf! +4: valueOf! +(34) 0 (object): 0 / 0 / 0 +5: valueOf! +5: valueOf! +5: valueOf! +(35) 1 (object): 1 / 1 / 1 +6: valueOf! +6: valueOf! +6: valueOf! +(36) 0.5 (object): 0.5 / 0.5 / 0 +7: valueOf! +7: valueOf! +7: valueOf! +(37) -1 (object): 0 / 0 / 0 +8: valueOf! +8: valueOf! +8: valueOf! +(38) -0.5 (object): 0 / 0 / 0 +9: valueOf! +9: valueOf! +9: valueOf! +(39) Infinity (object): 255 / 255 / 0 +10: valueOf! +10: valueOf! +10: valueOf! +(40) -Infinity (object): 0 / 0 / 0 +11: valueOf! +11: valueOf! +11: valueOf! +(41) NaN (object): NaN / NaN / 0 +12: valueOf! +12: valueOf! +12: valueOf! +(42) (object): NaN / NaN / 0 +13: valueOf! +13: valueOf! +13: valueOf! +(43) 0 (object): 0 / 0 / 0 +14: valueOf! +14: valueOf! +14: valueOf! +(44) -0 (object): 0 / 0 / 0 +15: valueOf! +15: valueOf! +15: valueOf! +(45) 0.0 (object): 0 / 0 / 0 +16: valueOf! +16: valueOf! +16: valueOf! +(46) 1 (object): 1 / 1 / 1 +17: valueOf! +17: valueOf! +17: valueOf! +(47) Hello World! (object): NaN / NaN / 0 +18: valueOf! +18: valueOf! +18: valueOf! +(48) true (object): NaN / NaN / 0 +19: valueOf! +19: valueOf! +19: valueOf! +(49) _level0 (object): NaN / NaN / 0 +20: valueOf! +20: valueOf! +20: valueOf! +(50) äöü (object): NaN / NaN / 0 +21: valueOf! +21: valueOf! +21: valueOf! +(51) _level0 (object): NaN / NaN / 0 +22: valueOf! +22: valueOf! +22: valueOf! +(52) [type Object] (object): NaN / NaN / 0 +23: valueOf! +23: valueOf! +23: valueOf! +(53) [type Object] (object): NaN / NaN / 0 +24: valueOf! +24: valueOf! +24: valueOf! +(54) [type Object] (object): NaN / NaN / 0 +25: valueOf! +25: valueOf! +25: valueOf! +(55) [type Object] (object): NaN / NaN / 0 +26: valueOf! +26: valueOf! +26: valueOf! +(56) [type Object] (object): NaN / NaN / 0 +27: valueOf! +27: valueOf! +27: valueOf! +(57) [type Object] (object): NaN / NaN / 0 +28: valueOf! +28: valueOf! +28: valueOf! +(58) [type Object] (object): NaN / NaN / 0 +29: valueOf! +29: valueOf! +29: valueOf! +(59) [type Object] (object): NaN / NaN / 0 +-0.2: 0 / 0 / 0 +255.125: 255 / 255 / 15 +15.125: 15.125 / 15.125 / 15 +undefined +undefined: 1 / 2 / 3 +undefined: 1 / 2 / 3 diff --git a/test/trace/BlurFilter-construct.as b/test/trace/BlurFilter-construct.as new file mode 100644 index 00000000..93515daf --- /dev/null +++ b/test/trace/BlurFilter-construct.as @@ -0,0 +1,36 @@ +// makeswf -v 7 -s 200x150 -r 1 -o BlurFilter-construct.swf BlurFilter-construct.as + +#include "values.as" + +trace_filter = function (filter, name) { + trace (name + ": " + filter.blurX + " / " + filter.blurY + " / " + filter.quality); +}; + +check = function (val, name) { + if (arguments.length < 2) + name = val; + var filter = new flash.filters.BlurFilter (val, val, val); + trace_filter (filter, name); +}; + +trace_filter (new flash.filters.BlurFilter (), "0 args"); +trace_filter (new flash.filters.BlurFilter (1), "1 arg"); +trace_filter (new flash.filters.BlurFilter (1, 2), "2 args"); +trace_filter (new flash.filters.BlurFilter (1, 2, 3), "3 args"); +trace_filter (flash.filters.BlurFilter (1, 2, 3), "no new"); + +for (i = 0; i < values.length; i++) { + check (values[i], names[i]); +}; + +check (-0.2); +check (255.125); +check (15.125); + +trace (flash.filters.BlurFilter (1, 2, 3)); +filter = new flash.filters.BlurFilter (1, 2, 3); +trace_filter (filter); +flash.filters.BlurFilter.apply (filter); +trace_filter (filter); + +getURL ("fscommand:quit", ""); diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am index 8965fb22..6b443fc3 100644 --- a/test/trace/Makefile.am +++ b/test/trace/Makefile.am @@ -450,6 +450,15 @@ EXTRA_DIST = \ blur-filter-properties-7.swf.trace \ blur-filter-properties-8.swf \ blur-filter-properties-8.swf.trace \ + BlurFilter-construct-5.swf \ + BlurFilter-construct-5.swf.trace \ + BlurFilter-construct-6.swf \ + BlurFilter-construct-6.swf.trace \ + BlurFilter-construct-7.swf \ + BlurFilter-construct-7.swf.trace \ + BlurFilter-construct-8.swf \ + BlurFilter-construct-8.swf.trace \ + BlurFilter-construct.as \ boolean.as \ boolean-5.swf \ boolean-5.swf.trace \ @@ -468,6 +477,15 @@ EXTRA_DIST = \ boolean-properties-7.swf.trace \ boolean-properties-8.swf \ boolean-properties-8.swf.trace \ + builtin-construction-5.swf \ + builtin-construction-5.swf.trace \ + builtin-construction-6.swf \ + builtin-construction-6.swf.trace \ + builtin-construction-7.swf \ + builtin-construction-7.swf.trace \ + builtin-construction-8.swf \ + builtin-construction-8.swf.trace \ + builtin-construction.as \ button-properties.as \ button-properties-5.swf \ button-properties-5.swf.trace \ @@ -743,6 +761,15 @@ EXTRA_DIST = \ constructor-madness-8.swf.trace \ constructor-prototype.swf \ constructor-prototype.swf.trace \ + constructor-relay-5.swf \ + constructor-relay-5.swf.trace \ + constructor-relay-6.swf \ + constructor-relay-6.swf.trace \ + constructor-relay-7.swf \ + constructor-relay-7.swf.trace \ + constructor-relay-8.swf \ + constructor-relay-8.swf.trace \ + constructor-relay.as \ context-menu.as \ context-menu-5.swf \ context-menu-5.swf.trace \ @@ -779,6 +806,15 @@ EXTRA_DIST = \ context-menu-properties-7.swf.trace \ context-menu-properties-8.swf \ context-menu-properties-8.swf.trace \ + conversion-functions-5.swf \ + conversion-functions-5.swf.trace \ + conversion-functions-6.swf \ + conversion-functions-6.swf.trace \ + conversion-functions-7.swf \ + conversion-functions-7.swf.trace \ + conversion-functions-8.swf \ + conversion-functions-8.swf.trace \ + conversion-functions.as \ convolution-filter-properties.as \ convolution-filter-properties-5.swf \ convolution-filter-properties-5.swf.trace \ @@ -790,6 +826,7 @@ EXTRA_DIST = \ convolution-filter-properties-8.swf.trace \ countdown.swf \ countdown.swf.trace \ + cookiemon.jpg \ crash-0.5.2-cvs-return-from-block.as \ crash-0.5.2-cvs-return-from-block-5.swf \ crash-0.5.2-cvs-return-from-block-5.swf.trace \ @@ -1049,6 +1086,15 @@ EXTRA_DIST = \ crash-0.8.2-sendAndLoad-without-target-8.swf \ crash-0.8.2-sendAndLoad-without-target-8.swf.trace \ crash-0.8.2-sendAndLoad-without-target.as \ + crash-0.9.1-getvariable-shapes-5.swf \ + crash-0.9.1-getvariable-shapes-5.swf.trace \ + crash-0.9.1-getvariable-shapes-6.swf \ + crash-0.9.1-getvariable-shapes-6.swf.trace \ + crash-0.9.1-getvariable-shapes-7.swf \ + crash-0.9.1-getvariable-shapes-7.swf.trace \ + crash-0.9.1-getvariable-shapes-8.swf \ + crash-0.9.1-getvariable-shapes-8.swf.trace \ + crash-0.9.1-getvariable-shapes.xml \ createEmptyMovieClip-events.sc \ createEmptyMovieClip-events.swf \ createEmptyMovieClip-events.swf.trace \ @@ -1358,6 +1404,15 @@ EXTRA_DIST = \ equality-7.swf.trace \ equality-8.swf \ equality-8.swf.trace \ + equality-nan-5.swf \ + equality-nan-5.swf.trace \ + equality-nan-6.swf \ + equality-nan-6.swf.trace \ + equality-nan-7.swf \ + equality-nan-7.swf.trace \ + equality-nan-8.swf \ + equality-nan-8.swf.trace \ + equality-nan.as \ equality-old.as \ equality-old-5.swf \ equality-old-5.swf.trace \ @@ -2276,6 +2331,15 @@ EXTRA_DIST = \ movieclip-property-priorities-8.swf \ movieclip-property-priorities-8.swf.trace \ movieclip-property-priorities.as \ + movieclip-references-5.swf \ + movieclip-references-5.swf.trace \ + movieclip-references-6.swf \ + movieclip-references-6.swf.trace \ + movieclip-references-7.swf \ + movieclip-references-7.swf.trace \ + movieclip-references-8.swf \ + movieclip-references-8.swf.trace \ + movieclip-references.as \ movieclip-set-prototype.c \ movieclip-set-prototype-5.swf \ movieclip-set-prototype-5.swf.trace \ @@ -2454,6 +2518,15 @@ EXTRA_DIST = \ nextframe-stop.swf.trace \ number.swf \ number.swf.trace \ + number-construct.as \ + number-construct-5.swf \ + number-construct-5.swf.trace \ + number-construct-6.swf \ + number-construct-6.swf.trace \ + number-construct-7.swf \ + number-construct-7.swf.trace \ + number-construct-8.swf \ + number-construct-8.swf.trace \ number-properties.as \ number-properties-5.swf \ number-properties-5.swf.trace \ @@ -4325,6 +4398,15 @@ EXTRA_DIST = \ utf-32-be-bom.txt \ utf-32-le-bom.txt \ values.as \ + various-tests-5.swf \ + various-tests-5.swf.trace \ + various-tests-6.swf \ + various-tests-6.swf.trace \ + various-tests-7.swf \ + various-tests-7.swf.trace \ + various-tests-8.swf \ + various-tests-8.swf.trace \ + various-tests.as \ version4-global.sc \ version4-global.swf \ version4-global.swf.trace \ @@ -4377,6 +4459,7 @@ EXTRA_DIST = \ with-prototypes-6.swf.trace \ with-prototypes-7.swf \ with-prototypes-7.swf.trace \ + wookiemon.jpg \ xml-cdata.as \ xml-cdata-5.swf \ xml-cdata-5.swf.trace \ diff --git a/test/trace/builtin-construction-5.swf b/test/trace/builtin-construction-5.swf Binary files differnew file mode 100644 index 00000000..db3a1511 --- /dev/null +++ b/test/trace/builtin-construction-5.swf diff --git a/test/trace/builtin-construction-5.swf.trace b/test/trace/builtin-construction-5.swf.trace new file mode 100644 index 00000000..df04c0b0 --- /dev/null +++ b/test/trace/builtin-construction-5.swf.trace @@ -0,0 +1,16 @@ +true +true +false +false +true +true +true +true +true +true +[object Object] +[object Object] +[object Object] +[object Object] +[object Object] +[object Object] diff --git a/test/trace/builtin-construction-6.swf b/test/trace/builtin-construction-6.swf Binary files differnew file mode 100644 index 00000000..dd335308 --- /dev/null +++ b/test/trace/builtin-construction-6.swf diff --git a/test/trace/builtin-construction-6.swf.trace b/test/trace/builtin-construction-6.swf.trace new file mode 100644 index 00000000..a65f91fd --- /dev/null +++ b/test/trace/builtin-construction-6.swf.trace @@ -0,0 +1,16 @@ +false +true +false +true +false +true +false +true +false +true +23 +[type Object] +23 +undefined +[type Object] +undefined diff --git a/test/trace/builtin-construction-7.swf b/test/trace/builtin-construction-7.swf Binary files differnew file mode 100644 index 00000000..4d70f062 --- /dev/null +++ b/test/trace/builtin-construction-7.swf diff --git a/test/trace/builtin-construction-7.swf.trace b/test/trace/builtin-construction-7.swf.trace new file mode 100644 index 00000000..a65f91fd --- /dev/null +++ b/test/trace/builtin-construction-7.swf.trace @@ -0,0 +1,16 @@ +false +true +false +true +false +true +false +true +false +true +23 +[type Object] +23 +undefined +[type Object] +undefined diff --git a/test/trace/builtin-construction-8.swf b/test/trace/builtin-construction-8.swf Binary files differnew file mode 100644 index 00000000..b2ab3544 --- /dev/null +++ b/test/trace/builtin-construction-8.swf diff --git a/test/trace/builtin-construction-8.swf.trace b/test/trace/builtin-construction-8.swf.trace new file mode 100644 index 00000000..a65f91fd --- /dev/null +++ b/test/trace/builtin-construction-8.swf.trace @@ -0,0 +1,16 @@ +false +true +false +true +false +true +false +true +false +true +23 +[type Object] +23 +undefined +[type Object] +undefined diff --git a/test/trace/builtin-construction.as b/test/trace/builtin-construction.as new file mode 100644 index 00000000..5318ed0f --- /dev/null +++ b/test/trace/builtin-construction.as @@ -0,0 +1,49 @@ +// makeswf -v 7 -s 200x150 -r 1 -o builtin-construction.swf builtin-construction.as + +f = Function; +_global.Function = function () { + trace ("Function"); +}; +x = function () {}; +trace (f.prototype == x.__proto__); +trace (Function.prototype == x.__proto__); + +m = MovieClip; +_global.MovieClip = function () { + trace ("MovieClip"); +}; +createEmptyMovieClip ("a", 0); +trace (m.prototype == a.__proto__); +trace (MovieClip.prototype == a.__proto__); + +o = Object; +_global.Object = function () { + trace ("Object"); +}; + +y = function () {}; +trace (f.prototype == y.__proto__); +trace (Function.prototype == y.__proto__); +trace (y.prototype.__proto__ == o.prototype); +trace (y.prototype.__proto__ == Object.prototype); + +z = {}; +trace (o.prototype == z.__proto__); +trace (Object.prototype == z.__proto__); + +_global.Object.prototype = 23; +z = {}; +trace (z.__proto__); +y = function () {}; +trace (y.prototype); +trace (y.prototype.__proto__); + +_global.Object = 42; +z = {}; +trace (z.__proto__); +y = function () {}; +trace (y.prototype); +trace (y.prototype.__proto__); + + +getURL ("fscommand:quit", ""); diff --git a/test/trace/constructor-relay-5.swf b/test/trace/constructor-relay-5.swf Binary files differnew file mode 100644 index 00000000..18751eba --- /dev/null +++ b/test/trace/constructor-relay-5.swf diff --git a/test/trace/constructor-relay-5.swf.trace b/test/trace/constructor-relay-5.swf.trace new file mode 100644 index 00000000..3abf595f --- /dev/null +++ b/test/trace/constructor-relay-5.swf.trace @@ -0,0 +1,20 @@ +undefined +undefined +42 +42 +undefined +42 +undefined +42 +undefined +42 +undefined +42 +undefined +undefined +undefined +true +true +undefined +undefined +undefined diff --git a/test/trace/constructor-relay-6.swf b/test/trace/constructor-relay-6.swf Binary files differnew file mode 100644 index 00000000..9a55c039 --- /dev/null +++ b/test/trace/constructor-relay-6.swf diff --git a/test/trace/constructor-relay-6.swf.trace b/test/trace/constructor-relay-6.swf.trace new file mode 100644 index 00000000..ce49fa4b --- /dev/null +++ b/test/trace/constructor-relay-6.swf.trace @@ -0,0 +1,20 @@ +undefined +undefined +42 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +1035840244000 +undefined +true +true +undefined +undefined +undefined diff --git a/test/trace/constructor-relay-7.swf b/test/trace/constructor-relay-7.swf Binary files differnew file mode 100644 index 00000000..32e8d8f9 --- /dev/null +++ b/test/trace/constructor-relay-7.swf diff --git a/test/trace/constructor-relay-7.swf.trace b/test/trace/constructor-relay-7.swf.trace new file mode 100644 index 00000000..ce49fa4b --- /dev/null +++ b/test/trace/constructor-relay-7.swf.trace @@ -0,0 +1,20 @@ +undefined +undefined +42 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +1035840244000 +undefined +true +true +undefined +undefined +undefined diff --git a/test/trace/constructor-relay-8.swf b/test/trace/constructor-relay-8.swf Binary files differnew file mode 100644 index 00000000..ee3474a9 --- /dev/null +++ b/test/trace/constructor-relay-8.swf diff --git a/test/trace/constructor-relay-8.swf.trace b/test/trace/constructor-relay-8.swf.trace new file mode 100644 index 00000000..ce49fa4b --- /dev/null +++ b/test/trace/constructor-relay-8.swf.trace @@ -0,0 +1,20 @@ +undefined +undefined +42 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +42 +1035840244000 +1035840244000 +undefined +true +true +undefined +undefined +undefined diff --git a/test/trace/constructor-relay.as b/test/trace/constructor-relay.as new file mode 100644 index 00000000..4e3587b8 --- /dev/null +++ b/test/trace/constructor-relay.as @@ -0,0 +1,46 @@ +// makeswf -v 7 -s 200x150 -r 1 -o constructor-relay.swf constructor-relay.as + +extends = function (child, parent) { + asm { + push "child" + getvariable + push "parent" + getvariable + extends + }; +}; + +Foo = function () { + before = this; + trace (this.getTime ()); + this.__proto__.__constructor__ = Date; + trace (this.getTime ()); + this.x = 42; + trace (this.x); + for (i = 0; i < 5; i++) { + super (); + trace (this.x); + trace (this.getTime ()); + } + this.__proto__.__constructor__ = Array; + trace (this.getTime ()); + super (); + trace (this.getTime ()); + after = this; +}; + +//extends (Foo, Date); +Foo.prototype.getTime = Date.prototype.getTime; +x = new Foo (); +trace (before == after); +trace (before == x); +trace (before.getTime ()); +trace (after.getTime ()); + +x = new Object (); +x.getTime = Date.prototype.getTime; +x.construct = Date; +x.construct (); +trace (x.getTime ()); + +getURL ("fscommand:quit", ""); diff --git a/test/trace/conversion-functions-5.swf b/test/trace/conversion-functions-5.swf Binary files differnew file mode 100644 index 00000000..01bd168e --- /dev/null +++ b/test/trace/conversion-functions-5.swf diff --git a/test/trace/conversion-functions-5.swf.trace b/test/trace/conversion-functions-5.swf.trace new file mode 100644 index 00000000..27ff83e8 --- /dev/null +++ b/test/trace/conversion-functions-5.swf.trace @@ -0,0 +1,446 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +(0) (undefined) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(1) null (null) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(2) true (boolean) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: true (object) +(3) false (boolean) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: false (object) +(4) 0 (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(5) 1 (number) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(6) 0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0.5 (number) + Object: 0.5 (object) +(7) -1 (number) + Boolean: true (boolean) + Integer: -1 (number) + Number: -1 (number) + Object: -1 (object) +(8) -0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -0.5 (number) + Object: -0.5 (object) +(9) Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: Infinity (number) + Object: Infinity (object) +(10) -Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -Infinity (number) + Object: -Infinity (object) +(11) NaN (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: NaN (object) +(12) (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(13) 0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(14) -0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: -0 (object) +(15) 0.0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0.0 (object) +(16) 1 (string) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(17) Hello World! (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: Hello World! (object) +(18) true (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: true (object) +(19) _level0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (object) +(20) äöü (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: äöü (object) +(21) _level0 (movieclip) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (movieclip) +(22) [object Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [object Object] (object) +(23) 103584024400.25 (object) + Boolean: true (boolean) + Integer: 504809296 (number) + Number: 103584024400.25 (number) + Object: 103584024400.25 (object) +(24) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(25) (undefined) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(26) [type Object] (object) + Boolean: true (boolean) +valueOf called + Integer: 0 (number) +valueOf called + Number: NaN (number) +valueOf called +toString called + Object: [type Object] (object) +(27) [type Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) +toString called with + Object: [type Object] (object) +(28) [object Object] (object) + Boolean: true (boolean) +valueOf called with + Integer: 0 (number) +valueOf called with + Number: NaN (number) +valueOf called with + Object: [object Object] (object) +(29) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(30) (object) + Boolean: true (boolean) +0: valueOf! + Integer: 0 (number) +0: valueOf! + Number: 0 (number) +0: valueOf! + Object: (object) +(31) null (object) + Boolean: true (boolean) +1: valueOf! + Integer: 0 (number) +1: valueOf! + Number: 0 (number) +1: valueOf! + Object: null (object) +(32) true (object) + Boolean: true (boolean) +2: valueOf! + Integer: 1 (number) +2: valueOf! + Number: 1 (number) +2: valueOf! + Object: true (object) +(33) false (object) + Boolean: true (boolean) +3: valueOf! + Integer: 0 (number) +3: valueOf! + Number: 0 (number) +3: valueOf! + Object: false (object) +(34) 0 (object) + Boolean: true (boolean) +4: valueOf! + Integer: 0 (number) +4: valueOf! + Number: 0 (number) +4: valueOf! + Object: 0 (object) +(35) 1 (object) + Boolean: true (boolean) +5: valueOf! + Integer: 1 (number) +5: valueOf! + Number: 1 (number) +5: valueOf! + Object: 1 (object) +(36) 0.5 (object) + Boolean: true (boolean) +6: valueOf! + Integer: 0 (number) +6: valueOf! + Number: 0.5 (number) +6: valueOf! + Object: 0.5 (object) +(37) -1 (object) + Boolean: true (boolean) +7: valueOf! + Integer: -1 (number) +7: valueOf! + Number: -1 (number) +7: valueOf! + Object: -1 (object) +(38) -0.5 (object) + Boolean: true (boolean) +8: valueOf! + Integer: 0 (number) +8: valueOf! + Number: -0.5 (number) +8: valueOf! + Object: -0.5 (object) +(39) Infinity (object) + Boolean: true (boolean) +9: valueOf! + Integer: 0 (number) +9: valueOf! + Number: Infinity (number) +9: valueOf! + Object: Infinity (object) +(40) -Infinity (object) + Boolean: true (boolean) +10: valueOf! + Integer: 0 (number) +10: valueOf! + Number: -Infinity (number) +10: valueOf! + Object: -Infinity (object) +(41) NaN (object) + Boolean: true (boolean) +11: valueOf! + Integer: 0 (number) +11: valueOf! + Number: NaN (number) +11: valueOf! + Object: NaN (object) +(42) (object) + Boolean: true (boolean) +12: valueOf! + Integer: 0 (number) +12: valueOf! + Number: NaN (number) +12: valueOf! + Object: (object) +(43) 0 (object) + Boolean: true (boolean) +13: valueOf! + Integer: 0 (number) +13: valueOf! + Number: 0 (number) +13: valueOf! + Object: 0 (object) +(44) -0 (object) + Boolean: true (boolean) +14: valueOf! + Integer: 0 (number) +14: valueOf! + Number: 0 (number) +14: valueOf! + Object: -0 (object) +(45) 0.0 (object) + Boolean: true (boolean) +15: valueOf! + Integer: 0 (number) +15: valueOf! + Number: 0 (number) +15: valueOf! + Object: 0.0 (object) +(46) 1 (object) + Boolean: true (boolean) +16: valueOf! + Integer: 1 (number) +16: valueOf! + Number: 1 (number) +16: valueOf! + Object: 1 (object) +(47) Hello World! (object) + Boolean: true (boolean) +17: valueOf! + Integer: 0 (number) +17: valueOf! + Number: NaN (number) +17: valueOf! + Object: Hello World! (object) +(48) true (object) + Boolean: true (boolean) +18: valueOf! + Integer: 0 (number) +18: valueOf! + Number: NaN (number) +18: valueOf! + Object: true (object) +(49) _level0 (object) + Boolean: true (boolean) +19: valueOf! + Integer: 0 (number) +19: valueOf! + Number: NaN (number) +19: valueOf! + Object: _level0 (object) +(50) äöü (object) + Boolean: true (boolean) +20: valueOf! + Integer: 0 (number) +20: valueOf! + Number: NaN (number) +20: valueOf! + Object: äöü (object) +(51) _level0 (object) + Boolean: true (boolean) +21: valueOf! + Integer: 0 (number) +21: valueOf! + Number: NaN (number) +21: valueOf! + Object: _level0 (object) +(52) [type Object] (object) + Boolean: true (boolean) +22: valueOf! + Integer: 0 (number) +22: valueOf! + Number: NaN (number) +22: valueOf! +22: toString! + Object: [type Object] (object) +(53) [type Object] (object) + Boolean: true (boolean) +23: valueOf! + Integer: 0 (number) +23: valueOf! + Number: NaN (number) +23: valueOf! +23: toString! + Object: [type Object] (object) +(54) [type Object] (object) + Boolean: true (boolean) +24: valueOf! + Integer: 0 (number) +24: valueOf! + Number: NaN (number) +24: valueOf! +24: toString! + Object: [type Object] (object) +(55) (object) + Boolean: true (boolean) +25: valueOf! + Integer: 0 (number) +25: valueOf! + Number: 0 (number) +25: valueOf! + Object: (object) +(56) [type Object] (object) + Boolean: true (boolean) +26: valueOf! + Integer: 0 (number) +26: valueOf! + Number: NaN (number) +26: valueOf! +26: toString! + Object: [type Object] (object) +(57) [type Object] (object) + Boolean: true (boolean) +27: valueOf! + Integer: 0 (number) +27: valueOf! + Number: NaN (number) +27: valueOf! +27: toString! + Object: [type Object] (object) +(58) [type Object] (object) + Boolean: true (boolean) +28: valueOf! + Integer: 0 (number) +28: valueOf! + Number: NaN (number) +28: valueOf! +28: toString! + Object: [type Object] (object) +(59) [type Object] (object) + Boolean: true (boolean) +29: valueOf! + Integer: 0 (number) +29: valueOf! + Number: NaN (number) +29: valueOf! +29: toString! + Object: [type Object] (object) diff --git a/test/trace/conversion-functions-6.swf b/test/trace/conversion-functions-6.swf Binary files differnew file mode 100644 index 00000000..7527e8fe --- /dev/null +++ b/test/trace/conversion-functions-6.swf diff --git a/test/trace/conversion-functions-6.swf.trace b/test/trace/conversion-functions-6.swf.trace new file mode 100644 index 00000000..cc21f057 --- /dev/null +++ b/test/trace/conversion-functions-6.swf.trace @@ -0,0 +1,448 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +(0) (undefined) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(1) null (null) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(2) true (boolean) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: true (object) +(3) false (boolean) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: false (object) +(4) 0 (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(5) 1 (number) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(6) 0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0.5 (number) + Object: 0.5 (object) +(7) -1 (number) + Boolean: true (boolean) + Integer: -1 (number) + Number: -1 (number) + Object: -1 (object) +(8) -0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -0.5 (number) + Object: -0.5 (object) +(9) Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: Infinity (number) + Object: Infinity (object) +(10) -Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -Infinity (number) + Object: -Infinity (object) +(11) NaN (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: NaN (object) +(12) (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(13) 0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(14) -0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: -0 (object) +(15) 0.0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0.0 (object) +(16) 1 (string) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(17) Hello World! (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: Hello World! (object) +(18) true (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: true (object) +(19) _level0 (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (object) +(20) äöü (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: äöü (object) +(21) _level0 (movieclip) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (movieclip) +(22) [object Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [object Object] (object) +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object) + Boolean: true (boolean) + Integer: 504809296 (number) + Number: 103584024400.25 (number) + Object: Fri Apr 13 21:20:24 GMT+0000 1973 (object) +(24) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(25) [type Function] (function) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [type Function] (function) +(26) [type Object] (object) + Boolean: true (boolean) +valueOf called + Integer: 0 (number) +valueOf called + Number: NaN (number) +valueOf called +toString called + Object: [type Object] (object) +(27) [type Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) +toString called with + Object: [type Object] (object) +(28) [object Object] (object) + Boolean: true (boolean) +valueOf called with + Integer: 0 (number) +valueOf called with + Number: NaN (number) +valueOf called with + Object: [object Object] (object) +(29) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: (object) +(30) (object) + Boolean: true (boolean) +0: valueOf! + Integer: 0 (number) +0: valueOf! + Number: 0 (number) +0: valueOf! + Object: (object) +(31) null (object) + Boolean: true (boolean) +1: valueOf! + Integer: 0 (number) +1: valueOf! + Number: 0 (number) +1: valueOf! + Object: null (object) +(32) true (object) + Boolean: true (boolean) +2: valueOf! + Integer: 1 (number) +2: valueOf! + Number: 1 (number) +2: valueOf! + Object: true (object) +(33) false (object) + Boolean: true (boolean) +3: valueOf! + Integer: 0 (number) +3: valueOf! + Number: 0 (number) +3: valueOf! + Object: false (object) +(34) 0 (object) + Boolean: true (boolean) +4: valueOf! + Integer: 0 (number) +4: valueOf! + Number: 0 (number) +4: valueOf! + Object: 0 (object) +(35) 1 (object) + Boolean: true (boolean) +5: valueOf! + Integer: 1 (number) +5: valueOf! + Number: 1 (number) +5: valueOf! + Object: 1 (object) +(36) 0.5 (object) + Boolean: true (boolean) +6: valueOf! + Integer: 0 (number) +6: valueOf! + Number: 0.5 (number) +6: valueOf! + Object: 0.5 (object) +(37) -1 (object) + Boolean: true (boolean) +7: valueOf! + Integer: -1 (number) +7: valueOf! + Number: -1 (number) +7: valueOf! + Object: -1 (object) +(38) -0.5 (object) + Boolean: true (boolean) +8: valueOf! + Integer: 0 (number) +8: valueOf! + Number: -0.5 (number) +8: valueOf! + Object: -0.5 (object) +(39) Infinity (object) + Boolean: true (boolean) +9: valueOf! + Integer: 0 (number) +9: valueOf! + Number: Infinity (number) +9: valueOf! + Object: Infinity (object) +(40) -Infinity (object) + Boolean: true (boolean) +10: valueOf! + Integer: 0 (number) +10: valueOf! + Number: -Infinity (number) +10: valueOf! + Object: -Infinity (object) +(41) NaN (object) + Boolean: true (boolean) +11: valueOf! + Integer: 0 (number) +11: valueOf! + Number: NaN (number) +11: valueOf! + Object: NaN (object) +(42) (object) + Boolean: true (boolean) +12: valueOf! + Integer: 0 (number) +12: valueOf! + Number: NaN (number) +12: valueOf! + Object: (object) +(43) 0 (object) + Boolean: true (boolean) +13: valueOf! + Integer: 0 (number) +13: valueOf! + Number: 0 (number) +13: valueOf! + Object: 0 (object) +(44) -0 (object) + Boolean: true (boolean) +14: valueOf! + Integer: 0 (number) +14: valueOf! + Number: 0 (number) +14: valueOf! + Object: -0 (object) +(45) 0.0 (object) + Boolean: true (boolean) +15: valueOf! + Integer: 0 (number) +15: valueOf! + Number: 0 (number) +15: valueOf! + Object: 0.0 (object) +(46) 1 (object) + Boolean: true (boolean) +16: valueOf! + Integer: 1 (number) +16: valueOf! + Number: 1 (number) +16: valueOf! + Object: 1 (object) +(47) Hello World! (object) + Boolean: true (boolean) +17: valueOf! + Integer: 0 (number) +17: valueOf! + Number: NaN (number) +17: valueOf! + Object: Hello World! (object) +(48) true (object) + Boolean: true (boolean) +18: valueOf! + Integer: 0 (number) +18: valueOf! + Number: NaN (number) +18: valueOf! + Object: true (object) +(49) _level0 (object) + Boolean: true (boolean) +19: valueOf! + Integer: 0 (number) +19: valueOf! + Number: NaN (number) +19: valueOf! + Object: _level0 (object) +(50) äöü (object) + Boolean: true (boolean) +20: valueOf! + Integer: 0 (number) +20: valueOf! + Number: NaN (number) +20: valueOf! + Object: äöü (object) +(51) _level0 (object) + Boolean: true (boolean) +21: valueOf! + Integer: 0 (number) +21: valueOf! + Number: NaN (number) +21: valueOf! + Object: _level0 (object) +(52) [type Object] (object) + Boolean: true (boolean) +22: valueOf! + Integer: 0 (number) +22: valueOf! + Number: NaN (number) +22: valueOf! +22: toString! + Object: [type Object] (object) +(53) [type Object] (object) + Boolean: true (boolean) +23: valueOf! + Integer: 0 (number) +23: valueOf! + Number: NaN (number) +23: valueOf! +23: toString! + Object: [type Object] (object) +(54) [type Object] (object) + Boolean: true (boolean) +24: valueOf! + Integer: 0 (number) +24: valueOf! + Number: NaN (number) +24: valueOf! +24: toString! + Object: [type Object] (object) +(55) [type Object] (object) + Boolean: true (boolean) +25: valueOf! + Integer: 0 (number) +25: valueOf! + Number: NaN (number) +25: valueOf! +25: toString! + Object: [type Object] (object) +(56) [type Object] (object) + Boolean: true (boolean) +26: valueOf! + Integer: 0 (number) +26: valueOf! + Number: NaN (number) +26: valueOf! +26: toString! + Object: [type Object] (object) +(57) [type Object] (object) + Boolean: true (boolean) +27: valueOf! + Integer: 0 (number) +27: valueOf! + Number: NaN (number) +27: valueOf! +27: toString! + Object: [type Object] (object) +(58) [type Object] (object) + Boolean: true (boolean) +28: valueOf! + Integer: 0 (number) +28: valueOf! + Number: NaN (number) +28: valueOf! +28: toString! + Object: [type Object] (object) +(59) [type Object] (object) + Boolean: true (boolean) +29: valueOf! + Integer: 0 (number) +29: valueOf! + Number: NaN (number) +29: valueOf! +29: toString! + Object: [type Object] (object) diff --git a/test/trace/conversion-functions-7.swf b/test/trace/conversion-functions-7.swf Binary files differnew file mode 100644 index 00000000..ca47b759 --- /dev/null +++ b/test/trace/conversion-functions-7.swf diff --git a/test/trace/conversion-functions-7.swf.trace b/test/trace/conversion-functions-7.swf.trace new file mode 100644 index 00000000..51b2b5ea --- /dev/null +++ b/test/trace/conversion-functions-7.swf.trace @@ -0,0 +1,448 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +(0) undefined (undefined) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(1) null (null) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(2) true (boolean) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: true (object) +(3) false (boolean) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: false (object) +(4) 0 (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(5) 1 (number) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(6) 0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0.5 (number) + Object: 0.5 (object) +(7) -1 (number) + Boolean: true (boolean) + Integer: -1 (number) + Number: -1 (number) + Object: -1 (object) +(8) -0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -0.5 (number) + Object: -0.5 (object) +(9) Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: Infinity (number) + Object: Infinity (object) +(10) -Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -Infinity (number) + Object: -Infinity (object) +(11) NaN (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: NaN (object) +(12) (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(13) 0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(14) -0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: -0 (object) +(15) 0.0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0.0 (object) +(16) 1 (string) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(17) Hello World! (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: Hello World! (object) +(18) true (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: true (object) +(19) _level0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (object) +(20) äöü (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: äöü (object) +(21) _level0 (movieclip) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (movieclip) +(22) [object Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [object Object] (object) +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object) + Boolean: true (boolean) + Integer: 504809296 (number) + Number: 103584024400.25 (number) + Object: Fri Apr 13 21:20:24 GMT+0000 1973 (object) +(24) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(25) [type Function] (function) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [type Function] (function) +(26) [type Object] (object) + Boolean: true (boolean) +valueOf called + Integer: 0 (number) +valueOf called + Number: NaN (number) +valueOf called +toString called + Object: [type Object] (object) +(27) [type Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) +toString called with + Object: [type Object] (object) +(28) [object Object] (object) + Boolean: true (boolean) +valueOf called with + Integer: 0 (number) +valueOf called with + Number: NaN (number) +valueOf called with + Object: [object Object] (object) +(29) undefined (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(30) undefined (object) + Boolean: true (boolean) +0: valueOf! + Integer: 0 (number) +0: valueOf! + Number: NaN (number) +0: valueOf! + Object: undefined (object) +(31) null (object) + Boolean: true (boolean) +1: valueOf! + Integer: 0 (number) +1: valueOf! + Number: NaN (number) +1: valueOf! + Object: null (object) +(32) true (object) + Boolean: true (boolean) +2: valueOf! + Integer: 1 (number) +2: valueOf! + Number: 1 (number) +2: valueOf! + Object: true (object) +(33) false (object) + Boolean: true (boolean) +3: valueOf! + Integer: 0 (number) +3: valueOf! + Number: 0 (number) +3: valueOf! + Object: false (object) +(34) 0 (object) + Boolean: true (boolean) +4: valueOf! + Integer: 0 (number) +4: valueOf! + Number: 0 (number) +4: valueOf! + Object: 0 (object) +(35) 1 (object) + Boolean: true (boolean) +5: valueOf! + Integer: 1 (number) +5: valueOf! + Number: 1 (number) +5: valueOf! + Object: 1 (object) +(36) 0.5 (object) + Boolean: true (boolean) +6: valueOf! + Integer: 0 (number) +6: valueOf! + Number: 0.5 (number) +6: valueOf! + Object: 0.5 (object) +(37) -1 (object) + Boolean: true (boolean) +7: valueOf! + Integer: -1 (number) +7: valueOf! + Number: -1 (number) +7: valueOf! + Object: -1 (object) +(38) -0.5 (object) + Boolean: true (boolean) +8: valueOf! + Integer: 0 (number) +8: valueOf! + Number: -0.5 (number) +8: valueOf! + Object: -0.5 (object) +(39) Infinity (object) + Boolean: true (boolean) +9: valueOf! + Integer: 0 (number) +9: valueOf! + Number: Infinity (number) +9: valueOf! + Object: Infinity (object) +(40) -Infinity (object) + Boolean: true (boolean) +10: valueOf! + Integer: 0 (number) +10: valueOf! + Number: -Infinity (number) +10: valueOf! + Object: -Infinity (object) +(41) NaN (object) + Boolean: true (boolean) +11: valueOf! + Integer: 0 (number) +11: valueOf! + Number: NaN (number) +11: valueOf! + Object: NaN (object) +(42) (object) + Boolean: true (boolean) +12: valueOf! + Integer: 0 (number) +12: valueOf! + Number: NaN (number) +12: valueOf! + Object: (object) +(43) 0 (object) + Boolean: true (boolean) +13: valueOf! + Integer: 0 (number) +13: valueOf! + Number: 0 (number) +13: valueOf! + Object: 0 (object) +(44) -0 (object) + Boolean: true (boolean) +14: valueOf! + Integer: 0 (number) +14: valueOf! + Number: 0 (number) +14: valueOf! + Object: -0 (object) +(45) 0.0 (object) + Boolean: true (boolean) +15: valueOf! + Integer: 0 (number) +15: valueOf! + Number: 0 (number) +15: valueOf! + Object: 0.0 (object) +(46) 1 (object) + Boolean: true (boolean) +16: valueOf! + Integer: 1 (number) +16: valueOf! + Number: 1 (number) +16: valueOf! + Object: 1 (object) +(47) Hello World! (object) + Boolean: true (boolean) +17: valueOf! + Integer: 0 (number) +17: valueOf! + Number: NaN (number) +17: valueOf! + Object: Hello World! (object) +(48) true (object) + Boolean: true (boolean) +18: valueOf! + Integer: 0 (number) +18: valueOf! + Number: NaN (number) +18: valueOf! + Object: true (object) +(49) _level0 (object) + Boolean: true (boolean) +19: valueOf! + Integer: 0 (number) +19: valueOf! + Number: NaN (number) +19: valueOf! + Object: _level0 (object) +(50) äöü (object) + Boolean: true (boolean) +20: valueOf! + Integer: 0 (number) +20: valueOf! + Number: NaN (number) +20: valueOf! + Object: äöü (object) +(51) _level0 (object) + Boolean: true (boolean) +21: valueOf! + Integer: 0 (number) +21: valueOf! + Number: NaN (number) +21: valueOf! + Object: _level0 (object) +(52) [type Object] (object) + Boolean: true (boolean) +22: valueOf! + Integer: 0 (number) +22: valueOf! + Number: NaN (number) +22: valueOf! +22: toString! + Object: [type Object] (object) +(53) [type Object] (object) + Boolean: true (boolean) +23: valueOf! + Integer: 0 (number) +23: valueOf! + Number: NaN (number) +23: valueOf! +23: toString! + Object: [type Object] (object) +(54) [type Object] (object) + Boolean: true (boolean) +24: valueOf! + Integer: 0 (number) +24: valueOf! + Number: NaN (number) +24: valueOf! +24: toString! + Object: [type Object] (object) +(55) [type Object] (object) + Boolean: true (boolean) +25: valueOf! + Integer: 0 (number) +25: valueOf! + Number: NaN (number) +25: valueOf! +25: toString! + Object: [type Object] (object) +(56) [type Object] (object) + Boolean: true (boolean) +26: valueOf! + Integer: 0 (number) +26: valueOf! + Number: NaN (number) +26: valueOf! +26: toString! + Object: [type Object] (object) +(57) [type Object] (object) + Boolean: true (boolean) +27: valueOf! + Integer: 0 (number) +27: valueOf! + Number: NaN (number) +27: valueOf! +27: toString! + Object: [type Object] (object) +(58) [type Object] (object) + Boolean: true (boolean) +28: valueOf! + Integer: 0 (number) +28: valueOf! + Number: NaN (number) +28: valueOf! +28: toString! + Object: [type Object] (object) +(59) [type Object] (object) + Boolean: true (boolean) +29: valueOf! + Integer: 0 (number) +29: valueOf! + Number: NaN (number) +29: valueOf! +29: toString! + Object: [type Object] (object) diff --git a/test/trace/conversion-functions-8.swf b/test/trace/conversion-functions-8.swf Binary files differnew file mode 100644 index 00000000..1c407f1a --- /dev/null +++ b/test/trace/conversion-functions-8.swf diff --git a/test/trace/conversion-functions-8.swf.trace b/test/trace/conversion-functions-8.swf.trace new file mode 100644 index 00000000..51b2b5ea --- /dev/null +++ b/test/trace/conversion-functions-8.swf.trace @@ -0,0 +1,448 @@ +valueOf called +toString called +toString called with +valueOf called with +0: valueOf! +1: valueOf! +2: valueOf! +3: valueOf! +4: valueOf! +5: valueOf! +6: valueOf! +7: valueOf! +8: valueOf! +9: valueOf! +10: valueOf! +11: valueOf! +12: valueOf! +13: valueOf! +14: valueOf! +15: valueOf! +16: valueOf! +17: valueOf! +18: valueOf! +19: valueOf! +20: valueOf! +21: valueOf! +22: valueOf! +22: toString! +23: valueOf! +23: toString! +24: valueOf! +24: toString! +25: valueOf! +25: toString! +26: valueOf! +26: toString! +27: valueOf! +27: toString! +28: valueOf! +28: toString! +29: valueOf! +29: toString! +(0) undefined (undefined) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(1) null (null) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(2) true (boolean) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: true (object) +(3) false (boolean) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: false (object) +(4) 0 (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(5) 1 (number) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(6) 0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0.5 (number) + Object: 0.5 (object) +(7) -1 (number) + Boolean: true (boolean) + Integer: -1 (number) + Number: -1 (number) + Object: -1 (object) +(8) -0.5 (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -0.5 (number) + Object: -0.5 (object) +(9) Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: Infinity (number) + Object: Infinity (object) +(10) -Infinity (number) + Boolean: true (boolean) + Integer: 0 (number) + Number: -Infinity (number) + Object: -Infinity (object) +(11) NaN (number) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: NaN (object) +(12) (string) + Boolean: false (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(13) 0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0 (object) +(14) -0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: -0 (object) +(15) 0.0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: 0 (number) + Object: 0.0 (object) +(16) 1 (string) + Boolean: true (boolean) + Integer: 1 (number) + Number: 1 (number) + Object: 1 (object) +(17) Hello World! (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: Hello World! (object) +(18) true (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: true (object) +(19) _level0 (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (object) +(20) äöü (string) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: äöü (object) +(21) _level0 (movieclip) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: _level0 (movieclip) +(22) [object Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [object Object] (object) +(23) Fri Apr 13 21:20:24 GMT+0000 1973 (object) + Boolean: true (boolean) + Integer: 504809296 (number) + Number: 103584024400.25 (number) + Object: Fri Apr 13 21:20:24 GMT+0000 1973 (object) +(24) (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: (object) +(25) [type Function] (function) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: [type Function] (function) +(26) [type Object] (object) + Boolean: true (boolean) +valueOf called + Integer: 0 (number) +valueOf called + Number: NaN (number) +valueOf called +toString called + Object: [type Object] (object) +(27) [type Object] (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) +toString called with + Object: [type Object] (object) +(28) [object Object] (object) + Boolean: true (boolean) +valueOf called with + Integer: 0 (number) +valueOf called with + Number: NaN (number) +valueOf called with + Object: [object Object] (object) +(29) undefined (object) + Boolean: true (boolean) + Integer: 0 (number) + Number: NaN (number) + Object: undefined (object) +(30) undefined (object) + Boolean: true (boolean) +0: valueOf! + Integer: 0 (number) +0: valueOf! + Number: NaN (number) +0: valueOf! + Object: undefined (object) +(31) null (object) + Boolean: true (boolean) +1: valueOf! + Integer: 0 (number) +1: valueOf! + Number: NaN (number) +1: valueOf! + Object: null (object) +(32) true (object) + Boolean: true (boolean) +2: valueOf! + Integer: 1 (number) +2: valueOf! + Number: 1 (number) +2: valueOf! + Object: true (object) +(33) false (object) + Boolean: true (boolean) +3: valueOf! + Integer: 0 (number) +3: valueOf! + Number: 0 (number) +3: valueOf! + Object: false (object) +(34) 0 (object) + Boolean: true (boolean) +4: valueOf! + Integer: 0 (number) +4: valueOf! + Number: 0 (number) +4: valueOf! + Object: 0 (object) +(35) 1 (object) + Boolean: true (boolean) +5: valueOf! + Integer: 1 (number) +5: valueOf! + Number: 1 (number) +5: valueOf! + Object: 1 (object) +(36) 0.5 (object) + Boolean: true (boolean) +6: valueOf! + Integer: 0 (number) +6: valueOf! + Number: 0.5 (number) +6: valueOf! + Object: 0.5 (object) +(37) -1 (object) + Boolean: true (boolean) +7: valueOf! + Integer: -1 (number) +7: valueOf! + Number: -1 (number) +7: valueOf! + Object: -1 (object) +(38) -0.5 (object) + Boolean: true (boolean) +8: valueOf! + Integer: 0 (number) +8: valueOf! + Number: -0.5 (number) +8: valueOf! + Object: -0.5 (object) +(39) Infinity (object) + Boolean: true (boolean) +9: valueOf! + Integer: 0 (number) +9: valueOf! + Number: Infinity (number) +9: valueOf! + Object: Infinity (object) +(40) -Infinity (object) + Boolean: true (boolean) +10: valueOf! + Integer: 0 (number) +10: valueOf! + Number: -Infinity (number) +10: valueOf! + Object: -Infinity (object) +(41) NaN (object) + Boolean: true (boolean) +11: valueOf! + Integer: 0 (number) +11: valueOf! + Number: NaN (number) +11: valueOf! + Object: NaN (object) +(42) (object) + Boolean: true (boolean) +12: valueOf! + Integer: 0 (number) +12: valueOf! + Number: NaN (number) +12: valueOf! + Object: (object) +(43) 0 (object) + Boolean: true (boolean) +13: valueOf! + Integer: 0 (number) +13: valueOf! + Number: 0 (number) +13: valueOf! + Object: 0 (object) +(44) -0 (object) + Boolean: true (boolean) +14: valueOf! + Integer: 0 (number) +14: valueOf! + Number: 0 (number) +14: valueOf! + Object: -0 (object) +(45) 0.0 (object) + Boolean: true (boolean) +15: valueOf! + Integer: 0 (number) +15: valueOf! + Number: 0 (number) +15: valueOf! + Object: 0.0 (object) +(46) 1 (object) + Boolean: true (boolean) +16: valueOf! + Integer: 1 (number) +16: valueOf! + Number: 1 (number) +16: valueOf! + Object: 1 (object) +(47) Hello World! (object) + Boolean: true (boolean) +17: valueOf! + Integer: 0 (number) +17: valueOf! + Number: NaN (number) +17: valueOf! + Object: Hello World! (object) +(48) true (object) + Boolean: true (boolean) +18: valueOf! + Integer: 0 (number) +18: valueOf! + Number: NaN (number) +18: valueOf! + Object: true (object) +(49) _level0 (object) + Boolean: true (boolean) +19: valueOf! + Integer: 0 (number) +19: valueOf! + Number: NaN (number) +19: valueOf! + Object: _level0 (object) +(50) äöü (object) + Boolean: true (boolean) +20: valueOf! + Integer: 0 (number) +20: valueOf! + Number: NaN (number) +20: valueOf! + Object: äöü (object) +(51) _level0 (object) + Boolean: true (boolean) +21: valueOf! + Integer: 0 (number) +21: valueOf! + Number: NaN (number) +21: valueOf! + Object: _level0 (object) +(52) [type Object] (object) + Boolean: true (boolean) +22: valueOf! + Integer: 0 (number) +22: valueOf! + Number: NaN (number) +22: valueOf! +22: toString! + Object: [type Object] (object) +(53) [type Object] (object) + Boolean: true (boolean) +23: valueOf! + Integer: 0 (number) +23: valueOf! + Number: NaN (number) +23: valueOf! +23: toString! + Object: [type Object] (object) +(54) [type Object] (object) + Boolean: true (boolean) +24: valueOf! + Integer: 0 (number) +24: valueOf! + Number: NaN (number) +24: valueOf! +24: toString! + Object: [type Object] (object) +(55) [type Object] (object) + Boolean: true (boolean) +25: valueOf! + Integer: 0 (number) +25: valueOf! + Number: NaN (number) +25: valueOf! +25: toString! + Object: [type Object] (object) +(56) [type Object] (object) + Boolean: true (boolean) +26: valueOf! + Integer: 0 (number) +26: valueOf! + Number: NaN (number) +26: valueOf! +26: toString! + Object: [type Object] (object) +(57) [type Object] (object) + Boolean: true (boolean) +27: valueOf! + Integer: 0 (number) +27: valueOf! + Number: NaN (number) +27: valueOf! +27: toString! + Object: [type Object] (object) +(58) [type Object] (object) + Boolean: true (boolean) +28: valueOf! + Integer: 0 (number) +28: valueOf! + Number: NaN (number) +28: valueOf! +28: toString! + Object: [type Object] (object) +(59) [type Object] (object) + Boolean: true (boolean) +29: valueOf! + Integer: 0 (number) +29: valueOf! + Number: NaN (number) +29: valueOf! +29: toString! + Object: [type Object] (object) diff --git a/test/trace/conversion-functions.as b/test/trace/conversion-functions.as new file mode 100644 index 00000000..faf40c3c --- /dev/null +++ b/test/trace/conversion-functions.as @@ -0,0 +1,17 @@ +// makeswf -v 7 -s 200x150 -r 1 -o conversion-functions.swf conversion-functions.as + +#include "values.as" + +for (i = 0; i < values.length; i++) { + trace (names[i]); + x = Boolean (values[i]); + trace (" Boolean: " + x + " (" + typeof (x) + ")"); + x = int (values[i]); + trace (" Integer: " + x + " (" + typeof (x) + ")"); + x = Number (values[i]); + trace (" Number: " + x + " (" + typeof (x) + ")"); + x = Object(values[i]); + trace (" Object: " + x + " (" + typeof (x) + ")"); +} + +getURL ("fscommand:quit", ""); diff --git a/test/trace/crash-0.9.1-getvariable-shapes-5.swf b/test/trace/crash-0.9.1-getvariable-shapes-5.swf Binary files differnew file mode 100644 index 00000000..fcd8bc59 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-5.swf diff --git a/test/trace/crash-0.9.1-getvariable-shapes-5.swf.trace b/test/trace/crash-0.9.1-getvariable-shapes-5.swf.trace new file mode 100644 index 00000000..417b7b53 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-5.swf.trace @@ -0,0 +1 @@ +undefined diff --git a/test/trace/crash-0.9.1-getvariable-shapes-6.swf b/test/trace/crash-0.9.1-getvariable-shapes-6.swf Binary files differnew file mode 100644 index 00000000..c420c357 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-6.swf diff --git a/test/trace/crash-0.9.1-getvariable-shapes-6.swf.trace b/test/trace/crash-0.9.1-getvariable-shapes-6.swf.trace new file mode 100644 index 00000000..417b7b53 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-6.swf.trace @@ -0,0 +1 @@ +undefined diff --git a/test/trace/crash-0.9.1-getvariable-shapes-7.swf b/test/trace/crash-0.9.1-getvariable-shapes-7.swf Binary files differnew file mode 100644 index 00000000..3b3c1796 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-7.swf diff --git a/test/trace/crash-0.9.1-getvariable-shapes-7.swf.trace b/test/trace/crash-0.9.1-getvariable-shapes-7.swf.trace new file mode 100644 index 00000000..417b7b53 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-7.swf.trace @@ -0,0 +1 @@ +undefined diff --git a/test/trace/crash-0.9.1-getvariable-shapes-8.swf b/test/trace/crash-0.9.1-getvariable-shapes-8.swf Binary files differnew file mode 100644 index 00000000..6bc361db --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-8.swf diff --git a/test/trace/crash-0.9.1-getvariable-shapes-8.swf.trace b/test/trace/crash-0.9.1-getvariable-shapes-8.swf.trace new file mode 100644 index 00000000..417b7b53 --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes-8.swf.trace @@ -0,0 +1 @@ +undefined diff --git a/test/trace/crash-0.9.1-getvariable-shapes.xml b/test/trace/crash-0.9.1-getvariable-shapes.xml new file mode 100644 index 00000000..76b3b3ab --- /dev/null +++ b/test/trace/crash-0.9.1-getvariable-shapes.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<swf version="8" compressed="1"> + <Header framerate="1" frames="1"> + <size> + <Rectangle left="0" right="4000" top="0" bottom="3000"/> + </size> + <tags> + <FileAttributes hasMetaData="0" useNetwork="0"/> + <DefineShape3 objectID="1"> + <bounds> + <Rectangle left="0" right="1000" top="0" bottom="1000"/> + </bounds> + <styles> + <StyleList> + <fillStyles> + <Solid> + <color> + <Color red="0" green="0" blue="255" alpha="255"/> + </color> + </Solid> + </fillStyles> + </StyleList> + </styles> + <shapes> + <Shape> + <edges> + <ShapeSetup x="0" y="0" fillStyle0="1"/> + <LineTo x="1000" y="0"/> + <LineTo x="0" y="1000"/> + <LineTo x="-1000" y="0"/> + <LineTo x="0" y="-1000"/> + <ShapeSetup/> + </edges> + </Shape> + </shapes> + </DefineShape3> + <PlaceObject2 replace="0" depth="1" objectID="1"/> + <DoAction> + <actions> + <Dictionary> + <strings> + <String value="_root.foo"/> + <String value="fscommand:quit"/> + <String value=""/> + </strings> + </Dictionary> + <PushData> + <items> + <StackDictionaryLookup index="0"/> + </items> + </PushData> + <GetVariable/> + <Trace/> + <PushData> + <items> + <StackDictionaryLookup index="1"/> + <StackDictionaryLookup index="2"/> + </items> + </PushData> + <GetURL2 method="0"/> + <EndAction/> + </actions> + </DoAction> + <ShowFrame/> + <End/> + </tags> + </Header> +</swf> diff --git a/test/trace/equality-nan-5.swf b/test/trace/equality-nan-5.swf Binary files differnew file mode 100644 index 00000000..3648c1fc --- /dev/null +++ b/test/trace/equality-nan-5.swf diff --git a/test/trace/equality-nan-5.swf.trace b/test/trace/equality-nan-5.swf.trace new file mode 100644 index 00000000..9b63072a --- /dev/null +++ b/test/trace/equality-nan-5.swf.trace @@ -0,0 +1,90 @@ +NaN +0 == 0 => true +0 == 1 => false +0 == 2 => false +0 == 3 => false +0 == 4 => false +0 == 5 => false +0 == 6 => false +0 == 7 => false +0 == 8 => false +NaN +1 == 0 => false +1 == 1 => true +1 == 2 => false +1 == 3 => false +1 == 4 => false +1 == 5 => false +1 == 6 => false +1 == 7 => false +1 == 8 => false +NaN +2 == 0 => false +2 == 1 => false +2 == 2 => true +2 == 3 => true +2 == 4 => false +2 == 5 => false +2 == 6 => false +2 == 7 => false +2 == 8 => false +NaN +3 == 0 => false +3 == 1 => false +3 == 2 => true +3 == 3 => true +3 == 4 => false +3 == 5 => false +3 == 6 => false +3 == 7 => false +3 == 8 => false +NaN +4 == 0 => false +4 == 1 => false +4 == 2 => false +4 == 3 => false +4 == 4 => true +4 == 5 => false +4 == 6 => false +4 == 7 => false +4 == 8 => false +asdf +5 == 0 => false +5 == 1 => false +5 == 2 => false +5 == 3 => false +5 == 4 => false +5 == 5 => true +5 == 6 => true +5 == 7 => false +5 == 8 => false +asdf +6 == 0 => false +6 == 1 => false +6 == 2 => false +6 == 3 => false +6 == 4 => false +6 == 5 => true +6 == 6 => true +6 == 7 => false +6 == 8 => false +NaN +7 == 0 => false +7 == 1 => false +7 == 2 => false +7 == 3 => false +7 == 4 => false +7 == 5 => false +7 == 6 => false +7 == 7 => true +7 == 8 => true +NaN +8 == 0 => false +8 == 1 => false +8 == 2 => false +8 == 3 => false +8 == 4 => false +8 == 5 => false +8 == 6 => false +8 == 7 => true +8 == 8 => true diff --git a/test/trace/equality-nan-6.swf b/test/trace/equality-nan-6.swf Binary files differnew file mode 100644 index 00000000..9c169132 --- /dev/null +++ b/test/trace/equality-nan-6.swf diff --git a/test/trace/equality-nan-6.swf.trace b/test/trace/equality-nan-6.swf.trace new file mode 100644 index 00000000..9b63072a --- /dev/null +++ b/test/trace/equality-nan-6.swf.trace @@ -0,0 +1,90 @@ +NaN +0 == 0 => true +0 == 1 => false +0 == 2 => false +0 == 3 => false +0 == 4 => false +0 == 5 => false +0 == 6 => false +0 == 7 => false +0 == 8 => false +NaN +1 == 0 => false +1 == 1 => true +1 == 2 => false +1 == 3 => false +1 == 4 => false +1 == 5 => false +1 == 6 => false +1 == 7 => false +1 == 8 => false +NaN +2 == 0 => false +2 == 1 => false +2 == 2 => true +2 == 3 => true +2 == 4 => false +2 == 5 => false +2 == 6 => false +2 == 7 => false +2 == 8 => false +NaN +3 == 0 => false +3 == 1 => false +3 == 2 => true +3 == 3 => true +3 == 4 => false +3 == 5 => false +3 == 6 => false +3 == 7 => false +3 == 8 => false +NaN +4 == 0 => false +4 == 1 => false +4 == 2 => false +4 == 3 => false +4 == 4 => true +4 == 5 => false +4 == 6 => false +4 == 7 => false +4 == 8 => false +asdf +5 == 0 => false +5 == 1 => false +5 == 2 => false +5 == 3 => false +5 == 4 => false +5 == 5 => true +5 == 6 => true +5 == 7 => false +5 == 8 => false +asdf +6 == 0 => false +6 == 1 => false +6 == 2 => false +6 == 3 => false +6 == 4 => false +6 == 5 => true +6 == 6 => true +6 == 7 => false +6 == 8 => false +NaN +7 == 0 => false +7 == 1 => false +7 == 2 => false +7 == 3 => false +7 == 4 => false +7 == 5 => false +7 == 6 => false +7 == 7 => true +7 == 8 => true +NaN +8 == 0 => false +8 == 1 => false +8 == 2 => false +8 == 3 => false +8 == 4 => false +8 == 5 => false +8 == 6 => false +8 == 7 => true +8 == 8 => true diff --git a/test/trace/equality-nan-7.swf b/test/trace/equality-nan-7.swf Binary files differnew file mode 100644 index 00000000..7306dcfb --- /dev/null +++ b/test/trace/equality-nan-7.swf diff --git a/test/trace/equality-nan-7.swf.trace b/test/trace/equality-nan-7.swf.trace new file mode 100644 index 00000000..9b63072a --- /dev/null +++ b/test/trace/equality-nan-7.swf.trace @@ -0,0 +1,90 @@ +NaN +0 == 0 => true +0 == 1 => false +0 == 2 => false +0 == 3 => false +0 == 4 => false +0 == 5 => false +0 == 6 => false +0 == 7 => false +0 == 8 => false +NaN +1 == 0 => false +1 == 1 => true +1 == 2 => false +1 == 3 => false +1 == 4 => false +1 == 5 => false +1 == 6 => false +1 == 7 => false +1 == 8 => false +NaN +2 == 0 => false +2 == 1 => false +2 == 2 => true +2 == 3 => true +2 == 4 => false +2 == 5 => false +2 == 6 => false +2 == 7 => false +2 == 8 => false +NaN +3 == 0 => false +3 == 1 => false +3 == 2 => true +3 == 3 => true +3 == 4 => false +3 == 5 => false +3 == 6 => false +3 == 7 => false +3 == 8 => false +NaN +4 == 0 => false +4 == 1 => false +4 == 2 => false +4 == 3 => false +4 == 4 => true +4 == 5 => false +4 == 6 => false +4 == 7 => false +4 == 8 => false +asdf +5 == 0 => false +5 == 1 => false +5 == 2 => false +5 == 3 => false +5 == 4 => false +5 == 5 => true +5 == 6 => true +5 == 7 => false +5 == 8 => false +asdf +6 == 0 => false +6 == 1 => false +6 == 2 => false +6 == 3 => false +6 == 4 => false +6 == 5 => true +6 == 6 => true +6 == 7 => false +6 == 8 => false +NaN +7 == 0 => false +7 == 1 => false +7 == 2 => false +7 == 3 => false +7 == 4 => false +7 == 5 => false +7 == 6 => false +7 == 7 => true +7 == 8 => true +NaN +8 == 0 => false +8 == 1 => false +8 == 2 => false +8 == 3 => false +8 == 4 => false +8 == 5 => false +8 == 6 => false +8 == 7 => true +8 == 8 => true diff --git a/test/trace/equality-nan-8.swf b/test/trace/equality-nan-8.swf Binary files differnew file mode 100644 index 00000000..34e06763 --- /dev/null +++ b/test/trace/equality-nan-8.swf diff --git a/test/trace/equality-nan-8.swf.trace b/test/trace/equality-nan-8.swf.trace new file mode 100644 index 00000000..9b63072a --- /dev/null +++ b/test/trace/equality-nan-8.swf.trace @@ -0,0 +1,90 @@ +NaN +0 == 0 => true +0 == 1 => false +0 == 2 => false +0 == 3 => false +0 == 4 => false +0 == 5 => false +0 == 6 => false +0 == 7 => false +0 == 8 => false +NaN +1 == 0 => false +1 == 1 => true +1 == 2 => false +1 == 3 => false +1 == 4 => false +1 == 5 => false +1 == 6 => false +1 == 7 => false +1 == 8 => false +NaN +2 == 0 => false +2 == 1 => false +2 == 2 => true +2 == 3 => true +2 == 4 => false +2 == 5 => false +2 == 6 => false +2 == 7 => false +2 == 8 => false +NaN +3 == 0 => false +3 == 1 => false +3 == 2 => true +3 == 3 => true +3 == 4 => false +3 == 5 => false +3 == 6 => false +3 == 7 => false +3 == 8 => false +NaN +4 == 0 => false +4 == 1 => false +4 == 2 => false +4 == 3 => false +4 == 4 => true +4 == 5 => false +4 == 6 => false +4 == 7 => false +4 == 8 => false +asdf +5 == 0 => false +5 == 1 => false +5 == 2 => false +5 == 3 => false +5 == 4 => false +5 == 5 => true +5 == 6 => true +5 == 7 => false +5 == 8 => false +asdf +6 == 0 => false +6 == 1 => false +6 == 2 => false +6 == 3 => false +6 == 4 => false +6 == 5 => true +6 == 6 => true +6 == 7 => false +6 == 8 => false +NaN +7 == 0 => false +7 == 1 => false +7 == 2 => false +7 == 3 => false +7 == 4 => false +7 == 5 => false +7 == 6 => false +7 == 7 => true +7 == 8 => true +NaN +8 == 0 => false +8 == 1 => false +8 == 2 => false +8 == 3 => false +8 == 4 => false +8 == 5 => false +8 == 6 => false +8 == 7 => true +8 == 8 => true diff --git a/test/trace/equality-nan.as b/test/trace/equality-nan.as new file mode 100644 index 00000000..24c1b05f --- /dev/null +++ b/test/trace/equality-nan.as @@ -0,0 +1,14 @@ +// makeswf -v 7 -s 200x150 -r 1 -o equality-nan.swf equality-nan.as + +x = 0/0; +nans = [ 0/0, 0/0, NaN, NaN, Number ("asdf"), "asdf", "asdf", x, x]; + +for (i = 0; i < nans.length; i++) { + trace (nans[i]); + for (j = 0; j < nans.length; j++) { + trace (i + " == " + j + " => " + (nans[i] == nans[j])); + } +} + + +getURL ("fscommand:quit", ""); diff --git a/test/trace/movieclip-references-5.swf b/test/trace/movieclip-references-5.swf Binary files differnew file mode 100644 index 00000000..c0758fee --- /dev/null +++ b/test/trace/movieclip-references-5.swf diff --git a/test/trace/movieclip-references-5.swf.trace b/test/trace/movieclip-references-5.swf.trace new file mode 100644 index 00000000..b513ae3e --- /dev/null +++ b/test/trace/movieclip-references-5.swf.trace @@ -0,0 +1,59 @@ +2: begin +1: begin +0: begin +0: middle +0: end +0: [],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[] +1: [],[],[],[],[] +2: middle +1: begin +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[] +1: [],[],[],[],[],[],[],[],[] +2: end +1: begin +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[],[],[] +1: [],[],[],[],[],[],[],[],[],[],[],[],[] +2: [],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] diff --git a/test/trace/movieclip-references-6.swf b/test/trace/movieclip-references-6.swf Binary files differnew file mode 100644 index 00000000..6527c591 --- /dev/null +++ b/test/trace/movieclip-references-6.swf diff --git a/test/trace/movieclip-references-6.swf.trace b/test/trace/movieclip-references-6.swf.trace new file mode 100644 index 00000000..b513ae3e --- /dev/null +++ b/test/trace/movieclip-references-6.swf.trace @@ -0,0 +1,59 @@ +2: begin +1: begin +0: begin +0: middle +0: end +0: [],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[] +1: [],[],[],[],[] +2: middle +1: begin +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[] +1: [],[],[],[],[],[],[],[],[] +2: end +1: begin +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[] +1: middle +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[],[] +1: end +0: begin +0: middle +0: end +0: [],[],[],[],[],[],[],[],[],[],[],[],[] +1: [],[],[],[],[],[],[],[],[],[],[],[],[] +2: [],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] +[],[],[],[],[],[],[],[],[],[],[],[],[] diff --git a/test/trace/movieclip-references-7.swf b/test/trace/movieclip-references-7.swf Binary files differnew file mode 100644 index 00000000..2e2abf79 --- /dev/null +++ b/test/trace/movieclip-references-7.swf diff --git a/test/trace/movieclip-references-7.swf.trace b/test/trace/movieclip-references-7.swf.trace new file mode 100644 index 00000000..3965c24b --- /dev/null +++ b/test/trace/movieclip-references-7.swf.trace @@ -0,0 +1,59 @@ +2: begin +1: begin +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.b,_level0.a.b],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: [_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +2: middle +1: begin +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.b,_level0.b.b],[,,],[_level0.b.b.a,_level0.b.b.a,_level0.b.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a,_level0.b.a,_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a],[,,],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +1: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a,_level0.b.a,_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a],[,,],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +2: end +1: begin +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,],[,,],[,,],[,,],[,,],[_level0.a.b,_level0.a.b],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +2: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,] diff --git a/test/trace/movieclip-references-8.swf b/test/trace/movieclip-references-8.swf Binary files differnew file mode 100644 index 00000000..d4ca4e2d --- /dev/null +++ b/test/trace/movieclip-references-8.swf diff --git a/test/trace/movieclip-references-8.swf.trace b/test/trace/movieclip-references-8.swf.trace new file mode 100644 index 00000000..3965c24b --- /dev/null +++ b/test/trace/movieclip-references-8.swf.trace @@ -0,0 +1,59 @@ +2: begin +1: begin +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.b,_level0.a.b],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: [_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +2: middle +1: begin +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.b,_level0.b.b],[,,],[_level0.b.b.a,_level0.b.b.a,_level0.b.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a,_level0.b.a,_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a],[,,],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +1: [_level0.b,_level0.b],[,,],[,,],[,,],[,,],[_level0.b.a,_level0.b.a,_level0.b.a],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a],[,,],[_level0.b.a.a,_level0.b.a.a,_level0.b.a.a] +2: end +1: begin +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: middle +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,],[,,],[,,],[,,],[,,],[_level0.a.b,_level0.a.b],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a] +1: end +0: begin +0: middle +0: end +0: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +1: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +2: [_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[,,],[,,],[,,] +[_level0.a,_level0.a,_level0.a],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[,,],[,,],[,,],[_level0.a.a,_level0.a.a,_level0.a.a],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a],[,,],[_level0.a.a.a,_level0.a.a.a,_level0.a.a.a] +[_level0.a,_level0.a,_level0.a],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,],[,,],[,,],[,,],[,,],[,,],[,,],[_level0.a.b.a,_level0.a.b.a,_level0.a.b.a],[,,] diff --git a/test/trace/movieclip-references.as b/test/trace/movieclip-references.as new file mode 100644 index 00000000..722f3bd0 --- /dev/null +++ b/test/trace/movieclip-references.as @@ -0,0 +1,43 @@ +// makeswf -v 7 -s 200x150 -r 1 -o movieclip-references.swf movieclip-references.as + +function create (mc, array, depth) { + if (depth == 0) + return; + depth--; + var o = []; + o.toString = function () { return "[" + Array.prototype.toString.apply (this) + "]"; }; + array.push (o); + mc.createEmptyMovieClip ("a", 0); + o.push (mc.a); + trace (depth + ": begin"); + create (mc.a, array, depth); + mc.a._name = "b"; + o.push (mc.b); + trace (depth + ": middle"); + create (mc.b, array, depth); + mc.b._name = "a"; + o.push (mc.a); + trace (depth + ": end"); + create (mc.a, array, depth); + trace (depth + ": " + array); +}; + +array = []; +create (this, array, 3); +trace (array); +a.removeMovieClip (); +trace (array); +createEmptyMovieClip ("a", 0); +trace (array); +createEmptyMovieClip ("b", 1); +trace (array); +a.createEmptyMovieClip ("b", 0); +a.b._name = "a"; +trace (array); +a.a.createEmptyMovieClip ("a", 0); +trace (array); +a.a._name = "b"; +trace (array); + + +getURL ("fscommand:quit", ""); diff --git a/test/trace/number-construct-5.swf b/test/trace/number-construct-5.swf Binary files differnew file mode 100644 index 00000000..506ba446 --- /dev/null +++ b/test/trace/number-construct-5.swf diff --git a/test/trace/number-construct-5.swf.trace b/test/trace/number-construct-5.swf.trace new file mode 100644 index 00000000..3bbfc870 --- /dev/null +++ b/test/trace/number-construct-5.swf.trace @@ -0,0 +1,18 @@ +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity diff --git a/test/trace/number-construct-6.swf b/test/trace/number-construct-6.swf Binary files differnew file mode 100644 index 00000000..cd3bbbc2 --- /dev/null +++ b/test/trace/number-construct-6.swf diff --git a/test/trace/number-construct-6.swf.trace b/test/trace/number-construct-6.swf.trace new file mode 100644 index 00000000..3bbfc870 --- /dev/null +++ b/test/trace/number-construct-6.swf.trace @@ -0,0 +1,18 @@ +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity diff --git a/test/trace/number-construct-7.swf b/test/trace/number-construct-7.swf Binary files differnew file mode 100644 index 00000000..e76f79d0 --- /dev/null +++ b/test/trace/number-construct-7.swf diff --git a/test/trace/number-construct-7.swf.trace b/test/trace/number-construct-7.swf.trace new file mode 100644 index 00000000..3bbfc870 --- /dev/null +++ b/test/trace/number-construct-7.swf.trace @@ -0,0 +1,18 @@ +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity diff --git a/test/trace/number-construct-8.swf b/test/trace/number-construct-8.swf Binary files differnew file mode 100644 index 00000000..c30fe56f --- /dev/null +++ b/test/trace/number-construct-8.swf diff --git a/test/trace/number-construct-8.swf.trace b/test/trace/number-construct-8.swf.trace new file mode 100644 index 00000000..3bbfc870 --- /dev/null +++ b/test/trace/number-construct-8.swf.trace @@ -0,0 +1,18 @@ +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity +0 +0 +1 +2 +21239 +NaN +Infinity +Infinity +-Infinity diff --git a/test/trace/number-construct.as b/test/trace/number-construct.as new file mode 100644 index 00000000..ace842cb --- /dev/null +++ b/test/trace/number-construct.as @@ -0,0 +1,25 @@ +// makeswf -v 7 -s 200x150 -r 1 -o number-properties-7.swf number-properties.as + +#include "trace_properties.as" + +trace (new Number ()); +trace (new Number (0)); +trace (new Number (1)); +trace (new Number (2, 3)); +trace (new Number (21239)); +trace (new Number (NaN)); +trace (new Number (Infinity)); +trace (new Number (Infinity)); +trace (new Number (-Infinity)); + +trace (Number ()); +trace (Number (0)); +trace (Number (1)); +trace (Number (2, 3)); +trace (Number (21239)); +trace (Number (NaN)); +trace (Number (Infinity)); +trace (Number (Infinity)); +trace (Number (-Infinity)); + +getURL ("FSCommand:quit", ""); diff --git a/test/trace/various-tests-5.swf b/test/trace/various-tests-5.swf Binary files differnew file mode 100644 index 00000000..83a0e46f --- /dev/null +++ b/test/trace/various-tests-5.swf diff --git a/test/trace/various-tests-5.swf.trace b/test/trace/various-tests-5.swf.trace new file mode 100644 index 00000000..111d27d6 --- /dev/null +++ b/test/trace/various-tests-5.swf.trace @@ -0,0 +1,22 @@ +undefined +undefined +undefined +undefined +false +undefined +undefined +undefined +50 +[object Object] +[type Object] +toString +42 +toString +/ +/ +0 +0 +/ +42 +42 +[type Object] diff --git a/test/trace/various-tests-6.swf b/test/trace/various-tests-6.swf Binary files differnew file mode 100644 index 00000000..5ae66ad5 --- /dev/null +++ b/test/trace/various-tests-6.swf diff --git a/test/trace/various-tests-6.swf.trace b/test/trace/various-tests-6.swf.trace new file mode 100644 index 00000000..c699cde4 --- /dev/null +++ b/test/trace/various-tests-6.swf.trace @@ -0,0 +1,25 @@ +foo +undefined +_level0.a +undefined +undefined +false +1 +2 +3 +50 +[object Object] +[type Object] +toString +42 +toString +/b/b +/ +0 +0 +/ +42 +42 +[type Object] +not quitting, HAHA +quitting diff --git a/test/trace/various-tests-7.swf b/test/trace/various-tests-7.swf Binary files differnew file mode 100644 index 00000000..25a15fc2 --- /dev/null +++ b/test/trace/various-tests-7.swf diff --git a/test/trace/various-tests-7.swf.trace b/test/trace/various-tests-7.swf.trace new file mode 100644 index 00000000..c699cde4 --- /dev/null +++ b/test/trace/various-tests-7.swf.trace @@ -0,0 +1,25 @@ +foo +undefined +_level0.a +undefined +undefined +false +1 +2 +3 +50 +[object Object] +[type Object] +toString +42 +toString +/b/b +/ +0 +0 +/ +42 +42 +[type Object] +not quitting, HAHA +quitting diff --git a/test/trace/various-tests-8.swf b/test/trace/various-tests-8.swf Binary files differnew file mode 100644 index 00000000..15591c1a --- /dev/null +++ b/test/trace/various-tests-8.swf diff --git a/test/trace/various-tests-8.swf.trace b/test/trace/various-tests-8.swf.trace new file mode 100644 index 00000000..7176563c --- /dev/null +++ b/test/trace/various-tests-8.swf.trace @@ -0,0 +1,25 @@ +foo +undefined +_level0.a +undefined +(a=1, b=0, c=0, d=1, tx=0, ty=0) +false +1 +2 +3 +50 +[object Object] +[type Object] +toString +42 +toString +/b/b +/ +0 +0 +/ +42 +42 +[type Object] +not quitting, HAHA +quitting diff --git a/test/trace/various-tests.as b/test/trace/various-tests.as new file mode 100644 index 00000000..80de246d --- /dev/null +++ b/test/trace/various-tests.as @@ -0,0 +1,117 @@ +// makeswf -v 7 -s 200x150 -r 1 -o various-tests.swf various-tests.as + +/* check if ASBroadcaster requires an Array in _listeners */ +o = {}; +AsBroadcaster.initialize (o); +o._listeners = this; +this.length = 1; +this[0] = { foo: function () { trace ("foo"); } }; +o.broadcastMessage ("foo"); + + +/* check if Transform works on dead matrices */ +createEmptyMovieClip ("a", 0); +no = a; +a.removeMovieClip (); +t = new flash.geom.Transform (no); +trace (t.matrix); +createEmptyMovieClip ("a", 0); +trace (no); +trace (t.matrix); +t = new flash.geom.Transform (no); +trace (t.matrix); +delete t; + + +/* check if objects are equal that return the same thing from valueOf */ +x = { valueOf: function () { return o; } }; +y = { valueOf: function () { return o; } }; +trace (x == y); + + +/* check if setInterval works with deleted (and recreated) movies */ +createEmptyMovieClip ("a", 1000); +trace (setInterval (no, "quit", 500)); +a.removeMovieClip (); +trace (setInterval (no, "quit2", 500)); +createEmptyMovieClip ("a", 1000); +a.quit = function () { + trace ("not quitting, HAHA"); + getURL ("fscommand:quit", ""); +}; +a.quit2 = function () { + trace ("quitting"); + getURL ("fscommand:quit", ""); +}; + +createEmptyMovieClip ("b", 1); +b.trace = function () { trace ("hello"); }; +trace (setInterval (b, "trace", 500)); +b.removeMovieClip (); + + +/* check if Color.setTransform works with all types of objects */ +this.aa = 50; +c = new Color (this); +c.setTransform (this); +trace (_alpha); + + +/* check what undefined does as argument to Object */ +trace (new Object (undefined)); +trace (Object (undefined)); + + +/* check when setMember action calls [[ToName]] */ +o.toString = function () { trace ("toString"); return "x"; }; +asm { + push "o" + getvariable + dup + push 42 + setmember +}; +trace (o.x); +asm { + push 42, "o" + getvariable + push 42 + setmember +}; + + +/* check what deleting the target does */ +createEmptyMovieClip ("b", 0); +b.createEmptyMovieClip ("b", 0); +setTarget ("b.b"); +trace (_target); +_parent.removeMovieClip (); +trace (_target); + + +/* check what Number does without args */ +trace (new Number ()); +trace (Number ()); + + +/* check what object functions are set on upon declaration */ +createEmptyMovieClip ("b", 0); +setTarget ("b"); +function f () { trace (_target); }; +setTarget (""); +f(); +a.f(); + + +/* check if native functions get executed when run as constructor */ +x = new Array.prototype.push (42); +trace (x[0]); + + +/* check something with var (what was this supposed to be about?) */ +function test () { + var x = 42; + trace (x); +} +test (); +trace (x); diff --git a/test/various/Makefile.am b/test/various/Makefile.am index 072c490d..94931439 100644 --- a/test/various/Makefile.am +++ b/test/various/Makefile.am @@ -1,10 +1,6 @@ -check_PROGRAMS = gc ringbuffer +check_PROGRAMS = ringbuffer TESTS = $(check_PROGRAMS) -gc_SOURCES = gc.c -gc_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) -gc_LDFLAGS = $(SWFDEC_LIBS) $(CAIRO_LIBS) - ringbuffer_SOURCES = ringbuffer.c ringbuffer_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_CFLAGS) $(CAIRO_CFLAGS) ringbuffer_LDFLAGS = $(SWFDEC_LIBS) $(CAIRO_LIBS) diff --git a/test/various/gc.c b/test/various/gc.c deleted file mode 100644 index 6f485b69..00000000 --- a/test/various/gc.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Swfdec - * Copyright (C) 2006 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "swfdec/swfdec_as_context.h" -#include "swfdec/swfdec_as_object.h" -#include "swfdec/swfdec_as_strings.h" - -#define ERROR(...) G_STMT_START { \ - g_printerr ("ERROR (line %u): ", __LINE__); \ - g_printerr (__VA_ARGS__); \ - g_printerr ("\n"); \ - errors++; \ -}G_STMT_END - -static guint -check_strings (void) -{ - const char *s; - guint errors = 0; - SwfdecAsContext *context; - - context = g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); - swfdec_as_context_startup (context); - - s = swfdec_as_context_get_string (context, "hi mom"); - if (!g_str_equal (s, "hi mom")) { - ERROR ("swfdec_as_context_get_string returns different string from input"); - } - - g_object_unref (context); - return errors; -} - -static guint -check_objects (void) -{ - SwfdecAsObject *object; - guint errors = 0; - SwfdecAsContext *context; - SwfdecAsValue val; - gpointer check = GUINT_TO_POINTER (-1); /* NOT NULL */ - - context = g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); - swfdec_as_context_startup (context); - g_assert (check != NULL); - - object = swfdec_as_object_new (context); - g_object_add_weak_pointer (G_OBJECT (object), &check); - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - swfdec_as_object_set_variable (context->global, SWFDEC_AS_STR__root, &val); - swfdec_as_context_gc (context); - if (check == NULL) { - ERROR ("GC collected a rooted object, bailing"); - g_object_unref (context); - return errors; - } - swfdec_as_object_delete_variable (context->global, SWFDEC_AS_STR__root); - swfdec_as_context_gc (context); - if (check != NULL) { - ERROR ("GC did not collect an unreferenced object"); - } - - g_object_unref (context); - return errors; -} - -static guint -check_object_variables (void) -{ - SwfdecAsObject *o, *o2; - guint errors = 0; - SwfdecAsContext *context; - const char *s; - gpointer check = GUINT_TO_POINTER (-1); /* NOT NULL */ - gpointer check2 = GUINT_TO_POINTER (-1); /* NOT NULL */ - SwfdecAsValue v1, v2; - - context = g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); - swfdec_as_context_startup (context); - g_assert (check != NULL); - - o = swfdec_as_object_new (context); - o2 = swfdec_as_object_new (context); - g_object_add_weak_pointer (G_OBJECT (o), &check); - g_object_add_weak_pointer (G_OBJECT (o2), &check2); - s = swfdec_as_context_get_string (context, "foo"); - /* step one: set a variable */ - SWFDEC_AS_VALUE_SET_OBJECT (&v1, o); - swfdec_as_object_set_variable (context->global, s, &v1); - SWFDEC_AS_VALUE_SET_OBJECT (&v2, o2); - swfdec_as_object_set_variable (o, s, &v2); - SWFDEC_AS_VALUE_SET_UNDEFINED (&v2); - swfdec_as_object_get_variable (o, s, &v2); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&v2)) { - ERROR ("variable changed type"); - } else if (o2 != SWFDEC_AS_VALUE_GET_OBJECT (&v2)) { - ERROR ("variable changed value"); - } - /* step 2: gc */ - swfdec_as_context_gc (context); - if (check == NULL || check2 == NULL) { - ERROR ("GC collected a used object, bailing"); - g_object_unref (context); - return errors; - } - /* step 3: unset root reference and set cyclic variable */ - swfdec_as_object_delete_variable (context->global, s); - swfdec_as_object_set_variable (o2, s, &v1); - SWFDEC_AS_VALUE_SET_UNDEFINED (&v1); - swfdec_as_object_get_variable (o2, s, &v1); - if (!SWFDEC_AS_VALUE_IS_OBJECT (&v1)) { - ERROR ("variable changed type"); - } else if (o != SWFDEC_AS_VALUE_GET_OBJECT (&v1)) { - ERROR ("variable changed value"); - } - /* step 4: gc, ensure that both objects disappears */ - swfdec_as_context_gc (context); - if (check != NULL || check2 != NULL) { - ERROR ("GC didn't collect unused object"); - } - - g_object_unref (context); - return errors; - -} - -int -main (int argc, char **argv) -{ - guint errors = 0; - - g_type_init (); - - errors += check_strings (); - errors += check_objects (); - errors += check_object_variables (); - - g_print ("TOTAL ERRORS: %u\n", errors); - return errors; -} - diff --git a/tools/dump.c b/tools/dump.c index eb56c4b6..d70f9f7d 100644 --- a/tools/dump.c +++ b/tools/dump.c @@ -1,7 +1,7 @@ /* Swfdec * Copyright (C) 2003-2006 David Schleef <ds@schleef.org> * 2005-2006 Eric Anholt <eric@anholt.net> - * 2006-2007 Benjamin Otte <otte@gnome.org> + * 2006-2008 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 @@ -51,14 +51,30 @@ static const char * get_audio_format_name (guint codec) { switch (codec) { + case SWFDEC_AUDIO_CODEC_UNDEFINED: + return "Undefined"; case SWFDEC_AUDIO_CODEC_ADPCM: return "ADPCM"; case SWFDEC_AUDIO_CODEC_MP3: return "MP3"; case SWFDEC_AUDIO_CODEC_UNCOMPRESSED: - return "uncompressed"; + return "Uncompressed"; + case SWFDEC_AUDIO_CODEC_NELLYMOSER_16KHZ: + return "Nellymoser 16kHz"; + case SWFDEC_AUDIO_CODEC_NELLYMOSER_8KHZ: + return "Nellymoser 8kHz"; case SWFDEC_AUDIO_CODEC_NELLYMOSER: return "Nellymoser"; + case SWFDEC_AUDIO_CODEC_ALAW: + return "a-law"; + case SWFDEC_AUDIO_CODEC_MULAW: + return "u-law"; + case SWFDEC_AUDIO_CODEC_AAC: + return "AAC"; + case SWFDEC_AUDIO_CODEC_SPEEX: + return "Speex"; + case SWFDEC_AUDIO_CODEC_MP3_8KHZ: + return "MP3 8kHz"; default: return "Unknown"; } diff --git a/tools/swfdec-extract.c b/tools/swfdec-extract.c index 24d25784..b864fef8 100644 --- a/tools/swfdec-extract.c +++ b/tools/swfdec-extract.c @@ -147,7 +147,7 @@ export_sprite_sound (SwfdecSprite *sprite, const char *filename) static cairo_surface_t * surface_create_for_filename (const char *filename, int width, int height) { - guint len = strlen (filename); + G_GNUC_UNUSED guint len = strlen (filename); cairo_surface_t *surface; if (FALSE) { #ifdef CAIRO_HAS_PDF_SURFACE diff --git a/vivified/Makefile.am b/vivified/Makefile.am index 94d8f7e4..8e14e745 100644 --- a/vivified/Makefile.am +++ b/vivified/Makefile.am @@ -1 +1 @@ -SUBDIRS = code core dock ui +SUBDIRS = code diff --git a/vivified/code/rewrite.c b/vivified/code/rewrite.c index b2ca8cc5..32dc23b1 100644 --- a/vivified/code/rewrite.c +++ b/vivified/code/rewrite.c @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2006 Benjamin Otte <otte@gnome.org> + * Copyright (C) 2008 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 @@ -290,10 +290,10 @@ replace_random (ViviCodeAssembler *assembler, guint init) static void rewrite_getters (ViviCodeAssembler *assembler) { - guint i, count; + guint i; + static guint count = 0; char *s; - count = 0; for (i = 0; i < vivi_code_assembler_get_n_codes (assembler); i++) { ViviCodeAsm *code = vivi_code_assembler_get_code (assembler, i); if (VIVI_IS_CODE_ASM_GET_VARIABLE (code) || diff --git a/vivified/code/vivi_parser_scanner_lex.l b/vivified/code/vivi_parser_scanner_lex.l index 914df8a2..b87322ec 100644 --- a/vivified/code/vivi_parser_scanner_lex.l +++ b/vivified/code/vivi_parser_scanner_lex.l @@ -24,6 +24,9 @@ extern YY_DECL; #define YY_EXTRA_TYPE ViviParserScanner * + +/* stupid lex can't define it to not throw an unused_result error */ +#define ECHO } %{ diff --git a/vivified/core/.gitignore b/vivified/core/.gitignore deleted file mode 100644 index 4bc848f9..00000000 --- a/vivified/core/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -*~ -CVS -.cvsignore -.deps -.libs - -Makefile -Makefile.in -*.o -*.la -*.lo -*.loT - -vivi_function_list.h -vivi_marshal.h -vivi_marshal.c diff --git a/vivified/core/Makefile.am b/vivified/core/Makefile.am deleted file mode 100644 index 5e274f16..00000000 --- a/vivified/core/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -noinst_LTLIBRARIES = libvivified-core.la - -libvivified_core_la_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_GTK_CFLAGS) $(VIVI_CFLAGS) -libvivified_core_la_LDFLAGS = $(SWFDEC_GTK_LIBS) $(VIVI_LIBS) - -libvivified_core_la_SOURCES = \ - $(libvivified_core_sources) \ - vivi_marshal.c - -libvivified_core_sources = \ - vivi_application.c \ - vivi_application_as.c \ - vivi_application.c \ - vivi_breakpoint.c \ - vivi_debugger.c \ - vivi_function.c \ - vivi_initialize.as \ - vivi_initialize.s \ - vivi_ming.c \ - vivi_player_as.c \ - vivi_wrap.c \ - vivi_wrap_as.c - -vivi_initialize.lo: vivi_initialize.s vivi_initialize.as - $(LTCCASCOMPILE) -c -o $@ vivi_initialize.s - -noinst_HEADERS = \ - vivi_application.h \ - vivi_breakpoint.h \ - vivi_debugger.h \ - vivi_function.h \ - vivi_function_list.h \ - vivi_marshal.h \ - vivi_ming.h \ - vivi_wrap.h \ - vivified-core.h - -BUILT_SOURCES = \ - vivi_function_list.h \ - vivi_marshal.h \ - vivi_marshal.c - -CLEANFILES = \ - $(BUILT_SOURCES) - -EXTRA_DIST = \ - vivi_marshal.list - -vivi_function_list.h: $(libvivified_core_source) - (cd $(srcdir) \ - && grep -he "^VIVI_FUNCTION" $(libvivified_core_sources) \ - ) >> xgen-vfl \ - && (cmp -s xgen-vfl vivi_function_list.h || cp xgen-vfl vivi_function_list.h) \ - && rm -f xgen-vfl - -vivi_marshal.h: vivi_marshal.list Makefile - $(GLIB_GENMARSHAL) --prefix=vivi_marshal $(srcdir)/vivi_marshal.list --header >> xgen-vmh \ - && (cmp -s xgen-vmh vivi_marshal.h || cp xgen-vmh vivi_marshal.h) \ - && rm -f xgen-vmh - -vivi_marshal.c: vivi_marshal.list vivi_marshal.h Makefile - (echo "#include \"vivi_marshal.h\""; \ - $(GLIB_GENMARSHAL) --prefix=vivi_marshal $(srcdir)/vivi_marshal.list --body;) >> xgen-vmc \ - && cp xgen-vmc vivi_marshal.c \ - && rm -f xgen-vmc - diff --git a/vivified/core/vivi_application.c b/vivified/core/vivi_application.c deleted file mode 100644 index 623e2934..00000000 --- a/vivified/core/vivi_application.c +++ /dev/null @@ -1,416 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <swfdec-gtk/swfdec-gtk.h> -#include "vivi_application.h" -#include "vivi_debugger.h" -#include "vivi_function.h" -#include "vivi_ming.h" - -enum { - MESSAGE, - LAST_SIGNAL -}; - -enum { - PROP_0, - PROP_FILENAME, - PROP_VARIABLES, - PROP_PLAYER, - PROP_INTERRUPTED, - PROP_QUIT -}; - -G_DEFINE_TYPE (ViviApplication, vivi_application, SWFDEC_TYPE_AS_CONTEXT) -static guint signals[LAST_SIGNAL] = { 0, }; - -static void -vivi_application_get_property (GObject *object, guint param_id, GValue *value, - GParamSpec * pspec) -{ - ViviApplication *app = VIVI_APPLICATION (object); - - switch (param_id) { - case PROP_FILENAME: - g_value_set_string (value, app->filename); - break; - case PROP_VARIABLES: - g_value_set_string (value, app->variables); - break; - case PROP_PLAYER: - g_value_set_object (value, app->player); - break; - case PROP_INTERRUPTED: - g_value_set_boolean (value, app->loop != NULL); - break; - case PROP_QUIT: - g_value_set_boolean (value, app->playback_state == VIVI_APPLICATION_EXITING); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_application_set_property (GObject *object, guint param_id, const GValue *value, - GParamSpec *pspec) -{ - ViviApplication *app = VIVI_APPLICATION (object); - - switch (param_id) { - case PROP_FILENAME: - vivi_application_set_filename (app, g_value_get_string (value)); - break; - case PROP_VARIABLES: - vivi_application_set_variables (app, g_value_get_string (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_application_dispose (GObject *object) -{ - ViviApplication *app = VIVI_APPLICATION (object); - - if (app->playback_state != VIVI_APPLICATION_EXITING) - vivi_application_quit (app); - - g_object_unref (app->player); - g_hash_table_destroy (app->wraps); - - G_OBJECT_CLASS (vivi_application_parent_class)->dispose (object); -} - -static void -vivi_application_class_init (ViviApplicationClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = vivi_application_dispose; - object_class->get_property = vivi_application_get_property; - object_class->set_property = vivi_application_set_property; - - g_object_class_install_property (object_class, PROP_FILENAME, - g_param_spec_string ("filename", "filename", "name of file to play", - NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_FILENAME, - g_param_spec_string ("variables", "variables", "variables to pass to the file", - NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_PLAYER, - g_param_spec_object ("player", "player", "Flash player in use", - SWFDEC_TYPE_PLAYER, G_PARAM_READABLE)); - g_object_class_install_property (object_class, PROP_INTERRUPTED, - g_param_spec_boolean ("interrupted", "interrupted", "TRUE if handling a breakpoint", - FALSE, G_PARAM_READABLE)); - g_object_class_install_property (object_class, PROP_QUIT, - g_param_spec_boolean ("quit", "quit", "TRUE if application has been quit (no breakpoints will happen)", - FALSE, G_PARAM_READABLE)); - - signals[MESSAGE] = g_signal_new ("message", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, /* FIXME */ - G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); -} - -static void -vivi_application_init (ViviApplication *app) -{ - app->debugger = g_object_new (VIVI_TYPE_DEBUGGER, NULL); - app->debugger->app = app; - app->player = swfdec_gtk_player_new (SWFDEC_AS_DEBUGGER (app->debugger)); - /* FIXME: to get rid of dead movie clips, we GC all the time */ - g_object_set (app->player, "memory-until-gc", (gulong) 0, NULL); - - app->wraps = g_hash_table_new (g_direct_hash, g_direct_equal); -} - -ViviApplication * -vivi_application_new (void) -{ - ViviApplication *app; - - app = g_object_new (VIVI_TYPE_APPLICATION, NULL); - swfdec_as_context_startup (SWFDEC_AS_CONTEXT (app)); - vivi_function_init_context (app); - return app; -} - -void -vivi_application_reset (ViviApplication *app) -{ - gboolean audio; - - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - if (app->loop != NULL) - g_main_loop_quit (app->loop); - audio = swfdec_gtk_player_get_audio_enabled (SWFDEC_GTK_PLAYER (app->player)); - g_object_unref (app->player); - app->player = swfdec_gtk_player_new (SWFDEC_AS_DEBUGGER (app->debugger)); - swfdec_gtk_player_set_audio_enabled (SWFDEC_GTK_PLAYER (app->player), audio); - app->player_inited = FALSE; - g_object_notify (G_OBJECT (app), "player"); -} - -void -vivi_application_set_filename (ViviApplication *app, const char *filename) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - g_return_if_fail (filename != NULL); - - g_free (app->filename); - app->filename = g_strdup (filename); - vivi_application_reset (app); - g_object_notify (G_OBJECT (app), "filename"); -} - -const char * -vivi_application_get_filename (ViviApplication *app) -{ - g_return_val_if_fail (VIVI_IS_APPLICATION (app), NULL); - - return app->filename; -} - -void -vivi_application_set_variables (ViviApplication *app, const char *variables) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - g_free (app->variables); - app->variables = g_strdup (variables); - g_object_notify (G_OBJECT (app), "variables"); -} - -const char * -vivi_application_get_variables (ViviApplication *app) -{ - g_return_val_if_fail (VIVI_IS_APPLICATION (app), NULL); - - return app->variables; -} - -SwfdecPlayer * -vivi_application_get_player (ViviApplication *app) -{ - g_return_val_if_fail (VIVI_IS_APPLICATION (app), NULL); - - return app->player; -} - -gboolean -vivi_application_get_interrupted (ViviApplication *app) -{ - g_return_val_if_fail (VIVI_IS_APPLICATION (app), FALSE); - - return app->loop != NULL; -} - -gboolean -vivi_application_is_quit (ViviApplication *app) -{ - g_return_val_if_fail (VIVI_IS_APPLICATION (app), FALSE); - - return app->playback_state == VIVI_APPLICATION_EXITING; -} - -static gboolean -vivi_application_step_forward (gpointer appp) -{ - ViviApplication *app = appp; - guint next_event; - - app->step_source = 0; - if (app->loop != NULL || - app->playback_state != VIVI_APPLICATION_STEPPING) - return FALSE; - - app->playback_count--; - if (app->playback_count == 0) - app->playback_state = VIVI_APPLICATION_STOPPED; - next_event = swfdec_player_get_next_event (app->player); - swfdec_player_advance (app->player, next_event); - - vivi_application_check (app); - return FALSE; -} - -void -vivi_application_check (ViviApplication *app) -{ - gboolean is_breakpoint; - - /* if we're inside some script code, don't do anything */ - if (swfdec_as_context_get_frame (SWFDEC_AS_CONTEXT (app))) - return; - - is_breakpoint = app->loop != NULL; - swfdec_as_context_maybe_gc (SWFDEC_AS_CONTEXT (app)); - - switch (app->playback_state) { - case VIVI_APPLICATION_EXITING: - case VIVI_APPLICATION_STOPPED: - case VIVI_APPLICATION_PLAYING: - break; - case VIVI_APPLICATION_STEPPING: - if (!is_breakpoint && app->step_source == 0) { - app->step_source = g_idle_add_full (-100, vivi_application_step_forward, app, NULL); - } - break; - default: - g_assert_not_reached (); - break; - } - - /* only play when not in breakpoints and only when really playing */ - swfdec_gtk_player_set_playing (SWFDEC_GTK_PLAYER (app->player), !is_breakpoint && - app->playback_state == VIVI_APPLICATION_PLAYING); - - /* leave breakpoint unless stopped */ - if (is_breakpoint && app->playback_state != VIVI_APPLICATION_STOPPED) - g_main_loop_quit (app->loop); - - /* init player if playing */ - if ((app->playback_state == VIVI_APPLICATION_PLAYING || - app->playback_state == VIVI_APPLICATION_STEPPING) && - !app->player_inited) { - if (app->filename == NULL) { - vivi_application_error (app, "no file set to play."); - app->playback_state = VIVI_APPLICATION_STOPPED; - vivi_application_check (app); - } else { - SwfdecURL *url; - - app->player_inited = TRUE; - swfdec_player_set_variables (app->player, app->variables); - url = swfdec_url_new_from_input (app->filename); - swfdec_player_set_url (app->player, url); - swfdec_url_free (url); - } - } -} - -void -vivi_application_execute (ViviApplication *app, const char *command) -{ - SwfdecAsValue val; - SwfdecAsObject *object; - SwfdecScript *script; - char *error = NULL; - - g_return_if_fail (VIVI_IS_APPLICATION (app)); - g_return_if_fail (command != NULL); - - vivi_application_input (app, "%s", command); - script = vivi_ming_compile (command, &error); - if (script == NULL) { - vivi_application_error (app, "%s", error); - g_free (error); - return; - } - object = SWFDEC_AS_CONTEXT (app)->global; - swfdec_as_object_get_variable (object, - swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app), "Commands"), - &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - object = SWFDEC_AS_VALUE_GET_OBJECT (&val); - swfdec_as_object_run (object, script); - swfdec_script_unref (script); - vivi_application_check (app); -} - -void -vivi_application_send_message (ViviApplication *app, - ViviMessageType type, const char *format, ...) -{ - va_list args; - char *msg; - - g_return_if_fail (VIVI_IS_APPLICATION (app)); - g_return_if_fail (format != NULL); - - va_start (args, format); - msg = g_strdup_vprintf (format, args); - va_end (args); - g_signal_emit (app, signals[MESSAGE], 0, (guint) type, msg); - g_free (msg); -} - -void -vivi_application_play (ViviApplication *app) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - if (app->playback_state == VIVI_APPLICATION_EXITING) - return; - app->playback_state = VIVI_APPLICATION_PLAYING; - app->playback_count = 1; - vivi_application_check (app); -} - -void -vivi_application_stop (ViviApplication *app) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - if (app->playback_state == VIVI_APPLICATION_EXITING) - return; - app->playback_state = VIVI_APPLICATION_STOPPED; - app->playback_count = 0; - vivi_application_check (app); -} - -void -vivi_application_step (ViviApplication *app, guint n_times) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - if (app->playback_state == VIVI_APPLICATION_EXITING) - return; - app->playback_state = VIVI_APPLICATION_STEPPING; - app->playback_count = n_times; - vivi_application_check (app); -} - -void -vivi_application_quit (ViviApplication *app) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - - if (app->playback_state == VIVI_APPLICATION_EXITING) - return; - app->playback_state = VIVI_APPLICATION_EXITING; - app->playback_count = 1; - if (app->step_source) { - if (!g_source_remove (app->step_source)) { - g_assert_not_reached (); - } - app->step_source = 0; - } - g_object_notify (G_OBJECT (app), "quit"); - vivi_application_check (app); -} - diff --git a/vivified/core/vivi_application.h b/vivified/core/vivi_application.h deleted file mode 100644 index 0ebe0fde..00000000 --- a/vivified/core/vivi_application.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Vivified - * 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 _VIVI_APPLICATION_H_ -#define _VIVI_APPLICATION_H_ - -#include <swfdec/swfdec.h> - -G_BEGIN_DECLS - - -typedef struct _ViviApplication ViviApplication; -typedef struct _ViviApplicationClass ViviApplicationClass; -/* forward declarations */ -typedef struct _ViviDebugger ViviDebugger; - -typedef enum { - VIVI_APPLICATION_STOPPED, - VIVI_APPLICATION_PLAYING, - VIVI_APPLICATION_STEPPING, - VIVI_APPLICATION_EXITING, -} ViviApplicationPlayback; - -typedef enum { - VIVI_MESSAGE_INPUT, - VIVI_MESSAGE_OUTPUT, - VIVI_MESSAGE_ERROR -} ViviMessageType; - -#define VIVI_TYPE_APPLICATION (vivi_application_get_type()) -#define VIVI_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_APPLICATION)) -#define VIVI_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_APPLICATION)) -#define VIVI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_APPLICATION, ViviApplication)) -#define VIVI_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_APPLICATION, ViviApplicationClass)) -#define VIVI_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_APPLICATION, ViviApplicationClass)) - -struct _ViviApplication -{ - SwfdecAsContext context; - - char * filename; /* name of the file we play back or NULL if none set yet */ - char * variables; /* variables to pass to player or NULL if none set */ - SwfdecPlayer * player; /* the current player */ - ViviDebugger * debugger; /* the debugger used in player */ - gboolean player_inited; /* if the player is inited already */ - ViviApplicationPlayback playback_state; /* (running, stepping or stopped) */ - guint playback_count; /* how often to just restart this on breakpoints */ - GMainLoop * loop; /* the breakpoint main loop */ - guint step_source; /* source for stepping forward */ - - GHashTable * wraps; /* all wrapped objects from @player */ -}; - -struct _ViviApplicationClass -{ - SwfdecAsContextClass context_class; -}; - -GType vivi_application_get_type (void); - -ViviApplication * vivi_application_new (void); - -void vivi_application_check (ViviApplication * app); - -void vivi_application_send_message (ViviApplication * app, - ViviMessageType type, - const char * format, - ...) G_GNUC_PRINTF (3, 4); -#define vivi_application_input(manager, ...) \ - vivi_application_send_message (manager, VIVI_MESSAGE_INPUT, __VA_ARGS__) -#define vivi_application_output(manager, ...) \ - vivi_application_send_message (manager, VIVI_MESSAGE_OUTPUT, __VA_ARGS__) -#define vivi_application_error(manager, ...) \ - vivi_application_send_message (manager, VIVI_MESSAGE_ERROR, __VA_ARGS__) - -void vivi_application_set_filename (ViviApplication * app, - const char * filename); -const char * vivi_application_get_filename (ViviApplication * app); -void vivi_application_set_variables (ViviApplication * app, - const char * filename); -const char * vivi_application_get_variables (ViviApplication * app); -SwfdecPlayer * vivi_application_get_player (ViviApplication * app); -gboolean vivi_application_get_interrupted(ViviApplication * app); -gboolean vivi_application_is_quit (ViviApplication * app); - -void vivi_application_reset (ViviApplication * app); -void vivi_application_play (ViviApplication * app); -void vivi_application_stop (ViviApplication * app); -void vivi_application_step (ViviApplication * app, - guint n_times); -void vivi_application_quit (ViviApplication * app); - -void vivi_application_execute (ViviApplication * app, - const char * command); - -G_END_DECLS -#endif diff --git a/vivified/core/vivi_application_as.c b/vivified/core/vivi_application_as.c deleted file mode 100644 index 2f9ec6e3..00000000 --- a/vivified/core/vivi_application_as.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_application.h" -#include "vivi_function.h" - -VIVI_FUNCTION ("reset", vivi_application_as_reset) -void -vivi_application_as_reset (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - vivi_application_reset (app); -} - -VIVI_FUNCTION ("run", vivi_application_as_run) -void -vivi_application_as_run (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - vivi_application_play (app); -} - -VIVI_FUNCTION ("stop", vivi_application_as_stop) -void -vivi_application_as_stop (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - vivi_application_stop (app); -} - -VIVI_FUNCTION ("step", vivi_application_as_step) -void -vivi_application_as_step (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - int steps; - - if (argc > 0) { - steps = swfdec_as_value_to_integer (cx, &argv[0]); - if (steps <= 1) - steps = 1; - } else { - steps = 1; - } - vivi_application_step (app, steps); -} - -VIVI_FUNCTION ("print", vivi_application_as_print) -void -vivi_application_as_print (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s; - - if (argc == 0) - return; - - s = swfdec_as_value_to_string (cx, &argv[0]); - vivi_application_output (app, "%s", s); -} - -VIVI_FUNCTION ("error", vivi_application_as_error) -void -vivi_application_as_error (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s; - - if (argc == 0) - return; - - s = swfdec_as_value_to_string (cx, &argv[0]); - vivi_application_error (app, "%s", s); -} - -VIVI_FUNCTION ("quit", vivi_application_as_quit) -void -vivi_application_as_quit (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - vivi_application_quit (app); -} - diff --git a/vivified/core/vivi_breakpoint.c b/vivified/core/vivi_breakpoint.c deleted file mode 100644 index df47627b..00000000 --- a/vivified/core/vivi_breakpoint.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_breakpoint.h" -#include "vivi_application.h" -#include "vivi_function.h" -#include "vivi_wrap.h" - -G_DEFINE_TYPE (ViviBreakpoint, vivi_breakpoint, SWFDEC_TYPE_AS_OBJECT) - -static gboolean -vivi_breakpoint_step (ViviDebugger *debugger, ViviBreakpoint *breakpoint) -{ - SwfdecAsObject *obj = SWFDEC_AS_OBJECT (breakpoint); - SwfdecAsValue retval; - - swfdec_as_object_call (obj, swfdec_as_context_get_string (swfdec_gc_object_get_context (obj), "onCommand"), 0, NULL, &retval); - return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (obj), &retval); -} - -static gboolean -vivi_breakpoint_enter_frame (ViviDebugger *debugger, SwfdecAsFrame *frame, ViviBreakpoint *breakpoint) -{ - SwfdecAsObject *obj = SWFDEC_AS_OBJECT (breakpoint); - SwfdecAsValue val; - SwfdecAsValue retval; - - SWFDEC_AS_VALUE_SET_OBJECT (&val, vivi_wrap_object (VIVI_APPLICATION (swfdec_gc_object_get_context (obj)), SWFDEC_AS_OBJECT (frame))); - swfdec_as_object_call (obj, swfdec_as_context_get_string (swfdec_gc_object_get_context (obj), "onEnterFrame"), 1, &val, &retval); - return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (obj), &retval); -} - -static gboolean -vivi_breakpoint_leave_frame (ViviDebugger *debugger, SwfdecAsFrame *frame, const SwfdecAsValue *ret, ViviBreakpoint *breakpoint) -{ - SwfdecAsObject *obj = SWFDEC_AS_OBJECT (breakpoint); - SwfdecAsValue vals[2]; - SwfdecAsValue retval; - - SWFDEC_AS_VALUE_SET_OBJECT (&vals[0], vivi_wrap_object (VIVI_APPLICATION (swfdec_gc_object_get_context (obj)), SWFDEC_AS_OBJECT (frame))); - vivi_wrap_value (VIVI_APPLICATION (swfdec_gc_object_get_context (obj)), &vals[1], ret); - swfdec_as_object_call (obj, swfdec_as_context_get_string (swfdec_gc_object_get_context (obj), "onLeaveFrame"), 2, vals, &retval); - return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (obj), &retval); -} - -static gboolean -vivi_breakpoint_set_variable (ViviDebugger *debugger, SwfdecAsObject *object, - const char *variable, const SwfdecAsValue *value, ViviBreakpoint *breakpoint) -{ - SwfdecAsObject *obj = SWFDEC_AS_OBJECT (breakpoint); - SwfdecAsValue vals[3]; - SwfdecAsValue retval; - - SWFDEC_AS_VALUE_SET_OBJECT (&vals[0], vivi_wrap_object (VIVI_APPLICATION (swfdec_gc_object_get_context (obj)), object)); - SWFDEC_AS_VALUE_SET_STRING (&vals[1], swfdec_as_context_get_string (swfdec_gc_object_get_context (obj), variable)); - vivi_wrap_value (VIVI_APPLICATION (swfdec_gc_object_get_context (obj)), &vals[2], value); - swfdec_as_object_call (obj, swfdec_as_context_get_string (swfdec_gc_object_get_context (obj), "onSetVariable"), 3, vals, &retval); - return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (obj), &retval); -} - -static const struct { - const char * event; - const char * signal; - GCallback handler; -} events[] = { - { NULL, NULL, NULL }, /* invalid */ - { "onCommand", "step", G_CALLBACK (vivi_breakpoint_step) }, - { "onEnterFrame", "enter-frame", G_CALLBACK (vivi_breakpoint_enter_frame) }, - { "onLeaveFrame", "leave-frame", G_CALLBACK (vivi_breakpoint_leave_frame) }, - { "onSetVariable", "set-variable", G_CALLBACK (vivi_breakpoint_set_variable) } -}; - -static guint -vivi_breakpoint_find_event (const char *name) -{ - guint i; - - for (i = 1; i < G_N_ELEMENTS (events); i++) { - if (g_str_equal (events[i].event, name)) - return i; - } - return 0; -} - -static void -vivi_breakpoint_add (ViviBreakpoint *breakpoint, guint i) -{ - ViviDebugger *debugger = VIVI_APPLICATION (swfdec_gc_object_get_context (breakpoint))->debugger; - - g_assert (i != 0); - if (breakpoint->active) { - breakpoint->handlers[i] = g_signal_connect (debugger, events[i].signal, - events[i].handler, breakpoint); - } else { - breakpoint->handlers[i] = 1; - } -} - -static void -vivi_breakpoint_remove (ViviBreakpoint *breakpoint, guint i) -{ - ViviDebugger *debugger = VIVI_APPLICATION (swfdec_gc_object_get_context (breakpoint))->debugger; - - g_assert (i != 0); - if (breakpoint->active) - g_signal_handler_disconnect (debugger, breakpoint->handlers[i]); - breakpoint->handlers[i] = 0; -} - -static void -vivi_breakpoint_set (SwfdecAsObject *object, const char *variable, const SwfdecAsValue *val, guint flags) -{ - guint i; - - i = vivi_breakpoint_find_event (variable); - if (i) { - ViviBreakpoint *breakpoint = VIVI_BREAKPOINT (object); - if (SWFDEC_AS_VALUE_IS_OBJECT (val) && - SWFDEC_IS_AS_FUNCTION (SWFDEC_AS_VALUE_GET_OBJECT (val))) { - if (!breakpoint->handlers[i]) - vivi_breakpoint_add (breakpoint, i); - } else { - if (breakpoint->handlers[i]) - vivi_breakpoint_remove (breakpoint, i); - } - } - SWFDEC_AS_OBJECT_CLASS (vivi_breakpoint_parent_class)->set (object, variable, val, flags); -} - -static SwfdecAsDeleteReturn -vivi_breakpoint_delete (SwfdecAsObject *object, const char *variable) -{ - ViviBreakpoint *breakpoint = VIVI_BREAKPOINT (object); - guint i; - SwfdecAsDeleteReturn ret; - - ret = SWFDEC_AS_OBJECT_CLASS (vivi_breakpoint_parent_class)->del (object, variable); - - if (ret == SWFDEC_AS_DELETE_DELETED) { - i = vivi_breakpoint_find_event (variable); - if (i && breakpoint->handlers[i]) - vivi_breakpoint_remove (breakpoint, i); - } - - return ret; -} - -static void -vivi_breakpoint_dispose (GObject *object) -{ - ViviBreakpoint *breakpoint = VIVI_BREAKPOINT (object); - - vivi_breakpoint_set_active (breakpoint, FALSE); - - G_OBJECT_CLASS (vivi_breakpoint_parent_class)->dispose (object); -} - -static void -vivi_breakpoint_class_init (ViviBreakpointClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecAsObjectClass *as_object_class = SWFDEC_AS_OBJECT_CLASS (klass); - - object_class->dispose = vivi_breakpoint_dispose; - - as_object_class->set = vivi_breakpoint_set; - as_object_class->del = vivi_breakpoint_delete; -} - -static void -vivi_breakpoint_init (ViviBreakpoint *breakpoint) -{ - breakpoint->active = TRUE; -} - -void -vivi_breakpoint_set_active (ViviBreakpoint *breakpoint, gboolean active) -{ - guint i; - - g_return_if_fail (VIVI_IS_BREAKPOINT (breakpoint)); - - g_print ("active = %d", active); - if (breakpoint->active == active) - return; - breakpoint->active = !breakpoint->active; - for (i = 1; i < G_N_ELEMENTS (events); i++) { - if (breakpoint->handlers[i] == 0) - continue; - /* FIXME: this is hacky */ - breakpoint->active = !breakpoint->active; - vivi_breakpoint_remove (breakpoint, i); - breakpoint->active = !breakpoint->active; - vivi_breakpoint_add (breakpoint, i); - } -} - -/*** AS CODE ***/ - -VIVI_FUNCTION ("breakpoint_active_get", vivi_breakpoint_as_get_active) -void -vivi_breakpoint_as_get_active (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - if (!VIVI_IS_BREAKPOINT (this)) - return; - - SWFDEC_AS_VALUE_SET_BOOLEAN (retval, VIVI_BREAKPOINT (this)->active); -} - -VIVI_FUNCTION ("breakpoint_active_set", vivi_breakpoint_as_set_active) -void -vivi_breakpoint_as_set_active (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - if (!VIVI_IS_BREAKPOINT (this) || - argc == 0) - return; - vivi_breakpoint_set_active (VIVI_BREAKPOINT (this), swfdec_as_value_to_boolean (cx, &argv[0])); -} - diff --git a/vivified/core/vivi_breakpoint.h b/vivified/core/vivi_breakpoint.h deleted file mode 100644 index ed9af661..00000000 --- a/vivified/core/vivi_breakpoint.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Vivified - * 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 _VIVI_BREAKPOINT_H_ -#define _VIVI_BREAKPOINT_H_ - -#include <swfdec/swfdec.h> -#include <vivified/core/vivi_application.h> - -G_BEGIN_DECLS - - -typedef struct _ViviBreakpoint ViviBreakpoint; -typedef struct _ViviBreakpointClass ViviBreakpointClass; - -#define VIVI_TYPE_BREAKPOINT (vivi_breakpoint_get_type()) -#define VIVI_IS_BREAKPOINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_BREAKPOINT)) -#define VIVI_IS_BREAKPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_BREAKPOINT)) -#define VIVI_BREAKPOINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_BREAKPOINT, ViviBreakpoint)) -#define VIVI_BREAKPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_BREAKPOINT, ViviBreakpointClass)) -#define VIVI_BREAKPOINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_BREAKPOINT, ViviBreakpointClass)) - -struct _ViviBreakpoint -{ - SwfdecAsObject object; - - gboolean active; /* only active breakpoints receive events */ - gulong handlers[5]; /* handlers for every signal of the debugger or 0 */ -}; - -struct _ViviBreakpointClass -{ - SwfdecAsObjectClass object_class; -}; - -GType vivi_breakpoint_get_type (void); - -void vivi_breakpoint_set_active (ViviBreakpoint * breakpoint, - gboolean active); - -G_END_DECLS -#endif diff --git a/vivified/core/vivi_debugger.c b/vivified/core/vivi_debugger.c deleted file mode 100644 index 508b27e9..00000000 --- a/vivified/core/vivi_debugger.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_debugger.h" -#include "vivi_application.h" -#include "vivi_marshal.h" -/* FIXME: oops */ -#include "swfdec/swfdec_player_internal.h" - -enum { - ADD, - REMOVE, - STEP, - ENTER_FRAME, - LEAVE_FRAME, - SET_VARIABLE, - LAST_SIGNAL -}; - -G_DEFINE_TYPE (ViviDebugger, vivi_debugger, SWFDEC_TYPE_AS_DEBUGGER) -static guint signals[LAST_SIGNAL] = { 0, }; - -static gboolean -vivi_accumulate_or (GSignalInvocationHint *ihint, GValue *return_accu, - const GValue *handler_return, gpointer data) -{ - if (g_value_get_boolean (handler_return)) - g_value_set_boolean (return_accu, TRUE); - return TRUE; -} - -static void -vivi_debugger_dispose (GObject *object) -{ - //ViviDebugger *debugger = VIVI_DEBUGGER (object); - - G_OBJECT_CLASS (vivi_debugger_parent_class)->dispose (object); -} - -static void -vivi_debugger_break (ViviDebugger *debugger) -{ - ViviApplication *app = debugger->app; - SwfdecPlayer *player = app->player; - - g_assert (app); - if (app->playback_state == VIVI_APPLICATION_EXITING) - return; - if (app->playback_state == VIVI_APPLICATION_PLAYING) { - app->playback_count--; - if (app->playback_count > 0) - return; - } - swfdec_player_unlock_soft (player); - - app->playback_state = 0; - app->playback_count = 0; - app->loop = g_main_loop_new (NULL, FALSE); - g_object_notify (G_OBJECT (app), "interrupted"); - vivi_application_check (app); - - g_main_loop_run (app->loop); - - g_main_loop_unref (app->loop); - app->loop = NULL; - g_object_notify (G_OBJECT (app), "interrupted"); - vivi_application_check (app); - swfdec_player_lock_soft (player); -} - -static void -vivi_debugger_add (SwfdecAsDebugger *debugger, SwfdecAsContext *context, - SwfdecAsObject *object) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[ADD], 0, object, &retval); - - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_remove (SwfdecAsDebugger *debugger, SwfdecAsContext *context, - SwfdecAsObject *object) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[REMOVE], 0, object, &retval); - - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_step (SwfdecAsDebugger *debugger, SwfdecAsContext *context) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[STEP], 0, &retval); - - if (!retval) { - ViviApplication *app = VIVI_DEBUGGER (debugger)->app; - - if (app->playback_state == VIVI_APPLICATION_STEPPING) { - app->playback_count--; - if (app->playback_count == 0) - retval = TRUE; - } - } - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_enter_frame (SwfdecAsDebugger *debugger, SwfdecAsContext *context, SwfdecAsFrame *frame) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[ENTER_FRAME], 0, frame, &retval); - - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_leave_frame (SwfdecAsDebugger *debugger, SwfdecAsContext *context, - SwfdecAsFrame *frame, const SwfdecAsValue *ret) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[LEAVE_FRAME], 0, frame, ret, &retval); - - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_set_variable (SwfdecAsDebugger *debugger, SwfdecAsContext *context, - SwfdecAsObject *object, const char *variable, const SwfdecAsValue *value) -{ - gboolean retval = FALSE; - - g_signal_emit (debugger, signals[SET_VARIABLE], 0, object, variable, value, &retval); - - if (retval) - vivi_debugger_break (VIVI_DEBUGGER (debugger)); -} - -static void -vivi_debugger_class_init (ViviDebuggerClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - SwfdecAsDebuggerClass *debugger_class = SWFDEC_AS_DEBUGGER_CLASS (klass); - - object_class->dispose = vivi_debugger_dispose; - - signals[ADD] = g_signal_new ("add", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__OBJECT, - G_TYPE_BOOLEAN, 1, SWFDEC_TYPE_AS_OBJECT); - signals[REMOVE] = g_signal_new ("remove", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__OBJECT, - G_TYPE_BOOLEAN, 1, SWFDEC_TYPE_AS_OBJECT); - signals[STEP] = g_signal_new ("step", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__VOID, - G_TYPE_BOOLEAN, 0); - signals[ENTER_FRAME] = g_signal_new ("enter-frame", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__OBJECT, - G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); - signals[LEAVE_FRAME] = g_signal_new ("leave-frame", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__OBJECT_POINTER, - G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_POINTER); - signals[SET_VARIABLE] = g_signal_new ("set-variable", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, vivi_accumulate_or, NULL, vivi_marshal_BOOLEAN__OBJECT_STRING_POINTER, - G_TYPE_BOOLEAN, 3, SWFDEC_TYPE_AS_OBJECT, G_TYPE_STRING, G_TYPE_POINTER); - - debugger_class->add = vivi_debugger_add; - debugger_class->remove = vivi_debugger_remove; - debugger_class->step = vivi_debugger_step; - debugger_class->enter_frame = vivi_debugger_enter_frame; - debugger_class->leave_frame = vivi_debugger_leave_frame; - debugger_class->set_variable = vivi_debugger_set_variable; -} - -static void -vivi_debugger_init (ViviDebugger *debugger) -{ -} - diff --git a/vivified/core/vivi_debugger.h b/vivified/core/vivi_debugger.h deleted file mode 100644 index 80a67652..00000000 --- a/vivified/core/vivi_debugger.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Vivified - * 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 _VIVI_DEBUGGER_H_ -#define _VIVI_DEBUGGER_H_ - -#include <swfdec/swfdec.h> -#include <vivified/core/vivi_application.h> - -G_BEGIN_DECLS - - -//typedef struct _ViviDebugger ViviDebugger; -typedef struct _ViviDebuggerClass ViviDebuggerClass; - -#define VIVI_TYPE_DEBUGGER (vivi_debugger_get_type()) -#define VIVI_IS_DEBUGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_DEBUGGER)) -#define VIVI_IS_DEBUGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_DEBUGGER)) -#define VIVI_DEBUGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_DEBUGGER, ViviDebugger)) -#define VIVI_DEBUGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_DEBUGGER, ViviDebuggerClass)) -#define VIVI_DEBUGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_DEBUGGER, ViviDebuggerClass)) - -struct _ViviDebugger -{ - SwfdecAsDebugger debugger; - - ViviApplication * app; /* the appliction we're playing for */ -}; - -struct _ViviDebuggerClass -{ - SwfdecAsDebuggerClass debugger_class; -}; - -GType vivi_debugger_get_type (void); - - -G_END_DECLS -#endif diff --git a/vivified/core/vivi_function.c b/vivified/core/vivi_function.c deleted file mode 100644 index a44c9aa4..00000000 --- a/vivified/core/vivi_function.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_function.h" -#include "vivi_breakpoint.h" -#include "vivi_function_list.h" - -/* include vivi_function_list with special macro definition, so we get a nice - * way to initialize it */ -#undef VIVI_FUNCTION -#define VIVI_FUNCTION(name, fun) \ - { name, fun }, -static const struct { - const char * name; - SwfdecAsNative fun; -} functions[] = { -#include "vivi_function_list.h" - { NULL, NULL } -}; -#undef VIVI_FUNCTION - -/* defined in vivi_initialize.s */ -extern const char vivi_initialize[]; - -static void -vivi_function_not_reached (ViviApplication *app, guint type, char *message, gpointer unused) -{ - if (type == VIVI_MESSAGE_ERROR) - g_error ("%s", message); -} - -void -vivi_function_init_context (ViviApplication *app) -{ - SwfdecAsContext *cx = SWFDEC_AS_CONTEXT (app); - SwfdecAsFunction *fun; - SwfdecAsObject *obj; - SwfdecAsValue val; - guint i; - - obj = swfdec_as_object_new (cx); - if (obj == NULL) - return; - SWFDEC_AS_VALUE_SET_OBJECT (&val, obj); - swfdec_as_object_set_variable (cx->global, - swfdec_as_context_get_string (cx, "Native"), &val); - - for (i = 0; functions[i].name; i++) { - swfdec_as_object_add_function (obj, - swfdec_as_context_get_string (cx, functions[i].name), - functions[i].fun); - } - /* FIXME: find a better solution than this */ - fun = swfdec_as_object_add_function (obj, - swfdec_as_context_get_string (cx, "Breakpoint"), - functions[i].fun); - swfdec_as_native_function_set_construct_type (SWFDEC_AS_NATIVE_FUNCTION (fun), - VIVI_TYPE_BREAKPOINT); - obj = swfdec_as_object_new (cx); - if (obj == NULL) - return; - SWFDEC_AS_VALUE_SET_OBJECT (&val, obj); - swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (fun), - swfdec_as_context_get_string (cx, "prototype"), &val); - - g_signal_connect (app, "message", G_CALLBACK (vivi_function_not_reached), NULL); - vivi_application_execute (app, vivi_initialize); - g_signal_handlers_disconnect_by_func (app, G_CALLBACK (vivi_function_not_reached), NULL); -} - diff --git a/vivified/core/vivi_function.h b/vivified/core/vivi_function.h deleted file mode 100644 index f1d497c5..00000000 --- a/vivified/core/vivi_function.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Vivified - * 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 - */ - -#include <swfdec/swfdec.h> -#include <vivified/core/vivi_application.h> - -#ifndef _VIVI_FUNCTION_H_ -#define _VIVI_FUNCTION_H_ - -G_BEGIN_DECLS - - -#define VIVI_FUNCTION(name, fun) \ - void fun (SwfdecAsContext *cx, SwfdecAsObject *this, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval); - -void vivi_function_init_context (ViviApplication * app); - - -G_END_DECLS -#endif diff --git a/vivified/core/vivi_initialize.as b/vivified/core/vivi_initialize.as deleted file mode 100644 index bbab5b66..00000000 --- a/vivified/core/vivi_initialize.as +++ /dev/null @@ -1,158 +0,0 @@ -/* Vivified - * 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 - */ - -/*** general objects ***/ - -Wrap = function () {}; -Wrap.prototype = {}; -Wrap.prototype.get = Native.wrap_get; -Wrap.prototype.toString = Native.wrap_toString; - -Frame = function () extends Wrap {}; -Frame.prototype = new Wrap (); -Frame.prototype.addProperty ("code", Native.frame_code_get, null); -Frame.prototype.addProperty ("name", Native.frame_name_get, null); -Frame.prototype.addProperty ("next", Native.frame_next_get, null); -Frame.prototype.addProperty ("this", Native.frame_this_get, null); - -/*** breakpoints ***/ - -Breakpoint = function () extends Native.Breakpoint { - super (); - Breakpoint.list.push (this); -}; -Breakpoint.list = new Array (); -Breakpoint.prototype.addProperty ("active", Native.breakpoint_active_get, Native.breakpoint_active_set); -Breakpoint.prototype.toString = function () { - return "user-defined breakpoint"; -}; - -/*** information about the player ***/ - -Player = {}; -Player.addProperty ("filename", Native.player_filename_get, Native.player_filename_set); -Player.addProperty ("frame", Native.player_frame_get, null); -Player.addProperty ("global", Native.player_global_get, null); -Player.addProperty ("sound", Native.player_sound_get, Native.player_sound_set); -Player.addProperty ("variables", Native.player_variables_get, Native.player_variables_set); - -/*** commands available for debugging ***/ - -Commands = new Object (); -Commands.print = Native.print; -Commands.error = Native.error; -Commands.r = Native.run; -Commands.run = Native.run; -Commands.halt = Native.stop; -Commands.stop = Native.stop; -Commands.s = Native.step; -Commands.step = Native.step; -Commands.reset = Native.reset; -Commands.restart = function () { - Commands.reset (); - Commands.run (); -}; -Commands.quit = Native.quit; -/* can't use "break" as a function name, it's a keyword in JS */ -Commands.add = function (name) { - if (name == undefined) { - Commands.error ("add command requires a function name"); - return undefined; - } - var ret = new Breakpoint (); - ret.onEnterFrame = function (frame) { - if (frame.name != name) - return false; - - Commands.print ("Breakpoint: function " + name + " called"); - Commands.print (" " + frame); - return true; - }; - ret.toString = function () { - return "function call " + name; - }; - return ret; -}; -Commands.list = function () { - var a = Breakpoint.list; - var i; - for (i = 0; i < a.length; i++) { - Commands.print (i + ": " + a[i]); - } -}; -Commands.del = function (id) { - var a = Breakpoint.list; - if (id == undefined) { - while (a[0]) - Commands.del (0); - } - var b = a[id]; - a.splice (id, 1); - b.active = false; -}; -Commands.delete = Commands.del; -Commands.where = function () { - var frame = Player.frame; - if (frame == undefined) { - Commands.print ("---"); - return; - } - var i = 0; - while (frame) { - Commands.print (i++ + ": " + frame); - frame = frame.next; - } -}; -Commands.backtrace = Commands.where; -Commands.bt = Commands.where; -Commands.watch = function () { - var object; - var name; - if (arguments.length == 1) { - name = arguments[0]; - } else if (arguments.length == 2) { - object = arguments[0]; - name = arguments[1]; - } else { - Commands.error ("usage: watch [object] name"); - return; - } - var ret = new Breakpoint (); - ret.onSetVariable = function (o, variable, value) { - if (object && o != object) - return false; - if (variable != name) - return; - - if (object) { - Commands.print ("Breakpoint: variable " + name + " on " + object + " set to: " + value); - } else { - Commands.print ("Breakpoint: variable " + name + " set to: " + value); - } - Commands.print (" " + Player.frame); - return true; - }; - ret.toString = function () { - var s = "watch " + name; - if (object) - s += " on " + object; - return s; - }; - return ret; -}; diff --git a/vivified/core/vivi_initialize.s b/vivified/core/vivi_initialize.s deleted file mode 100644 index eec00c68..00000000 --- a/vivified/core/vivi_initialize.s +++ /dev/null @@ -1,7 +0,0 @@ -.section ".rodata" -.global vivi_initialize - .type vivi_initialize,@object - .size vivi_initialize, .-vivi_initialize -vivi_initialize: -.incbin "vivi_initialize.as" -.byte 0 diff --git a/vivified/core/vivi_marshal.list b/vivified/core/vivi_marshal.list deleted file mode 100644 index e28004fe..00000000 --- a/vivified/core/vivi_marshal.list +++ /dev/null @@ -1,4 +0,0 @@ -BOOLEAN:OBJECT -BOOLEAN:OBJECT,POINTER -BOOLEAN:OBJECT,STRING,POINTER -BOOLEAN:VOID diff --git a/vivified/core/vivi_ming.c b/vivified/core/vivi_ming.c deleted file mode 100644 index ed0102d2..00000000 --- a/vivified/core/vivi_ming.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_ming.h" -#include <string.h> - -static GString *ming_errors = NULL; - -static void -vivi_ming_error (const char *format, ...) -{ - va_list varargs; - char *s; - - if (ming_errors) { - g_string_append_c (ming_errors, '\n'); - } else { - ming_errors = g_string_new (""); - } - va_start (varargs, format); - g_string_append_vprintf (ming_errors, format, varargs); - s = g_strdup_vprintf (format, varargs); - va_end (varargs); -} - -static char * -vivi_ming_get_error (void) -{ - char *ret; - - if (ming_errors == NULL) - return g_strdup ("Unknown error"); - - ret = g_string_free (ming_errors, FALSE); - ming_errors = NULL; - return ret; -} - -static void -vivi_ming_clear_error (void) -{ - char *ret; - - if (ming_errors != NULL) { - ret = vivi_ming_get_error (); - g_free (ret); - } -} - -static void -vivi_ming_init (void) -{ - static gboolean ming_inited = FALSE; - - if (ming_inited) - return; - - ming_inited = TRUE; - - Ming_init (); - Ming_useSWFVersion (8); - Ming_setErrorFunction (vivi_ming_error); - Ming_setWarnFunction (vivi_ming_error); -} - -SwfdecScript * -vivi_ming_compile (const char *code, char **error) -{ - byte *data; - SWFAction action; - int len; - SwfdecBuffer *buffer; - SwfdecScript *script; - - vivi_ming_init (); - - action = newSWFAction (code); - data = SWFAction_getByteCode (action, &len); - if (data == NULL || len <= 1) { - if (error) - *error = vivi_ming_get_error (); - script = NULL; - } else { - buffer = swfdec_buffer_new (len); - memcpy (buffer->data, data, len); - script = swfdec_script_new (buffer, "compiled script", 8); - } - vivi_ming_clear_error (); - return script; -} - diff --git a/vivified/core/vivi_player_as.c b/vivified/core/vivi_player_as.c deleted file mode 100644 index f2d79e8a..00000000 --- a/vivified/core/vivi_player_as.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_wrap.h" -#include "vivi_application.h" -#include "vivi_function.h" -#include <swfdec-gtk/swfdec-gtk.h> - -VIVI_FUNCTION ("player_frame_get", vivi_player_as_frame_get) -void -vivi_player_as_frame_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - SwfdecAsObject *obj; - - obj = SWFDEC_AS_OBJECT (swfdec_as_context_get_frame (SWFDEC_AS_CONTEXT (app->player))); - if (obj) - SWFDEC_AS_VALUE_SET_OBJECT (retval, vivi_wrap_object (app, obj)); -} - -VIVI_FUNCTION ("player_filename_get", vivi_player_as_filename_get) -void -vivi_player_as_filename_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s = vivi_application_get_filename (app); - - if (s) - SWFDEC_AS_VALUE_SET_STRING (retval, swfdec_as_context_get_string (cx, s)); -} - -VIVI_FUNCTION ("player_filename_set", vivi_player_as_filename_set) -void -vivi_player_as_filename_set (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s; - - if (argc == 0) - return; - s = swfdec_as_value_to_string (cx, &argv[0]); - - vivi_application_set_filename (app, s); -} - -VIVI_FUNCTION ("player_variables_get", vivi_player_as_variables_get) -void -vivi_player_as_variables_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s = vivi_application_get_variables (app); - - if (s) - SWFDEC_AS_VALUE_SET_STRING (retval, swfdec_as_context_get_string (cx, s)); -} - -VIVI_FUNCTION ("player_variables_set", vivi_player_as_variables_set) -void -vivi_player_as_variables_set (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - const char *s; - - if (argc == 0) - return; - s = swfdec_as_value_to_string (cx, &argv[0]); - - vivi_application_set_variables (app, s); -} - -VIVI_FUNCTION ("player_global_get", vivi_player_as_global_get) -void -vivi_player_as_global_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - if (SWFDEC_AS_CONTEXT (app->player)->global) { - SWFDEC_AS_VALUE_SET_OBJECT (retval, vivi_wrap_object (app, - SWFDEC_AS_CONTEXT (app->player)->global)); - } -} - -VIVI_FUNCTION ("player_sound_get", vivi_player_as_sound_get) -void -vivi_player_as_sound_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - SWFDEC_AS_VALUE_SET_BOOLEAN (retval, - swfdec_gtk_player_get_audio_enabled (SWFDEC_GTK_PLAYER (app->player))); -} - -VIVI_FUNCTION ("player_sound_set", vivi_player_as_sound_set) -void -vivi_player_as_sound_set (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - - if (argc == 0) - return; - swfdec_gtk_player_set_audio_enabled (SWFDEC_GTK_PLAYER (app->player), - swfdec_as_value_to_boolean (cx, &argv[0])); -} - diff --git a/vivified/core/vivi_wrap.c b/vivified/core/vivi_wrap.c deleted file mode 100644 index 98ac1005..00000000 --- a/vivified/core/vivi_wrap.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_wrap.h" -#include "vivi_application.h" - -G_DEFINE_TYPE (ViviWrap, vivi_wrap, SWFDEC_TYPE_AS_OBJECT) - -static void -vivi_wrap_dispose (GObject *object) -{ - ViviWrap *wrap = VIVI_WRAP (object); - - if (wrap->wrap) { - g_hash_table_remove (VIVI_APPLICATION (swfdec_gc_object_get_context (wrap))->wraps, wrap->wrap); - wrap->wrap = NULL; - } - - G_OBJECT_CLASS (vivi_wrap_parent_class)->dispose (object); -} - -static void -vivi_wrap_class_init (ViviWrapClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = vivi_wrap_dispose; -} - -static void -vivi_wrap_init (ViviWrap *wrap) -{ -} - -SwfdecAsObject * -vivi_wrap_object (ViviApplication *app, SwfdecAsObject *object) -{ - SwfdecAsContext *cx; - SwfdecAsObject *wrap; - SwfdecAsValue val; - - wrap = g_hash_table_lookup (app->wraps, object); - if (wrap) - return wrap; - - cx = SWFDEC_AS_CONTEXT (app); - wrap = g_object_new (VIVI_TYPE_WRAP, "context", cx, NULL); - swfdec_as_object_get_variable (cx->global, swfdec_as_context_get_string (cx, "Wrap"), &val); - if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) - swfdec_as_object_set_constructor (wrap, SWFDEC_AS_VALUE_GET_OBJECT (&val)); - VIVI_WRAP (wrap)->wrap = object; - g_hash_table_insert (app->wraps, object, wrap); - return wrap; -} - -void -vivi_wrap_value (ViviApplication *app, SwfdecAsValue *dest, const SwfdecAsValue *src) -{ - g_return_if_fail (VIVI_IS_APPLICATION (app)); - g_return_if_fail (dest != NULL); - g_return_if_fail (SWFDEC_IS_AS_VALUE (src)); - - switch (src->type) { - case SWFDEC_AS_TYPE_UNDEFINED: - case SWFDEC_AS_TYPE_BOOLEAN: - case SWFDEC_AS_TYPE_NUMBER: - case SWFDEC_AS_TYPE_NULL: - *dest = *src; - break; - case SWFDEC_AS_TYPE_STRING: - SWFDEC_AS_VALUE_SET_STRING (dest, - swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app), - SWFDEC_AS_VALUE_GET_STRING (src))); - break; - case SWFDEC_AS_TYPE_OBJECT: - SWFDEC_AS_VALUE_SET_OBJECT (dest, - vivi_wrap_object (app, SWFDEC_AS_VALUE_GET_OBJECT (src))); - break; - case SWFDEC_AS_TYPE_INT: - default: - g_assert_not_reached (); - break; - } -} - diff --git a/vivified/core/vivi_wrap.h b/vivified/core/vivi_wrap.h deleted file mode 100644 index 9f0aec0b..00000000 --- a/vivified/core/vivi_wrap.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Vivified - * 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 _VIVI_WRAP_H_ -#define _VIVI_WRAP_H_ - -#include <swfdec/swfdec.h> -#include <vivified/core/vivi_application.h> - -G_BEGIN_DECLS - - -typedef struct _ViviWrap ViviWrap; -typedef struct _ViviWrapClass ViviWrapClass; - -#define VIVI_TYPE_WRAP (vivi_wrap_get_type()) -#define VIVI_IS_WRAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_WRAP)) -#define VIVI_IS_WRAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_WRAP)) -#define VIVI_WRAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_WRAP, ViviWrap)) -#define VIVI_WRAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_WRAP, ViviWrapClass)) -#define VIVI_WRAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_WRAP, ViviWrapClass)) - -struct _ViviWrap -{ - SwfdecAsObject object; - - SwfdecAsObject * wrap; /* the object we wrap */ -}; - -struct _ViviWrapClass -{ - SwfdecAsObjectClass object_class; -}; - -GType vivi_wrap_get_type (void); - -SwfdecAsObject * vivi_wrap_object (ViviApplication * app, - SwfdecAsObject * object); -void vivi_wrap_value (ViviApplication * app, - SwfdecAsValue * dest, - const SwfdecAsValue * src); - -G_END_DECLS -#endif diff --git a/vivified/core/vivi_wrap_as.c b/vivified/core/vivi_wrap_as.c deleted file mode 100644 index 79d942dc..00000000 --- a/vivified/core/vivi_wrap_as.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_wrap.h" -#include "vivi_application.h" -#include "vivi_function.h" - -VIVI_FUNCTION ("wrap_toString", vivi_wrap_toString) -void -vivi_wrap_toString (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviWrap *wrap; - char *s; - - if (!VIVI_IS_WRAP (this)) - return; - - wrap = VIVI_WRAP (this); - if (wrap->wrap == NULL) - return; - - s = swfdec_as_object_get_debug (wrap->wrap); - SWFDEC_AS_VALUE_SET_STRING (retval, swfdec_as_context_give_string (cx, s)); -} - -VIVI_FUNCTION ("wrap_get", vivi_wrap_get) -void -vivi_wrap_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ - ViviApplication *app = VIVI_APPLICATION (cx); - ViviWrap *wrap; - SwfdecAsValue val; - const char *name; - - if (!VIVI_IS_WRAP (this) || argc == 0) - return; - wrap = VIVI_WRAP (this); - if (wrap->wrap == NULL) - return; - - name = swfdec_as_value_to_string (cx, &argv[0]); - swfdec_as_object_get_variable (wrap->wrap, - swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app->player), name), - &val); - vivi_wrap_value (app, retval, &val); -} - -/*** FRAME specific code ***/ - -VIVI_FUNCTION ("frame_name_get", vivi_wrap_name_get) -void -vivi_wrap_name_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ -#if 0 - ViviWrap *wrap; - char *s; - - if (!VIVI_IS_WRAP (this)) - return; - - wrap = VIVI_WRAP (this); - - /* FIXME: improve */ - s = swfdec_as_object_get_debug (wrap->wrap); - SWFDEC_AS_VALUE_SET_STRING (retval, swfdec_as_context_give_string (cx, s)); -#endif -} - -VIVI_FUNCTION ("frame_code_get", vivi_wrap_code_get) -void -vivi_wrap_code_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ -#if 0 - ViviWrap *wrap; - SwfdecScript *script; - - if (!VIVI_IS_WRAP (this)) - return; - - wrap = VIVI_WRAP (this); - if (!SWFDEC_IS_AS_FRAME (wrap->wrap)) - return; - - script = swfdec_as_frame_get_script (SWFDEC_AS_FRAME (wrap->wrap)); - /* FIXME: wrap scripts */ - if (script) - SWFDEC_AS_VALUE_SET_BOOLEAN (retval, TRUE); -#endif -} - -VIVI_FUNCTION ("frame_next_get", vivi_wrap_next_get) -void -vivi_wrap_next_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ -#if 0 - ViviWrap *wrap; - SwfdecAsObject *obj; - - if (!VIVI_IS_WRAP (this)) - return; - - wrap = VIVI_WRAP (this); - if (!SWFDEC_IS_AS_FRAME (wrap->wrap)) - return; - - obj = SWFDEC_AS_OBJECT (swfdec_as_frame_get_next (SWFDEC_AS_FRAME (wrap->wrap))); - if (obj) - SWFDEC_AS_VALUE_SET_OBJECT (retval, vivi_wrap_object (VIVI_APPLICATION (cx), obj)); -#endif -} - -VIVI_FUNCTION ("frame_this_get", vivi_wrap_this_get) -void -vivi_wrap_this_get (SwfdecAsContext *cx, SwfdecAsObject *this, - guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) -{ -#if 0 - ViviWrap *wrap; - SwfdecAsObject *obj; - - if (!VIVI_IS_WRAP (this)) - return; - - wrap = VIVI_WRAP (this); - if (!SWFDEC_IS_AS_FRAME (wrap->wrap)) - return; - - obj = SWFDEC_AS_OBJECT (swfdec_as_frame_get_this (SWFDEC_AS_FRAME (wrap->wrap))); - if (obj) - SWFDEC_AS_VALUE_SET_OBJECT (retval, vivi_wrap_object (VIVI_APPLICATION (cx), obj)); -#endif -} - - diff --git a/vivified/dock/.gitignore b/vivified/dock/.gitignore deleted file mode 100644 index b580c89e..00000000 --- a/vivified/dock/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*~ -CVS -.cvsignore -.deps -.libs - -Makefile -Makefile.in -*.o -*.la -*.lo -*.loT diff --git a/vivified/dock/Makefile.am b/vivified/dock/Makefile.am deleted file mode 100644 index 590e5cf3..00000000 --- a/vivified/dock/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -noinst_LTLIBRARIES = libvivified-dock.la - -libvivified_dock_la_CFLAGS = $(GLOBAL_CFLAGS) $(GTK_CFLAGS) -libvivified_dock_la_LDFLAGS = $(GTK_LIBS) - -libvivified_dock_la_SOURCES = \ - vivi_docker.c \ - vivi_docklet.c \ - vivi_vdock.c - -noinst_HEADERS = \ - vivi_docker.h \ - vivi_docklet.h \ - vivi_vdock.h \ - vivified-dock.h diff --git a/vivified/dock/vivi_docker.c b/vivified/dock/vivi_docker.c deleted file mode 100644 index 90a0de9b..00000000 --- a/vivified/dock/vivi_docker.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_docker.h" - -enum { - REQUEST_CLOSE, - LAST_SIGNAL -}; -static guint signals[LAST_SIGNAL] = { 0, }; - -G_DEFINE_TYPE (ViviDocker, vivi_docker, GTK_TYPE_EXPANDER) - -static void -vivi_docker_dispose (GObject *object) -{ - //ViviDocker *docker = VIVI_DOCKER (object); - - G_OBJECT_CLASS (vivi_docker_parent_class)->dispose (object); -} - -static void -vivi_docker_class_init (ViviDockerClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = vivi_docker_dispose; - - signals[REQUEST_CLOSE] = 0; -} - -static void -vivi_docker_init (ViviDocker *docker) -{ -} - -static void -vivi_docker_docklet_notify_title (ViviDocklet *docklet, GParamSpec *pspec, GtkLabel *label) -{ - gtk_label_set_text (label, vivi_docklet_get_title (docklet)); -} - -static void -vivi_docker_set_docklet (ViviDocker *docker, ViviDocklet *docklet) -{ - GtkWidget *box, *widget; - - g_return_if_fail (VIVI_IS_DOCKER (docker)); - g_return_if_fail (VIVI_IS_DOCKLET (docklet)); - - box = gtk_hbox_new (FALSE, 3); - gtk_widget_show (box); - widget = gtk_label_new (vivi_docklet_get_title (docklet)); - gtk_widget_show (widget); - g_signal_connect (docklet, "notify::title", G_CALLBACK (vivi_docker_docklet_notify_title), widget); - gtk_box_pack_start (GTK_BOX (box), widget, TRUE, TRUE, 0); - gtk_expander_set_label_widget (GTK_EXPANDER (docker), box); - gtk_container_add (GTK_CONTAINER (docker), GTK_WIDGET (docklet)); -} - -GtkWidget * -vivi_docker_new (ViviDocklet *docklet) -{ - GtkWidget *widget; - - g_return_val_if_fail (VIVI_IS_DOCKLET (docklet), NULL); - - widget = g_object_new (VIVI_TYPE_DOCKER, "expanded", TRUE, NULL); - vivi_docker_set_docklet (VIVI_DOCKER (widget), docklet); - return widget; -} - - diff --git a/vivified/dock/vivi_docker.h b/vivified/dock/vivi_docker.h deleted file mode 100644 index 3baaf8d8..00000000 --- a/vivified/dock/vivi_docker.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Vivified - * 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 _VIVI_DOCKER_H_ -#define _VIVI_DOCKER_H_ - -#include <gtk/gtk.h> -#include <vivified/dock/vivi_docklet.h> - -G_BEGIN_DECLS - - -typedef struct _ViviDocker ViviDocker; -typedef struct _ViviDockerClass ViviDockerClass; - -#define VIVI_TYPE_DOCKER (vivi_docker_get_type()) -#define VIVI_IS_DOCKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_DOCKER)) -#define VIVI_IS_DOCKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_DOCKER)) -#define VIVI_DOCKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_DOCKER, ViviDocker)) -#define VIVI_DOCKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_DOCKER, ViviDockerClass)) -#define VIVI_DOCKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_DOCKER, ViviDockerClass)) - -struct _ViviDocker { - GtkExpander bin; -}; - -struct _ViviDockerClass -{ - GtkExpanderClass bin_class; - - void (* request_close) (ViviDocker * docker); -}; - -GType vivi_docker_get_type (void); - -GtkWidget * vivi_docker_new (ViviDocklet * docklet); - -G_END_DECLS -#endif diff --git a/vivified/dock/vivi_docklet.c b/vivified/dock/vivi_docklet.c deleted file mode 100644 index f6bc0151..00000000 --- a/vivified/dock/vivi_docklet.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_docklet.h" - -enum { - PROP_0, - PROP_TITLE, - PROP_ICON -}; - -G_DEFINE_ABSTRACT_TYPE (ViviDocklet, vivi_docklet, GTK_TYPE_BIN) - -static void -vivi_docklet_get_property (GObject *object, guint param_id, GValue *value, - GParamSpec * pspec) -{ - ViviDocklet *docklet = VIVI_DOCKLET (object); - - switch (param_id) { - case PROP_TITLE: - g_value_set_string (value, docklet->title); - break; - case PROP_ICON: - g_value_set_string (value, docklet->icon); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_docklet_set_property (GObject *object, guint param_id, const GValue *value, - GParamSpec *pspec) -{ - ViviDocklet *docklet = VIVI_DOCKLET (object); - - switch (param_id) { - case PROP_TITLE: - vivi_docklet_set_title (docklet, g_value_get_string (value)); - break; - case PROP_ICON: - vivi_docklet_set_title (docklet, g_value_get_string (value)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_docklet_dispose (GObject *object) -{ - ViviDocklet *docklet = VIVI_DOCKLET (object); - - g_free (docklet->title); - g_free (docklet->icon); - - G_OBJECT_CLASS (vivi_docklet_parent_class)->dispose (object); -} - -static void -vivi_docklet_size_request (GtkWidget *widget, GtkRequisition *req) -{ - GtkWidget *child = GTK_BIN (widget)->child; - - if (child) { - gtk_widget_size_request (child, req); - } else { - req->width = req->height = 0; - } -} - -static void -vivi_docklet_size_allocate (GtkWidget *widget, GtkAllocation *allocation) -{ - GtkWidget *child = GTK_BIN (widget)->child; - - GTK_WIDGET_CLASS (vivi_docklet_parent_class)->size_allocate (widget, allocation); - - if (child && GTK_WIDGET_VISIBLE (child)) { - gtk_widget_size_allocate (child, allocation); - } -} - -static void -vivi_docklet_class_init (ViviDockletClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - object_class->dispose = vivi_docklet_dispose; - object_class->get_property = vivi_docklet_get_property; - object_class->set_property = vivi_docklet_set_property; - - g_object_class_install_property (object_class, PROP_TITLE, - g_param_spec_string ("title", "title", "title of this docklet", - "Unnamed", G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_ICON, - g_param_spec_string ("icon", "icon", "name of the icon to display", - GTK_STOCK_MISSING_IMAGE, G_PARAM_READWRITE)); - - widget_class->size_request = vivi_docklet_size_request; - widget_class->size_allocate = vivi_docklet_size_allocate; -} - -static void -vivi_docklet_init (ViviDocklet *docklet) -{ - docklet->title = g_strdup ("Unnamed"); - docklet->icon = g_strdup (GTK_STOCK_MISSING_IMAGE); -} - -void -vivi_docklet_set_title (ViviDocklet *docklet, const char *title) -{ - g_return_if_fail (VIVI_IS_DOCKLET (docklet)); - g_return_if_fail (title != NULL); - - g_free (docklet->title); - docklet->title = g_strdup (title); - g_object_notify (G_OBJECT (docklet), "title"); -} - -const char * -vivi_docklet_get_title (ViviDocklet *docklet) -{ - g_return_val_if_fail (VIVI_IS_DOCKLET (docklet), NULL); - - return docklet->title; -} - -void -vivi_docklet_set_icon (ViviDocklet *docklet, const char *icon) -{ - g_return_if_fail (VIVI_IS_DOCKLET (docklet)); - g_return_if_fail (icon != NULL); - - g_free (docklet->icon); - docklet->icon = g_strdup (icon); - g_object_notify (G_OBJECT (docklet), "icon"); -} - -const char * -vivi_docklet_get_icon (ViviDocklet *docklet) -{ - g_return_val_if_fail (VIVI_IS_DOCKLET (docklet), NULL); - - return docklet->icon; -} - diff --git a/vivified/dock/vivi_docklet.h b/vivified/dock/vivi_docklet.h deleted file mode 100644 index 10882528..00000000 --- a/vivified/dock/vivi_docklet.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Vivified - * 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 _VIVI_DOCKLET_H_ -#define _VIVI_DOCKLET_H_ - -#include <gtk/gtk.h> - -G_BEGIN_DECLS - - -typedef struct _ViviDocklet ViviDocklet; -typedef struct _ViviDockletClass ViviDockletClass; - -#define VIVI_TYPE_DOCKLET (vivi_docklet_get_type()) -#define VIVI_IS_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_DOCKLET)) -#define VIVI_IS_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_DOCKLET)) -#define VIVI_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_DOCKLET, ViviDocklet)) -#define VIVI_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_DOCKLET, ViviDockletClass)) -#define VIVI_DOCKLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_DOCKLET, ViviDockletClass)) - -struct _ViviDocklet { - GtkBin bin; - - char * title; /* title to be used */ - char * icon; /* name of icon for docklet or "gtk-missing-image" */ -}; - -struct _ViviDockletClass -{ - GtkBinClass bin_class; -}; - -GType vivi_docklet_get_type (void); - -void vivi_docklet_set_title (ViviDocklet * docklet, - const char * titlename); -const char * vivi_docklet_get_title (ViviDocklet * docklet); -void vivi_docklet_set_icon (ViviDocklet * docklet, - const char * titlename); -const char * vivi_docklet_get_icon (ViviDocklet * docklet); - - -G_END_DECLS -#endif diff --git a/vivified/dock/vivi_vdock.c b/vivified/dock/vivi_vdock.c deleted file mode 100644 index a7a4b34c..00000000 --- a/vivified/dock/vivi_vdock.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_vdock.h" -#include "vivi_docker.h" -#include "vivi_docklet.h" - -G_DEFINE_TYPE (ViviVDock, vivi_vdock, GTK_TYPE_BIN) - -static void -vivi_vdock_destroy (GtkObject *object) -{ - ViviVDock *vdock = VIVI_VDOCK (object); - - GTK_OBJECT_CLASS (vivi_vdock_parent_class)->destroy (object); - - g_list_free (vdock->docklets); - vdock->docklets = NULL; -} - -static void -vivi_vdock_size_request (GtkWidget *widget, GtkRequisition *req) -{ - GtkWidget *child = GTK_BIN (widget)->child; - - if (child) { - gtk_widget_size_request (child, req); - } else { - req->width = req->height = 0; - } -} - -static void -vivi_vdock_size_allocate (GtkWidget *widget, GtkAllocation *allocation) -{ - GtkWidget *child = GTK_BIN (widget)->child; - - GTK_WIDGET_CLASS (vivi_vdock_parent_class)->size_allocate (widget, allocation); - - if (child && GTK_WIDGET_VISIBLE (child)) { - gtk_widget_size_allocate (child, allocation); - } -} - -void -vivi_vdock_add (ViviVDock *vdock, GtkWidget *widget) -{ - GtkWidget *docker; - - g_return_if_fail (VIVI_IS_VDOCK (vdock)); - g_return_if_fail (GTK_IS_WIDGET (widget)); - - docker = vivi_docker_new (VIVI_DOCKLET (widget)); - gtk_widget_show (docker); - - g_object_ref (widget); - if (vdock->docklets == NULL) { - gtk_container_add (GTK_CONTAINER (vdock), docker); - } else { - /* docklet is in docker, so we need to use parent */ - GtkWidget *last = gtk_widget_get_parent (vdock->docklets->data); - GtkWidget *parent = gtk_widget_get_parent (last); - GtkWidget *paned; - - g_object_ref (last); - gtk_container_remove (GTK_CONTAINER (parent), last); - paned = gtk_vpaned_new (); - gtk_paned_pack1 (GTK_PANED (paned), last, TRUE, FALSE); - gtk_paned_pack2 (GTK_PANED (paned), docker, TRUE, FALSE); - g_object_unref (last); - gtk_widget_show (paned); - if (parent == (GtkWidget *) vdock) { - gtk_container_add (GTK_CONTAINER (vdock), paned); - } else { - gtk_paned_pack2 (GTK_PANED (parent), paned, TRUE, FALSE); - } - } - vdock->docklets = g_list_prepend (vdock->docklets, widget); -} - -void -vivi_vdock_remove (ViviVDock *vdock, GtkWidget *widget) -{ - GtkWidget *docker, *parent; - - g_return_if_fail (g_list_find (vdock->docklets, widget)); - - docker = gtk_widget_get_parent (widget); - parent = gtk_widget_get_parent (docker); - if (parent == (GtkWidget *) vdock) { - gtk_container_remove (GTK_CONTAINER (vdock), docker); - } else { - GtkWidget *other; - GtkWidget *paned_parent; - g_assert (GTK_IS_PANED (parent)); - paned_parent = gtk_widget_get_parent (parent); - other = gtk_paned_get_child1 (GTK_PANED (parent)); - if (other == docker) - other = gtk_paned_get_child2 (GTK_PANED (parent)); - g_object_ref (other); - gtk_container_remove (GTK_CONTAINER (parent), docker); - gtk_container_remove (GTK_CONTAINER (parent), other); - if (paned_parent == (GtkWidget *) vdock) { - gtk_container_remove (GTK_CONTAINER (vdock), parent); - gtk_container_add (GTK_CONTAINER (vdock), other); - } else { - gtk_container_remove (GTK_CONTAINER (paned_parent), parent); - gtk_paned_pack1 (GTK_PANED (parent), other, TRUE, FALSE); - } - g_object_unref (other); - } - vdock->docklets = g_list_remove (vdock->docklets, widget); - g_object_unref (widget); -} - -static void -vivi_vdock_class_init (ViviVDockClass *klass) -{ - GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - object_class->destroy = vivi_vdock_destroy; - - widget_class->size_request = vivi_vdock_size_request; - widget_class->size_allocate = vivi_vdock_size_allocate; -} - -static void -vivi_vdock_init (ViviVDock *vdock) -{ -} - -GtkWidget * -vivi_vdock_new (void) -{ - return g_object_new (VIVI_TYPE_VDOCK, NULL); -} - - diff --git a/vivified/dock/vivi_vdock.h b/vivified/dock/vivi_vdock.h deleted file mode 100644 index 7b0f61f7..00000000 --- a/vivified/dock/vivi_vdock.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Vivified - * 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 _VIVI_VDOCK_H_ -#define _VIVI_VDOCK_H_ - -#include <gtk/gtk.h> - -G_BEGIN_DECLS - - -typedef struct _ViviVDock ViviVDock; -typedef struct _ViviVDockClass ViviVDockClass; - -#define VIVI_TYPE_VDOCK (vivi_vdock_get_type()) -#define VIVI_IS_VDOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_VDOCK)) -#define VIVI_IS_VDOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_VDOCK)) -#define VIVI_VDOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_VDOCK, ViviVDock)) -#define VIVI_VDOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_VDOCK, ViviVDockClass)) -#define VIVI_VDOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_VDOCK, ViviVDockClass)) - -struct _ViviVDock { - GtkBin bin; - - GList * docklets; /* all the docklets that got added to us */ -}; - -struct _ViviVDockClass -{ - GtkBinClass bin_class; -}; - -GType vivi_vdock_get_type (void); - -GtkWidget * vivi_vdock_new (void); - -void vivi_vdock_add (ViviVDock * vdock, - GtkWidget * widget); -void vivi_vdock_remove (ViviVDock * vdock, - GtkWidget * widget); - - -G_END_DECLS -#endif diff --git a/vivified/ui/.gitignore b/vivified/ui/.gitignore deleted file mode 100644 index 1adfd147..00000000 --- a/vivified/ui/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*~ -CVS -.cvsignore -.deps -.libs - -Makefile -Makefile.in -*.o -*.la -*.lo -*.loT - -vivified diff --git a/vivified/ui/Makefile.am b/vivified/ui/Makefile.am deleted file mode 100644 index 0b63193f..00000000 --- a/vivified/ui/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -noinst_PROGRAMS = vivified - -vivified_CFLAGS = $(GLOBAL_CFLAGS) $(SWFDEC_GTK_CFLAGS) $(VIVI_CFLAGS) -vivified_LDFLAGS = $(VIVI_LIBS) $(SWFDEC_GTK_LIBS) -vivified_LDADD = \ - $(top_builddir)/vivified/core/libvivified-core.la \ - $(top_builddir)/vivified/dock/libvivified-dock.la - -vivified_SOURCES = \ - vivi_command_line.c \ - vivi_movie_list.c \ - vivi_movies.c \ - vivi_player.c \ - vivi_vivi_docklet.c \ - vivi_widget.c \ - vivi_window.c \ - main.c - -noinst_HEADERS = \ - vivi_movie_list.h \ - vivi_vivi_docklet.h \ - vivi_widget.h \ - vivi_window.h - diff --git a/vivified/ui/main.c b/vivified/ui/main.c deleted file mode 100644 index 38568ec0..00000000 --- a/vivified/ui/main.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gtk/gtk.h> -#include <swfdec-gtk/swfdec-gtk.h> -#include "vivified/core/vivified-core.h" -#include "vivified/dock/vivified-dock.h" -#include "vivi_window.h" - -static gboolean -delete_event (GtkWidget *widget, GdkEvent *event, ViviApplication *app) -{ - if (!vivi_application_is_quit (app)) { - vivi_application_quit (app); - return TRUE; - } - return FALSE; -} - -static void -setup (const char *filename, const char *variables) -{ - GtkWidget *window; - ViviApplication *app; - - app = vivi_application_new (); - vivi_application_set_filename (app, filename); - vivi_application_set_variables (app, variables); - - window = vivi_window_new (app); - - g_signal_connect_swapped (app, "notify::quit", G_CALLBACK (gtk_widget_destroy), window); - g_signal_connect (window, "delete-event", G_CALLBACK (delete_event), app); - g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), app); - - gtk_widget_show_all (window); -} - -int -main (int argc, char **argv) -{ - gtk_init (&argc, &argv); - - if (argc < 2) { - g_print ("usage: %s FILE [VARIABLES]\n", argv[0]); - return 0; - } - - setup (argv[1], argc > 2 ? argv[2] : NULL); - gtk_main (); - - return 0; -} diff --git a/vivified/ui/vivi_command_line.c b/vivified/ui/vivi_command_line.c deleted file mode 100644 index 43778301..00000000 --- a/vivified/ui/vivi_command_line.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> -#include "vivi_vivi_docklet.h" - -static void -vivi_command_line_execute (ViviApplication *app, const char *command) -{ - char *run; - - if (!strpbrk (command, ";\"',()[]{}")) { - /* special mode: interpret as space-delimited list: - * first argument is function name, following arguemnts are function arguments - */ - char **args = g_strsplit (command, " ", -1); - GString *str = g_string_new (args[0]); - guint i; - - g_string_append (str, " ("); - for (i = 1; args[i] != NULL; i++) { - if (i > 1) - g_string_append (str, ", "); - g_string_append_c (str, '"'); - g_string_append (str, args[i]); - g_string_append_c (str, '"'); - } - g_string_append (str, ");"); - run = g_string_free (str, FALSE); - } else { - run = (char *) command; - } - - - vivi_application_execute (app, run); - if (command != run) - g_free (run); -} - -void -vivi_command_line_activate (GtkEntry *entry, ViviApplication *app); -void -vivi_command_line_activate (GtkEntry *entry, ViviApplication *app) -{ - const char *text = gtk_entry_get_text (entry); - - if (text[0] == '\0') - return; - - vivi_command_line_execute (app, text); - gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); -} - -static void -vivi_command_line_append_message (ViviApplication *app, guint type, const char *message, GtkTextView *view) -{ - GtkTextBuffer *buffer = gtk_text_view_get_buffer (view); - GtkTextIter iter; - GtkTextMark *mark; - const char *tag_names[] = { "input", "output", "error" }; - - gtk_text_buffer_get_end_iter (buffer, &iter); - mark = gtk_text_buffer_get_mark (buffer, "end"); - if (mark == NULL) - mark = gtk_text_buffer_create_mark (buffer, "end", &iter, FALSE); - if (gtk_text_buffer_get_char_count (buffer) > 0) - gtk_text_buffer_insert (buffer, &iter, "\n", 1); - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, message, -1, tag_names[type], NULL); - gtk_text_view_scroll_to_mark (view, mark, 0.0, TRUE, 0.0, 0.0); -} - -void -vivi_command_line_application_unset (ViviViviDocklet *docklet, ViviApplication *app); -void -vivi_command_line_application_unset (ViviViviDocklet *docklet, ViviApplication *app) -{ - GtkWidget *view = vivi_vivi_docklet_find_widget_by_type (docklet, GTK_TYPE_TEXT_VIEW); - - g_signal_handlers_disconnect_by_func (app, vivi_command_line_append_message, view); -} - -void -vivi_command_line_application_set (ViviViviDocklet *docklet, ViviApplication *app); -void -vivi_command_line_application_set (ViviViviDocklet *docklet, ViviApplication *app) -{ - GtkWidget *view = vivi_vivi_docklet_find_widget_by_type (docklet, GTK_TYPE_TEXT_VIEW); - - gtk_text_buffer_create_tag (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)), - "error", "foreground", "red", "left-margin", 15, NULL); - gtk_text_buffer_create_tag (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)), - "input", "foreground", "dark grey", NULL); - gtk_text_buffer_create_tag (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)), - "output", "left-margin", 15, NULL); - - g_signal_connect (app, "message", G_CALLBACK (vivi_command_line_append_message), view); -} - diff --git a/vivified/ui/vivi_command_line.xml b/vivified/ui/vivi_command_line.xml deleted file mode 100644 index 5a4b2fb5..00000000 --- a/vivified/ui/vivi_command_line.xml +++ /dev/null @@ -1,38 +0,0 @@ -<interface> - <object class="ViviViviDocklet" id="command-line"> - <property name="title">Command Line</property> - <signal name="application-set" handler="vivi_command_line_application_set" /> - <signal name="application-unset" handler="vivi_command_line_application_unset" /> - <child> - <object class="GtkVBox" id="box"> - <child> - <object class="GtkScrolledWindow" id="scroll"> - <property name="hscrollbar-policy">automatic</property> - <property name="vscrollbar-policy">automatic</property> - <child> - <object class="GtkTextView" id="text"> - <property name="editable">false</property> - <property name="wrap-mode">word-char</property> - </object> - </child> - </object> - <packing> - <property name="pack-type">start</property> - <property name="expand">true</property> - <property name="fill">true</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="entry"> - <signal name="activate" handler="vivi_command_line_activate" /> - </object> - <packing> - <property name="pack-type">end</property> - <property name="expand">false</property> - <property name="fill">true</property> - </packing> - </child> - </object> - </child> - </object> -</interface> diff --git a/vivified/ui/vivi_movie_list.c b/vivified/ui/vivi_movie_list.c deleted file mode 100644 index 61a471ff..00000000 --- a/vivified/ui/vivi_movie_list.c +++ /dev/null @@ -1,460 +0,0 @@ -/* 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, to_string to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gtk/gtk.h> -#include <swfdec/swfdec_movie.h> -#include <swfdec/swfdec_player_internal.h> -#include "vivi_movie_list.h" - -/*** GTK_TREE_MODEL ***/ - -#if 0 -# define REPORT g_print ("%s\n", G_STRFUNC) -#else -# define REPORT -#endif -static GtkTreeModelFlags -vivi_movie_list_get_flags (GtkTreeModel *tree_model) -{ - REPORT; - return 0; -} - -static gint -vivi_movie_list_get_n_columns (GtkTreeModel *tree_model) -{ - REPORT; - return VIVI_MOVIE_LIST_N_COLUMNS; -} - -static GType -vivi_movie_list_get_column_type (GtkTreeModel *tree_model, gint index_) -{ - REPORT; - switch (index_) { - case VIVI_MOVIE_LIST_COLUMN_MOVIE: - return G_TYPE_POINTER; - case VIVI_MOVIE_LIST_COLUMN_NAME: - return G_TYPE_STRING; - case VIVI_MOVIE_LIST_COLUMN_DEPTH: - return G_TYPE_INT; - case VIVI_MOVIE_LIST_COLUMN_TYPE: - return G_TYPE_STRING; - default: - break; - } - g_assert_not_reached (); - return G_TYPE_NONE; -} - -static gboolean -vivi_movie_list_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path) -{ - ViviMovieList *movies = VIVI_MOVIE_LIST (tree_model); - GNode *node; - guint i, depth; - int *indices; - - REPORT; - depth = gtk_tree_path_get_depth (path); - indices = gtk_tree_path_get_indices (path); - if (indices == NULL) - return FALSE; - node = movies->root; - for (i = 0; i < depth; i++) { - node = g_node_nth_child (node, indices[i]); - if (node == NULL) - return FALSE; - } - iter->user_data = node; - iter->stamp = movies->stamp; - return TRUE; -} - -static GtkTreePath * -vivi_movie_list_node_to_path (GNode *node) -{ - GtkTreePath *path; - - path = gtk_tree_path_new (); - while (node->parent != NULL) { - gtk_tree_path_prepend_index (path, g_node_child_position (node->parent, node)); - node = node->parent; - } - return path; -} - -static GtkTreePath * -vivi_movie_list_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - REPORT; - return vivi_movie_list_node_to_path (iter->user_data); -} - -static void -vivi_movie_list_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, - gint column, GValue *value) -{ - SwfdecMovie *movie = ((GNode *) iter->user_data)->data; - - REPORT; - switch (column) { - case VIVI_MOVIE_LIST_COLUMN_MOVIE: - g_value_init (value, G_TYPE_POINTER); - g_value_set_pointer (value, movie); - return; - case VIVI_MOVIE_LIST_COLUMN_NAME: - g_value_init (value, G_TYPE_STRING); - if (movie->name[0]) - g_value_set_string (value, movie->name); - else - g_value_set_string (value, movie->original_name); - return; - case VIVI_MOVIE_LIST_COLUMN_DEPTH: - g_value_init (value, G_TYPE_INT); - g_value_set_int (value, movie->depth); - return; - case VIVI_MOVIE_LIST_COLUMN_TYPE: - g_value_init (value, G_TYPE_STRING); - /* big hack: we skip the "Swfdec" here */ - g_value_set_string (value, G_OBJECT_TYPE_NAME (movie) + 6); - return; - default: - break; - } - g_assert_not_reached (); -} - -static gboolean -vivi_movie_list_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - GNode *node; - - REPORT; - node = iter->user_data; - node = node->next; - if (node == NULL) - return FALSE; - iter->user_data = node; - return TRUE; -} - -static gboolean -vivi_movie_list_iter_children (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent) -{ - GNode *node; - - REPORT; - if (parent) { - node = parent->user_data; - } else { - node = VIVI_MOVIE_LIST (tree_model)->root; - } - if (node->children == NULL) - return FALSE; - iter->user_data = node->children; - return TRUE; -} - -static gboolean -vivi_movie_list_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - GtkTreeIter unused; - - REPORT; - return vivi_movie_list_iter_children (tree_model, &unused, iter); -} - -static gint -vivi_movie_list_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - GNode *node; - - REPORT; - if (iter) { - node = iter->user_data; - } else { - node = VIVI_MOVIE_LIST (tree_model)->root; - } - return g_node_n_children (node); -} - -static gboolean -vivi_movie_list_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, - GtkTreeIter *parent, gint n) -{ - GNode *node; - - REPORT; - if (parent) { - node = parent->user_data; - } else { - node = VIVI_MOVIE_LIST (tree_model)->root; - } - node = g_node_nth_child (node, n); - if (node == NULL) - return FALSE; - iter->user_data = node; - return TRUE; -} - -static gboolean -vivi_movie_list_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *child) -{ - GNode *node; - - REPORT; - node = child->user_data; - node = node->parent; - if (node->parent == NULL) - return FALSE; - iter->user_data = node; - return TRUE; -} - -static void -vivi_movie_list_tree_model_init (GtkTreeModelIface *iface) -{ - iface->get_flags = vivi_movie_list_get_flags; - iface->get_n_columns = vivi_movie_list_get_n_columns; - iface->get_column_type = vivi_movie_list_get_column_type; - iface->get_iter = vivi_movie_list_get_iter; - iface->get_path = vivi_movie_list_get_path; - iface->get_value = vivi_movie_list_get_value; - iface->iter_next = vivi_movie_list_iter_next; - iface->iter_children = vivi_movie_list_iter_children; - iface->iter_has_child = vivi_movie_list_iter_has_child; - iface->iter_n_children = vivi_movie_list_iter_n_children; - iface->iter_nth_child = vivi_movie_list_iter_nth_child; - iface->iter_parent = vivi_movie_list_iter_parent; -} - -/*** VIVI_MOVIE_LIST ***/ - -G_DEFINE_TYPE_WITH_CODE (ViviMovieList, vivi_movie_list, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL, vivi_movie_list_tree_model_init)) - -static int -vivi_movie_list_get_index (GNode *parent, GNode *new) -{ - GNode *walk; - int i = 0; - - for (walk = parent->children; walk; walk = walk->next) { - if (walk == new) - continue; - if (swfdec_movie_compare_depths (walk->data, new->data) < 0) { - i++; - continue; - } - break; - } - return i; -} - -static void -vivi_movie_list_movie_notify (SwfdecMovie *movie, GParamSpec *pspec, ViviMovieList *movies) -{ - GtkTreeIter iter; - GtkTreePath *path; - GNode *node; - - node = g_hash_table_lookup (movies->nodes, movie); - if (g_str_equal (pspec->name, "depth")) { - guint old, new; - GNode *parent; - - parent = node->parent; - old = g_node_child_position (parent, node); - new = vivi_movie_list_get_index (parent, node); - if (old != new) { - /* reorder */ - guint min = MIN (old, new); - guint max = MAX (old, new); - guint i; - guint count = g_node_n_children (parent); - int *positions = g_new (int, count); - for (i = 0; i < min; i++) { - positions[i] = i; - } - if (old < new) { - for (i = min; i < max; i++) { - positions[i] = i + 1; - } - } else { - for (i = min + 1; i <= max; i++) { - positions[i] = i - 1; - } - } - positions[new] = old; - for (i = max + 1; i < count; i++) { - positions[i] = i; - } - g_node_unlink (node); - g_node_insert (parent, new, node); - iter.stamp = movies->stamp; - iter.user_data = parent; - path = vivi_movie_list_node_to_path (parent); - gtk_tree_model_rows_reordered (GTK_TREE_MODEL (movies), path, &iter, positions); - gtk_tree_path_free (path); - g_free (positions); - } - } - iter.stamp = movies->stamp; - iter.user_data = node; - path = vivi_movie_list_node_to_path (node); - gtk_tree_model_row_changed (GTK_TREE_MODEL (movies), path, &iter); - gtk_tree_path_free (path); -} - -static gboolean -vivi_movie_list_added (ViviDebugger *debugger, SwfdecAsObject *object, ViviMovieList *movies) -{ - SwfdecMovie *movie; - GtkTreePath *path; - GtkTreeIter iter; - GNode *node, *new; - int pos; - - if (!SWFDEC_IS_MOVIE (object)) - return FALSE; - movie = SWFDEC_MOVIE (object); - g_signal_connect (movie, "notify", G_CALLBACK (vivi_movie_list_movie_notify), movies); - if (movie->parent) { - node = g_hash_table_lookup (movies->nodes, movie->parent); - g_assert (node); - } else { - node = movies->root; - } - new = g_node_new (movie); - g_hash_table_insert (movies->nodes, movie, new); - pos = vivi_movie_list_get_index (node, new); - g_node_insert (node, pos, new); - movies->stamp++; - iter.stamp = movies->stamp; - iter.user_data = new; - path = vivi_movie_list_node_to_path (new); - gtk_tree_model_row_inserted (GTK_TREE_MODEL (movies), path, &iter); - gtk_tree_path_free (path); - return FALSE; -} - -static void -vivi_movie_list_remove_node (ViviMovieList *movies, GNode *node) -{ - GNode *walk; - - for (walk = node->children; walk; walk = walk->next) { - vivi_movie_list_remove_node (movies, walk); - } - g_hash_table_remove (movies->nodes, node->data); - g_signal_handlers_disconnect_by_func (node->data, vivi_movie_list_movie_notify, movies); -} - -static gboolean -vivi_movie_list_removed (ViviDebugger *debugger, SwfdecAsObject *object, ViviMovieList *movies) -{ - GNode *node; - GtkTreePath *path; - - if (!SWFDEC_IS_MOVIE (object)) - return FALSE; - node = g_hash_table_lookup (movies->nodes, object); - /* happens when parent was already removed */ - if (node == NULL) - return FALSE; - vivi_movie_list_remove_node (movies, node); - path = vivi_movie_list_node_to_path (node); - g_node_destroy (node); - gtk_tree_model_row_deleted (GTK_TREE_MODEL (movies), path); - gtk_tree_path_free (path); - return FALSE; -} - -static void -vivi_movie_list_reset (ViviApplication *app, GParamSpec *pspec, ViviMovieList *movies) -{ - GNode *walk; - - for (walk = movies->root->children; walk; walk = walk->next) { - vivi_movie_list_removed (NULL, walk->data, movies); - } -} - -static void -vivi_movie_list_dispose (GObject *object) -{ - ViviMovieList *movies = VIVI_MOVIE_LIST (object); - ViviDebugger *debugger; - GNode *walk; - - debugger = movies->app->debugger; - g_signal_handlers_disconnect_by_func (movies->app, vivi_movie_list_reset, movies); - g_signal_handlers_disconnect_by_func (debugger, vivi_movie_list_removed, movies); - g_signal_handlers_disconnect_by_func (debugger, vivi_movie_list_added, movies); - g_object_unref (movies->app); - for (walk = movies->root->children; walk; walk = walk->next) { - vivi_movie_list_remove_node (movies, walk); - } - g_node_destroy (movies->root); -#ifndef G_DISABLE_ASSERT - if (g_hash_table_size (movies->nodes) != 0) { - g_error ("%u items left in hash table", g_hash_table_size (movies->nodes)); - } -#endif - g_hash_table_destroy (movies->nodes); - - G_OBJECT_CLASS (vivi_movie_list_parent_class)->dispose (object); -} - -static void -vivi_movie_list_class_init (ViviMovieListClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - object_class->dispose = vivi_movie_list_dispose; -} - -static void -vivi_movie_list_init (ViviMovieList *movies) -{ - movies->root = g_node_new (NULL); - movies->nodes = g_hash_table_new (g_direct_hash, g_direct_equal); -} - -GtkTreeModel * -vivi_movie_list_new (ViviApplication *app) -{ - ViviMovieList *movies; - ViviDebugger *debugger; - - movies = g_object_new (VIVI_TYPE_MOVIE_LIST, NULL); - g_object_ref (app); - movies->app = app; - debugger = app->debugger; - g_signal_connect (app, "notify::player", G_CALLBACK (vivi_movie_list_reset), movies); - g_signal_connect (debugger, "add", G_CALLBACK (vivi_movie_list_added), movies); - g_signal_connect (debugger, "remove", G_CALLBACK (vivi_movie_list_removed), movies); - return GTK_TREE_MODEL (movies); -} - diff --git a/vivified/ui/vivi_movie_list.h b/vivified/ui/vivi_movie_list.h deleted file mode 100644 index a030549c..00000000 --- a/vivified/ui/vivi_movie_list.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Vivi - * 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 - */ - -#include <vivified/core/vivified-core.h> - -#ifndef _VIVI_MOVIE_LIST_H_ -#define _VIVI_MOVIE_LIST_H_ - -G_BEGIN_DECLS - -enum { - VIVI_MOVIE_LIST_COLUMN_MOVIE, - VIVI_MOVIE_LIST_COLUMN_NAME, - VIVI_MOVIE_LIST_COLUMN_DEPTH, - VIVI_MOVIE_LIST_COLUMN_TYPE, - /* add more */ - VIVI_MOVIE_LIST_N_COLUMNS -}; - -typedef struct _ViviMovieList ViviMovieList; -typedef struct _ViviMovieListClass ViviMovieListClass; - -#define VIVI_TYPE_MOVIE_LIST (vivi_movie_list_get_type()) -#define VIVI_IS_MOVIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_MOVIE_LIST)) -#define VIVI_IS_MOVIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_MOVIE_LIST)) -#define VIVI_MOVIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_MOVIE_LIST, ViviMovieList)) -#define VIVI_MOVIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_MOVIE_LIST, ViviMovieListClass)) - -struct _ViviMovieList -{ - GObject object; - - ViviApplication * app; /* the application we watch */ - GNode * root; /* the root node containing all the movies */ - int stamp; /* to validate tree iters */ - GHashTable * nodes; /* movies => node fast lookup table */ -}; - -struct _ViviMovieListClass -{ - GObjectClass object_class; -}; - -GType vivi_movie_list_get_type (void); - -GtkTreeModel * vivi_movie_list_new (ViviApplication * app); - - -G_END_DECLS -#endif diff --git a/vivified/ui/vivi_movies.c b/vivified/ui/vivi_movies.c deleted file mode 100644 index cc88466b..00000000 --- a/vivified/ui/vivi_movies.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <swfdec-gtk/swfdec-gtk.h> -#include "vivi_vivi_docklet.h" -#include "vivi_movie_list.h" - -void -vivi_movies_application_set (ViviViviDocklet *docklet, ViviApplication *app); -void -vivi_movies_application_set (ViviViviDocklet *docklet, ViviApplication *app) -{ - GtkWidget *view = vivi_vivi_docklet_find_widget_by_type (docklet, GTK_TYPE_TREE_VIEW); - GtkTreeModel *model; - - model = vivi_movie_list_new (app); - gtk_tree_view_set_model (GTK_TREE_VIEW (view), model); - g_object_unref (model); -} - diff --git a/vivified/ui/vivi_movies.xml b/vivified/ui/vivi_movies.xml deleted file mode 100644 index 47f1bdf4..00000000 --- a/vivified/ui/vivi_movies.xml +++ /dev/null @@ -1,38 +0,0 @@ -<interface> - <object class="ViviViviDocklet" id="movies"> - <property name="title">Movies</property> - <signal name="application-set" handler="vivi_movies_application_set" /> - <child> - <object class="GtkScrolledWindow" id="1"> - <property name="hscrollbar-policy">automatic</property> - <property name="vscrollbar-policy">automatic</property> - <child> - <object class="GtkTreeView" id="x"> - <child> - <object class="GtkTreeViewColumn" id="x"> - <property name="title">Movie</property> - <child> - <object class="GtkCellRendererText" id="x"/> - <attributes> - <attribute name="text">1</attribute> - </attributes> - </child> - </object> - </child> - <child> - <object class="GtkTreeViewColumn" id="x"> - <property name="title">Depth</property> - <child> - <object class="GtkCellRendererText" id="x"/> - <attributes> - <attribute name="text">2</attribute> - </attributes> - </child> - </object> - </child> - </object> - </child> - </object> - </child> - </object> -</interface> diff --git a/vivified/ui/vivi_player.xml b/vivified/ui/vivi_player.xml deleted file mode 100644 index 1c63819d..00000000 --- a/vivified/ui/vivi_player.xml +++ /dev/null @@ -1,16 +0,0 @@ -<interface> - <object class="ViviViviDocklet" id="player"> - <property name="title">Player</property> - <signal name="application-set" handler="vivi_player_application_set" /> - <child> - <object class="GtkAlignment" id="1"> - <property name="xscale">0.0</property> - <property name="yscale">0.0</property> - <child> - <object class="ViviWidget" id="2"> - </object> - </child> - </object> - </child> - </object> -</interface> diff --git a/vivified/ui/vivi_vivi_docklet.c b/vivified/ui/vivi_vivi_docklet.c deleted file mode 100644 index cea4f64d..00000000 --- a/vivified/ui/vivi_vivi_docklet.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Vivified - * 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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "vivi_vivi_docklet.h" - -enum { - PROP_0, - PROP_APP -}; - -enum { - APPLICATION_SET, - APPLICATION_UNSET, - LAST_SIGNAL -}; - -G_DEFINE_TYPE (ViviViviDocklet, vivi_vivi_docklet, VIVI_TYPE_DOCKLET) -guint signals[LAST_SIGNAL]; - -static void -vivi_vivi_docklet_get_property (GObject *object, guint param_id, GValue *value, - GParamSpec * pspec) -{ - ViviViviDocklet *docklet = VIVI_VIVI_DOCKLET (object); - - switch (param_id) { - case PROP_APP: - g_value_set_object (value, docklet->app); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_vivi_docklet_set_property (GObject *object, guint param_id, const GValue *value, - GParamSpec *pspec) -{ - ViviViviDocklet *docklet = VIVI_VIVI_DOCKLET (object); - - switch (param_id) { - case PROP_APP: - if (docklet->app) { - g_signal_emit (docklet, signals[APPLICATION_UNSET], 0, docklet->app); - g_object_unref (docklet->app); - } - docklet->app = g_value_dup_object (value); - if (docklet->app) { - g_signal_emit (docklet, signals[APPLICATION_SET], 0, docklet->app); - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_vivi_docklet_dispose (GObject *object) -{ - ViviViviDocklet *docklet = VIVI_VIVI_DOCKLET (object); - - if (docklet->app) { - g_signal_emit (docklet, signals[APPLICATION_UNSET], 0, docklet->app); - g_object_unref (docklet->app); - docklet->app = NULL; - } - - G_OBJECT_CLASS (vivi_vivi_docklet_parent_class)->dispose (object); -} - -static void -vivi_vivi_docklet_class_init (ViviViviDockletClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->dispose = vivi_vivi_docklet_dispose; - object_class->get_property = vivi_vivi_docklet_get_property; - object_class->set_property = vivi_vivi_docklet_set_property; - - g_object_class_install_property (object_class, PROP_APP, - g_param_spec_object ("application", "application", "application used by this docklet", - VIVI_TYPE_APPLICATION, G_PARAM_READWRITE)); - - signals[APPLICATION_SET] = g_signal_new ("application-set", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViviViviDockletClass, application_set), - NULL, NULL, g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, VIVI_TYPE_APPLICATION); - signals[APPLICATION_UNSET] = g_signal_new ("application-unset", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViviViviDockletClass, application_unset), - NULL, NULL, g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, VIVI_TYPE_APPLICATION); -} - -static void -vivi_vivi_docklet_init (ViviViviDocklet *docklet) -{ -} - -typedef struct { - GtkWidget * result; - GType desired_type; -} FindData; - -static void -find_widget (GtkWidget *widget, gpointer datap) -{ - FindData *data = datap; - - if (G_TYPE_CHECK_INSTANCE_TYPE (widget, data->desired_type)) { - data->result = widget; - return; - } - if (GTK_IS_CONTAINER (widget)) - gtk_container_foreach (GTK_CONTAINER (widget), find_widget, data); -} - -GtkWidget * -vivi_vivi_docklet_find_widget_by_type (ViviViviDocklet *docklet, GType type) -{ - FindData data = { NULL, }; - - g_return_val_if_fail (VIVI_IS_VIVI_DOCKLET (docklet), NULL); - g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), NULL); - - data.desired_type = type; - gtk_container_foreach (GTK_CONTAINER (docklet), find_widget, &data); - return data.result; -} diff --git a/vivified/ui/vivi_vivi_docklet.h b/vivified/ui/vivi_vivi_docklet.h deleted file mode 100644 index 8142ae14..00000000 --- a/vivified/ui/vivi_vivi_docklet.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Vivified - * 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 _VIVI_VIVI_DOCKLET_H_ -#define _VIVI_VIVI_DOCKLET_H_ - -#include <vivified/core/vivified-core.h> -#include <vivified/dock/vivified-dock.h> - -G_BEGIN_DECLS - - -typedef struct _ViviViviDocklet ViviViviDocklet; -typedef struct _ViviViviDockletClass ViviViviDockletClass; - -#define VIVI_TYPE_VIVI_DOCKLET (vivi_vivi_docklet_get_type()) -#define VIVI_IS_VIVI_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_VIVI_DOCKLET)) -#define VIVI_IS_VIVI_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_VIVI_DOCKLET)) -#define VIVI_VIVI_DOCKLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_VIVI_DOCKLET, ViviViviDocklet)) -#define VIVI_VIVI_DOCKLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_VIVI_DOCKLET, ViviViviDockletClass)) -#define VIVI_VIVI_DOCKLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIVI_TYPE_VIVI_DOCKLET, ViviViviDockletClass)) - -struct _ViviViviDocklet { - ViviDocklet docklet; - - ViviApplication * app; /* the application we connect to */ -}; - -struct _ViviViviDockletClass -{ - ViviDockletClass docklet_class; - - void (* application_set) (ViviViviDocklet * docklet, - ViviApplication * app); - void (* application_unset) (ViviViviDocklet * docklet, - ViviApplication * app); -}; - -GType vivi_vivi_docklet_get_type (void); - -GtkWidget * vivi_vivi_docklet_find_widget_by_type - (ViviViviDocklet * docklet, - GType type); - -G_END_DECLS -#endif diff --git a/vivified/ui/vivi_widget.c b/vivified/ui/vivi_widget.c deleted file mode 100644 index 6114e2c2..00000000 --- a/vivified/ui/vivi_widget.c +++ /dev/null @@ -1,245 +0,0 @@ -/* Swfdec - * Copyright (C) 2006-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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <math.h> -#include "vivi_widget.h" - -enum { - PROP_0, - PROP_APP -}; - -G_DEFINE_TYPE (ViviWidget, vivi_widget, SWFDEC_TYPE_GTK_WIDGET) - -static void -vivi_widget_get_property (GObject *object, guint param_id, GValue *value, - GParamSpec * pspec) -{ - ViviWidget *widget = VIVI_WIDGET (object); - - switch (param_id) { - case PROP_APP: - g_value_set_object (value, widget->app); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_widget_set_property (GObject *object, guint param_id, const GValue *value, - GParamSpec *pspec) -{ - ViviWidget *widget = VIVI_WIDGET (object); - - switch (param_id) { - case PROP_APP: - vivi_widget_set_application (widget, VIVI_APPLICATION (g_value_get_object (value))); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static gboolean -vivi_widget_motion_notify (GtkWidget *gtkwidget, GdkEventMotion *event) -{ - return FALSE; -} - -static gboolean -vivi_widget_leave_notify (GtkWidget *gtkwidget, GdkEventCrossing *event) -{ - return FALSE; -} - -#define RADIUS 10 -static void -vivi_widget_invalidate_click_area (ViviWidget *widget) -{ - GtkWidget *gtkwidget = GTK_WIDGET (widget); - GdkRectangle rect = { widget->x - RADIUS, widget->y - RADIUS, 2 * RADIUS, 2 * RADIUS }; - - gdk_window_invalidate_rect (gtkwidget->window, &rect, FALSE); -} - -static gboolean -vivi_widget_button_press (GtkWidget *gtkwidget, GdkEventButton *event) -{ - SwfdecGtkWidget *widget = SWFDEC_GTK_WIDGET (gtkwidget); - ViviWidget *debug = VIVI_WIDGET (gtkwidget); - - if (event->window != gtkwidget->window) - return FALSE; - - if (event->button == 1 && swfdec_gtk_widget_get_interactive (widget)) { - SwfdecPlayer *player = swfdec_gtk_widget_get_player (widget); - // cast to int to get rid of unhandled enum warnings... - switch ((int)event->type) { - case GDK_BUTTON_PRESS: - vivi_widget_invalidate_click_area (debug); - debug->x = event->x; - debug->y = event->y; - swfdec_player_mouse_move (player, debug->x, debug->y); - vivi_widget_invalidate_click_area (debug); - break; - case GDK_2BUTTON_PRESS: - debug->button = 1 - debug->button; - debug->x = event->x; - debug->y = event->y; - if (debug->button) - swfdec_player_mouse_press (player, debug->x, debug->y, 1); - else - swfdec_player_mouse_release (player, debug->x, debug->y, 1); - vivi_widget_invalidate_click_area (debug); - break; - default: - break; - } - } - return FALSE; -} - -static gboolean -vivi_widget_button_release (GtkWidget *gtkwidget, GdkEventButton *event) -{ - return FALSE; -} - -static gboolean -vivi_widget_expose (GtkWidget *gtkwidget, GdkEventExpose *event) -{ - ViviWidget *debug = VIVI_WIDGET (gtkwidget); - cairo_t *cr; - - if (event->window != gtkwidget->window) - return FALSE; - - if (GTK_WIDGET_CLASS (vivi_widget_parent_class)->expose_event (gtkwidget, event)) - return TRUE; - - cr = gdk_cairo_create (gtkwidget->window); - - cairo_arc (cr, debug->x, debug->y, RADIUS - 1.5, 0.0, 2 * G_PI); - if (debug->button) { - cairo_set_source_rgba (cr, 0.25, 0.25, 0.25, 0.5); - cairo_fill_preserve (cr); - } - cairo_set_line_width (cr, 3); - cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); - cairo_stroke_preserve (cr); - cairo_set_line_width (cr, 1); - cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); - cairo_stroke (cr); - cairo_destroy (cr); - - return FALSE; -} - -static void -vivi_widget_dispose (GObject *object) -{ - ViviWidget *widget = VIVI_WIDGET (object); - - vivi_widget_set_application (widget, NULL); - - G_OBJECT_CLASS (vivi_widget_parent_class)->dispose (object); -} - -static void -vivi_widget_class_init (ViviWidgetClass * g_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (g_class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (g_class); - - object_class->dispose = vivi_widget_dispose; - object_class->get_property = vivi_widget_get_property; - object_class->set_property = vivi_widget_set_property; - - g_object_class_install_property (object_class, PROP_APP, - g_param_spec_object ("application", "application", "application that is playing", - VIVI_TYPE_APPLICATION, G_PARAM_READWRITE)); - - widget_class->expose_event = vivi_widget_expose; - widget_class->button_press_event = vivi_widget_button_press; - widget_class->button_release_event = vivi_widget_button_release; - widget_class->motion_notify_event = vivi_widget_motion_notify; - widget_class->leave_notify_event = vivi_widget_leave_notify; -} - -static void -vivi_widget_init (ViviWidget *widget) -{ -} - -GtkWidget * -vivi_widget_new (ViviApplication *app) -{ - ViviWidget *widget; - - g_return_val_if_fail (VIVI_IS_APPLICATION (app), NULL); - - widget = g_object_new (VIVI_TYPE_WIDGET, "player", vivi_application_get_player (app), NULL); - - return GTK_WIDGET (widget); -} - -static void -vivi_widget_app_notify (ViviApplication *app, GParamSpec *pspec, ViviWidget *widget) -{ - if (g_str_equal (pspec->name, "interrupted")) { - swfdec_gtk_widget_set_interactive (SWFDEC_GTK_WIDGET (widget), - !vivi_application_get_interrupted (widget->app)); - } else if (g_str_equal (pspec->name, "player")) { - swfdec_gtk_widget_set_player (SWFDEC_GTK_WIDGET (widget), - vivi_application_get_player (widget->app)); - } -} - -void -vivi_widget_set_application (ViviWidget *widget, ViviApplication *app) -{ - g_return_if_fail (VIVI_IS_WIDGET (widget)); - g_return_if_fail (app == NULL || VIVI_IS_APPLICATION (app)); - - if (widget->app) { - g_signal_handlers_disconnect_by_func (widget->app, vivi_widget_app_notify, widget); - g_object_unref (widget->app); - } - widget->app = app; - if (app) { - g_object_ref (app); - g_signal_connect (app, "notify", G_CALLBACK (vivi_widget_app_notify), widget); - swfdec_gtk_widget_set_interactive (SWFDEC_GTK_WIDGET (widget), - !vivi_application_get_interrupted (app)); - swfdec_gtk_widget_set_player (SWFDEC_GTK_WIDGET (widget), - vivi_application_get_player (app)); - } else { - swfdec_gtk_widget_set_interactive (SWFDEC_GTK_WIDGET (widget), TRUE); - swfdec_gtk_widget_set_player (SWFDEC_GTK_WIDGET (widget), NULL); - } - g_object_notify (G_OBJECT (widget), "application"); -} - diff --git a/vivified/ui/vivi_widget.h b/vivified/ui/vivi_widget.h deleted file mode 100644 index f7d47273..00000000 --- a/vivified/ui/vivi_widget.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Vivi - * Copyright (C) 2006-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 _VIVI_WIDGET_H_ -#define _VIVI_WIDGET_H_ - -#include <swfdec-gtk/swfdec-gtk.h> -#include <vivified/core/vivified-core.h> - -G_BEGIN_DECLS - -typedef struct _ViviWidget ViviWidget; -typedef struct _ViviWidgetClass ViviWidgetClass; - -#define VIVI_TYPE_WIDGET (vivi_widget_get_type()) -#define VIVI_IS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_WIDGET)) -#define VIVI_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_WIDGET)) -#define VIVI_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_WIDGET, ViviWidget)) -#define VIVI_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_WIDGET, ViviWidgetClass)) - -struct _ViviWidget -{ - SwfdecGtkWidget widget; - - ViviApplication * app; - - int x; - int y; - int button; -}; - -struct _ViviWidgetClass -{ - SwfdecGtkWidgetClass widget_class; -}; - -GType vivi_widget_get_type (void); - -GtkWidget * vivi_widget_new (ViviApplication * app); - -void vivi_widget_set_application (ViviWidget * widget, - ViviApplication * app); - - -G_END_DECLS -#endif diff --git a/vivified/ui/vivi_window.c b/vivified/ui/vivi_window.c deleted file mode 100644 index 9d8b6acd..00000000 --- a/vivified/ui/vivi_window.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Swfdec - * Copyright (C) 2006-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 - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <math.h> -#include "vivi_window.h" - -enum { - PROP_0, - PROP_APP, - PROP_MOVIE -}; - -G_DEFINE_TYPE (ViviWindow, vivi_window, GTK_TYPE_WINDOW) - -static void -vivi_window_app_notify (ViviApplication *app, GParamSpec *pspec, ViviWindow *window) -{ - if (g_str_equal (pspec->name, "player")) { - vivi_window_set_movie (window, NULL); - } else if (g_str_equal (pspec->name, "filename")) { - const char *filename = vivi_application_get_filename (app); - - if (filename == NULL) - filename = "Vivified"; - gtk_window_set_title (GTK_WINDOW (window), filename); - } -} - -static void -vivi_window_set_application (ViviWindow *window, ViviApplication *app) -{ - g_return_if_fail (VIVI_IS_WINDOW (window)); - g_return_if_fail (app == NULL || VIVI_IS_APPLICATION (app)); - - vivi_window_set_movie (window, NULL); - if (window->app) { - g_signal_handlers_disconnect_by_func (window->app, vivi_window_app_notify, window); - g_object_unref (window->app); - } - window->app = app; - if (app) { - g_object_ref (app); - g_signal_connect (app, "notify", G_CALLBACK (vivi_window_app_notify), window); - } - g_object_notify (G_OBJECT (window), "application"); -} - -static void -vivi_window_get_property (GObject *object, guint param_id, GValue *value, - GParamSpec * pspec) -{ - ViviWindow *window = VIVI_WINDOW (object); - - switch (param_id) { - case PROP_APP: - g_value_set_object (value, window->app); - break; - case PROP_MOVIE: - g_value_set_object (value, window->movie); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_window_set_property (GObject *object, guint param_id, const GValue *value, - GParamSpec *pspec) -{ - ViviWindow *window = VIVI_WINDOW (object); - - switch (param_id) { - case PROP_APP: - vivi_window_set_application (window, VIVI_APPLICATION (g_value_get_object (value))); - break; - case PROP_MOVIE: - vivi_window_set_movie (window, SWFDEC_MOVIE (g_value_get_object (value))); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - -static void -vivi_window_dispose (GObject *object) -{ - ViviWindow *window = VIVI_WINDOW (object); - - vivi_window_set_application (window, NULL); - vivi_window_set_movie (window, NULL); - - G_OBJECT_CLASS (vivi_window_parent_class)->dispose (object); -} - -static void -vivi_window_class_init (ViviWindowClass * g_class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (g_class); - - object_class->dispose = vivi_window_dispose; - object_class->get_property = vivi_window_get_property; - object_class->set_property = vivi_window_set_property; - - g_object_class_install_property (object_class, PROP_APP, - g_param_spec_object ("application", "application", "application that is playing", - VIVI_TYPE_APPLICATION, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_MOVIE, - g_param_spec_object ("movie", "movie", "selected movie", - SWFDEC_TYPE_MOVIE, G_PARAM_READWRITE)); -} - -static void -vivi_window_init (ViviWindow *window) -{ -} - -static void -try_grab_focus (GtkWidget *widget, gpointer unused) -{ - if (GTK_IS_ENTRY (widget)) - gtk_widget_grab_focus (widget); - else if (GTK_IS_CONTAINER (widget)) - gtk_container_foreach (GTK_CONTAINER (widget), try_grab_focus, NULL); -} - -GtkWidget * -vivi_window_new (ViviApplication *app) -{ - GtkWidget *window, *box, *paned, *widget; - GtkBuilder *builder; - GError *error = NULL; - - g_return_val_if_fail (VIVI_IS_APPLICATION (app), NULL); - - window = g_object_new (VIVI_TYPE_WINDOW, "application", app, - "type", GTK_WINDOW_TOPLEVEL, "default-width", 600, "default-height", 450, - NULL); - - builder = gtk_builder_new (); - if (!gtk_builder_add_from_file (builder, "vivi_player.xml", &error) || - !gtk_builder_add_from_file (builder, "vivi_command_line.xml", &error) || - !gtk_builder_add_from_file (builder, "vivi_movies.xml", &error)) - g_error ("%s", error->message); - gtk_builder_connect_signals (builder, app); - - gtk_window_set_default_size (GTK_WINDOW (window), 600, 450); - paned = gtk_hpaned_new (); - gtk_paned_set_position (GTK_PANED (paned), 200); - gtk_container_add (GTK_CONTAINER (window), paned); - - box = vivi_vdock_new (); - gtk_paned_add2 (GTK_PANED (paned), box); - widget = GTK_WIDGET (gtk_builder_get_object (builder, "player")); - g_object_set (widget, "application", app, NULL); - vivi_vdock_add (VIVI_VDOCK (box), widget); - widget = GTK_WIDGET (gtk_builder_get_object (builder, "command-line")); - g_object_set (widget, "application", app, NULL); - vivi_vdock_add (VIVI_VDOCK (box), widget); - gtk_container_foreach (GTK_CONTAINER (widget), try_grab_focus, NULL); - - box = vivi_vdock_new (); - gtk_paned_add1 (GTK_PANED (paned), box); - widget = GTK_WIDGET (gtk_builder_get_object (builder, "movies")); - g_object_set (widget, "application", app, NULL); - vivi_vdock_add (VIVI_VDOCK (box), widget); - - g_object_unref (builder); - - return window; -} - -ViviApplication * -vivi_window_get_application (ViviWindow *window) -{ - g_return_val_if_fail (VIVI_IS_WINDOW (window), NULL); - - return window->app; -} - -void -vivi_window_set_movie (ViviWindow *window, SwfdecMovie *movie) -{ - g_return_if_fail (VIVI_IS_WINDOW (window)); - g_return_if_fail (movie == NULL || SWFDEC_IS_MOVIE (movie)); - - if (window->movie == movie) - return; - - if (window->movie) { - g_object_unref (window->movie); - } - window->movie = movie; - if (window->movie) { - g_object_ref (movie); - } - g_object_notify (G_OBJECT (window), "movie"); -} - diff --git a/vivified/ui/vivi_window.h b/vivified/ui/vivi_window.h deleted file mode 100644 index 7edcd5a1..00000000 --- a/vivified/ui/vivi_window.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Vivi - * Copyright (C) 2006-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 _VIVI_WINDOW_H_ -#define _VIVI_WINDOW_H_ - -#include <vivified/dock/vivified-dock.h> -#include <vivified/core/vivified-core.h> -/* FIXME */ -#include <swfdec/swfdec_movie.h> - -G_BEGIN_DECLS - -typedef struct _ViviWindow ViviWindow; -typedef struct _ViviWindowClass ViviWindowClass; - -#define VIVI_TYPE_WINDOW (vivi_window_get_type()) -#define VIVI_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIVI_TYPE_WINDOW)) -#define VIVI_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIVI_TYPE_WINDOW)) -#define VIVI_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIVI_TYPE_WINDOW, ViviWindow)) -#define VIVI_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIVI_TYPE_WINDOW, ViviWindowClass)) - -struct _ViviWindow -{ - GtkWindow window; - - ViviApplication * app; /* application we are displaying */ - - SwfdecMovie * movie; /* the currently active movie or NULL if none */ -}; - -struct _ViviWindowClass -{ - GtkWindowClass window_class; -}; - -GType vivi_window_get_type (void); - -GtkWidget * vivi_window_new (ViviApplication * app); - -ViviApplication * vivi_window_get_application (ViviWindow * window); -void vivi_window_set_movie (ViviWindow * window, - SwfdecMovie * movie); -SwfdecMovie * vivi_window_get_movie (ViviWindow * window); - - -G_END_DECLS -#endif |