\section{KService Class Reference}
\label{classKService}\index{KService@{KService}}
Represent a service, i.e.  


{\tt \#include $<$kservice.h$>$}

Inheritance diagram for KService:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKService__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KService:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=312pt]{classKService__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef {\bf KShared\-Ptr}$<$ {\bf KService} $>$ {\bf Ptr}\label{classKService_w0}

\item 
typedef {\bf QValue\-List}$<$ {\bf Ptr} $>$ {\bf List}\label{classKService_w1}

\item 
enum {\bf DCOPService\-Type\_\-t} \{ {\bf DCOP\_\-None} =  0, 
{\bf DCOP\_\-Unique}, 
{\bf DCOP\_\-Multi}, 
{\bf DCOP\_\-Wait}
 \}
\begin{CompactList}\small\item\em \begin{itemize}
\item None - This service has no DCOP support \item Unique - This service provides a unique DCOP service. \end{itemize}
\item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KService} (const  {\bf QString} \&\_\-name, const  {\bf QString} \&\_\-exec, const  {\bf QString} \&\_\-icon)
\begin{CompactList}\small\item\em Construct a temporary service with a given name, exec-line and icon. \item\end{CompactList}\item 
{\bf KService} (const  {\bf QString} \&\_\-fullpath)
\begin{CompactList}\small\item\em Construct a service and take all information from a config file. \item\end{CompactList}\item 
{\bf KService} ({\bf KDesktop\-File} $\ast$config)
\begin{CompactList}\small\item\em Construct a service and take all information from a desktop file. \item\end{CompactList}\item 
{\bf KService} ({\bf QData\-Stream} \&\_\-str, int {\bf offset})\label{classKService_a3}

\item 
virtual {\bf QString} {\bf type} () const 
\item 
virtual {\bf QString} {\bf name} () const 
\item 
{\bf QString} {\bf exec} () const 
\item 
{\bf QString} {\bf library} () const 
\item 
{\bf QString} {\bf init} () const 
\item 
{\bf QString} {\bf icon} () const 
\item 
{\bf QPixmap} {\bf pixmap} ({\bf KIcon::Group} \_\-group, int \_\-force\_\-size=0, int \_\-state=0, {\bf QString} $\ast$\_\-path=0L) const 
\item 
bool {\bf terminal} () const 
\item 
{\bf QString} {\bf terminal\-Options} () const 
\item 
bool {\bf substitute\-Uid} () const 
\item 
{\bf QString} {\bf username} () const 
\item 
{\bf QString} {\bf desktop\-Entry\-Path} () const 
\item 
{\bf QString} {\bf desktop\-Entry\-Name} () const 
\item 
{\bf DCOPService\-Type\_\-t} {\bf DCOPService\-Type} () const 
\item 
{\bf QString} {\bf path} () const 
\item 
{\bf QString} {\bf comment} () const 
\item 
{\bf QString} {\bf generic\-Name} () const 
\item 
{\bf QString\-List} {\bf keywords} () const 
\item 
{\bf QString\-List} {\bf categories} () const 
\item 
{\bf QString\-List} {\bf service\-Types} () const 
\item 
bool {\bf has\-Service\-Type} (const  {\bf QString} \&\_\-service) const 
\item 
bool {\bf allow\-As\-Default} () const 
\item 
bool {\bf allow\-Multiple\-Files} () const 
\item 
int {\bf initial\-Preference} () const 
\begin{CompactList}\small\item\em What preference to associate with this service initially (before the user has had any chance to define a profile for it) The bigger the value, the most preferred the service is. \item\end{CompactList}\item 
void {\bf set\-Initial\-Preference} (int i)\label{classKService_a29}

\item 
bool {\bf no\-Display} () const 
\begin{CompactList}\small\item\em Whether the entry should be suppressed in menus. \item\end{CompactList}\item 
{\bf QString} {\bf parent\-App} () const 
\begin{CompactList}\small\item\em Name of the application this service belongs to. \item\end{CompactList}\item 
virtual {\bf QVariant} {\bf property} (const  {\bf QString} \&\_\-name) const 
\item 
virtual {\bf QString\-List} {\bf property\-Names} () const 
\item 
bool {\bf is\-Valid} () const 
\item 
virtual void {\bf load} ({\bf QData\-Stream} \&)\label{classKService_a35}

