1 /* 2 Copyright 2007, 2008, 2009, 2010 Geyer Klaus 3 4 This file is part of Cat'sEyE. 5 6 Cat'sEyE is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Cat'sEyE is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Cat'sEyE. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef COMMANDPARSER_H_ 21 #define COMMANDPARSER_H_ 22 23 24 #define KNOWNPREDEFINES { "ThisDirectory","TDIR",\ 25 "OtherDirectory","ODIR",\ 26 "LeftSideDirectory", "LDIR",\ 27 "RightSideDirectory", "RDIR",\ 28 "Home", "HOME",\ 29 "AllItemsWithoutPathUnQuoted", "MIS_NP_UQ", \ 30 "AllItemsWithoutPathQuoted", "MIS_NP_Q", \ 31 "AllItemsWithPathUnQuoted", "MIS_WP_UQ", \ 32 "AllItemsWithPathQuoted", "MIS_WP_Q", \ 33 "ItemWithoutPathUnQuoted", "MI_NP_UQ", \ 34 "ItemWithoutPathQuoted", "MI_NP_Q", \ 35 "ItemWithPathUnQuoted", "MI_WP_UQ", \ 36 "ItemWithPathQuoted", "MI_WP_Q", \ 37 "home" \ 38 } 39 #define NUMBEROFPREDEFINES 27 //Change this if you add or remove a String to/from KownPredefines 40 //Do not forget to change function decryptPredefine <- its the onl 41 42 43 44 struct _predefineStruct{ 45 GString *gstrThisSidePath; //do not free, comes from _CallUserCommand_StartThreadStructure 46 GString *gstrOtherSidePath; //do not free, comes from _CallUserCommand_StartThreadStructure 47 GString *gstrLeftSidePath; //do not free, comes from _CallUserCommand_StartThreadStructure 48 GString *gstrRightSidePath; //do not free, comes from _CallUserCommand_StartThreadStructure 49 GString *gstrHomeDir; //do not free, comes from _CallUserCommand_StartThreadStructure 50 //GString *gstrWorkingPath; //do not free, freed in CallUserCommand_CallToSystem 51 52 GString *gstrAllMarkedItems_WithoutPath_Unquoted; 53 GString *gstrAllMarkedItems_WithoutPath_Quoted; 54 GString *gstrAllMarkedItems_WithPath_Unquoted; 55 GString *gstrAllMarkedItems_WithPath_Quoted; 56 57 GString *gstrOneMarkedItem_WithoutPath_Unquoted; //OneMarkedItem strings are only valid in each and list mode 58 GString *gstrOneMarkedItem_WithoutPath_Quoted; //in all mode they are the same as the AllMarkedItems strings 59 GString *gstrOneMarkedItem_WithPath_Unquoted; 60 GString *gstrOneMarkedItem_WithPath_Quoted; 61 }; 62 63 64 int ParseXMLUserCommand (struct _CallUserCommand_StartThreadStructure *ThreadStartStruct, GString **gstrpParsedCommand, GString **gstrpQuitReplyText, GString **gstrpActionNoteText, GString *gstrWorkingPath); 65 66 int ParseUserCommand(GString *Command, GString *FileList, GString *FileListWithPath, GString *WorkPath, GString *OtherSidePath, GString **ActionNoteText, GString **QuitReplyText, struct updateList **UpdateFolderWhenFinished_List); 67 int UserCommandCallType(GString *Command, int *ip_CallType, GString **gstrCaption, GString **gstrLabel, GString **gstrCall); 68 int newUsercommandReadOverSeveralLines(FILE *thefile,char *commandPart); 69 70 71 #endif /*COMMANDPARSER_H_*/ 72 73 74