aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyProtocolHandler.h
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-26 06:08:01 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-26 06:08:01 +0800
commitc951555722d4933277a1d468c6508f5ad34711b1 (patch)
tree13d85691d343cc9315e9c172df44d5d80d64a3e4 /embed/mozilla/EphyProtocolHandler.h
parent2029610e09684f3dec57d3b00af6084f97699fe2 (diff)
downloadgsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar.gz
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar.bz2
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar.lz
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar.xz
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.tar.zst
gsoc2013-epiphany-c951555722d4933277a1d468c6508f5ad34711b1.zip
Add protocol handler, which I'll use for our custom error pages. Since
2005-05-26 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyProtocolHandler.cpp: * embed/mozilla/EphyProtocolHandler.h: * embed/mozilla/EphyUtils.cpp: * embed/mozilla/EphyUtils.h: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/Makefile.am: * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozRegisterComponents.cpp: Add protocol handler, which I'll use for our custom error pages. Since it's almost gratis, add about:epiphany back.
Diffstat (limited to 'embed/mozilla/EphyProtocolHandler.h')
-rw-r--r--embed/mozilla/EphyProtocolHandler.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/embed/mozilla/EphyProtocolHandler.h b/embed/mozilla/EphyProtocolHandler.h
new file mode 100644
index 000000000..332a20a5c
--- /dev/null
+++ b/embed/mozilla/EphyProtocolHandler.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2001 Matt Aubury, Philip Langdale
+ * Copyright (C) 2004 Crispin Flowerday
+ * Copyright (C) 2005 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ */
+
+#ifndef EPHY_PROTOCOL_HANDLER_H
+#define EPHY_PROTOCOL_HANDLER_H
+
+#include <nsError.h>
+#include <nsIAboutModule.h>
+#include <nsIProtocolHandler.h>
+
+/* a9aea13e-21de-4be8-a07e-a05f11658c55 */
+#define EPHY_PROTOCOL_HANDLER_CID \
+{ 0xa9aea13e, 0x21de, 0x4be8, \
+ { 0xa0, 0x7e, 0xa0, 0x5f, 0x11, 0x65, 0x8c, 0x55 } }
+
+#define EPHY_PROTOCOL_HANDLER_CONTRACTID NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "epiphany"
+#define EPHY_PROTOCOL_HANDLER_CLASSNAME "Epiphany Protocol Handler"
+#define EPHY_ABOUT_CONTRACTID NS_ABOUT_MODULE_CONTRACTID_PREFIX "epiphany"
+#define EPHY_ABOUT_CLASSNAME "Epiphany's about:epiphany"
+
+class nsIChannel;
+class nsIOutputStream;
+class nsIURI;
+
+class EphyProtocolHandler : public nsIProtocolHandler,
+ public nsIAboutModule
+{
+ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIPROTOCOLHANDLER
+
+ EphyProtocolHandler (void);
+ virtual ~EphyProtocolHandler();
+
+ private:
+ nsresult Redirect (const nsACString&, nsIChannel**);
+};
+
+#endif /* EPHY_PROTOCOL_HANDLER_H */