Changed EphyHistoryWindow to use the new backend, some things still remain (selected_...
[ephy-soc.git] / embed / mozilla / ContentHandler.h
blobdecdebe5b3cfefa6da10e6777d73a6ef0e9837bf
1 /*
2 * Copyright © 2000-2003 Marco Pesenti Gritti,
3 * Copyright © 2003 Xan Lopez
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * $Id: ContentHandler.h 6952 2007-03-11 19:42:02Z chpe $
22 #ifndef CONTENT_HANDLER_H
23 #define CONTENT_HANDLER_H
25 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
27 #include <nsCOMPtr.h>
28 #include <nsIFile.h>
29 #include <nsIHelperAppLauncherDialog.h>
30 #include <nsIURI.h>
32 #include "ephy-file-helpers.h"
35 typedef enum
37 CONTENT_ACTION_OPEN = 1,
38 CONTENT_ACTION_OPEN_TMP,
39 CONTENT_ACTION_DOWNLOAD,
40 CONTENT_ACTION_SAVEAS,
41 CONTENT_ACTION_NONE
42 } ContentAction;
44 #define G_CONTENTHANDLER_CID \
45 { /* 16072c4a-23a6-4996-9beb-9335c06bbeae */ \
46 0x16072c4a, \
47 0x23a6, \
48 0x4996, \
49 {0x9b, 0xeb, 0x93, 0x35, 0xc0, 0x6b, 0xbe, 0xae} \
52 class GContentHandler : public nsIHelperAppLauncherDialog
54 public:
55 NS_DECL_ISUPPORTS
56 NS_DECL_NSIHELPERAPPLAUNCHERDIALOG
58 GContentHandler();
59 virtual ~GContentHandler();
61 NS_METHOD MIMEDoAction ();
62 ContentAction mAction;
63 private:
65 NS_METHOD Init ();
67 NS_METHOD MIMEInitiateAction ();
68 NS_METHOD MIMEConfirmAction ();
70 nsCOMPtr<nsIHelperAppLauncher> mLauncher;
71 nsCOMPtr<nsISupports> mContext;
73 GnomeVFSMimeApplication *mHelperApp;
74 EphyMimePermission mPermission;
76 nsCString mUrl;
77 nsCString mMimeType;
78 PRUint32 mUserTime;
81 #endif /* CONTENT_HANDLER_H */