Get rid of async prefix

All operations are async anyway.

FossilOrigin-Name: d18fbd29fb7caa8dc87cc31caee4f2b6e94b498032bae3bbce2b7c2510bc3575
This commit is contained in:
Jonathan Schleifer 2020-10-03 17:23:45 +00:00
parent c4a1bd7932
commit 1985cb9b46
5 changed files with 15 additions and 15 deletions

View file

@ -116,14 +116,14 @@ typedef void (^mtx_client_room_list_block_t)(
* *
* @param block A block to call when logging out succeeded or failed * @param block A block to call when logging out succeeded or failed
*/ */
- (void)asyncLogOutWithBlock: (mtx_client_logout_block_t)block; - (void)logOutWithBlock: (mtx_client_logout_block_t)block;
/** /**
* @brief Fetches the list of joined rooms. * @brief Fetches the list of joined rooms.
* *
* @param block A block to call with the list of joined room * @param block A block to call with the list of joined room
*/ */
- (void)asyncFetchRoomList: (mtx_client_room_list_block_t)block; - (void)fetchRoomListWithBlock: (mtx_client_room_list_block_t)block;
@end @end
OF_ASSUME_NONNULL_END OF_ASSUME_NONNULL_END

View file

@ -78,8 +78,8 @@ validateHomeserver(OFURL *homeserver)
@"password": password @"password": password
}; };
[request asyncPerformWithBlock: ^ (mtx_response_t response, [request performWithBlock: ^ (mtx_response_t response, int statusCode,
int statusCode, id exception) { id exception) {
if (exception != nil) { if (exception != nil) {
block(nil, exception); block(nil, exception);
return; return;
@ -186,14 +186,14 @@ validateHomeserver(OFURL *homeserver)
homeserver: _homeserver]; homeserver: _homeserver];
} }
- (void)asyncLogOutWithBlock: (mtx_client_logout_block_t)block - (void)logOutWithBlock: (mtx_client_logout_block_t)block
{ {
void *pool = objc_autoreleasePoolPush(); void *pool = objc_autoreleasePoolPush();
MTXRequest *request = MTXRequest *request =
[self requestWithPath: @"/_matrix/client/r0/logout"]; [self requestWithPath: @"/_matrix/client/r0/logout"];
request.method = OF_HTTP_REQUEST_METHOD_POST; request.method = OF_HTTP_REQUEST_METHOD_POST;
[request asyncPerformWithBlock: ^ (mtx_response_t response, [request performWithBlock: ^ (mtx_response_t response, int statusCode,
int statusCode, id exception) { id exception) {
if (exception != nil) { if (exception != nil) {
block(exception); block(exception);
return; return;
@ -213,13 +213,13 @@ validateHomeserver(OFURL *homeserver)
objc_autoreleasePoolPop(pool); objc_autoreleasePoolPop(pool);
} }
- (void)asyncFetchRoomList: (mtx_client_room_list_block_t)block - (void)fetchRoomListWithBlock: (mtx_client_room_list_block_t)block
{ {
void *pool = objc_autoreleasePoolPush(); void *pool = objc_autoreleasePoolPush();
MTXRequest *request = MTXRequest *request =
[self requestWithPath: @"/_matrix/client/r0/joined_rooms"]; [self requestWithPath: @"/_matrix/client/r0/joined_rooms"];
[request asyncPerformWithBlock: ^ (mtx_response_t response, [request performWithBlock: ^ (mtx_response_t response, int statusCode,
int statusCode, id exception) { id exception) {
if (exception != nil) { if (exception != nil) {
block(nil, exception); block(nil, exception);
return; return;

View file

@ -106,7 +106,7 @@ typedef void (^mtx_request_block_t)(mtx_response_t _Nullable response,
* *
* @param block The block to call once the request succeeded or failed * @param block The block to call once the request succeeded or failed
*/ */
- (void)asyncPerformWithBlock: (mtx_request_block_t)block; - (void)performWithBlock: (mtx_request_block_t)block;
@end @end
OF_ASSUME_NONNULL_END OF_ASSUME_NONNULL_END

View file

@ -87,7 +87,7 @@
.objectByParsingJSON; .objectByParsingJSON;
} }
- (void)asyncPerformWithBlock: (mtx_request_block_t)block - (void)performWithBlock: (mtx_request_block_t)block
{ {
void *pool = objc_autoreleasePoolPush(); void *pool = objc_autoreleasePoolPush();

View file

@ -65,8 +65,8 @@ OF_APPLICATION_DELEGATE(Tests)
- (void)fetchRoomList - (void)fetchRoomList
{ {
[_client asyncFetchRoomList: ^ (OFArray<OFString *> *rooms, [_client fetchRoomListWithBlock: ^ (OFArray<OFString *> *rooms,
id exception) { id exception) {
if (exception != nil) { if (exception != nil) {
of_log(@"Failed to fetch room list: %@", exception); of_log(@"Failed to fetch room list: %@", exception);
[OFApplication terminateWithStatus: 1]; [OFApplication terminateWithStatus: 1];
@ -80,7 +80,7 @@ OF_APPLICATION_DELEGATE(Tests)
- (void)logOut - (void)logOut
{ {
[_client asyncLogOutWithBlock: ^ (id exception) { [_client logOutWithBlock: ^ (id exception) {
if (exception != nil) { if (exception != nil) {
of_log(@"Failed to log out: %@\n", exception); of_log(@"Failed to log out: %@\n", exception);
[OFApplication terminateWithStatus: 1]; [OFApplication terminateWithStatus: 1];