OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_IOS_HOST_REFRESH_H_ |
| 6 #define REMOTING_IOS_HOST_REFRESH_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 #include "google_apis/google_api_keys.h" |
| 11 // TODO (aboone) Pulling in some service values from the host side. The cc's |
| 12 // are also compiled as part of this project because the target remoting_host |
| 13 // does not build on iOS right now. |
| 14 #include "remoting/host/setup/oauth_helper.h" |
| 15 #include "remoting/host/service_urls.h" |
| 16 |
| 17 #import "GTMOAuth2Authentication.h" |
| 18 |
| 19 namespace { |
| 20 static NSString* const kKeychainItemName = @"Google Chromoting iOS"; |
| 21 } // namespace |
| 22 |
| 23 // HostRefresh encapulates a fetch of the Chromoting hostlist from |
| 24 // the jabber service. |
| 25 |
| 26 // Contract to handle the hostlist result of a Chromoting hostlist fetch. |
| 27 @protocol HostRefreshDelegate<NSObject> |
| 28 |
| 29 - (void)hostListRefresh:(NSArray*)hostList; |
| 30 |
| 31 @end |
| 32 |
| 33 // Fetches the host list from the jabber service async. Authenticates, |
| 34 // and parses the results to provide to a HostListViewController |
| 35 @interface HostRefresh : NSObject<NSURLConnectionDataDelegate> { |
| 36 @private |
| 37 // Store data read while the connection is active, and can be used after the |
| 38 // connection has been discarded |
| 39 NSMutableData* _jsonData; |
| 40 |
| 41 id<HostRefreshDelegate> _delegate; |
| 42 } |
| 43 |
| 44 - (void)refreshHostList:(GTMOAuth2Authentication*)authReq |
| 45 delegate:(id<HostRefreshDelegate>)delegate; |
| 46 |
| 47 @end |
| 48 |
| 49 #endif // REMOTING_IOS_HOST_REFRESH_H_ |
OLD | NEW |