client_connection_view_controller.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2017 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. #ifndef REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
  5. #define REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
  6. #import <UIKit/UIKit.h>
  7. @class HostInfo;
  8. // This enumerated the different modes this Client Connection View can be in.
  9. typedef NS_ENUM(NSInteger, ClientConnectionViewState) {
  10. ClientViewConnecting,
  11. ClientViewPinPrompt,
  12. ClientViewConnected,
  13. ClientViewReconnect,
  14. ClientViewClosed,
  15. ClientViewError,
  16. };
  17. // This is the view that shows the user feedback while the client connection is
  18. // being established. If requested the view can also display the pin entry view.
  19. // State communication for this view is handled by NSNotifications, it listens
  20. // to kHostSessionStatusChanged events on the default NSNotificationCenter.
  21. // Internally the notification is tied to [self setState] so view setup will
  22. // work the same way if state is set directly.
  23. @interface ClientConnectionViewController : UIViewController
  24. - (instancetype)initWithHostInfo:(HostInfo*)hostInfo;
  25. // Setting state will change the view
  26. @property(nonatomic, assign) ClientConnectionViewState state;
  27. @end
  28. #endif // REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_