Qtopia Home - Classes - Annotated - Functions - Qt Embedded

center.h

This is the verbatim text of the center.h include file. It is provided only for illustration; the copyright remains with Trolltech.


/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** Licensees holding valid Qtopia Developer license may use this
** file in accordance with the Qtopia Developer License Agreement
** provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
** PURPOSE.
**
** email sales@trolltech.com for information about Qtopia License
** Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef __centerinterface_h__
#define __centerinterface_h__

#include <qtopia/qpeglobal.h>
#include <qstring.h>
#include <qstringlist.h>

class FileSystemOperator;
class Categories;
class EditCategoriesDialog;
class QAction;
struct DeviceConnectionInterface;
class DocLnkSet;

struct CenterInterface
{
    QPC_EXPORT static void setPluginTranslatorDir(const QString&);
    QPC_EXPORT static void loadPluginTranslator(const char* pluginid);

    virtual void displayStatusMessage( const QString& text, bool temp=false)=0;
    virtual void displayProgress( int done, int total ) = 0;
    virtual FileSystemOperator &fileSystemOperator() = 0;
    virtual void sendQCopMessage(const QString& channel,
				 const QString& message,
				 const QStringList& args) = 0;
    virtual void sendDcopCommand( QString destination, QString message ) = 0;
    virtual void onDcopCommand( QString sender, QString event ) = 0;
    virtual QString applicationDataPath() = 0;
    virtual bool isConnected() const = 0;

    virtual void setCategories( const Categories &) =0;
    virtual const Categories &categories() const = 0;
    virtual EditCategoriesDialog &categoriesEditor() = 0;
    virtual void syncCategories() = 0;

    enum TimeoutOptions { NormalTimeout=0, LongTimeout, NoTimeout };
    virtual void setConnectionTimeout( TimeoutOptions t ) = 0;
    virtual TimeoutOptions connectionTimeout() const = 0;

    virtual DeviceConnectionInterface *connection() const = 0;
    virtual DeviceConnectionInterface *getDevice( const QString & ) const = 0;
};

struct CardInfo
{
    QString name, path, options;
    int size;
};

struct ConnectionCenterInterface
{
    virtual void setConnection( DeviceConnectionInterface *, bool connected ) = 0;

    virtual void receivedMessage( const QString &message,
				  const QByteArray &data ) = 0;
    virtual void setCardInfo( const QValueList<CardInfo> & );
    virtual void setAllDocLinks( const DocLnkSet & );

    virtual const CenterInterface *center() const = 0;
    virtual CenterInterface *center() = 0;
};

#endif


Copyright © 2001-2004 Trolltech Trademarks
Qtopia version 2.0.1