Searchbar should work better with wrong selections

This commit is contained in:
michael starke
2014-09-01 19:06:36 +02:00
parent 16ae9739f2
commit 8ab4d9f787
4 changed files with 28 additions and 29 deletions

View File

@@ -9,29 +9,30 @@
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, MPEntrySearchFlags) {
MPEntrySearchNone = 0,
MPEntrySearchUrls = (1<<0),
MPEntrySearchUsernames = (1<<1),
MPEntrySearchTitles = (1<<2),
MPEntrySearchPasswords = (1<<3),
MPEntrySearchNotes = (1<<4),
MPEntrySearchAllAttributes = (1<<5),
MPEntrySearchNone = 0,
MPEntrySearchUrls = (1<<0),
MPEntrySearchUsernames = (1<<1),
MPEntrySearchTitles = (1<<2),
MPEntrySearchPasswords = (1<<3),
MPEntrySearchNotes = (1<<4),
MPEntrySearchAllAttributes = (1<<5),
/* The following two flags should be used like enums.
They are not intented to be used in conjunktion with any other flag */
MPEntrySearchDoublePasswords = (1<<6),
MPEntrySearchExpiredEntries = (1<<7),
/* All search flags that are combineable combined */
MPEntrySearchAllFlags = (MPEntrySearchDoublePasswords |
MPEntrySearchExpiredEntries |
MPEntrySearchNotes |
MPEntrySearchPasswords |
MPEntrySearchTitles |
MPEntrySearchUrls |
MPEntrySearchUsernames |
MPEntrySearchAllAttributes )
MPEntrySearchDoublePasswords = (1<<6),
MPEntrySearchExpiredEntries = (1<<7),
/* All combinebale search flags combined */
MPEntrySearchAllCombineableFlags = (MPEntrySearchDoublePasswords |
MPEntrySearchExpiredEntries |
MPEntrySearchNotes |
MPEntrySearchPasswords |
MPEntrySearchTitles |
MPEntrySearchUrls |
MPEntrySearchUsernames |
MPEntrySearchAllAttributes),
MPEntrySearchSingleFlags = (MPEntrySearchDoublePasswords | MPEntrySearchExpiredEntries),
MPEntrySearchAllFlags = (MPEntrySearchAllCombineableFlags | MPEntrySearchSingleFlags )
};
/* Wrap serach criteria to be able to store them */
@interface MPEntrySearchContext : NSObject <NSSecureCoding,NSCopying>