]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_transform/lib/Monitor.h
Security-57740.1.18.tar.gz
[apple/security.git] / OSX / libsecurity_transform / lib / Monitor.h
1 #ifndef __MONITOR__
2 #define __MONITOR__
3
4
5
6
7 #include "Transform.h"
8
9
10
11 typedef CFTypeRef SecMonitorRef;
12
13
14 class Monitor : public Transform
15 {
16 public:
17 virtual ~Monitor() { }
18 Monitor(CFStringRef mName) : Transform(mName) {}
19 virtual void Wait();
20 bool IsExternalizable();
21 };
22
23
24
25 class BlockMonitor : public Monitor
26 {
27 protected:
28 dispatch_queue_t mDispatchQueue;
29 SecMessageBlock mBlock;
30 bool mSeenFinal;
31
32 virtual void AttributeChanged(CFStringRef name, CFTypeRef value);
33 void LastValueSent();
34
35 BlockMonitor(dispatch_queue_t queue, SecMessageBlock block);
36
37 public:
38 virtual ~BlockMonitor();
39 static CFTypeRef Make(dispatch_queue_t dispatch_queue, SecMessageBlock block);
40 };
41
42
43 #endif