KVIrc  4.9.2
DeveloperAPIs
KviMediaManager.h
Go to the documentation of this file.
1 #ifndef _KVI_MEDIAMANAGER_H_
2 #define _KVI_MEDIAMANAGER_H_
3 
4 //=============================================================================
5 //
6 // File : KviMediaManager.h
7 // Creation date : Wed Dec 29 2010 00:37:56 CEST by Elvio basello
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2010 Elvio Basello (hellvis69 at gmail dot com)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 // This file was originally part of KviMediaType.h
29 
30 #include "KviMediaType.h"
31 #include "kvi_settings.h"
32 #include "KviThread.h"
33 #include "KviPointerList.h"
34 
36 {
37 public:
39  ~KviMediaManager();
40 
41 protected:
43 
44 private:
45  KviMediaType * findMediaTypeForRegularFile(const char * pcFullPath, const char * pcFileName, bool bCheckMagic);
46 
47 public:
48  KviPointerList<KviMediaType> * mediaTypeList() { return m_pMediaTypeList; };
49  KviMediaType * findMediaTypeByFileMask(const char * pcFilemask);
50  KviMediaType * findMediaTypeByIanaType(const char * pcIanaType);
51  bool removeMediaType(KviMediaType * pType) { return m_pMediaTypeList->removeRef(pType); };
52  void clear() { m_pMediaTypeList->clear(); };
53  void insertMediaType(KviMediaType * pType);
54  KviMediaType * findMediaType(const char * pcFilename, bool bCheckMagic = true);
55  static void copyMediaType(KviMediaType * pDst, KviMediaType * pSrc);
56 
57  void load(const QString & szFilename);
58  void save(const QString & szFilename);
59 };
60 
61 #endif // _KVI_MEDIAMANAGER_H_
Definition: KviMediaManager.h:35
bool removeMediaType(KviMediaType *pType)
Definition: KviMediaManager.h:51
Definition: KviThread.h:146
KviPointerList< KviMediaType > * mediaTypeList()
Definition: KviMediaManager.h:48
Definition: KviMediaType.h:50
bool save(KviThemeInfo &options, bool bSaveIcons)
Definition: KviOptions.cpp:986
C++ Template based double linked pointer list class.
void clear()
Definition: KviMediaManager.h:52
This file contains compile time settings.
static void copyMediaType(KviMediaType *dst, const KviMediaType *src)
Definition: OptionsWidget_mediaTypes.cpp:37
#define KVILIB_API
Definition: kvi_settings.h:125
KviPointerList< KviMediaType > * m_pMediaTypeList
Definition: KviMediaManager.h:42