should find the first item (can be more than one item with the same 'param') fixed: added sorting tickets params in ReadTicketParams() (in plugins/ticket/ticketinfo.cpp) fixed: plugin should have its own 'PluginInfo info' struct a plugin's function can call another plugin's functions added: removing tickets files/images added: removing threads changed: rm function will call WINIX_FILE_REMOVED now when deleting directories git-svn-id: svn://ttmath.org/publicrep/winix/trunk@710 e52654a7-88a9-db11-a3e9-0013d4bc506e
70 lines
1.2 KiB
C++
Executable File
70 lines
1.2 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_functions_rm
|
|
#define headerfile_winix_functions_rm
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
|
|
class Rm : public FunctionBase
|
|
{
|
|
public:
|
|
|
|
Rm();
|
|
bool HasAccess();
|
|
void MakePost();
|
|
|
|
void RemoveDir(const Item & dir);
|
|
void RemoveDirContent(const Item & dir);
|
|
void RemoveFileOrSymlink(Item & item);
|
|
|
|
// removing either a directory or a symlink or a file
|
|
void RemoveItemById(long item_id);
|
|
|
|
private:
|
|
|
|
// for deleting content in a directory (files and symlinks)
|
|
DbItemQuery content_dir_iq;
|
|
std::vector<Item> content_item_tab;
|
|
std::wstring path;
|
|
|
|
// for deleting content in a directory (files, symlinks and directories)
|
|
DbItemQuery content_dir_iq2;
|
|
std::vector<Item> content_item_tab2;
|
|
|
|
// for logging
|
|
std::wstring old_url;
|
|
|
|
// for removing an item by id
|
|
DbItemQuery rm_by_id_iq;
|
|
Item rm_by_id_item;
|
|
|
|
bool HasAccess(const Item & item);
|
|
void Prepare();
|
|
void Clear();
|
|
bool RemoveStaticFile(const std::wstring & path);
|
|
void RemoveStaticFile(Item & item);
|
|
void RemoveDirTree(long dir_id);
|
|
void RemoveDirContent();
|
|
void RemoveDir();
|
|
void RemoveFile();
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
#endif
|