/***************************************************************************
                          cutils.h  -  description
                             -------------------
    begin                : Fri May 16 2003
    copyright            : (C) 2003 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CUTILS_H
#define CUTILS_H

/**
  *@author Mathias Küster
  */

#include <dclib/dcos.h>
#include <dclib/core/cstring.h>
#include <dclib/core/types.h>

class DLL_EXPORT CUtils : public CObject {
public:
	/** */
	CUtils();
	/** */
	virtual ~CUtils();

	/** */
	static CString GetSizeString( const ulonglong size, eUnit unit );
	/* This will Convert Total Secs to how much time is
	 * remaining X Days + X Hrs + X Mins + X Secs */
	static CString GetTimeString( const ulonglong sec );
	/** */
	static CString GetTransferString( const ulonglong rate );
	/** */
	static bool ConvertDCLink( CString link, CString & hubhost, CString & hubname, CString & nick, ulonglong & size, CString & file );
};

#endif
