KVIrc 5.2.0
Developer APIs
KviSharedFile.h
Go to the documentation of this file.
1#ifndef _KVISHAREDFILE_H_
2#define _KVISHAREDFILE_H_
3//=============================================================================
4//
5// File : KviSharedFile.h
6// Creation date : Wed Dec 29 2010 03:40:05 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 KviPixmap.h
28
29#include "kvi_settings.h"
30#include "KviHeapObject.h"
31#include "KviPointerList.h"
32
33#include <QString>
34
35#include <time.h>
36
38{
39public:
40 KviSharedFile(const QString & szName, const QString & szAbsPath, const QString & szUserMask, time_t expireTime, unsigned int uFileSize);
42
43private:
44 QString m_szName;
47 QString m_szUserMask;
48 unsigned int m_uFileSize;
49 unsigned int m_uWildCount;
50 unsigned int m_uNonWildCount;
51
52public:
53 const QString & name() { return m_szName; };
54
55 const QString & absFilePath() { return m_szAbsFilePath; };
56
57 const QString & userMask() { return m_szUserMask; };
58
59 time_t expireTime() { return m_expireTime; };
60 bool expires() { return (m_expireTime != 0); };
61
62 unsigned int fileSize() { return m_uFileSize; };
63
64 unsigned int wildcardCount() { return m_uWildCount; };
65 unsigned int nonWildcardCount() { return m_uNonWildCount; };
66 int maskLength() { return m_szUserMask.length(); };
67};
68
70
71#endif // _KVISHAREDFILE_H_
Heap Object.
C++ Template based double linked pointer list class.
KviPointerList< KviSharedFile > KviSharedFileList
Definition KviSharedFile.h:69
Definition KviHeapObject.h:125
A template double linked list of pointers.
Definition KviPointerList.h:371
Definition KviSharedFile.h:38
unsigned int fileSize()
Definition KviSharedFile.h:62
unsigned int m_uNonWildCount
Definition KviSharedFile.h:50
unsigned int nonWildcardCount()
Definition KviSharedFile.h:65
int maskLength()
Definition KviSharedFile.h:66
const QString & name()
Definition KviSharedFile.h:53
const QString & userMask()
Definition KviSharedFile.h:57
unsigned int m_uWildCount
Definition KviSharedFile.h:49
time_t expireTime()
Definition KviSharedFile.h:59
QString m_szAbsFilePath
Definition KviSharedFile.h:45
const QString & absFilePath()
Definition KviSharedFile.h:55
bool expires()
Definition KviSharedFile.h:60
unsigned int wildcardCount()
Definition KviSharedFile.h:64
QString m_szUserMask
Definition KviSharedFile.h:47
time_t m_expireTime
Definition KviSharedFile.h:46
unsigned int m_uFileSize
Definition KviSharedFile.h:48
QString m_szName
Definition KviSharedFile.h:44
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124