2008-03-19 Stephanie Lewis <slewis@apple.com>
[WebKit-https.git] / WebCore / platform / SharedBuffer.h
index 45d93e84e2fdc6a4e61d8a85d2d3f382d78ab3bc..9ce1f129d71385c5214a8b6ef501b927761aac6b 100644 (file)
 #include <wtf/Forward.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(CF)
 #include <wtf/RetainPtr.h>
+#endif
 
+#if PLATFORM(MAC)
 #ifdef __OBJC__
 @class NSData;
 #else
@@ -53,10 +55,12 @@ public:
     
 #if PLATFORM(MAC)
     NSData *createNSData();
-    CFDataRef createCFData();
     static PassRefPtr<SharedBuffer> wrapNSData(NSData *data);
 #endif
-        
+#if PLATFORM(CF)
+    CFDataRef createCFData();
+#endif
+
     const char* data() const;
     unsigned size() const;
     const Vector<char> &buffer() { return m_buffer; }
@@ -80,9 +84,9 @@ private:
     bool hasPlatformData() const;
     
     Vector<char> m_buffer;
-#if PLATFORM(MAC)
-    SharedBuffer(NSData *nsdata);
-    RetainPtr<NSData> m_nsData;
+#if PLATFORM(CF)
+    SharedBuffer(CFDataRef);
+    RetainPtr<CFDataRef> m_cfData;
 #endif
 };