\item 
virtual void {\bf save} ({\bf QData\-Stream} \&)\label{classKService_a36}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Ptr} {\bf service\-By\-Name} (const  {\bf QString} \&\_\-name)
\begin{CompactList}\small\item\em Find a service by name, i.e. \item\end{CompactList}\item 
{\bf Ptr} {\bf service\-By\-Desktop\-Path} (const  {\bf QString} \&\_\-name)
\begin{CompactList}\small\item\em Find a service by its relative path to the applnk or services directory, for instance \char`\"{}Internet/konqbrowser.desktop\char`\"{}. \item\end{CompactList}\item 
{\bf Ptr} {\bf service\-By\-Desktop\-Name} (const  {\bf QString} \&\_\-name)
\begin{CompactList}\small\item\em Find a service by the name of its desktop file, not depending on its actual location (as long as it's under the applnk or service directories). \item\end{CompactList}\item 
{\bf List} {\bf all\-Services} ()
\item 
{\bf List} {\bf all\-Init\-Services} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf init} ({\bf KDesktop\-File} $\ast$config)\label{classKService_b0}

\item 
{\bf QString\-List} \& {\bf access\-Service\-Types} ()\label{classKService_b1}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKService_b2}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KBuild\-Sycoca}\label{classKService_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Represent a service, i.e. 

an application bound to one or several mimetypes (or servicetypes) as written in its desktop entry file.

A service may be a library, too. The starting point you need is often the static methods.

\begin{Desc}
\item[Author:]Torben Weis $<${\tt weis@kde.org}$>$ \end{Desc}




Definition at line 43 of file kservice.h.

\subsection{Member Enumeration Documentation}
\index{KService@{KService}!DCOPServiceType_t@{DCOPServiceType\_\-t}}
\index{DCOPServiceType_t@{DCOPServiceType\_\-t}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KService::DCOPService\-Type\_\-t}}\label{classKService_w6}


\begin{itemize}
\item None - This service has no DCOP support \item Unique - This service provides a unique DCOP service. \end{itemize}


The service name is equal to the desktop\-Entry\-Name. \begin{itemize}
\item Multi - This service provides a DCOP service which can be run with multiple instances in parallel. The service name of an instance is equal to the desktop\-Entry\-Name + \char`\"{}-\char`\"{} + the PID of the process. \item Wait - This service has no DCOP support, the launcher will wait till it is finished. \end{itemize}


Definition at line 162 of file kservice.h.

Referenced by DCOPService\-Type().

\subsection{Constructor \& Destructor Documentation}
\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService (const {\bf QString} \& {\em \_\-name}, const {\bf QString} \& {\em \_\-exec}, const {\bf QString} \& {\em \_\-icon})}\label{classKService_a0}


Construct a temporary service with a given name, exec-line and icon. 



Definition at line 58 of file kservice.cpp.

References KSycoca\-Entry::m\_\-b\-Deleted.\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService (const {\bf QString} \& {\em \_\-fullpath})}\label{classKService_a1}


Construct a service and take all information from a config file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-fullpath}]Full path to the config file. \end{description}
\end{Desc}


Definition at line 74 of file kservice.cpp.

References init().\index{KService@{KService}!KService@{KService}}
\index{KService@{KService}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KService::KService ({\bf KDesktop\-File} $\ast$ {\em config})}\label{classKService_a2}


Construct a service and take all information from a desktop file. 



Definition at line 82 of file kservice.cpp.

References init().

\subsection{Member Function Documentation}
\index{KService@{KService}!type@{type}}
\index{type@{type}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KService::type () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a5}


\begin{Desc}
\item[Returns:]the type of the service (\char`\"{}Application\char`\"{} or \char`\"{}Service\char`\"{}). \end{Desc}


Definition at line 85 of file kservice.h.\index{KService@{KService}!name@{name}}
\index{name@{name}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QString} KService::name () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a6}


\begin{Desc}
\item[Returns:]the name of the service. \end{Desc}


Implements {\bf KSycoca\-Entry}.

Definition at line 89 of file kservice.h.\index{KService@{KService}!exec@{exec}}
\index{exec@{exec}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::exec () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a7}


\begin{Desc}
\item[Returns:]the command that the service executes. \end{Desc}


Definition at line 93 of file kservice.h.

Referenced by KRun::process\-Desktop\-Exec().\index{KService@{KService}!library@{library}}
\index{library@{library}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::library () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a8}


\begin{Desc}
\item[Returns:]the name of the library that contains the services implementation. \end{Desc}


