• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • java
kjavaappletserver.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /* This file is part of the KDE project
4  *
5  * Copyright (C) 2000 Richard Moore <rich@kde.org>
6  * 2000 Wynn Wilkes <wynnw@caldera.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public License
19  * along with this library; see the file COPYING.LIB. If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef KJAVAAPPLETSERVER_H
25 #define KJAVAAPPLETSERVER_H
26 
27 #include "kjavaprocess.h"
28 #include <QtCore/QObject>
29 #include <QtCore/QMap>
30 #include <QtCore/QSize>
31 
38 class KJavaAppletContext;
39 class KJavaAppletServerPrivate;
40 class JSStackFrame;
41 
42 class KJavaAppletServer : public QObject
43 {
44 Q_OBJECT
45 
46 public:
51  KJavaAppletServer();
52  ~KJavaAppletServer();
53 
58  static KJavaAppletServer *allocateJavaServer();
59 
64  static void freeJavaServer();
65 
71  static QString getAppletLabel();
72 
76  void createContext( int contextId, KJavaAppletContext* context );
77 
82  void destroyContext( int contextId );
83 
88  bool createApplet( int contextId, int appletId,
89  const QString & name, const QString & clazzName,
90  const QString & baseURL, const QString & user,
91  const QString & password, const QString & authname,
92  const QString & codeBase, const QString & jarFile,
93  QSize size, const QMap<QString, QString>& params,
94  const QString & windowTitle );
95 
99  void initApplet( int contextId, int appletId );
100 
104  void destroyApplet( int contextId, int appletId );
105 
109  void startApplet( int contextId, int appletId );
110 
114  void stopApplet( int contextId, int appletId );
115 
119  void showConsole();
120 
125  void sendURLData( int loaderID, int code, const QByteArray& data );
129  void removeDataJob( int loaderID );
130 
134  void quit();
135  KJavaProcess* javaProcess() { return process; }
136 
137  QString appletLabel();
138 
139  void waitForReturnData(JSStackFrame *);
140  void endWaitForReturnData();
141 
142  bool getMember(QStringList & args, QStringList & ret_args);
143  bool putMember(QStringList & args);
144  bool callMember(QStringList & args, QStringList & ret_args);
145  void derefObject(QStringList & args);
146 
147  bool usingKIO();
148 protected:
149  void setupJava( KJavaProcess* p );
150 
151  KJavaProcess* process;
152 
153 protected Q_SLOTS:
154  void slotJavaRequest( const QByteArray& qb );
155  void checkShutdown();
156  void timerEvent(QTimerEvent *);
157  void killTimers();
158 
159 private:
160  KJavaAppletServerPrivate* const d;
161 
162 };
163 
164 
165 class PermissionDialog : public QObject
166 {
167  Q_OBJECT
168 public:
169  PermissionDialog( QWidget* );
170  ~PermissionDialog();
171 
172  QString exec( const QString & cert, const QString & perm );
173 
174 private Q_SLOTS:
175  void clicked();
176 
177 private:
178  QString m_button;
179 };
180 
181 #endif // KJAVAAPPLETSERVER_H
KJavaAppletServer::KJavaAppletServer
KJavaAppletServer()
Create the applet server.
Definition: kjavaappletserver.cpp:135
KJavaAppletServer::killTimers
void killTimers()
Definition: kjavaappletserver.cpp:711
KJavaAppletServer::checkShutdown
void checkShutdown()
Definition: kjavaappletserver.cpp:209
KJavaAppletServer::usingKIO
bool usingKIO()
Definition: kjavaappletserver.cpp:777
KJavaAppletServer::waitForReturnData
void waitForReturnData(JSStackFrame *)
Definition: kjavaappletserver.cpp:730
KJavaAppletServer::createContext
void createContext(int contextId, KJavaAppletContext *context)
Create an applet context with the specified id.
Definition: kjavaappletserver.cpp:316
KJavaAppletServer::getAppletLabel
static QString getAppletLabel()
This allows the KJavaAppletWidget to display some feedback in a QLabel while the applet is being load...
Definition: kjavaappletserver.cpp:165
QWidget
KJavaAppletServer::removeDataJob
void removeDataJob(int loaderID)
Removes KJavaDownloader from the list (deletes it too).
Definition: kjavaappletserver.cpp:452
name
const char * name(StandardAction id)
KJavaAppletServer::stopApplet
void stopApplet(int contextId, int appletId)
Stop the specified applet.
Definition: kjavaappletserver.cpp:427
QString
QObject
KJavaAppletServer::appletLabel
QString appletLabel()
Definition: kjavaappletserver.cpp:173
KJavaAppletServer::createApplet
bool createApplet(int contextId, int appletId, const QString &name, const QString &clazzName, const QString &baseURL, const QString &user, const QString &password, const QString &authname, const QString &codeBase, const QString &jarFile, QSize size, const QMap< QString, QString > &params, const QString &windowTitle)
Create an applet in the specified context with the specified id.
Definition: kjavaappletserver.cpp:339
PermissionDialog::exec
QString exec(const QString &cert, const QString &perm)
Definition: kjavaappletserver.cpp:786
kjavaprocess.h
KJavaAppletServer::initApplet
void initApplet(int contextId, int appletId)
This should be called by the KJavaAppletWidget.
Definition: kjavaappletserver.cpp:397
KJavaAppletServer::derefObject
void derefObject(QStringList &args)
Definition: kjavaappletserver.cpp:773
QStringList
KJavaAppletServer::showConsole
void showConsole()
Show java console.
Definition: kjavaappletserver.cpp:437
PermissionDialog::~PermissionDialog
~PermissionDialog()
Definition: kjavaappletserver.cpp:837
KJavaAppletServer
Definition: kjavaappletserver.h:42
PermissionDialog
Definition: kjavaappletserver.h:165
KJavaAppletServer::putMember
bool putMember(QStringList &args)
Definition: kjavaappletserver.cpp:752
KJavaAppletServer::setupJava
void setupJava(KJavaProcess *p)
Definition: kjavaappletserver.cpp:218
KJavaAppletServer::~KJavaAppletServer
~KJavaAppletServer()
Definition: kjavaappletserver.cpp:155
KJavaAppletServer::getMember
bool getMember(QStringList &args, QStringList &ret_args)
Definition: kjavaappletserver.cpp:742
KJavaAppletServer::sendURLData
void sendURLData(int loaderID, int code, const QByteArray &data)
Send data we got back from a KJavaDownloader back to the appropriate class loader.
Definition: kjavaappletserver.cpp:443
KJavaAppletServer::destroyContext
void destroyContext(int contextId)
Destroy the applet context with the specified id.
Definition: kjavaappletserver.cpp:328
KJavaAppletServer::endWaitForReturnData
void endWaitForReturnData()
Definition: kjavaappletserver.cpp:716
KJavaAppletServer::startApplet
void startApplet(int contextId, int appletId)
Start the specified applet.
Definition: kjavaappletserver.cpp:417
KJavaAppletServer::process
KJavaProcess * process
Definition: kjavaappletserver.h:151
QSize
KJavaAppletContext
Definition: kjavaappletcontext.h:45
PermissionDialog::PermissionDialog
PermissionDialog(QWidget *)
Definition: kjavaappletserver.cpp:782
KJavaAppletServer::freeJavaServer
static void freeJavaServer()
When you are done using your reference to the AppletServer, you must dereference it by calling freeJa...
Definition: kjavaappletserver.cpp:190
KJavaAppletServer::callMember
bool callMember(QStringList &args, QStringList &ret_args)
Definition: kjavaappletserver.cpp:763
KJavaAppletServer::quit
void quit()
Shut down the KJAS server.
Definition: kjavaappletserver.cpp:461
KJavaAppletServer::timerEvent
void timerEvent(QTimerEvent *)
Definition: kjavaappletserver.cpp:725
KJavaAppletServer::slotJavaRequest
void slotJavaRequest(const QByteArray &qb)
Definition: kjavaappletserver.cpp:469
KJavaProcess
Definition: kjavaprocess.h:41
KJavaAppletServer::allocateJavaServer
static KJavaAppletServer * allocateJavaServer()
A factory method that returns the default server.
Definition: kjavaappletserver.cpp:178
QMap< QString, QString >
KJavaAppletServer::destroyApplet
void destroyApplet(int contextId, int appletId)
Destroy an applet in the specified context with the specified id.
Definition: kjavaappletserver.cpp:407
KJavaAppletServer::javaProcess
KJavaProcess * javaProcess()
Definition: kjavaappletserver.h:135
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal