source: smplayer/trunk/src/winfileassoc.h@ 178

Last change on this file since 178 was 176, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.4

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19 Winfileassoc.h
20 Handles file associations in Windows
21 Author: Florin Braghis (florin@libertv.ro)
22*/
23
24#ifndef WINFILEASSOC_H
25#define WINFILEASSOC_H
26
27#include <QString>
28#include <QStringList>
29
30class WinFileAssoc
31{
32protected:
33 QString m_ClassId; //Application ClassId
34 QString m_ClassId2; //The ClassId created by explorer if user selects 'Open With...', usually smplayer.exe
35 QString m_AppName;
36
37protected:
38 bool CreateClassId(const QString& executablePath, const QString& friendlyName);
39 bool RemoveClassId();
40 bool VistaGetDefaultApps(const QStringList &extensions, QStringList& registeredExt);
41 int VistaSetAppsAsDefault(const QStringList& extensions);
42public:
43 WinFileAssoc(const QString ClassId = "MPlayerFileVideo", const QString AppName="SMPlayer");
44 //Checks the registry to see which extensions are registered with SMPlayer
45 bool GetRegisteredExtensions(const QStringList& extensionsToCheck, QStringList& registeredExtensions);
46
47 int CreateFileAssociations(const QStringList& fileExtensions);
48 int RestoreFileAssociations(const QStringList& fileExtensions);
49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.