• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

knotify.h
00001 /*
00002    Copyright (c) 1997 Christian Esken (esken@kde.org)
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef KNOTIFY_H
00021 #define KNOTIFY_H
00022 
00023 #include <tqobject.h>
00024 #include <knotifyclient.h>
00025 #include <dcopobject.h>
00026 
00027 class KNotifyPrivate;
00028 class KProcess;
00029 class KConfig;
00030 
00031 class KNotify : public TQObject, public DCOPObject
00032 {
00033 Q_OBJECT
00034 K_DCOP
00035 
00036 public:
00037     KNotify( bool useArts );
00038     ~KNotify();
00039 
00040     enum PlayingFinishedStatus
00041     {
00042         PlayedOK = 0,        // success, all following mean failure
00043         NoSoundFile,
00044         FileAlreadyPlaying,
00045         NoSoundSupport,
00046         PlayerBusy,
00047         Aborted,
00048         Unknown = 5000
00049     };
00050 
00051 protected:
00052 k_dcop:
00053     // deprecated
00054     void notify(const TQString &event, const TQString &fromApp,
00055                          const TQString &text, TQString sound, TQString file,
00056                          int present, int level);
00057 
00058     // deprecated
00059     void notify(const TQString &event, const TQString &fromApp,
00060                          const TQString &text, TQString sound, TQString file,
00061                          int present, int level, int winId);
00062 
00063     void notify(const TQString &event, const TQString &fromApp,
00064                          const TQString &text, TQString sound, TQString file,
00065                          int present, int level, int winId, int eventId);
00066 
00067 
00068     void reconfigure();
00069     void setVolume( int volume );
00070         void sessionReady(); // from ksmserver
00071 
00072 private:
00073     bool notifyBySound(const TQString &sound, const TQString &appname, int eventId);
00074     bool notifyByMessagebox(const TQString &text, int level, WId winId);
00075     bool notifyByLogfile(const TQString &text, const TQString &file);
00076     bool notifyByStderr(const TQString &text);
00077     bool notifyByPassivePopup(const TQString &text, const TQString &appName,
00078                                   KConfig* eventsFile, WId winId );
00079     bool notifyByExecute(const TQString &command, 
00080                              const TQString& event, 
00081                              const TQString& fromApp, 
00082                              const TQString& text,
00083                              int winId,
00084                              int eventId );
00085     bool notifyByTaskbar( WId winId );
00086     
00087     bool isPlaying( const TQString& soundFile ) const;
00088 
00089     void soundFinished( int eventId, PlayingFinishedStatus reason );
00090     void abortFirstPlayObject();
00091     
00092         WId checkWinId( const TQString& appName, WId senderWinId );
00093 
00097     bool isGlobal(const TQString &eventname);
00098 
00099 private slots:
00100     void playTimeout();
00101     void slotPlayerProcessExited( KProcess *proc );
00102     void restartedArtsd();
00103 
00104 private:
00105     KNotifyPrivate* d;
00106     void loadConfig();
00107 };
00108 
00109 
00110 #endif
00111 

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for arts by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |