Permalink
Browse files

migrating cocoa

  • Loading branch information...
1 parent 1e828ad commit eb8157c556201f9fcdb836aa3efb40cfcfa6b423 geremy committed Mar 1, 2013
Showing with 2 additions and 27,904 deletions.
  1. +0 −187 cocoa/3.1/JSON/ByteStream.h
  2. +0 −298 cocoa/3.1/JSON/ByteStream.m
  3. +0 −120 cocoa/3.1/JSON/ByteStreamDelegate.h
  4. +0 −391 cocoa/3.1/JSON/ByteStreamDelegate.m
  5. +0 −30 cocoa/3.1/JSON/GNUmakefile
  6. +0 −69 cocoa/3.1/JSON/JSON.h
  7. +0 −24 cocoa/3.1/JSON/JSONExtensions.h
  8. +0 −93 cocoa/3.1/JSON/JSONPort.h
  9. +0 −391 cocoa/3.1/JSON/JSONPort.m
  10. +0 −204 cocoa/3.1/JSON/NSArray+JSON.m
  11. +0 −248 cocoa/3.1/JSON/NSDictionary+JSON.m
  12. +0 −37 cocoa/3.1/JSON/NSDictionary+JSONRPC.m
  13. +0 −289 cocoa/3.1/JSON/NSNumber+JSON.m
  14. +0 −61 cocoa/3.1/JSON/NSObject+JSON.h
  15. +0 −106 cocoa/3.1/JSON/NSObject+JSON.m
  16. +0 −214 cocoa/3.1/JSON/NSString+JSON.m
  17. +0 −113 cocoa/3.1/JSON/SBJsonParser.h
  18. +0 −120 cocoa/3.1/JSON/SBJsonParser.m
  19. +0 −135 cocoa/3.1/JSON/SBJsonStreamParser.h
  20. +0 −264 cocoa/3.1/JSON/SBJsonStreamParser.m
  21. +0 −88 cocoa/3.1/JSON/SBJsonStreamParserAdapter.h
  22. +0 −171 cocoa/3.1/JSON/SBJsonStreamParserAdapter.m
  23. +0 −89 cocoa/3.1/JSON/SBJsonStreamParserState.h
  24. +0 −370 cocoa/3.1/JSON/SBJsonStreamParserState.m
  25. +0 −157 cocoa/3.1/JSON/SBJsonStreamWriter.h
  26. +0 −378 cocoa/3.1/JSON/SBJsonStreamWriter.m
  27. +0 −75 cocoa/3.1/JSON/SBJsonStreamWriterState.h
  28. +0 −132 cocoa/3.1/JSON/SBJsonStreamWriterState.m
  29. +0 −67 cocoa/3.1/JSON/SBJsonTokeniser.h
  30. +0 −482 cocoa/3.1/JSON/SBJsonTokeniser.m
  31. +0 −132 cocoa/3.1/JSON/SBJsonWriter.h
  32. +0 −102 cocoa/3.1/JSON/SBJsonWriter.m
  33. +0 −13 cocoa/3.1/JSON/iohelpers.h
  34. +0 −115 cocoa/3.1/JSON/iohelpers.m
  35. +0 −26 cocoa/3.1/JSON/jsunicode.h
  36. +0 −133 cocoa/3.1/JSON/jsunicode.m
  37. +0 −9 cocoa/3.1/JSON/streamutils.h
  38. +0 −24 cocoa/3.1/JSON/streamutils.m
  39. +0 −27 cocoa/3.1/build-example
  40. +0 −786 cocoa/3.1/example.d
  41. +0 −109 cocoa/3.1/example.m
  42. +0 −49 cocoa/3.1/pubnub.h
  43. +0 −223 cocoa/3.1/pubnub.m
  44. +0 −41 cocoa/3.1/request.h
  45. +0 −102 cocoa/3.1/request.m
  46. +0 −373 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest.xcodeproj/project.pbxproj
  47. +0 −7 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  48. BIN ...st.xcodeproj/project.xcworkspace/xcuserdata/dahiwadkar.xcuserdatad/UserInterfaceState.xcuserstate
  49. +0 −98 ...est/CocoaPubnubTest.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  50. +0 −86 ...st/CocoaPubnubTest.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcschemes/CocoaPubnubTest.xcscheme
  51. +0 −22 ...st/CocoaPubnubTest.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcschemes/xcschememanagement.plist
  52. +0 −19 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/AppDelegate.h
  53. +0 −46 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/AppDelegate.m
  54. +0 −34 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/CocoaPubnubTest-Info.plist
  55. +0 −7 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/CocoaPubnubTest-Prefix.pch
  56. +0 −32 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/JSON.h
  57. +0 −94 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/JSON.m
  58. +0 −251 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/JSONKit.h
  59. +0 −3,065 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/JSONKit.m
  60. +0 −74 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/pubnub.h
  61. +0 −721 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/pubnub.m
  62. +0 −84 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/request.h
  63. +0 −234 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/PubNub/request.m
  64. +0 −14 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/CL_223.h
  65. +0 −147 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/CL_223.m
  66. +0 −13 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/Catch_Up_UnitTest.h
  67. +0 −129 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/Catch_Up_UnitTest.m
  68. +0 −13 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/CommonUtil.h
  69. +0 −23 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/CommonUtil.m
  70. +0 −45 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/DetailedHistoryUnitTest.h
  71. +0 −360 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/DetailedHistoryUnitTest.m
  72. +0 −6 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/UnsubcribeUnitTest.h
  73. +0 −136 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/UnitTest/UnsubcribeUnitTest.m
  74. +0 −29 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/en.lproj/Credits.rtf
  75. +0 −2 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/en.lproj/InfoPlist.strings
  76. +0 −3,635 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/en.lproj/MainMenu.xib
  77. +0 −14 cocoa/3.3/CocoaPubnubTest/CocoaPubnubTest/main.m
  78. +0 −333 cocoa/3.3/PubNub/cocoa.xcodeproj/project.pbxproj
  79. +0 −7 cocoa/3.3/PubNub/cocoa.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  80. BIN ...oa.xcodeproj/project.xcworkspace/xcuserdata/dahiwadkar.xcuserdatad/UserInterfaceState.xcuserstate
  81. +0 −10 ...ocoa.xcodeproj/project.xcworkspace/xcuserdata/dahiwadkar.xcuserdatad/WorkspaceSettings.xcsettings
  82. +0 −59 cocoa/3.3/PubNub/cocoa.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  83. +0 −86 cocoa/3.3/PubNub/cocoa.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcschemes/cocoa.xcscheme
  84. +0 −22 ...a/3.3/PubNub/cocoa.xcodeproj/xcuserdata/dahiwadkar.xcuserdatad/xcschemes/xcschememanagement.plist
  85. +0 −30 cocoa/3.3/PubNub/cocoa/AppDelegate.h
  86. +0 −266 cocoa/3.3/PubNub/cocoa/AppDelegate.m
  87. +0 −32 cocoa/3.3/PubNub/cocoa/PubNub/JSON.h
  88. +0 −94 cocoa/3.3/PubNub/cocoa/PubNub/JSON.m
  89. +0 −251 cocoa/3.3/PubNub/cocoa/PubNub/JSONKit.h
  90. +0 −3,065 cocoa/3.3/PubNub/cocoa/PubNub/JSONKit.m
  91. +0 −21 cocoa/3.3/PubNub/cocoa/PubNub/build-example
  92. BIN cocoa/3.3/PubNub/cocoa/PubNub/example
  93. +0 −181 cocoa/3.3/PubNub/cocoa/PubNub/example.m
  94. +0 −74 cocoa/3.3/PubNub/cocoa/PubNub/pubnub.h
  95. +0 −721 cocoa/3.3/PubNub/cocoa/PubNub/pubnub.m
  96. +0 −84 cocoa/3.3/PubNub/cocoa/PubNub/request.h
  97. +0 −234 cocoa/3.3/PubNub/cocoa/PubNub/request.m
  98. +0 −34 cocoa/3.3/PubNub/cocoa/cocoa-Info.plist
  99. +0 −7 cocoa/3.3/PubNub/cocoa/cocoa-Prefix.pch
  100. +0 −29 cocoa/3.3/PubNub/cocoa/en.lproj/Credits.rtf
  101. +0 −2 cocoa/3.3/PubNub/cocoa/en.lproj/InfoPlist.strings
  102. +0 −4,756 cocoa/3.3/PubNub/cocoa/en.lproj/MainMenu.xib
  103. +0 −14 cocoa/3.3/PubNub/cocoa/main.m
  104. +2 −385 cocoa/README.md
