VLCNetworkLoginViewController.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*****************************************************************************
  2. * VLCNetworkLoginViewController.h
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Felix Paul Kühne <fkuehne # videolan.org>
  9. * Pierre SAGASPE <pierre.sagaspe # me.com>
  10. *
  11. * Refer to the COPYING file of the official project for license.
  12. *****************************************************************************/
  13. #import <UIKit/UIKit.h>
  14. typedef NS_ENUM(NSInteger, VLCServerProtocol) {
  15. VLCServerProtocolSMB,
  16. VLCServerProtocolFTP,
  17. VLCServerProtocolPLEX,
  18. VLCServerProtocolUndefined,
  19. };
  20. @protocol VLCNetworkLoginViewControllerDelegate <NSObject>
  21. @required
  22. - (void)loginToServer:(NSString *)server
  23. port:(NSString *)port
  24. protocol:(VLCServerProtocol)protocol
  25. confirmedWithUsername:(NSString *)username
  26. andPassword:(NSString *)password;
  27. @end
  28. @interface VLCNetworkLoginViewController : UIViewController
  29. @property (nonatomic, strong) IBOutlet UISegmentedControl *protocolSegmentedControl;
  30. @property (nonatomic, strong) IBOutlet UITextField *serverField;
  31. @property (nonatomic, strong) IBOutlet UILabel *serverLabel;
  32. @property (nonatomic, strong) IBOutlet UITextField *portField;
  33. @property (nonatomic, strong) IBOutlet UILabel *portLabel;
  34. @property (nonatomic, strong) IBOutlet UIButton *connectButton;
  35. @property (nonatomic, strong) IBOutlet UITextField *usernameField;
  36. @property (nonatomic, strong) IBOutlet UITextField *passwordField;
  37. @property (nonatomic, strong) IBOutlet UILabel *loginHelpLabel;
  38. @property (nonatomic, strong) IBOutlet UITableView *storedServersTableView;
  39. @property (nonatomic, strong) IBOutlet UIButton *saveButton;
  40. @property (nonatomic, readwrite) NSInteger serverProtocol;
  41. @property (nonatomic, retain) NSString *hostname;
  42. @property (nonatomic, retain) NSString *port;
  43. @property (nonatomic, retain) NSString *username;
  44. @property (nonatomic, retain) NSString *password;
  45. @property (nonatomic, retain) id delegate;
  46. - (IBAction)connectToServer:(id)sender;
  47. - (IBAction)saveServer:(id)sender;
  48. - (IBAction)protocolSelectionChanged:(id)sender;
  49. @end