Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: remoting/ios/host_refresh.h

Issue 186733007: iOS Chromoting Client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/ios/host_preferences.h ('k') | remoting/ios/host_refresh.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/host_refresh.h
diff --git a/remoting/ios/host_refresh.h b/remoting/ios/host_refresh.h
new file mode 100644
index 0000000000000000000000000000000000000000..8cdef3efd59b9aa2d4511955510964f59c703684
--- /dev/null
+++ b/remoting/ios/host_refresh.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_IOS_HOST_REFRESH_H_
+#define REMOTING_IOS_HOST_REFRESH_H_
+
+#import <Foundation/Foundation.h>
+
+#import "GTMOAuth2Authentication.h"
+
+// HostRefresh encapsulates a fetch of the Chromoting host list from
+// the jabber service.
+
+// Contract to handle the host list result of a Chromoting host list fetch.
+@protocol HostRefreshDelegate<NSObject>
+
+- (void)hostListRefresh:(NSArray*)hostList errorMessage:(NSString*)errorMessage;
+
+@end
+
+// Fetches the host list from the jabber service async. Authenticates,
+// and parses the results to provide to a HostListViewController
+@interface HostRefresh : NSObject<NSURLConnectionDataDelegate>
+
+// Store data read while the connection is active, and can be used after the
+// connection has been discarded
+@property(nonatomic, copy) NSMutableData* jsonData;
+@property(nonatomic, copy) NSString* errorMessage;
+@property(nonatomic, assign) id<HostRefreshDelegate> delegate;
+
+- (void)refreshHostList:(GTMOAuth2Authentication*)authReq
+ delegate:(id<HostRefreshDelegate>)delegate;
+
+@end
+
+#endif // REMOTING_IOS_HOST_REFRESH_H_
« no previous file with comments | « remoting/ios/host_preferences.h ('k') | remoting/ios/host_refresh.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698