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

KInit

  • sources
  • kde-4.14
  • kdelibs
  • kinit
Macros | Functions | Variables
kinit_win.cpp File Reference
#include <config.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <Sddl.h>
#include <tlhelp32.h>
#include <psapi.h>
#include <QtCore/QProcess>
#include <QtCore/QFileInfo>
#include <QtDBus/QtDBus>
#include <kcomponentdata.h>
#include <kstandarddirs.h>
#include <kapplication.h>
#include <kdeversion.h>
Include dependency graph for kinit_win.cpp:

Go to the source code of this file.

Macros

#define KDED_EXENAME   "kded4"
 

Functions

bool checkIfRegisteredInDBus (const QString &name, int _timeout=10)
 
PSID copySid (PSID from)
 
void freeSid (PSID sid)
 
static PSID getCurrentProcessOwner ()
 
static HANDLE getProcessHandle (int processID)
 
static QString getProcessName (DWORD pid)
 
static PSID getProcessOwner (HANDLE hProcess)
 
int launch (const QString &cmd)
 
void listAllNamedAppsInDBus ()
 
void listAllRunningKDEProcesses (ProcessList &processList)
 
int main (int argc, char **argv, char **envp)
 
QDebug operator<< (QDebug out, const ProcessListEntry &c)
 
void quitApplicationsOverDBus ()
 
void terminateAllRunningKDEProcesses (ProcessList &processList)
 
QString toString (PSID sid)
 

Variables

static KComponentData * s_instance = 0
 
QList< QProcess * > startedProcesses
 
int verbose =0
 

Macro Definition Documentation

#define KDED_EXENAME   "kded4"

Definition at line 54 of file kinit_win.cpp.

Function Documentation

bool checkIfRegisteredInDBus ( const QString &  name,
int  _timeout = 10 
)

check dbus registration

Definition at line 400 of file kinit_win.cpp.

PSID copySid ( PSID  from)

copy sid

Parameters
fromsif to copy from
Returns
copied sid, need to be free'd with free
Note
null sid's are handled too

Definition at line 76 of file kinit_win.cpp.

void freeSid ( PSID  sid)

copy sid

Parameters
fromsif to copy from
Returns
copied sid, need to be free'd with free
Note
null sid's are handled too

Definition at line 92 of file kinit_win.cpp.

static PSID getCurrentProcessOwner ( )
static

return sid of current process owner

Definition at line 193 of file kinit_win.cpp.

static HANDLE getProcessHandle ( int  processID)
static

return process handle

Parameters
pidprocess id
Returns
process handle

Definition at line 124 of file kinit_win.cpp.

static QString getProcessName ( DWORD  pid)
static

return absolute path of process

Parameters
pidprocess id
Returns
process name

Definition at line 136 of file kinit_win.cpp.

static PSID getProcessOwner ( HANDLE  hProcess)
static

return sid of specific process

Parameters
hProcesshandle to process
Returns
sid pointer to PSID structure, must be freed with LocalAlloc

Definition at line 161 of file kinit_win.cpp.

int launch ( const QString &  cmd)

Definition at line 376 of file kinit_win.cpp.

void listAllNamedAppsInDBus ( )

Definition at line 445 of file kinit_win.cpp.

void listAllRunningKDEProcesses ( ProcessList &  processList)

Definition at line 419 of file kinit_win.cpp.

int main ( int  argc,
char **  argv,
char **  envp 
)

Save arguments first...

Create our instance

Free arguments

wait for termination of all (core) processes

Definition at line 483 of file kinit_win.cpp.

QDebug operator<< ( QDebug  out,
const ProcessListEntry &  c 
)

Definition at line 227 of file kinit_win.cpp.

void quitApplicationsOverDBus ( )

Definition at line 457 of file kinit_win.cpp.

void terminateAllRunningKDEProcesses ( ProcessList &  processList)

Definition at line 430 of file kinit_win.cpp.

QString toString ( PSID  sid)

copy sid

Parameters
fromsif to copy from
Returns
copied sid, need to be free'd with free
Note
null sid's are handled too

Definition at line 104 of file kinit_win.cpp.

Variable Documentation

KComponentData* s_instance = 0
static

Definition at line 56 of file kinit_win.cpp.

QList<QProcess*> startedProcesses

holds process list for suicide mode

Definition at line 62 of file kinit_win.cpp.

int verbose =0

Definition at line 59 of file kinit_win.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KInit

Skip menu "KInit"
  • Main Page
  • 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • 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