Qtopia library API Documentation

qlibrary.h

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 
00021 #ifndef QLIBRARY_H
00022 #define QLIBRARY_H
00023 
00024 #include <qstring.h>
00025 
00026 #ifndef QT_NO_COMPONENT
00027 
00028 #include <qpe/qcom.h>
00029 
00030 class QLibraryPrivate;
00031 
00032 class Q_EXPORT QLibrary
00033 {
00034 public:
00035     enum Policy
00036     {
00037     Delayed,
00038     Immediately,
00039     Manual
00040     };
00041 
00042     QLibrary( const QString& filename, Policy = Delayed );
00043     ~QLibrary();
00044 
00045     void *resolve( const char* );
00046     static void *resolve( const QString &filename, const char * );
00047 
00048     bool unload( bool force = FALSE );
00049     bool isLoaded() const;
00050 
00051     void setPolicy( Policy pol );
00052     Policy policy() const;
00053 
00054     QString library() const;
00055 
00056     QRESULT queryInterface( const QUuid&, QUnknownInterface** );
00057 
00058 private:
00059     bool load();
00060     void createInstanceInternal();
00061 
00062     QLibraryPrivate *d;
00063 
00064     QString libfile;
00065     Policy libPol;
00066     QUnknownInterface *entry;
00067 
00068 private:    // Disabled copy constructor and operator=
00069 #if defined(Q_DISABLE_COPY)
00070     QLibrary( const QLibrary & );
00071     QLibrary &operator=( const QLibrary & );
00072 #endif
00073 };
00074 
00075 #endif // QT_NO_COMPONENT
00076 
00077 #endif //QLIBRARY_H
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:06 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001