4 #import "keychain/ot/OctagonStateMachineHelpers.h"
5 #import "keychain/ot/OctagonPendingFlag.h"
7 NS_ASSUME_NONNULL_BEGIN
9 // OctagonFlags allow you to set binary flags for consumption by the state machine, similar to processor interrupts
10 // This allows the state machine to respond to external inputs or requests that don't need a timeout attached to them.
11 // Setting and removing flags are idempotent.
13 @protocol OctagonFlagContainer
14 - (BOOL
)_onqueueContains
:(OctagonFlag
*)flag
;
15 - (NSArray
<NSString
*>*)dumpFlags
;
18 @protocol OctagonFlagSetter
<OctagonFlagContainer
>
19 - (void)setFlag
:(OctagonFlag
*)flag
;
20 - (void)_onqueueSetFlag
:(OctagonFlag
*)flag
;
23 @protocol OctagonFlagClearer
<OctagonFlagSetter
>
24 - (void)_onqueueRemoveFlag
:(OctagonFlag
*)flag
;
27 @interface OctagonFlags
: NSObject
<OctagonFlagContainer
,
30 - (instancetype
)initWithQueue
:(dispatch_queue_t
)queue
;
32 - (NSString
*)contentsAsString
;