You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.4 KiB
83 lines
2.4 KiB
15 years ago
|
/*
|
||
12 years ago
|
* This is a simple tdeioslave to handle mbox-files.
|
||
15 years ago
|
* Copyright (C) 2004 Mart Kelder (mart.kde@hccnet.nl)
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Lesser General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Lesser General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Lesser General Public
|
||
|
* License along with this library; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*/
|
||
|
#ifndef STAT_H
|
||
|
#define STAT_H
|
||
|
|
||
12 years ago
|
#include <tdeio/global.h>
|
||
15 years ago
|
|
||
|
class ReadMBox;
|
||
|
class UrlInfo;
|
||
|
|
||
|
class KURL;
|
||
|
|
||
15 years ago
|
class TQString;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* This class is used to get the stats of a mbox-email or mbox-file.
|
||
|
* This class only uses static members.
|
||
|
*/
|
||
|
class Stat
|
||
|
{
|
||
|
public:
|
||
|
/**
|
||
|
* Empty constructor
|
||
|
*/
|
||
|
Stat() {}
|
||
|
|
||
|
/**
|
||
|
* Emtpy destructor
|
||
|
*/
|
||
|
~Stat() {}
|
||
|
|
||
|
/**
|
||
|
* This functions gives information with a given UrlInfo.
|
||
|
* @param info The file information
|
||
|
* @return The information of the file as destribed in UrlInfo.
|
||
|
*/
|
||
12 years ago
|
static TDEIO::UDSEntry stat( const UrlInfo& info );
|
||
15 years ago
|
/**
|
||
|
* This function gives information with a given ReadMBox and UrlInfo.
|
||
|
* Through this, it is possible to ask the stats of the next message,
|
||
|
* without reopening the mbox-file.
|
||
|
* @param mbox The ReadMBox instance, used to search the mbox-email in.
|
||
|
* @param info The url information.
|
||
|
* @return The requesteds information.
|
||
|
*/
|
||
12 years ago
|
static TDEIO::UDSEntry stat( ReadMBox& mbox, const UrlInfo& info );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* This function gets the stats of a given mbox-file in an UDSEntry.
|
||
|
* @param info The location of the mbox-file.
|
||
|
* @return A list of Atoms.
|
||
|
*/
|
||
12 years ago
|
static TDEIO::UDSEntry statDirectory( const UrlInfo& info );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* This function gets the stats of a geven mbox-message in a UDSEntry.
|
||
|
* @param info The url of the mbox-message.
|
||
|
* @return Information shipped in an UDSEntry.
|
||
|
*/
|
||
12 years ago
|
static TDEIO::UDSEntry statMessage( const UrlInfo& info );
|
||
15 years ago
|
private:
|
||
12 years ago
|
static void addAtom( TDEIO::UDSEntry& entry, unsigned int key, const TQString& value );
|
||
|
static void addAtom( TDEIO::UDSEntry& entry, unsigned int key, const long value );
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif
|