• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

krfb

main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                                    main.cpp
00003                              -------------------
00004     begin                : Sat Dec  8 03:23:02 CET 2001
00005     copyright            : (C) 2001-2003 by Tim Jansen
00006     email                : tim@tjansen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "trayicon.h"
00019 //#include "configuration.h"
00020 #include "krfbserver.h"
00021 #include "manageinvitationsdialog.h"
00022 
00023 #include <QPixmap>
00024 #include <kaction.h>
00025 #include <kdebug.h>
00026 #include <KNotification>
00027 #include <ksystemtrayicon.h>
00028 #include <kcmdlineargs.h>
00029 #include <kaboutdata.h>
00030 #include <kaboutapplicationdialog.h>
00031 #include <klocale.h>
00032 #include <kapplication.h>
00033 #include <kmessagebox.h>
00034 #include <qwindowdefs.h>
00035 
00036 #include <signal.h>
00037 
00038 #define VERSION "1.0"
00039 
00040 static const char description[] = I18N_NOOP("VNC-compatible server to share "
00041                        "KDE desktops");
00042 
00043 
00044 int main(int argc, char *argv[])
00045 {
00046     KAboutData aboutData( "krfb", 0, ki18n("Desktop Sharing"),
00047         VERSION, ki18n(description), KAboutData::License_GPL,
00048         ki18n("(c) 2007, Alessandro Praduroux\n"
00049             "(c) 2001-2003, Tim Jansen\n"
00050         "(c) 2001, Johannes E. Schindelin\n"
00051         "(c) 2000, heXoNet Support GmbH, D-66424 Homburg\n"
00052         "(c) 2000-2001, Const Kaplinsky\n"
00053         "(c) 2000, Tridia Corporation\n"
00054         "(c) 1999, AT&T Laboratories Boston\n"));
00055     aboutData.addAuthor(ki18n("Alessandro Praduroux"), ki18n("KDE4 porting"), "pradu@pradu.it");
00056     aboutData.addAuthor(ki18n("Tim Jansen"), KLocalizedString(), "tim@tjansen.de");
00057     aboutData.addAuthor(ki18n("Ian Reinhart Geiser"), ki18n("DCOP interface"), "geiseri@kde.org");
00058     aboutData.addCredit(ki18n("Johannes E. Schindelin"),
00059                 ki18n("libvncserver"));
00060     aboutData.addCredit(ki18n("Const Kaplinsky"),
00061                 ki18n("TightVNC encoder"));
00062     aboutData.addCredit(ki18n("Tridia Corporation"),
00063                 ki18n("ZLib encoder"));
00064     aboutData.addCredit(ki18n("AT&T Laboratories Boston"),
00065                 ki18n("original VNC encoders and "
00066                       "protocol design"));
00067     aboutData.addCredit(ki18n("Jens Wagner (heXoNet Support GmbH)"),
00068                 ki18n("X11 update scanner, "
00069                       "original code base"));
00070     aboutData.addCredit(ki18n("Jason Spisak"),
00071                 ki18n("Connection side image"),
00072                 "kovalid@yahoo.com");
00073     aboutData.addCredit(ki18n("Karl Vogel"),
00074                 ki18n("KDesktop background deactivation"));
00075     KCmdLineArgs::init(argc, argv, &aboutData);
00076 
00077     KApplication app;
00078     TrayIcon trayicon(new ManageInvitationsDialog);
00079 
00080     KrfbServer *server = KrfbServer::self(); // initialize the server manager
00081     if (!server->checkX11Capabilities()) {
00082         return 1;
00083     }
00084 
00085     QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)),
00086              server, SLOT(enableDesktopControl(bool)));
00087     QObject::connect(server, SIGNAL(sessionEstablished(QString)),
00088              &trayicon, SLOT(showConnectedMessage(QString)));
00089     QObject::connect(server, SIGNAL(sessionFinished()),
00090              &trayicon, SLOT(showDisconnectedMessage()));
00091     QObject::connect(server, SIGNAL(desktopControlSettingChanged(bool)),
00092              &trayicon, SLOT(setDesktopControlSetting(bool)));
00093     QObject::connect(&trayicon, SIGNAL(quitSelected()),
00094              server, SLOT(disconnectAndQuit()));
00095     QObject::connect(server, SIGNAL(quitApp()),
00096                       &app, SLOT(quit()));
00097 
00098     sigset_t sigs;
00099     sigemptyset(&sigs);
00100     sigaddset(&sigs, SIGPIPE);
00101     sigprocmask(SIG_BLOCK, &sigs, 0);
00102 
00103     return app.exec();
00104 }
00105 

krfb

Skip menu "krfb"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal