Adding Cocoa generator to Thrift
Summary: Thanks to Andrew McGeachie for doing this
Reviewed By: dreiss
Test Plan: No merge/build issues. Will solicit McGeachie for additions to test/cocoa in the future
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665254 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cocoa/TTransport.h b/lib/cocoa/TTransport.h
new file mode 100644
index 0000000..bb0270e
--- /dev/null
+++ b/lib/cocoa/TTransport.h
@@ -0,0 +1,17 @@
+@protocol TTransport <NSObject>
+
+ /**
+ * Guarantees that all of len bytes are
+ *
+ * @param buf Array to read into
+ * @param off Index to start reading at
+ * @param len Maximum number of bytes to read
+ * @return The number of bytes actually read, which must be equal to len
+ * @throws TTransportException if there was an error reading data
+ */
+- (int) readAll: (uint8_t *) buf offset: (int) off length: (int) len;
+
+- (void) write: (const uint8_t *) data offset: (unsigned int) offset length: (unsigned int) length;
+
+- (void) flush;
+@end