summaryrefslogtreecommitdiffstats
path: root/konqueror/KonquerorIface.h
blob: 508feda85a7943080727d5fdaebfada2a6dd2ced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* This file is part of the KDE project
   Copyright (C) 2000 Simon Hausmann <[email protected]>
   Copyright (C) 2000 David Faure <[email protected]>

   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 of the License, 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; see the file COPYING.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef __KonquerorIface_h__
#define __KonquerorIface_h__

#include <dcopobject.h>
#include <tqvaluelist.h>
#include <dcopref.h>

#include <tqstringlist.h>
/**
 * DCOP interface for konqueror
 */
class KonquerorIface : virtual public DCOPObject
{
  K_DCOP
public:

  KonquerorIface();
  ~KonquerorIface();

k_dcop:

  /**
   * Opens a new window for the given @p url (using createSimpleWindow, i.e. a single view)
   */
  DCOPRef openBrowserWindow( const TQString &url );
  /**
   * Like @ref openBrowserWindow , with setting the application startup notification ( ASN )
   * property on the window.
   */
  DCOPRef openBrowserWindowASN( const TQString &url, const TQCString &startup_id );

  /**
   * Opens a new window for the given @p url (using createNewWindow, i.e. with an appropriate profile)
   */
  DCOPRef createNewWindow( const TQString &url );
  /**
   * Like @ref createNewWindow , with setting the application startup notification ( ASN )
   * property on the window.
   */
  DCOPRef createNewWindowASN( const TQString &url, const TQCString &startup_id, bool tempFile );

  /**
   * Opens a new window like @ref createNewWindow, then selects the given @p filesToSelect
   */
  DCOPRef createNewWindowWithSelection( const TQString &url, TQStringList filesToSelect );
  /**
   * Like @ref createNewWindowWithSelection, with setting the application startup notification ( ASN )
   * property on the window.
   */
  DCOPRef createNewWindowWithSelectionASN( const TQString &url, TQStringList filesToSelect, const TQCString &startup_id );

  /**
   * Opens a new window for the given @p url (using createNewWindow, i.e. with an appropriate profile)
   * @param mimetype to speed it up.
   */
  DCOPRef createNewWindow( const TQString &url, const TQString & mimetype, bool tempFile );
  /**
   * Like @ref createNewWindow , with setting the application startup notification ( ASN )
   * property on the window.
   */
  DCOPRef createNewWindowASN( const TQString &url, const TQString & mimetype,
      const TQCString &startup_id, bool tempFile );

  /**
   * As the name says, this creates a window from a profile.
   * Used for instance by khelpcenter.
   */
  DCOPRef createBrowserWindowFromProfile( const TQString &path );
  /**
   * Like @ref createBrowserWindowFromProfile , with setting the application startup
   * notification ( ASN ) property on the window.
   */
  DCOPRef createBrowserWindowFromProfileASN( const TQString &path, const TQCString &startup_id );

  /**
   * As the name says, this creates a window from a profile.
   * Used for instance by kfmclient.
   * @param path full path to the profile file
   * @param filename name of the profile file, if under the profiles dir
   */
  DCOPRef createBrowserWindowFromProfile( const TQString &path, const TQString &filename );
  /**
   * Like @ref createBrowserWindowFromProfile , with setting the application startup
   * notification ( ASN ) property on the window.
   */
  DCOPRef createBrowserWindowFromProfileASN( const TQString &path, const TQString &filename,
      const TQCString &startup_id );

  /**
   * Creates a window from a profile and a URL.
   * Used by kfmclient to open http URLs with the webbrowsing profile
   * and others with the filemanagement profile.
   * @param path full path to the profile file
   * @param filename name of the profile file, if under the profiles dir
   * @param url the URL to open
   */
  DCOPRef createBrowserWindowFromProfileAndURL( const TQString &path, const TQString &filename, const TQString &url );
  /**
   * Like @ref createBrowserWindowFromProfileAndURL , with setting the application startup
   * notification ( ASN ) property on the window.
   */
  DCOPRef createBrowserWindowFromProfileAndURLASN( const TQString &path, const TQString &filename, const TQString &url,
      const TQCString &startup_id );

  /**
   * Creates a window the fastest way : the caller has to provide
   * profile, URL, and mimetype.
   * @param path full path to the profile file
   * @param filename name of the profile file, if under the profiles dir
   * @param url the URL to open
   * @param mimetype the mimetype that the URL we want to open has
   */
  DCOPRef createBrowserWindowFromProfileAndURL( const TQString &path, const TQString &filename, const TQString &url, const TQString &mimetype );
  /**
   * Like @ref createBrowserWindowFromProfileAndURL , with setting the application startup
   * notification ( ASN ) property on the window.
   */
  DCOPRef createBrowserWindowFromProfileAndURLASN( const TQString &path, const TQString &filename, const TQString &url, const TQString &mimetype,
      const TQCString& startup_id );

  /**
   * Called by kcontrol when the global configuration changes
   */
  ASYNC reparseConfiguration();

  /**
   * @return the name of the instance's crash log file
   */
  TQString crashLogFile();

  /**
   * @return a list of references to all the windows
   */
  TQValueList<DCOPRef> getWindows();

  /**
   *  Called internally as broadcast when the user adds/removes/renames a view profile
    */
  ASYNC updateProfileList();

  /**
   * Called internally as broadcast when a URL is to be added to the combobox.
   */
  ASYNC addToCombo( TQString, TQCString );

  /**
   * Called internall as broadcast when a URL has to be removed from the combo.
   */
  ASYNC removeFromCombo( TQString, TQCString );

  /**
   * Called internally as a broadcast when the combobox was cleared.
   */
  ASYNC comboCleared( TQCString );

  /**
   * Used by kfmclient when the 'minimize memory usage' setting is set
   * to find out if this konqueror can be used.
   */
  bool processCanBeReused( int screen );

  /**
   * Called from konqy_preloader to terminate this Konqueror instance,
   * if it's in the preloaded mode, and there are too many preloaded Konqy's
   */
  ASYNC terminatePreloaded();
};

#endif