View
@@ -1,187 +0,0 @@
-#ifndef _INCLUDED_ByteStream_h
-#define _INCLUDED_ByteStream_h
-
-// ByteIStream, ByteOStream - bufferred input and output classes
-// emulating stream of bytes. They provide subset of FILE stream
-// functionality from standard C library.
-
-#include <Foundation/NSObject.h>
-
-//-----------------------------------------------------------------------------
-// Delegate protocols.
-//-----------------------------------------------------------------------------
-
-@protocol ByteISDelegate
-// Get new data from the data source. Return first new character or -1 if
-// operation failed or end of file encountered. Do not advance the position.
-- (int) underflow;
-
-// Return YES if the stream is at EOF
-- (BOOL) eof;
-
-// Close data source. Returns 0 on success or -1 on error
-- (int) close;
-@end
-
-@protocol ByteOSDelegate
-// Flush the buffer into the data sink. Return 0 on success and -1 on failure.
-- (int) flush;
-
-// Move some or all data to the data sink, then put ch into buffer.
-// Return that character on success or -1 if data move failed.
-// Current implementations try to move all data, like flush does.
-- (int) overflow: (unsigned char) ch;
-
-// Flush data and close data sink. Return 0 on success or -1 on error
-- (int) close;
-@end
-
-
-//-----------------------------------------------------------------------------
-// ByteStreamBuffer - superclass for input and output streams
-//-----------------------------------------------------------------------------
-
-@interface ByteStreamBuffer : NSObject
-{
-@public
- unsigned char * _buf; // buffer
- unsigned _capa; // size of buffer, 0 means _buf is not owned
- unsigned _pos; // current input or output position
-}
-
-- (unsigned char *) buffer;
-- (unsigned) bufferCapacity;
-
-- (int) close;
-
-@end
-
-//-----------------------------------------------------------------------------
-// Input byte stream.
-//-----------------------------------------------------------------------------
-
-@class NSInputStream;
-
-@interface ByteIStream: ByteStreamBuffer
-{
-@public
- id <ByteISDelegate, NSObject> _del;
- unsigned _len; // length of data within buffer
-}
-
-// Memory stream
-- (id) initWithBuffer: (unsigned char *) buffer size: (int) len;
-- (id) initWithBuffer: (unsigned char *) buffer size: (int) len
- makeCopy: (BOOL) copy;
-
-// File descriptor stream
-- (id) initWithFD: (int) fd;
-- (id) initWithFileAtPath: (NSString *) path;
-- (id) initWithFileAtPath: (NSString *) path flags: (int) flags;
-
-// NSStream stream
-- (id) initWithNSIStream: (NSInputStream *) s;
-
-- (int) close;
-
-- (unsigned) bufferLength;
-
-@end
-
-//-----------------------------------------------------------------------------
-// Output byte stream.
-//-----------------------------------------------------------------------------
-
-@class NSOutputStream;
-
-@interface ByteOStream: ByteStreamBuffer
-{
-@public
- id <ByteOSDelegate, NSObject> _del;
-}
-
-// Memory stream
-- (id) init;
-- (id) initWithCapacity: (int) capa;
-
-// File descriptor stream
-- (id) initWithFD: (int) fd;
-- (id) initToFileAtPath: (NSString *) path;
-- (id) initToFileAtPath: (NSString *) path flags: (int) flags;
-
-// NSStream based stream
-- (id) initWithNSOStream: (NSOutputStream *) s;
-
-- (int) close;
-
-- (unsigned) bufferLength;
-
-@end
-
-
-//-----------------------------------------------------------------------------
-// Input functions.
-//-----------------------------------------------------------------------------
-
-
-inline static BOOL str_eof( ByteIStream * s )
-{
- return [s->_del eof];
-}
-
-// Returns next byte and does not advance the current position,
-// returns -1 on eof or error.
-inline static int str_peekc( ByteIStream * s )
-{
- return (s->_pos < s->_len) ? s->_buf[s->_pos] : [s->_del underflow];
-}
-
-// Return next byte and advance the current position,
-// returns -1 on eof or error.
-inline static int str_getc( ByteIStream * s )
-{
- int ch = str_peekc( s );
- if ( ch != -1 )
- ++s->_pos;
- return ch;
-}
-
-// Move current position back and inserts given byte at it.
-// Currently guaranteed to work only after str_getc().
-inline static int str_ungetc( unsigned char c, ByteIStream * s )
-{
- return (s->_pos > 0) ? (s->_buf[--s->_pos] = c) : -1;
-}
-
-// Reads 'count' bytes from stream into buffer. Returns number of bytes read
-// which can be less than 'count' if EOF is reached.
-unsigned str_getbytes( ByteIStream * s, char * buffer, unsigned count );
-
-
-//-----------------------------------------------------------------------------
-// Output functions.
-//-----------------------------------------------------------------------------
-
-// Put character c into stream s. Returns that character or -1 on error.
-inline static int str_putc( unsigned char c, ByteOStream * s )
-{
- return (s->_pos < s->_capa) ?
- (s->_buf[s->_pos++] = c) : [s->_del overflow: c];
-}
-
-// Flushes the buffer into the data sink. Returns 0 on success, -1 on failure.
-inline static int str_flush( ByteOStream * s )
-{
- return [s->_del flush];
-}
-
-// Writes string into stream, returns number of bytes written or -1 on error.
-int str_puts( const char * str, ByteOStream * s );
-
-inline static int str_close( ByteStreamBuffer * s )
-{
- return [s close];
-}
-
-
-#endif // _INCLUDED_ByteStream_h
Oops, something went wrong.

0 comments on commit eb8157c

Please sign in to comment.