Permalink
Browse files

3.01

  • Loading branch information...
1 parent 1de71d7 commit 5033970ceab314fb51134b1aa5f097f01bab2302 Thomas Greany committed Apr 26, 2012
Showing with 26 additions and 30 deletions.
  1. +5 −0 README.md
  2. +21 −30 libBump/BumpClient.h
  3. BIN libBump/libBump.a
View
@@ -32,6 +32,11 @@ Notes
Release Notes
=============
+3.01
+---
+* fixes userId configuration bug
+* adds optional disconnect/connect calls (first call to sharedClient auto-connects)
+
3.0
---
* setBumpable turns location updates on/off
View
@@ -7,59 +7,50 @@
#import <Foundation/Foundation.h>
-/* an identifier for a Channel. */
typedef unsigned long long BumpChannelID;
typedef enum {
BUMP_EVENT_BUMP = 0,
BUMP_EVENT_NO_MATCH = 1,
} bump_event;
-/* called after a Bump or No Match is detected. */
typedef void (^BumpEventBlock)(bump_event event);
-
-/* called after a Match has occurred. */
-typedef void (^BumpMatchBlock)(BumpChannelID proposedChannelID);
-
-/* called after both parties to a Match have confirmed the proposed Channel */
+typedef void (^BumpMatchBlock)(BumpChannelID channelID);
typedef void (^BumpChannelConfirmedBlock)(BumpChannelID channelID);
-
-/* called when data has been received from the other end of a Channel */
-typedef void (^BumpDataReceivedBlock)(BumpChannelID channel, NSData *data);
-
-/* called when the connection to Bump connects or disconnects. */
typedef void (^BumpConnectionStateChangedBlock)(BOOL connectedToBumpServer);
+typedef void (^BumpDataReceivedBlock)(BumpChannelID channel, NSData *data);
@interface BumpClient : NSObject {}
-/*
- required configuration prior to accessing the sharedClient
- after configuration, the client will attempt to connect to Bump.
- */
-+ (void) configureWithAPIKey : (NSString *) key andUserID : (NSString *) userID;
-
-
+ (BumpClient *) sharedClient;
-/* setters for callback blocks */
-- (void) setBumpEventBlock : (BumpEventBlock) bumpEventBlock;
+- (void) connect; // the first call to sharedClient calls this already
+- (void) disconnect;
+
+// required configuration
++ (void) configureWithAPIKey : (NSString *) key andUserID : (NSString *) userName;
- (void) setMatchBlock : (BumpMatchBlock) matchBlock;
- (void) setChannelConfirmedBlock : (BumpChannelConfirmedBlock) confirmedBlock;
-- (void) setDataReceivedBlock : (BumpDataReceivedBlock) dataReceivedBlock;
-- (void) setConnectionStateChangedBlock : (BumpConnectionStateChangedBlock) connectionBlock;
-/* channel methods */
-- (void) confirmMatch : (BOOL) confirmed onChannel : (BumpChannelID) proposedChannelID;
-- (void) sendData : (NSData *) data toChannel : (BumpChannelID) channelID;
+// channel methods
+- (void) confirmMatch : (BOOL) confirmed onChannel : (BumpChannelID) channel;
+- (void) sendData : (NSData *) data toChannel : (BumpChannelID) channel;
- (NSString *) userIDForChannel : (BumpChannelID) channelID;
-/* turn bumping on/off; defaults to YES. */
+// optional blocks
+- (void) setConnectionStateChangedBlock : (BumpConnectionStateChangedBlock) connectionBlock;
+- (void) setBumpEventBlock : (BumpEventBlock) bumpEventBlock;
+- (void) setDataReceivedBlock : (BumpDataReceivedBlock) dataReceivedBlock;
+
+// turn bumping on/off; defaults to YES.
@property (nonatomic) BOOL bumpable;
-/* bump simulation */
+// specify dispatch queue that callback blocks should placed on.
+// if unset, the main queue is used.
+- (void) setCallbackQueue : (dispatch_queue_t) callbackQueue;
+
+// bump simulation
- (void) simulateBump;
-/* specify dispatch queue that callback blocks should placed on. if unset, the main queue is used. */
-- (void) setCallbackQueue : (dispatch_queue_t) callbackQueue;
@end
View
Binary file not shown.

0 comments on commit 5033970

Please sign in to comment.