~ubuntu-branches/ubuntu/raring/mozvoikko/raring

« back to all changes in this revision

Viewing changes to src/mozVoikkoSpellFactory.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-11-26 01:16:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101126011603-nzpm30ouwayrhkci
Tags: 1.9.0~svn20101114r3591-0ubuntu1
* New upstream SVN snapshot to support Firefox 4.0

* Convert to dh7 and use mozilla-devscripts
  - update debian/compat
  - update debian/rules
  - update debian/control
  - remove debian/dirs
* Use source format 3.0
  - update debian/control
  - add debian/source/format
* Rename binary to xul-ext-mozvoikko and provide a transitional package
  - update debian/control
* Drop unnecessary patches:
  - remove debian/patches/fix_freebsd_ftbfs.patch
  - remove debian/patches/fix_min_max_versions.patch
  - update debian/patches/series
* The mozvoikko source has 2 build systems - one to allow building in a fully
  built Firefox source tree, and the other one just using the Mozilla SDK.
  The latter is totally broken in the current version though, so we hack
  it to work in order to avoid having to do the in-tree build
  - add debian/patches/fix_sdk_build.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *
18
18
 * ***** END LICENSE BLOCK ***** */
19
19
 
20
 
#include "nsIGenericFactory.h"
 
20
#include "mozilla/ModuleUtils.h"
21
21
#include "nsICategoryManager.h"
22
22
 
23
23
#include "mozVoikkoSpell.hxx"
30
30
 
31
31
NS_GENERIC_FACTORY_CONSTRUCTOR(mozVoikkoSpell)
32
32
 
33
 
////////////////////////////////////////////////////////////////////////
34
 
// Define a table of CIDs implemented by this module along with other
35
 
// information like the function to create an instance, contractid, and
36
 
// class name.
37
 
//
38
 
static nsModuleComponentInfo components[] =
39
 
{
40
 
    {
41
 
        "mozVoikkoSpell",
42
 
        MOZ_VOIKKOSPELL_CID,
43
 
        MOZ_VOIKKOSPELL_CONTRACTID,
44
 
        mozVoikkoSpellConstructor,
45
 
        mozVoikkoSpell::registerExtension,
46
 
        mozVoikkoSpell::unregisterExtension
47
 
    }
48
 
};
49
 
 
50
 
////////////////////////////////////////////////////////////////////////
51
 
// Implement the NSGetModule() exported function for your module
52
 
// and the entire implementation of the module object.
53
 
//
54
 
NS_IMPL_NSGETMODULE(mozVoikkoModule, components)
 
33
NS_DEFINE_NAMED_CID(MOZ_VOIKKOSPELL_CID);
 
34
 
 
35
// Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
 
36
// should be completely unique UUIDs.
 
37
// each entry has the form { CID, service, factoryproc, constructorproc }
 
38
// where factoryproc is usually NULL.
 
39
static const mozilla::Module::CIDEntry kMozVoikkoSpellCIDs[] = {
 
40
  { &kMOZ_VOIKKOSPELL_CID, false, NULL, mozVoikkoSpellConstructor },
 
41
  { NULL }
 
42
};
 
43
 
 
44
// Build a table which maps contract IDs to CIDs.
 
45
// A contract is a string which identifies a particular set of functionality. In some
 
46
// cases an extension component may override the contract ID of a builtin gecko component
 
47
// to modify or extend functionality.
 
48
static const mozilla::Module::ContractIDEntry kMozVoikkoSpellContracts[] = {
 
49
  { MOZ_VOIKKOSPELL_CONTRACTID, &kMOZ_VOIKKOSPELL_CID },
 
50
  { NULL }
 
51
};
 
52
 
 
53
// Category entries are category/key/value triples which can be used
 
54
// to register contract ID as content handlers or to observe certain
 
55
// notifications. Most modules do not need to register any category
 
56
// entries: this is just a sample of how you'd do it.
 
57
// @see nsICategoryManager for information on retrieving category data.
 
58
static const mozilla::Module::CategoryEntry kMozVoikkoSpellCategories[] = {
 
59
  {"spell-check-engine", MOZ_VOIKKOSPELL_CONTRACTID, MOZ_VOIKKOSPELL_CONTRACTID},
 
60
  { NULL }
 
61
};
 
62
 
 
63
static const mozilla::Module kMozVoikkoSpellModule = {
 
64
     mozilla::Module::kVersion,
 
65
     kMozVoikkoSpellCIDs,
 
66
     kMozVoikkoSpellContracts,
 
67
     kMozVoikkoSpellCategories
 
68
};
 
69
 
 
70
// The following line implements the one-and-only "NSModule" symbol exported from this
 
71
// shared library.
 
72
NSMODULE_DEFN(nsMozVoikkoSpellModule) = &kMozVoikkoSpellModule;
 
73
 
 
74
// The following line implements the one-and-only "NSGetModule" symbol
 
75
// for compatibility with mozilla 1.9.2. You should only use this
 
76
// if you need a binary which is backwards-compatible and if you use
 
77
// interfaces carefully across multiple versions.
 
78
NS_IMPL_MOZILLA192_NSGETMODULE(&kMozVoikkoSpellModule)
 
79