~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/xpfe/bootstrap/nsStaticComponents.cpp.in

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 
2
 *
 
3
 * The contents of this file are subject to the Mozilla Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/MPL/
 
7
 *
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 *
 
13
 * The Original Code is mozilla.org code.
 
14
 *
 
15
 * The Initial Developer of the Original Code is Netscape Communications
 
16
 * Corporation.  Portions created by Netscape are
 
17
 * Copyright (C) 2001 Netscape Communications Corporation. All
 
18
 * Rights Reserved.
 
19
 *
 
20
 * Contributor(s):
 
21
 *      Christopher Seawood <cls@seawood.org>
 
22
 *  Chris Waterson <waterson@netscape.com>
 
23
 */
 
24
 
 
25
#line 26 "nsStaticComponents.cpp.in"
 
26
#define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1
 
27
 
 
28
#include "nsIGenericFactory.h"
 
29
#include "nsStaticComponent.h"
 
30
 
 
31
/**
 
32
 * Construct a unique NSGetModule entry point for a generic module.
 
33
 */
 
34
#define NSGETMODULE(_name) _name##_NSGetmodule
 
35
 
 
36
/**
 
37
 * Declare an NSGetModule() routine for a generic module.
 
38
 */
 
39
#define DECL_NSGETMODULE(_name)                                \
 
40
extern nsModuleInfo NSMODULEINFO(_name);                       \
 
41
extern "C" NS_EXPORT nsresult                                  \
 
42
NSGETMODULE(_name) (nsIComponentManager* aCompMgr,             \
 
43
                    nsIFile*             aLocation,            \
 
44
                    nsIModule**          aResult)              \
 
45
{                                                              \
 
46
    return NS_NewGenericModule2(&NSMODULEINFO(_name), aResult);\
 
47
}
 
48
 
 
49
// NSGetModule entry points
 
50
%DECL_NSGETMODULES%
 
51
#line 52 "nsStaticComponents.cpp.in"
 
52
 
 
53
/**
 
54
 * The nsStaticModuleInfo
 
55
 */
 
56
static nsStaticModuleInfo gStaticModuleInfo[] = {
 
57
#define MODULE(_name) { (#_name), NSGETMODULE(_name) }
 
58
        %MODULE_LIST%
 
59
#line 60 "nsStaticComponents.cpp.in"
 
60
};
 
61
 
 
62
/**
 
63
 * Our NSGetStaticModuleInfoFunc
 
64
 */
 
65
nsresult PR_CALLBACK
 
66
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count)
 
67
{
 
68
  *info = gStaticModuleInfo;
 
69
  *count = sizeof(gStaticModuleInfo) / sizeof(gStaticModuleInfo[0]);
 
70
  return NS_OK;
 
71
}
 
72