src/FilesystemCommand.h
branchv_0
changeset 27 532953173cd5
parent 24 4353cd19a6b5
child 28 9172bd97ae99
equal deleted inserted replaced
26:1b14ef641c7b 27:532953173cd5
    35 
    35 
    36 #include "Configuration.h"
    36 #include "Configuration.h"
    37 #include "AttributeFinder.h"
    37 #include "AttributeFinder.h"
    38 #include "FileAttributeFinder.h"
    38 #include "FileAttributeFinder.h"
    39 #include "XattrAttributeFinder.h"
    39 #include "XattrAttributeFinder.h"
       
    40 #include "HashAttributeFinder.h"
    40 
    41 
    41 namespace relpipe {
    42 namespace relpipe {
    42 namespace in {
    43 namespace in {
    43 namespace filesystem {
    44 namespace filesystem {
    44 
    45 
    48 class FilesystemCommand {
    49 class FilesystemCommand {
    49 private:
    50 private:
    50 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
    51 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
    51 
    52 
    52 	FileAttributeFinder fileAttributeFinder;
    53 	FileAttributeFinder fileAttributeFinder;
       
    54 	HashAttributeFinder hashAttributeFinder;
    53 	XattrAttributeFinder xattrAttributeFinder;
    55 	XattrAttributeFinder xattrAttributeFinder;
    54 
    56 
    55 	std::map<string_t, AttributeFinder*> attributeFinders{
    57 	std::map<string_t, AttributeFinder*> attributeFinders{
    56 		{RequestedField::GROUP_FILE, &fileAttributeFinder},
    58 		{RequestedField::GROUP_FILE, &fileAttributeFinder},
       
    59 		{RequestedField::GROUP_HASH, &hashAttributeFinder},
    57 		{RequestedField::GROUP_XATTR, &xattrAttributeFinder}};
    60 		{RequestedField::GROUP_XATTR, &xattrAttributeFinder}};
    58 
    61 
    59 	void reset(std::stringstream& stream) {
    62 	void reset(std::stringstream& stream) {
    60 		stream.str("");
    63 		stream.str("");
    61 		stream.clear();
    64 		stream.clear();