Skip to content

Commit

Permalink
Merge pull request #734 from esl/andres.FixSlotSignature
Browse files Browse the repository at this point in the history
improved api naming and fixed api error when creating slots
  • Loading branch information
chrisballinger committed May 26, 2016
2 parents aefd72a + af933b5 commit cc83f0b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Extensions/XEP-0363/XMPPHTTPFileUpload.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static NSString *const XMPPHTTPFileUploadNamespace = @"urn:xmpp:http:upload";
- (id)initWithServiceName:(NSString *)serviceName;
- (id)initWithServiceName:(NSString *)serviceName dispatchQueue:(dispatch_queue_t)queue;

- (void)requestSlotForFile:(NSString *) filename size:(NSInteger) size contentType:(NSString*) contentType;
- (void)requestSlotForFilename:(NSString *) filename size:(NSInteger) size contentType:(NSString*) contentType;

@end

Expand Down
2 changes: 1 addition & 1 deletion Extensions/XEP-0363/XMPPHTTPFileUpload.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (void)deactivate {
}


- (void)requestSlotForFile:(NSString *) filename size:(NSInteger) size contentType:(NSString*) contentType {
- (void)requestSlotForFilename:(NSString *) filename size:(NSInteger) size contentType:(NSString*) contentType {



Expand Down
2 changes: 1 addition & 1 deletion Extensions/XEP-0363/XMPPSlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@interface XMPPSlot: NSObject

- (id)initWithGet:(NSString *)put andGet:(NSString *)get;
- (id)initWithPut:(NSString *)put andGet:(NSString *)get;
- (id)initWithIQ:(XMPPIQ *)iq;

@property (nonatomic, copy, readonly) NSString *put;
Expand Down
2 changes: 1 addition & 1 deletion Extensions/XEP-0363/XMPPSlot.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation XMPPSlot

- (id)initWithGet:(NSString *)put andGet:(NSString *)get {
- (id)initWithPut:(NSString *)put andGet:(NSString *)get {

self = [super init];
if(self) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (void) testSlotInitWithIQ {

- (void) testSlotInit {

XMPPSlot *slot = [[XMPPSlot alloc] initWithGet:@"http://put.com" andGet:@"http://get.com"];
XMPPSlot *slot = [[XMPPSlot alloc] initWithPut:@"http://put.com" andGet:@"http://get.com"];

XCTAssertEqualObjects(slot.get, @"http://get.com");
XCTAssertEqualObjects(slot.put, @"http://put.com");
Expand Down Expand Up @@ -99,7 +99,7 @@ - (void) testRequestSlot {

XMPPHTTPFileUpload *xmppFileUpload = [[XMPPHTTPFileUpload alloc] initWithServiceName:@"upload.montague.tld"];
[xmppFileUpload activate:streamTest];
[xmppFileUpload requestSlotForFile:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];
[xmppFileUpload requestSlotForFilename:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];

[self waitForExpectationsWithTimeout:1 handler:^(NSError * _Nullable error) {
if(error){
Expand All @@ -125,7 +125,7 @@ - (void) testResponseSlot {
[weakStreamTest fakeIQResponse:iq];
};

[xmppFileUpload requestSlotForFile:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];
[xmppFileUpload requestSlotForFilename:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];

[self waitForExpectationsWithTimeout:10 handler:^(NSError * _Nullable error) {
if(error){
Expand All @@ -149,7 +149,7 @@ - (void) testResponseSlotWithError {
[weakStreamTest fakeIQResponse:iq];
};

[xmppFileUpload requestSlotForFile:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];
[xmppFileUpload requestSlotForFilename:@"my_juliet.png" size:23456 contentType:@"image/jpeg"];

[self waitForExpectationsWithTimeout:10 handler:^(NSError * _Nullable error) {
if(error){
Expand Down

0 comments on commit cc83f0b

Please sign in to comment.