Sends NetworkChangeNotifier connection type changes to Blink, to support NetInfo v3.
[chromium-blink-merge.git] / remoting / ios / host_refresh.h
blob8cdef3efd59b9aa2d4511955510964f59c703684
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.
5 #ifndef REMOTING_IOS_HOST_REFRESH_H_
6 #define REMOTING_IOS_HOST_REFRESH_H_
8 #import <Foundation/Foundation.h>
10 #import "GTMOAuth2Authentication.h"
12 // HostRefresh encapsulates a fetch of the Chromoting host list from
13 // the jabber service.
15 // Contract to handle the host list result of a Chromoting host list fetch.
16 @protocol HostRefreshDelegate<NSObject>
18 - (void)hostListRefresh:(NSArray*)hostList errorMessage:(NSString*)errorMessage;
20 @end
22 // Fetches the host list from the jabber service async. Authenticates,
23 // and parses the results to provide to a HostListViewController
24 @interface HostRefresh : NSObject<NSURLConnectionDataDelegate>
26 // Store data read while the connection is active, and can be used after the
27 // connection has been discarded
28 @property(nonatomic, copy) NSMutableData* jsonData;
29 @property(nonatomic, copy) NSString* errorMessage;
30 @property(nonatomic, assign) id<HostRefreshDelegate> delegate;
32 - (void)refreshHostList:(GTMOAuth2Authentication*)authReq
33 delegate:(id<HostRefreshDelegate>)delegate;
35 @end
37 #endif // REMOTING_IOS_HOST_REFRESH_H_