]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_transform/lib/NullTransform.cpp
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / libsecurity_transform / lib / NullTransform.cpp
1 #include "NullTransform.h"
2
3 NullTransform::NullTransform() : Transform(CFSTR("NullTransform"))
4 {
5 }
6
7
8
9 CFTypeRef NullTransform::Make()
10 {
11 return CoreFoundationHolder::MakeHolder(gInternalCFObjectName, new NullTransform());
12 }
13
14
15
16 void NullTransform::AttributeChanged(CFStringRef name, CFTypeRef value)
17 {
18 // move input to output, otherwise do nothing
19 if (CFStringCompare(name, kSecTransformInputAttributeName, 0) == kCFCompareEqualTo)
20 {
21 SetAttributeNoCallback(kSecTransformOutputAttributeName, value);
22 }
23 }
24
25
26
27 std::string NullTransform::DebugDescription()
28 {
29 return Transform::DebugDescription() + ": NullTransform";
30 }
31
32
33
34 class NullTransformFactory : public TransformFactory
35 {
36 public:
37 NullTransformFactory();
38
39 virtual CFTypeRef Make();
40 };
41
42
43
44 TransformFactory* NullTransform::MakeTransformFactory()
45 {
46 return new NullTransformFactory();
47 }
48
49
50
51 NullTransformFactory::NullTransformFactory() : TransformFactory(CFSTR("Null Transform"))
52 {
53 }
54
55
56
57 CFTypeRef NullTransformFactory::Make()
58 {
59 return NullTransform::Make();
60 }
61