~ubuntu-branches/ubuntu/karmic/gnash/karmic

« back to all changes in this revision

Viewing changes to server/swf/TagLoadersTable.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-10-13 14:29:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081013142949-f6qdvnu4mn05ltdc
Tags: 0.8.4~~bzr9980-0ubuntu1
* new upstream release 0.8.4 (LP: #240325)
* ship new lib usr/lib/gnash/libmozsdk.so.* in mozilla-plugin-gnash
  - update debian/mozilla-plugin-gnash.install
* ship new lib usr/lib/gnash/libgnashnet.so.* in gnash-common
  - update debian/gnash-common.install
* add basic debian/build_head script to build latest CVS head packages.
  - add debian/build_head
* new sound architecture requires build depend on libsdl1.2-dev
  - update debian/control
* head build script now has been completely migrated to bzr (upstream +
  ubuntu)
  - update debian/build_head
* disable kde gui until klash/qt4 has been fixed; keep kde packages as empty
  packages for now.
  - update debian/rules
  - debian/klash.install
  - debian/klash.links
  - debian/klash.manpages
  - debian/konqueror-plugin-gnash.install
* drop libkonq5-dev build dependency accordingly
  - update debian/control
* don't install headers manually anymore. gnash doesnt provide a -dev
  package after all
  - update debian/rules
* update libs installed in gnash-common; libgnashserver-*.so is not available
  anymore (removed); in turn we add the new libgnashcore-*.so
  - update debian/gnash-common.install
* use -Os for optimization and properly pass CXXFLAGS=$(CFLAGS) to configure
  - update debian/rules
* touch firefox .autoreg in postinst of mozilla plugin
  - update debian/mozilla-plugin-gnash.postinst
* link gnash in ubufox plugins directory for the plugin alternative switcher
  - add debian/mozilla-plugin-gnash.links
* suggest ubufox accordingly
  - update debian/control
* add new required build-depends on libgif-dev
  - update debian/control
* add Xb-Npp-Description and Xb-Npp-File as new plugin database meta data
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// 
2
 
//   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
3
 
// 
4
 
// This program is free software; you can redistribute it and/or modify
5
 
// it under the terms of the GNU General Public License as published by
6
 
// the Free Software Foundation; either version 3 of the License, or
7
 
// (at your option) any later version.
8
 
// 
9
 
// This program is distributed in the hope that it will be useful,
10
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
// GNU General Public License for more details.
13
 
// 
14
 
// You should have received a copy of the GNU General Public License
15
 
// along with this program; if not, write to the Free Software
16
 
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 
 
18
 
#ifndef GNASH_SWF_TAGLOADERSTABLE_H
19
 
#define GNASH_SWF_TAGLOADERSTABLE_H
20
 
 
21
 
#ifdef HAVE_CONFIG_H
22
 
#include "gnashconfig.h"
23
 
#endif
24
 
 
25
 
#include "swf.h"
26
 
 
27
 
#include <map>
28
 
 
29
 
// Forward declarations
30
 
namespace gnash {
31
 
        class stream;
32
 
        class movie_definition;
33
 
}
34
 
 
35
 
namespace gnash {
36
 
namespace SWF {
37
 
 
38
 
/// Table of SWF tags loaders
39
 
class TagLoadersTable
40
 
{
41
 
public:
42
 
 
43
 
        /// Signature of an SWF tag loader
44
 
        //
45
 
        /// 'in' is the SWF input stream
46
 
        /// 't' is the tag type
47
 
        /// 'm' a pointer to the movie (or sprite) being read
48
 
        ///
49
 
        typedef void (*loader_function)(
50
 
                stream* input, tag_type type, movie_definition* m);
51
 
 
52
 
        /// \brief
53
 
        /// Get a pointer to the loader_function for the
54
 
        /// specified SWF::tag_type.
55
 
        //
56
 
        /// @return false if no loader is associated with the tag.
57
 
        ///
58
 
        bool get(tag_type t, loader_function* lf);
59
 
 
60
 
        /// \brief
61
 
        /// Register a loader for the specified SWF::tag_type.
62
 
        //
63
 
        /// @return false if a loader is already registered
64
 
        ///               for the given tag
65
 
        ///
66
 
        bool register_loader(tag_type t, loader_function lf);
67
 
 
68
 
        /// \brief
69
 
        /// Return a reference to the singleton instance
70
 
        /// of this class.
71
 
        static TagLoadersTable& getInstance();
72
 
 
73
 
private:
74
 
 
75
 
        /// The container being used for the table
76
 
        typedef std::map<int, loader_function> container;
77
 
 
78
 
        container _tag_loaders;
79
 
 
80
 
        /// Use getInstance()
81
 
        TagLoadersTable()
82
 
                :
83
 
                _tag_loaders()
84
 
        {}
85
 
 
86
 
        ~TagLoadersTable() {}
87
 
 
88
 
        TagLoadersTable(const TagLoadersTable& tl)
89
 
                :
90
 
                _tag_loaders(tl._tag_loaders)
91
 
        {}
92
 
 
93
 
        TagLoadersTable& operator=(const TagLoadersTable& tl)
94
 
        {
95
 
                _tag_loaders = tl._tag_loaders;
96
 
                return *this;
97
 
        }
98
 
 
99
 
};
100
 
 
101
 
} // namespace gnash::SWF
102
 
} // namespace gnash
103
 
 
104
 
#endif // GNASH_SWF_TAGLOADERSTABLE_H