Definition at line 98 of file kservice.h.\index{KService@{KService}!init@{init}}
\index{init@{init}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::init () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a9}


\begin{Desc}
\item[Returns:]the name of the init function to call in this service during startup of {\bf KDE}. (KControl modules only) \end{Desc}


Definition at line 103 of file kservice.h.

Referenced by KService().\index{KService@{KService}!icon@{icon}}
\index{icon@{icon}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::icon () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a10}


\begin{Desc}
\item[Returns:]the icon associated with the service. \end{Desc}


Definition at line 108 of file kservice.h.\index{KService@{KService}!pixmap@{pixmap}}
\index{pixmap@{pixmap}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KService::pixmap ({\bf KIcon::Group} {\em \_\-group}, int {\em \_\-force\_\-size} = 0, int {\em \_\-state} = 0, {\bf QString} $\ast$ {\em \_\-path} = 0L) const}\label{classKService_a11}


\begin{Desc}
\item[Returns:]a pixmap for this service (finds and loads {\bf icon()}{\rm (p.\,\pageref{classKService_a10})}) \end{Desc}


Definition at line 260 of file kservice.cpp.

References KIcon\-Loader::add\-Extra\-Desktop\-Themes(), KIcon\-Loader::extra\-Desktop\-Themes\-Added(), KGlobal::icon\-Loader(), QPixmap::is\-Null(), KIcon\-Loader::load\-Icon(), and pixmap().

Referenced by pixmap().\index{KService@{KService}!terminal@{terminal}}
\index{terminal@{terminal}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::terminal () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a12}


\begin{Desc}
\item[Returns:]true if the service is to be run in a terminal. \end{Desc}


Definition at line 117 of file kservice.h.

Referenced by KRun::process\-Desktop\-Exec().\index{KService@{KService}!terminalOptions@{terminalOptions}}
\index{terminalOptions@{terminalOptions}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::terminal\-Options () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a13}


\begin{Desc}
\item[Returns:]any options associated with the terminal the service runs in, if it requires a terminal.\end{Desc}
The service must be a tty-oriented program. 

Definition at line 124 of file kservice.h.

Referenced by KRun::process\-Desktop\-Exec().\index{KService@{KService}!substituteUid@{substituteUid}}
\index{substituteUid@{substituteUid}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::substitute\-Uid () const}\label{classKService_a14}


\begin{Desc}
\item[Returns:]true if the service has to be run under a different uid. \end{Desc}


Definition at line 528 of file kservice.cpp.

References QVariant::is\-Valid(), property(), and QVariant::to\-Bool().

Referenced by KRun::process\-Desktop\-Exec().\index{KService@{KService}!username@{username}}
\index{username@{username}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::username () const}\label{classKService_a15}


\begin{Desc}
\item[Returns:]the username under which the service has to be run. \end{Desc}


Definition at line 533 of file kservice.cpp.

References QString::is\-Empty(), QVariant::is\-Valid(), property(), and QVariant::to\-String().

Referenced by KRun::process\-Desktop\-Exec().\index{KService@{KService}!desktopEntryPath@{desktopEntryPath}}
\index{desktopEntryPath@{desktopEntryPath}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::desktop\-Entry\-Path () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a16}


