2 // SOSPeerRateLimiter.h
5 #import "keychain/ckks/RateLimiter.h"
6 #include "keychain/SecureObjectSync/SOSPeer.h"
8 #ifndef SOSPeerRateLimiter_h
9 #define SOSPeerRateLimiter_h
12 RateLimitStateCanSend
= 1,
13 RateLimitStateHoldMessage
= 2
16 @interface PeerRateLimiter
: RateLimiter
21 @
property (retain
) NSString
*peerID
;
22 @
property (retain
) NSMutableDictionary
*accessGroupRateLimitState
;
23 @
property (retain
) NSMutableDictionary
*accessGroupToTimer
;
24 @
property (retain
) NSMutableDictionary
*accessGroupToNextMessageToSend
;
26 -(instancetype
)initWithPeer
:(SOSPeerRef
)peer
;
27 -(NSDictionary
*) setUpConfigForPeer
;
28 -(enum RateLimitState
) stateForAccessGroup
:(NSString
*) accessGroup
;
31 @interface KeychainItem
: NSObject
32 @
property (atomic
, retain
) NSString
* accessGroup
;
33 -(instancetype
) initWithAccessGroup
:(NSString
*)accessGroup
;
36 #endif /* SOSPeerRateLimiter_h */