1 /* 2 KeePass Password Safe - The Open-Source Password Manager 3 Copyright (C) 2003-2021 Dominik Reichl <dominik.reichl@t-online.de> 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 using System; 21 22 namespace KeePassLib 23 { 24 /// <summary> 25 /// Compression algorithm specifiers. 26 /// </summary> 27 public enum PwCompressionAlgorithm 28 { 29 /// <summary> 30 /// No compression. 31 /// </summary> 32 None = 0, 33 34 /// <summary> 35 /// GZip compression. 36 /// </summary> 37 GZip = 1, 38 39 /// <summary> 40 /// Virtual field: currently known number of algorithms. Should not be used 41 /// by plugins or libraries -- it's used internally only. 42 /// </summary> 43 Count = 2 44 } 45 46 /// <summary> 47 /// Tree traversal methods. 48 /// </summary> 49 public enum TraversalMethod 50 { 51 /// <summary> 52 /// Don't traverse the tree. 53 /// </summary> 54 None = 0, 55 56 /// <summary> 57 /// Traverse the tree in pre-order mode, i.e. first visit all items 58 /// in the current node, then visit all subnodes. 59 /// </summary> 60 PreOrder = 1 61 } 62 63 /// <summary> 64 /// Methods for merging databases/entries. 65 /// </summary> 66 public enum PwMergeMethod 67 { 68 // Do not change the explicitly assigned values, otherwise 69 // serialization (e.g. of Ecas triggers) breaks 70 None = 0, 71 OverwriteExisting = 1, 72 KeepExisting = 2, 73 OverwriteIfNewer = 3, 74 CreateNewUuids = 4, 75 Synchronize = 5 76 } 77 78 /// <summary> 79 /// Icon identifiers for groups and password entries. 80 /// </summary> 81 public enum PwIcon 82 { 83 Key = 0, 84 World, 85 Warning, 86 NetworkServer, 87 MarkedDirectory, 88 UserCommunication, 89 Parts, 90 Notepad, 91 WorldSocket, 92 Identity, 93 PaperReady, 94 Digicam, 95 IRCommunication, 96 MultiKeys, 97 Energy, 98 Scanner, 99 WorldStar, 100 CDRom, 101 Monitor, 102 EMail, 103 Configuration, 104 ClipboardReady, 105 PaperNew, 106 Screen, 107 EnergyCareful, 108 EMailBox, 109 Disk, 110 Drive, 111 PaperQ, 112 TerminalEncrypted, 113 Console, 114 Printer, 115 ProgramIcons, 116 Run, 117 Settings, 118 WorldComputer, 119 Archive, 120 Homebanking, 121 DriveWindows, 122 Clock, 123 EMailSearch, 124 PaperFlag, 125 Memory, 126 TrashBin, 127 Note, 128 Expired, 129 Info, 130 Package, 131 Folder, 132 FolderOpen, 133 FolderPackage, 134 LockOpen, 135 PaperLocked, 136 Checked, 137 Pen, 138 Thumbnail, 139 Book, 140 List, 141 UserKey, 142 Tool, 143 Home, 144 Star, 145 Tux, 146 Feather, 147 Apple, 148 Wiki, 149 Money, 150 Certificate, 151 BlackBerry, 152 153 /// <summary> 154 /// Virtual identifier -- represents the number of icons. 155 /// </summary> 156 Count 157 } 158 159 public enum ProxyServerType 160 { 161 None = 0, 162 System = 1, 163 Manual = 2 164 } 165 166 public enum ProxyAuthType 167 { 168 None = 0, 169 170 /// <summary> 171 /// Use default user credentials (provided by the system). 172 /// </summary> 173 Default = 1, 174 175 Manual = 2, 176 177 /// <summary> 178 /// <c>Default</c> or <c>Manual</c>, depending on whether 179 /// manual credentials are available. 180 /// This type exists for supporting upgrading from KeePass 181 /// 2.28 to 2.29; the user cannot select this type. 182 /// </summary> 183 Auto = 3 184 } 185 186 /// <summary> 187 /// Comparison modes for in-memory protected objects. 188 /// </summary> 189 public enum MemProtCmpMode 190 { 191 /// <summary> 192 /// Ignore the in-memory protection states. 193 /// </summary> 194 None = 0, 195 196 /// <summary> 197 /// Ignore the in-memory protection states of standard 198 /// objects; do compare in-memory protection states of 199 /// custom objects. 200 /// </summary> 201 CustomOnly, 202 203 /// <summary> 204 /// Compare in-memory protection states. 205 /// </summary> 206 Full 207 } 208 209 [Flags] 210 public enum PwCompareOptions 211 { 212 None = 0x0, 213 214 /// <summary> 215 /// Empty standard string fields are considered to be the 216 /// same as non-existing standard string fields. 217 /// This doesn't affect custom string comparisons. 218 /// </summary> 219 NullEmptyEquivStd = 0x1, 220 221 IgnoreParentGroup = 0x2, 222 IgnoreLastAccess = 0x4, 223 IgnoreLastMod = 0x8, 224 IgnoreHistory = 0x10, 225 IgnoreLastBackup = 0x20, 226 227 // For groups: 228 PropertiesOnly = 0x40, 229 230 IgnoreTimes = (IgnoreLastAccess | IgnoreLastMod) 231 } 232 233 public enum IOAccessType 234 { 235 None = 0, 236 237 /// <summary> 238 /// The I/O connection is being opened for reading. 239 /// </summary> 240 Read = 1, 241 242 /// <summary> 243 /// The I/O connection is being opened for writing. 244 /// </summary> 245 Write = 2, 246 247 /// <summary> 248 /// The I/O connection is being opened for testing 249 /// whether a file/object exists. 250 /// </summary> 251 Exists = 3, 252 253 /// <summary> 254 /// The I/O connection is being opened for deleting a file/object. 255 /// </summary> 256 Delete = 4, 257 258 /// <summary> 259 /// The I/O connection is being opened for renaming/moving a file/object. 260 /// </summary> 261 Move = 5 262 } 263 264 // public enum PwLogicalOp 265 // { 266 // None = 0, 267 // Or = 1, 268 // And = 2, 269 // NOr = 3, 270 // NAnd = 4 271 // } 272 273 [Flags] 274 public enum AppRunFlags 275 { 276 None = 0, 277 GetStdOutput = 1, 278 WaitForExit = 2, 279 280 // https://sourceforge.net/p/keepass/patches/84/ 281 /// <summary> 282 /// This flag prevents any handles being garbage-collected 283 /// before the started process has terminated, without 284 /// blocking the current thread. 285 /// </summary> 286 GCKeepAlive = 4, 287 288 // https://sourceforge.net/p/keepass/patches/85/ 289 DoEvents = 8, 290 DisableForms = 16 291 } 292 293 [Flags] 294 public enum ScaleTransformFlags 295 { 296 None = 0, 297 298 /// <summary> 299 /// <c>UIIcon</c> indicates that the returned image is going 300 /// to be displayed as icon in the UI and that it is not 301 /// subject to future changes in size. 302 /// </summary> 303 UIIcon = 1 304 } 305 306 public enum DesktopType 307 { 308 None = 0, 309 Windows, 310 Gnome, 311 Kde, 312 Unity, 313 Lxde, 314 Xfce, 315 Mate, 316 Cinnamon, 317 Pantheon 318 } 319 320 public enum PwSearchMode 321 { 322 None = 0, 323 Simple, 324 Regular, 325 XPath 326 } 327 } 328