Permalink
Browse files

CL-194: Review and manually merge community contributions

  • Loading branch information...
1 parent 02d6a26 commit 872e43130ddcb94fb8366db31b0ebe7283bbea71 tanaji committed Oct 3, 2012
@@ -21,13 +21,15 @@
C8FD4D7B153D469D00D0A418 /* Cipher.m in Sources */ = {isa = PBXBuildFile; fileRef = C8FD4D70153D469D00D0A418 /* Cipher.m */; };
C8FD4D7C153D469D00D0A418 /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = C8FD4D72153D469D00D0A418 /* Common.m */; };
C8FD4D85153D505500D0A418 /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = C8FD4D84153D505500D0A418 /* MainWindow_iPhone.xib */; };
+ F8969FEB15B69E2600D12EBD /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = F8969FEA15B69E2600D12EBD /* README.md */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
C8C1CDD61611C71100FE66B6 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
C8C1CDD71611C71100FE66B6 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
C8C1CDD91611CC1A00FE66B6 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = "<group>"; };
C8C1CDDA1611CC3C00FE66B6 /* JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSON.m; sourceTree = "<group>"; };
+ C8C1CDE8161C19C100FE66B6 /* CEPubnubDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEPubnubDelegate.h; sourceTree = "<group>"; };
C8FD4D33153D447200D0A418 /* Pubnub.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Pubnub.app; sourceTree = BUILT_PRODUCTS_DIR; };
C8FD4D37153D447200D0A418 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C8FD4D39153D447200D0A418 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -49,6 +51,7 @@
C8FD4D71153D469D00D0A418 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; };
C8FD4D72153D469D00D0A418 /* Common.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Common.m; sourceTree = "<group>"; };
C8FD4D84153D505500D0A418 /* MainWindow_iPhone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow_iPhone.xib; sourceTree = "<group>"; };
+ F8969FEA15B69E2600D12EBD /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -95,6 +98,7 @@
C8FD4D3D153D447200D0A418 /* Pubnub */ = {
isa = PBXGroup;
children = (
+ F8969FEA15B69E2600D12EBD /* README.md */,
C8FD4D84153D505500D0A418 /* MainWindow_iPhone.xib */,
C8FD4D6A153D469D00D0A418 /* PubNub */,
C8FD4D46153D447200D0A418 /* AppDelegate.h */,
@@ -120,18 +124,19 @@
C8FD4D6A153D469D00D0A418 /* PubNub */ = {
isa = PBXGroup;
children = (
- C8C1CDD61611C71100FE66B6 /* JSONKit.h */,
- C8C1CDD71611C71100FE66B6 /* JSONKit.m */,
- C8FD4D6B153D469D00D0A418 /* Base64.h */,
- C8FD4D6C153D469D00D0A418 /* Base64.m */,
+ C8C1CDE8161C19C100FE66B6 /* CEPubnubDelegate.h */,
C8FD4D6D153D469D00D0A418 /* CEPubnub.h */,
C8FD4D6E153D469D00D0A418 /* CEPubnub.m */,
- C8FD4D6F153D469D00D0A418 /* Cipher.h */,
- C8FD4D70153D469D00D0A418 /* Cipher.m */,
C8FD4D71153D469D00D0A418 /* Common.h */,
C8FD4D72153D469D00D0A418 /* Common.m */,
+ C8FD4D6F153D469D00D0A418 /* Cipher.h */,
+ C8FD4D70153D469D00D0A418 /* Cipher.m */,
C8C1CDD91611CC1A00FE66B6 /* JSON.h */,
C8C1CDDA1611CC3C00FE66B6 /* JSON.m */,
+ C8C1CDD61611C71100FE66B6 /* JSONKit.h */,
+ C8C1CDD71611C71100FE66B6 /* JSONKit.m */,
+ C8FD4D6B153D469D00D0A418 /* Base64.h */,
+ C8FD4D6C153D469D00D0A418 /* Base64.m */,
);
path = PubNub;
sourceTree = "<group>";
@@ -188,6 +193,7 @@
files = (
C8FD4D42153D447200D0A418 /* InfoPlist.strings in Resources */,
C8FD4D85153D505500D0A418 /* MainWindow_iPhone.xib in Resources */,
+ F8969FEB15B69E2600D12EBD /* README.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -275,7 +281,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Pubnub/Pubnub-Prefix.pch";
INFOPLIST_FILE = "Pubnub/Pubnub-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@@ -287,7 +293,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Pubnub/Pubnub-Prefix.pch";
INFOPLIST_FILE = "Pubnub/Pubnub-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
@@ -4,29 +4,16 @@
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
- shouldBeEnabled = "No"
+ shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
- filePath = "Pubnub/PubNub/CEPubnub.m"
- timestampString = "366189577.825939"
+ filePath = "Pubnub/iPhoneTest.m"
+ timestampString = "370952321.084141"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "749"
- endingLineNumber = "749"
- landmarkName = "-connection:didCompleteWithResponse:"
- landmarkType = "5">
- </FileBreakpoint>
- <FileBreakpoint
- shouldBeEnabled = "No"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "Pubnub/PubNub/CEPubnub.m"
- timestampString = "366189383.043986"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "118"
- endingLineNumber = "118"
- landmarkName = "-connectionDidFinishLoading:"
+ startingLineNumber = "370"
+ endingLineNumber = "370"
+ landmarkName = "-pubnub:disconnectFromChannel:"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
@@ -13,92 +13,72 @@
// limitations under the License.
#import <Foundation/Foundation.h>
+#import "CEPubnubDelegate.h"
-@class CEPubnub;
-
-@protocol CEPubnubDelegate <NSObject>
-@optional
-- (void) pubnub:(CEPubnub*)pubnub didSucceedPublishingMessageToChannel:(NSString*)channel withResponce: (id)responce message:(id)message;
-- (void) pubnub:(CEPubnub*)pubnub didFailPublishingMessageToChannel:(NSString*)channel error:(NSString*)error message:(id)message; // "error" may be nil
-
- //- (void) pubnub:(PubNub*)pubnub didReceiveMessage:(NSDictionary*)message onChannel:(NSString*)channel;
-
-- (void)pubnub:(CEPubnub *)pubnub subscriptionDidReceiveDictionary:(NSDictionary *)message onChannel:(NSString *)channel;
-- (void)pubnub:(CEPubnub *)pubnub subscriptionDidReceiveArray:(NSArray *)message onChannel:(NSString *)channel;
-- (void)pubnub:(CEPubnub *)pubnub subscriptionDidReceiveString:(NSString *)message onChannel:(NSString *)channel;
-- (void)pubnub:(CEPubnub *)pubnub subscriptionDidFailWithResponse:(NSString *)message onChannel:(NSString *)channel;
-
-- (void) pubnub:(CEPubnub*)pubnub didFetchHistory:(NSArray*)messages forChannel:(NSString*)channel;
-- (void) pubnub:(CEPubnub*)pubnub didFailFetchHistoryOnChannel:(NSString*)channel withError:(id)error;
-
-- (void) pubnub:(CEPubnub*)pubnub didFetchDetailedHistory:(NSArray*)messages forChannel:(NSString*)channel;
-- (void) pubnub:(CEPubnub*)pubnub didFailFetchDetailedHistoryOnChannel:(NSString*)channel withError:(id)error;
-
-- (void) pubnub:(CEPubnub*)pubnub didReceiveTime:(NSTimeInterval)time; // "time" will be NAN on failure
-
-- (void) pubnub:(CEPubnub*)pubnub ConnectToChannel:(NSString*)channel ;
-- (void) pubnub:(CEPubnub*)pubnub DisconnectToChannel:(NSString*)channel ;
-- (void) pubnub:(CEPubnub*)pubnub Re_ConnectToChannel:(NSString*)channel ;
-
-- (void)pubnub:(CEPubnub *)pubnub presence:(NSDictionary *)message onChannel:(NSString *)channel;
-
-- (void)pubnub:(CEPubnub *)pubnub here_now:(NSDictionary *)message onChannel:(NSString *)channel;
-@end
-
- // All operations happen on the main thread
- // Messages must be JSON compatible
+// All operations happen on the main thread
+// Messages must be JSON compatible
@interface CEPubnub : NSObject {
@private
__unsafe_unretained id<CEPubnubDelegate> _delegate;
- NSString* _publishKey;
- NSString* _subscribeKey;
- NSString* _secretKey;
- NSString* _host;
- NSString* _cipherKey;
- NSString* _uuids;
+ NSString *_publishKey;
+ NSString *_subscribeKey;
+ NSString *_secretKey;
+ NSString *_host;
+ NSString *_cipherKey;
+ NSString *_uuids;
NSMutableSet* _connections;
NSMutableSet * _subscriptions;
int _tryCount;
}
-@property(nonatomic, assign) id<CEPubnubDelegate> delegate;
-- (CEPubnub*) initWithSubscribeKey:(NSString*)subscribeKey useSSL:(BOOL)useSSL;
-- (CEPubnub*) initWithPublishKey:(NSString*)publishKey
- subscribeKey:(NSString*)subscribeKey
- secretKey:(NSString*)secretKey
+
+@property (nonatomic, assign) id<CEPubnubDelegate> delegate;
+
+- (CEPubnub *)initWithSubscribeKey:(NSString *)subscribeKey useSSL:(BOOL)useSSL;
+
+- (CEPubnub *)initWithPublishKey:(NSString *)publishKey
+ subscribeKey:(NSString *)subscribeKey
+ secretKey:(NSString *)secretKey
useSSL:(BOOL)useSSL;
-- (CEPubnub*) initWithPublishKey:(NSString*)publishKey // May be nil if -publishMessage:toChannel: is never used
- subscribeKey:(NSString*)subscribeKey
- secretKey:(NSString*)secretKey // May be nil if -publishMessage:toChannel: is never used
+- (CEPubnub *)initWithPublishKey:(NSString *)publishKey // May be nil if -publishMessage:toChannel: is never used
+ subscribeKey:(NSString *)subscribeKey
+ secretKey:(NSString *)secretKey // May be nil if -publishMessage:toChannel: is never used
useSSL:(BOOL)useSSL
- cipherKey:(NSString*)cipherKey
- origin:(NSString*)origin;
+ cipherKey:(NSString *)cipherKey
+ origin:(NSString *)origin;
-- (CEPubnub*) initWithPublishKey:(NSString*)publishKey
- subscribeKey:(NSString*)subscribeKey
- secretKey:(NSString*)secretKey
- cipherKey:(NSString*)cipherKey
+- (CEPubnub *)initWithPublishKey:(NSString *)publishKey
+ subscribeKey:(NSString *)subscribeKey
+ secretKey:(NSString *)secretKey
+ cipherKey:(NSString *)cipherKey
useSSL:(BOOL)useSSL;
-- (void) publish:(NSDictionary * )arg1;
-- (void) publish:(NSString * )message onChannel:(NSString *) channel;
-- (void) fetchHistory:(NSDictionary * )arg1;
-- (void) detailedHistory:(NSDictionary * )arg1;
-- (void) unsubscribeFromAllChannels;
-- (void) getTime;
-+ (NSString*) getUUID;
-- (void) subscribe:(NSString*)channel; // Does nothing if already subscribed
-- (void) unsubscribeFromChannel:(NSString*)channel; // Does nothing if not subscribed
-- (BOOL) isSubscribedToChannel:(NSString*)channel;
-- (void) here_now:(NSString*)channel;
-- (void) presence:(NSString*)channel;
-@end
++ (NSString *)getUUID;
+
+- (void)publish:(NSDictionary *)arg1;
+- (void)publish:(NSString *)message onChannel:(NSString *)channel;
+- (void)fetchHistory:(NSDictionary *)arg1;
+- (void)detailedHistory:(NSDictionary *)arg1;
+- (void)unsubscribeFromAllChannels;
+- (void)getTime;
+- (void)subscribe:(NSString *)channel; // Does nothing if already subscribed
+- (void)unsubscribeFromChannel:(NSString *)channel; // Does nothing if not subscribed
+- (BOOL)isSubscribedToChannel:(NSString *)channel;
+- (void)hereNow:(NSString *)channel;
+- (void)presence:(NSString *)channel;
+- (void)here_now:(NSString *)channel __deprecated;
+
+@end
@interface ChannelStatus :NSObject
-@property(nonatomic, retain) NSString* channel;
+
+@property(nonatomic, retain) NSString *channel;
@property(nonatomic, nonatomic) BOOL connected;
@property(nonatomic, nonatomic) BOOL first;
+
@end
+
+
Oops, something went wrong.

0 comments on commit 872e431

Please sign in to comment.