Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

serverinterface.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef SERVER_INTERFACE_H
00021 #define SERVER_INTERFACE_H
00022 
00023 
00024 #include <qstring.h>
00025 #include <qpixmap.h>
00026 #include <qwidget.h>
00027 #include <qtopia/applnk.h>
00028 #include <qtopia/storage.h>
00029 
00030 
00031 class ServerInterface {
00032 public:
00033     virtual ~ServerInterface();
00034 
00035     virtual void createGUI() = 0;
00036     virtual void destroyGUI() = 0;
00037 
00038     // These notify of the application categories, like what is used in the current launcher tabs,
00039     // for example "Applications", "Games" etc.
00040     virtual void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap ) = 0;
00041     virtual void typeRemoved( const QString& type ) = 0;
00042 
00043     // These functions notify when an application is added or removed and to which category it belongs
00044     virtual void applicationAdded( const QString& type, const AppLnk& doc ) = 0;
00045     virtual void applicationRemoved( const QString& type, const AppLnk& doc ) = 0;
00046     virtual void allApplicationsRemoved() = 0;
00047     // Useful for wait icons, or running application lists etc
00048     enum ApplicationState { Launching, Running, Terminated };
00049     virtual void applicationStateChanged( const QString& name, ApplicationState state ) = 0;
00050     static const AppLnkSet& appLnks();
00051 
00052     // These functions notify of adding, removal and changes of document links used in the documents tab for example
00053     virtual void aboutToAddBegin() {}
00054     virtual void aboutToAddEnd() {}
00055     virtual void documentAdded( const DocLnk& doc ) = 0;
00056     virtual void documentRemoved( const DocLnk& doc ) = 0;
00057     virtual void allDocumentsRemoved() = 0;
00058     virtual void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) = 0;
00059 
00060     virtual void storageChanged( const QList<FileSystem> & ) = 0;
00061 
00062     virtual void applicationScanningProgress( int percent ) = 0;
00063     virtual void documentScanningProgress( int percent ) = 0;
00064 
00065     // Tells the server if the GUI needs to be updated about documents or applnks
00066     virtual bool requiresApplications() const = 0;
00067     virtual bool requiresDocuments() const = 0;
00068 
00069     enum DockArea { Top, Bottom, Left, Right };
00070     static void dockWidget( QWidget *w, DockArea placement );
00071 };
00072 
00073 
00074 #endif // SERVER_INTERFACE_H

Generated on Sat Nov 5 16:15:33 2005 for OPIE by  doxygen 1.4.2