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