utilities/downloadmanager/inc/storageutility.h
changeset 16 3c88a81ff781
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
       
     1 /**
       
     2    This file is part of CWRT package **
       
     3 
       
     4    Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
       
     5 
       
     6    This program is free software: you can redistribute it and/or modify
       
     7    it under the terms of the GNU (Lesser) General Public License as 
       
     8    published by the Free Software Foundation, version 2.1 of the License. 
       
     9    This program is distributed in the hope that it will be useful, but
       
    10    WITHOUT ANY WARRANTY; without even the implied warranty of 
       
    11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
       
    12    (Lesser) General Public License for more details. You should have 
       
    13    received a copy of the GNU (Lesser) General Public License along 
       
    14    with this program. If not, see <http://www.gnu.org/licenses/>.
       
    15 */
       
    16 
       
    17 #ifndef STORAGEUTILITY_H
       
    18 #define STORAGEUTILITY_H
       
    19 
       
    20 #include <QObject>
       
    21 
       
    22 #define TEMPORARY_FOLDER "downloads"
       
    23 #define FILENAME_UNKNOWN "Unknown"
       
    24 
       
    25 // class declaration
       
    26 
       
    27 // utility class
       
    28 class StorageUtility
       
    29 {
       
    30 public:
       
    31     // generate unique filename
       
    32     static int generateUniqueFileName(const QString &fileName, const QString &tempPath,
       
    33             const QString& permPath, QString &outFileName);
       
    34     // validate filename
       
    35     static void validateFileName(const QString &fileName, QString &outFileName);
       
    36     // create temporary path for writing the data
       
    37     static QString createTemporaryPath(const QString& clientName);
       
    38 };
       
    39 
       
    40 #endif