00001 /**************************************************************** 00002 * Vidalia is distributed under the following license: 00003 * 00004 * Copyright (C) 2006, Matt Edman, Justin Hipple 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 ****************************************************************/ 00021 00022 /** 00023 * \file win32.h 00024 * \version $Id: win32.h 1563 2006-12-26 06:06:04Z edmanm $ 00025 * \brief Win32-specific functions 00026 */ 00027 00028 #ifndef _WIN32_H 00029 #define _WIN32_H 00030 00031 #define WIN32_LEAN_AND_MEAN 00032 #include <windows.h> 00033 #include <QHash> 00034 #include <QString> 00035 00036 /** Retrieves the location of the user's %PROGRAMFILES% folder. */ 00037 QString win32_program_files_folder(); 00038 00039 /** Retrieves the location of the user's %APPDATA% folder. */ 00040 QString win32_app_data_folder(); 00041 00042 /** Returns value of keyName or empty QString if keyName doesn't exist */ 00043 QString win32_registry_get_key_value(QString keyLocation, QString keyName); 00044 00045 /** Creates and/or sets the key to the specified value */ 00046 void win32_registry_set_key_value(QString keyLocation, QString keyName, QString keyValue); 00047 00048 /** Removes the key from the registry if it exists */ 00049 void win32_registry_remove_key(QString keyLocation, QString keyName); 00050 00051 /** Returns a list of all currently active processes, including their pid 00052 * and exe filename. */ 00053 QHash<qint64, QString> win32_process_list(); 00054 00055 #endif 00056