Diffstat (limited to 'core/launcher/serverinterface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/serverinterface.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/core/launcher/serverinterface.h b/core/launcher/serverinterface.h new file mode 100644 index 0000000..e57ea51 --- a/dev/null +++ b/core/launcher/serverinterface.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef SERVER_INTERFACE_H | ||
21 | #define SERVER_INTERFACE_H | ||
22 | |||
23 | |||
24 | #include <qstring.h> | ||
25 | #include <qpixmap.h> | ||
26 | #include <qwidget.h> | ||
27 | #include <qtopia/applnk.h> | ||
28 | #include <qtopia/storage.h> | ||
29 | |||
30 | |||
31 | class ServerInterface { | ||
32 | public: | ||
33 | virtual ~ServerInterface(); | ||
34 | |||
35 | virtual void createGUI() = 0; | ||
36 | virtual void destroyGUI() = 0; | ||
37 | |||
38 | // These notify of the application categories, like what is used in the current launcher tabs, | ||
39 | // for example "Applications", "Games" etc. | ||
40 | virtual void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap ) = 0; | ||
41 | virtual void typeRemoved( const QString& type ) = 0; | ||
42 | |||
43 | // These functions notify when an application is added or removed and to which category it belongs | ||
44 | virtual void applicationAdded( const QString& type, const AppLnk& doc ) = 0; | ||
45 | virtual void applicationRemoved( const QString& type, const AppLnk& doc ) = 0; | ||
46 | virtual void allApplicationsRemoved() = 0; | ||
47 | // Useful for wait icons, or running application lists etc | ||
48 | enum ApplicationState { Launching, Running, Terminated }; | ||
49 | virtual void applicationStateChanged( const QString& name, ApplicationState state ) = 0; | ||
50 | static const AppLnkSet& appLnks(); | ||
51 | |||
52 | // These functions notify of adding, removal and changes of document links used in the documents tab for example | ||
53 | virtual void documentAdded( const DocLnk& doc ) = 0; | ||
54 | virtual void documentRemoved( const DocLnk& doc ) = 0; | ||
55 | virtual void allDocumentsRemoved() = 0; | ||
56 | virtual void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) = 0; | ||
57 | |||
58 | virtual void storageChanged( const QList<FileSystem> & ) = 0; | ||
59 | |||
60 | virtual void applicationScanningProgress( int percent ) = 0; | ||
61 | virtual void documentScanningProgress( int percent ) = 0; | ||
62 | |||
63 | // Tells the server if the GUI needs to be updated about documents or applnks | ||
64 | virtual bool requiresApplications() const = 0; | ||
65 | virtual bool requiresDocuments() const = 0; | ||
66 | |||
67 | enum DockArea { Top, Bottom, Left, Right }; | ||
68 | static void dockWidget( QWidget *w, DockArea placement ); | ||
69 | }; | ||
70 | |||
71 | |||
72 | #endif // SERVER_INTERFACE_H | ||