aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes/MCData.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/basetypes/MCData.h')
-rw-r--r--src/core/basetypes/MCData.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/basetypes/MCData.h b/src/core/basetypes/MCData.h
index 6ba056e7..bec75008 100644
--- a/src/core/basetypes/MCData.h
+++ b/src/core/basetypes/MCData.h
@@ -2,16 +2,22 @@
#define MAILCORE_MCDATA_H
+#include <stdlib.h>
+
#include <MailCore/MCObject.h>
#include <MailCore/MCMessageConstants.h>
+#ifdef __APPLE__
+#import <CoreFoundation/CoreFoundation.h>
+#endif
+
#ifdef __cplusplus
namespace mailcore {
class String;
- class Data : public Object {
+ class MAILCORE_EXPORT Data : public Object {
public:
Data();
Data(int capacity);
@@ -41,6 +47,9 @@ namespace mailcore {
public: // private
virtual String * charsetWithFilteredHTML(bool filterHTML, String * hintCharset = NULL);
+#ifdef __APPLE__
+ virtual CFDataRef destructiveNSData();
+#endif
public: // subclass behavior
Data(Data * otherData);
@@ -55,9 +64,10 @@ namespace mailcore {
char * mBytes;
unsigned int mLength;
unsigned int mAllocated;
- void allocate(unsigned int length);
+ void allocate(unsigned int length, bool force = false);
void reset();
String * charsetWithFilteredHTMLWithoutHint(bool filterHTML);
+ void takeBytesOwnership(char * bytes, unsigned int length);
};