~ubuntu-branches/ubuntu/lucid/enigmail/lucid-security

« back to all changes in this revision

Viewing changes to extensions/enigmail/ipc/build/nsIPCModule.cpp

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-04-18 15:10:32 UTC
  • mfrom: (0.11.1) (19.1.1 lucid-proposed)
  • Revision ID: package-import@ubuntu.com-20120418151032-2u0e8yetqqpp5tam
Tags: 2:1.4.1-0ubuntu0.10.04.1
* New upstream release v1.4.1
  - LP: #987305
  - Fix LP: #968122 - localization messed up

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
 
1
/* ***** BEGIN LICENSE BLOCK *****
 
2
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
3
 *
2
4
 * The contents of this file are subject to the Mozilla Public
3
5
 * License Version 1.1 (the "MPL"); you may not use this file
4
6
 * except in compliance with the MPL. You may obtain a copy of
16
18
 * Copyright (C) 2000 Ramalingam Saravanan. All Rights Reserved.
17
19
 *
18
20
 * Contributor(s):
 
21
 * Patrick Brunschwig <patrick@mozilla-enigmail.org>
19
22
 *
20
 
 * Alternatively, the contents of this file may be used under the
21
 
 * terms of the GNU General Public License (the "GPL"), in which case
22
 
 * the provisions of the GPL are applicable instead of
23
 
 * those above. If you wish to allow use of your version of this
24
 
 * file only under the terms of the GPL and not to allow
25
 
 * others to use your version of this file under the MPL, indicate
26
 
 * your decision by deleting the provisions above and replace them
27
 
 * with the notice and other provisions required by the GPL.
28
 
 * If you do not delete the provisions above, a recipient
29
 
 * may use your version of this file under either the MPL or the
30
 
 * GPL.
31
 
 */
 
23
 * Alternatively, the contents of this file may be used under the terms of
 
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
27
 * of those above. If you wish to allow use of your version of this file only
 
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
29
 * use your version of this file under the terms of the MPL, indicate your
 
30
 * decision by deleting the provisions above and replace them with the notice
 
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
32
 * the provisions above, a recipient may use your version of this file under
 
33
 * the terms of any one of the MPL, the GPL or the LGPL.
 
34
 * ***** END LICENSE BLOCK ***** */
32
35
 
33
 
#include "nsIGenericFactory.h"
34
 
#include "nsIPCModule.h"
35
36
#include "ipc.h"
36
 
 
37
 
#include "nsProcessInfo.h"
38
 
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProcessInfo)
 
37
#include "nsIClassInfoImpl.h"
39
38
 
40
39
#include "nsPipeTransport.h"
41
 
#include "nsPipeConsole.h"
42
 
#include "nsPipeChannel.h"
43
 
#include "nsPipeFilterListener.h"
44
40
#include "nsIPCBuffer.h"
45
41
 
 
42
#include "mozilla/ModuleUtils.h"
 
43
 
46
44
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPipeTransport)
47
 
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPipeConsole)
48
 
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPipeChannel)
49
 
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPipeFilterListener)
50
45
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIPCBuffer)
51
46
 
52
 
#include "nsIPCService.h"
53
 
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsIPCService, Init)
54
 
 
55
 
// CIDs implemented by module
56
 
static const nsModuleComponentInfo components[] =
57
 
{
58
 
 
59
 
    { NS_PROCESSINFO_CLASSNAME,
60
 
      NS_PROCESSINFO_CID,
61
 
      NS_PROCESSINFO_CONTRACTID,
62
 
      nsProcessInfoConstructor,
63
 
    },
64
 
 
65
 
    { NS_PIPETRANSPORT_CLASSNAME,
66
 
      NS_PIPETRANSPORT_CID,
67
 
      NS_PIPETRANSPORT_CONTRACTID,
68
 
      nsPipeTransportConstructor,
69
 
    },
70
 
 
71
 
    { NS_PIPECONSOLE_CLASSNAME,
72
 
      NS_PIPECONSOLE_CID,
73
 
      NS_PIPECONSOLE_CONTRACTID,
74
 
      nsPipeConsoleConstructor,
75
 
    },
76
 
 
77
 
    { NS_PIPECHANNEL_CLASSNAME,
78
 
      NS_PIPECHANNEL_CID,
79
 
      NS_PIPECHANNEL_CONTRACTID,
80
 
      nsPipeChannelConstructor,
81
 
    },
82
 
 
83
 
    { NS_PIPEFILTERLISTENER_CLASSNAME,
84
 
      NS_PIPEFILTERLISTENER_CID,
85
 
      NS_PIPEFILTERLISTENER_CONTRACTID,
86
 
      nsPipeFilterListenerConstructor,
87
 
    },
88
 
 
89
 
    { NS_IPCBUFFER_CLASSNAME,
90
 
      NS_IPCBUFFER_CID,
91
 
      NS_IPCBUFFER_CONTRACTID,
92
 
      nsIPCBufferConstructor,
93
 
    },
94
 
 
95
 
    { NS_IPCSERVICE_CLASSNAME,
96
 
      NS_IPCSERVICE_CID,
97
 
      NS_IPCSERVICE_CONTRACTID,
98
 
      nsIPCServiceConstructor,
99
 
    },
100
 
 
101
 
};
102
 
 
103
 
// Module entry point
104
 
NS_IMPL_NSGETMODULE(nsIPCModule, components)
 
47
NS_DEFINE_NAMED_CID(NS_PIPETRANSPORT_CID);
 
48
NS_DEFINE_NAMED_CID(NS_IPCBUFFER_CID);
 
49
 
 
50
const mozilla::Module::CIDEntry kIPCModuleCIDs[] = {
 
51
  { &kNS_PIPETRANSPORT_CID, false, NULL, nsPipeTransportConstructor },
 
52
  { &kNS_IPCBUFFER_CID, false, NULL, nsIPCBufferConstructor },
 
53
  { NULL }
 
54
};
 
55
 
 
56
const mozilla::Module::ContractIDEntry kIPCModuleContracts[] = {
 
57
  { NS_PIPETRANSPORT_CONTRACTID, &kNS_PIPETRANSPORT_CID },
 
58
  { NS_IPCBUFFER_CONTRACTID, &kNS_IPCBUFFER_CID },
 
59
  { NULL }
 
60
};
 
61
 
 
62
static const mozilla::Module kIPCModule = {
 
63
  mozilla::Module::kVersion,
 
64
  kIPCModuleCIDs,
 
65
  kIPCModuleContracts,
 
66
  NULL
 
67
};
 
68
 
 
69
NSMODULE_DEFN(nsIPCModule) = &kIPCModule;