\begin{Desc}
\item[Returns:]the path to the location where the service desktop entry is stored.\end{Desc}
This is a relative path if the desktop entry was found in any of the locations pointed to by \$KDEDIRS (e.g. \char`\"{}Internet/kppp.desktop\char`\"{}) It is a full path if the desktop entry originates from another location. 

Definition at line 143 of file kservice.h.

References KSycoca\-Entry::entry\-Path().

Referenced by KRun::run().\index{KService@{KService}!desktopEntryName@{desktopEntryName}}
\index{desktopEntryName@{desktopEntryName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::desktop\-Entry\-Name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a17}


\begin{Desc}
\item[Returns:]the filename of the service desktop entry without any extension. E.g. \char`\"{}kppp\char`\"{} \end{Desc}


Definition at line 149 of file kservice.h.

Referenced by KRun::run().\index{KService@{KService}!DCOPServiceType@{DCOPServiceType}}
\index{DCOPServiceType@{DCOPServiceType}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DCOPService\-Type\_\-t} KService::DCOPService\-Type () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a18}


\begin{Desc}
\item[Returns:]The {\bf DCOPService\-Type}{\rm (p.\,\pageref{classKService_a18})} supported by this service. \end{Desc}


Definition at line 167 of file kservice.h.

References DCOPService\-Type\_\-t.\index{KService@{KService}!path@{path}}
\index{path@{path}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::path () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a19}


\begin{Desc}
\item[Returns:]the working directory to run the program in. \end{Desc}


Definition at line 172 of file kservice.h.\index{KService@{KService}!comment@{comment}}
\index{comment@{comment}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::comment () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a20}


\begin{Desc}
\item[Returns:]the descriptive comment for the service, if there is one. \end{Desc}


Definition at line 177 of file kservice.h.\index{KService@{KService}!genericName@{genericName}}
\index{genericName@{genericName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::generic\-Name () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a21}


\begin{Desc}
\item[Returns:]the generic name for the service, if there is one. (e.g. \char`\"{}Mail Client\char`\"{}) \end{Desc}


Definition at line 183 of file kservice.h.\index{KService@{KService}!keywords@{keywords}}
\index{keywords@{keywords}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::keywords () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a22}


\begin{Desc}
\item[Returns:]a list of descriptive keywords the service, if there are any. \end{Desc}


Definition at line 188 of file kservice.h.\index{KService@{KService}!categories@{categories}}
\index{categories@{categories}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::categories () const}\label{classKService_a23}


\begin{Desc}
\item[Returns:]a list of VFolder categories. \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 578 of file kservice.cpp.\index{KService@{KService}!serviceTypes@{serviceTypes}}
\index{serviceTypes@{serviceTypes}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::service\-Types () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a24}


\begin{Desc}
\item[Returns:]the service types that this service supports. \end{Desc}


Definition at line 199 of file kservice.h.\index{KService@{KService}!hasServiceType@{hasServiceType}}
\index{hasServiceType@{hasServiceType}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::has\-Service\-Type (const {\bf QString} \& {\em \_\-service}) const}\label{classKService_a25}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-service}]The name of the service type you are interested in determining whether this services supports.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the service you specified is supported, otherwise {\tt false}. \end{Desc}


Definition at line 333 of file kservice.cpp.

References KService\-Type::service\-Type().\index{KService@{KService}!allowAsDefault@{allowAsDefault}}
\index{allowAsDefault@{allowAsDefault}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::allow\-As\-Default () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a26}


\begin{Desc}
\item[Returns:]true if the service may be used as a default setting, for example in a file manager. Usually that is the case, but some services may only be started when the user selected them. This kind of services returns {\tt false} here. \end{Desc}


Definition at line 215 of file kservice.h.\index{KService@{KService}!allowMultipleFiles@{allowMultipleFiles}}
\index{allowMultipleFiles@{allowMultipleFiles}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::allow\-Multiple\-Files () const}\label{classKService_a27}


\begin{Desc}
\item[Returns:]true if multiple files may be passed to this service at startup. False if only one file at a time may be passed. \end{Desc}


Definition at line 569 of file kservice.cpp.

References QString::find().\index{KService@{KService}!initialPreference@{initialPreference}}
\index{initialPreference@{initialPreference}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KService::initial\-Preference () const\hspace{0.3cm}{\tt  [inline]}}\label{classKService_a28}


What preference to associate with this service initially (before the user has had any chance to define a profile for it) The bigger the value, the most preferred the service is. 



Definition at line 228 of file kservice.h.\index{KService@{KService}!noDisplay@{noDisplay}}
\index{noDisplay@{noDisplay}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::no\-Display () const}\label{classKService_a30}


Whether the entry should be suppressed in menus. 



Definition at line 545 of file kservice.cpp.

References QMap$<$ QString, QVariant $>$::end(), and QMap$<$ QString, QVariant $>$::find().

Referenced by KService\-Group::child\-Count(), and KService\-Group::entries().\index{KService@{KService}!parentApp@{parentApp}}
\index{parentApp@{parentApp}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KService::parent\-App () const}\label{classKService_a31}


Name of the application this service belongs to. 

(Usefull for e.g. plugins) \begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 559 of file kservice.cpp.

References QMap$<$ QString, QVariant $>$::end(), and QMap$<$ QString, QVariant $>$::find().\index{KService@{KService}!property@{property}}
\index{property@{property}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVariant} KService::property (const {\bf QString} \& {\em \_\-name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKService_a32}


\begin{Desc}
\item[Returns:]the requested properties. Some often used properties have convenience access functions like {\bf exec}{\rm (p.\,\pageref{classKService_a7})}(), {\bf service\-Types}{\rm (p.\,\pageref{classKService_a24})} etc.\end{Desc}
It depends upon the {\bf service\-Types}{\rm (p.\,\pageref{classKService_a24})}() of this service which properties a service can have.

\begin{Desc}
\item[See also:]{\bf KService\-Type}{\rm (p.\,\pageref{classKServiceType})} \end{Desc}


Definition at line 380 of file kservice.cpp.

References QMap$<$ QString, QVariant $>$::end(), KSycoca\-Entry::entry\-Path(), QMap$<$ QString, QVariant $>$::find(), and QString::to\-Int().

Referenced by substitute\-Uid(), and username().\index{KService@{KService}!propertyNames@{propertyNames}}
\index{propertyNames@{propertyNames}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KService::property\-Names () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKService_a33}


\begin{Desc}
\item[Returns:]the list of all properties that this service can have. That means, that some properties may be empty. \end{Desc}


Definition at line 471 of file kservice.cpp.

References QMap$<$ QString, QVariant $>$::begin(), and QMap$<$ QString, QVariant $>$::end().\index{KService@{KService}!isValid@{isValid}}
\index{isValid@{isValid}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KService::is\-Valid () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKService_a34}


\begin{Desc}
\item[Returns:]true if the service is valid (e.g. name is not empty) \end{Desc}


Implements {\bf KSycoca\-Entry}.

Definition at line 267 of file kservice.h.\index{KService@{KService}!serviceByName@{serviceByName}}
\index{serviceByName@{serviceByName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Name (const {\bf QString} \& {\em \_\-name})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e0}


Find a service by name, i.e. 

the translated Name field. You should really not use this method, since the name is translated.

\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important\/}: Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 505 of file kservice.cpp.

References KSycoca\-Entry::Ptr.\index{KService@{KService}!serviceByDesktopPath@{serviceByDesktopPath}}
\index{serviceByDesktopPath@{serviceByDesktopPath}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Desktop\-Path (const {\bf QString} \& {\em \_\-name})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e1}


Find a service by its relative path to the applnk or services directory, for instance \char`\"{}Internet/konqbrowser.desktop\char`\"{}. 

Better not use it for menu entries though, since the user can move them. It's ok to use it for services though (e.g. \char`\"{}http\_\-cache\_\-cleaner.desktop\char`\"{})

\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important\/}: Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 511 of file kservice.cpp.

References KSycoca\-Entry::Ptr.\index{KService@{KService}!serviceByDesktopName@{serviceByDesktopName}}
\index{serviceByDesktopName@{serviceByDesktopName}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::Ptr} KService::service\-By\-Desktop\-Name (const {\bf QString} \& {\em \_\-name})\hspace{0.3cm}{\tt  [static]}}\label{classKService_e2}


