FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
PasswordDialog Class Reference

#include <PasswordDialog.h>

Inheritance diagram for PasswordDialog:
Collaboration diagram for PasswordDialog:

Instance Methods

(IBAction) - onOK:
 
(IBAction) - onCancel:
 
(BOOL) - runModal:
 

Data Fields

NSTextField * usernameText
 
NSTextField * passwordText
 
NSTextField * messageLabel
 

Properties

IBOutlet NSTextField * usernameText
 
IBOutlet NSTextField * passwordText
 
IBOutlet NSTextField * messageLabel
 
NSString * serverHostname
 
NSString * username
 
NSString * password
 
NSString * domain
 
BOOL modalCode
 

Detailed Description

FreeRDP: A Remote Desktop Protocol Implementation MacFreeRDP

Copyright 2013 Christian Hofstaedtler

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 22 of file PasswordDialog.h.

Method Documentation

◆ onCancel:

- (IBAction) onCancel: (NSObject *)  sender

Definition at line 27 of file PasswordDialog.m.

100 :(NSObject *)sender
101{
102 [NSApp stopModalWithCode:FALSE];
103}

◆ onOK:

- (IBAction) onOK: (NSObject *)  sender

Definition at line 27 of file PasswordDialog.m.

73 :(NSObject *)sender
74{
75 char *submittedUser = NULL;
76 char *submittedDomain = NULL;
77
78 if (freerdp_parse_username(
79 [self.usernameText.stringValue cStringUsingEncoding:NSUTF8StringEncoding],
80 &submittedUser, &submittedDomain))
81 {
82 if (submittedUser)
83 self.username = [NSString stringWithCString:submittedUser
84 encoding:NSUTF8StringEncoding];
85 if (submittedDomain)
86 self.domain = [NSString stringWithCString:submittedDomain
87 encoding:NSUTF8StringEncoding];
88 }
89 else
90 {
91 self.username = self.usernameText.stringValue;
92 }
93
94 self.password = self.passwordText.stringValue;
95 free(submittedUser);
96 free(submittedDomain);
97 [NSApp stopModalWithCode:TRUE];
98}

◆ runModal:

- (BOOL) runModal: (NSWindow *)  mainWindow

Definition at line 27 of file PasswordDialog.m.

105 :(NSWindow *)mainWindow
106{
107 if ([mainWindow respondsToSelector:@selector(beginSheet:completionHandler:)])
108 {
109 [mainWindow beginSheet:self.window completionHandler:nil];
110 self.modalCode = [NSApp runModalForWindow:self.window];
111 [mainWindow endSheet:self.window];
112 }
113 else
114 {
115 [NSApp beginSheet:self.window
116 modalForWindow:mainWindow
117 modalDelegate:nil
118 didEndSelector:nil
119 contextInfo:nil];
120 self.modalCode = [NSApp runModalForWindow:self.window];
121 [NSApp endSheet:self.window];
122 }
123
124 [self.window orderOut:nil];
125 return self.modalCode;
126}

Field Documentation

◆ messageLabel

- (NSTextField*) messageLabel

Definition at line 27 of file PasswordDialog.h.

◆ passwordText

- (NSTextField*) passwordText

Definition at line 26 of file PasswordDialog.h.

◆ usernameText

- (NSTextField*) usernameText

Definition at line 25 of file PasswordDialog.h.

Property Documentation

◆ domain

- (NSString *) domain
readwriteatomicretain

Definition at line 31 of file PasswordDialog.h.

◆ messageLabel

- (IBOutlet NSTextField*) messageLabel
readwriteatomicretain

Definition at line 36 of file PasswordDialog.h.

◆ modalCode

- (BOOL) modalCode
readatomicassign

Definition at line 32 of file PasswordDialog.h.

◆ password

- (NSString *) password
readwriteatomicretain

Definition at line 30 of file PasswordDialog.h.

◆ passwordText

- (IBOutlet NSTextField*) passwordText
readwriteatomicretain

Definition at line 35 of file PasswordDialog.h.

◆ serverHostname

- (NSString *) serverHostname
readwriteatomicretain

Definition at line 28 of file PasswordDialog.h.

◆ username

- (NSString *) username
readwriteatomicretain

Definition at line 29 of file PasswordDialog.h.

◆ usernameText

- (IBOutlet NSTextField*) usernameText
readwriteatomicretain

Definition at line 34 of file PasswordDialog.h.


The documentation for this class was generated from the following files: