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