Find a service by the name of its desktop file, not depending on its actual location (as long as it's under the applnk or service directories). 

For instance \char`\"{}konqbrowser\char`\"{} or \char`\"{}kcookiejar\char`\"{}. Note that the \char`\"{}.desktop\char`\"{} extension is implicit.

This is the recommended method (safe even if the user moves stuff) but note that it assumes that no two entries have the same filename.

\begin{Desc}
\item[Returns:]a pointer to the requested service or 0 if the service is unknown. {\em Very\/} {\em important\/}: Don't store the result in a KService$\ast$ ! \end{Desc}


Definition at line 517 of file kservice.cpp.

References KSycoca\-Entry::Ptr.

Referenced by KRun::found\-Mime\-Type(), KURIFilter\-Data::icon\-Name(), and KRun::run\-Command().\index{KService@{KService}!allServices@{allServices}}
\index{allServices@{allServices}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::List} KService::all\-Services ()\hspace{0.3cm}{\tt  [static]}}\label{classKService_e3}


\begin{Desc}
\item[Returns:]the whole list of services.\end{Desc}
Useful for being able to to display them in a list box, for example. More memory consuming than the ones above, don't use unless really necessary. 

Definition at line 500 of file kservice.cpp.\index{KService@{KService}!allInitServices@{allInitServices}}
\index{allInitServices@{allInitServices}!KService@{KService}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KService::List} KService::all\-Init\-Services ()\hspace{0.3cm}{\tt  [static]}}\label{classKService_e4}


\begin{Desc}
\item[Returns:]all services that require initialisation.\end{Desc}
Only needed by \char`\"{}kcminit\char`\"{} 

Definition at line 523 of file kservice.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kservice.h\item 
kservice.cpp\end{CompactItemize}
