mirror of https://github.com/FreeRDP/FreeRDP
client/iOS: remove deprecated includes
This commit is contained in:
parent
496ce10637
commit
98965d4258
|
@ -7,7 +7,6 @@
|
|||
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#import <freerdp/utils/event.h>
|
||||
#import <freerdp/gdi/gdi.h>
|
||||
#import <freerdp/channels/channels.h>
|
||||
#import <freerdp/client/channels.h>
|
||||
|
@ -23,8 +22,7 @@
|
|||
|
||||
#pragma mark Connection helpers
|
||||
|
||||
static BOOL
|
||||
ios_pre_connect(freerdp * instance)
|
||||
static BOOL ios_pre_connect(freerdp* instance)
|
||||
{
|
||||
rdpSettings* settings = instance->settings;
|
||||
|
||||
|
@ -64,9 +62,9 @@ ios_pre_connect(freerdp * instance)
|
|||
settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE;
|
||||
settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE;
|
||||
|
||||
settings->FrameAcknowledge = 10;
|
||||
settings->FrameAcknowledge = 10;
|
||||
|
||||
freerdp_client_load_addins(instance->context->channels, instance->settings);
|
||||
freerdp_client_load_addins(instance->context->channels, instance->settings);
|
||||
|
||||
freerdp_channels_pre_connect(instance->context->channels, instance);
|
||||
|
||||
|
@ -77,7 +75,7 @@ static BOOL ios_post_connect(freerdp* instance)
|
|||
{
|
||||
mfInfo* mfi = MFI_FROM_INSTANCE(instance);
|
||||
|
||||
instance->context->cache = cache_new(instance->settings);
|
||||
instance->context->cache = cache_new(instance->settings);
|
||||
|
||||
// Graphics callbacks
|
||||
ios_allocate_display_buffer(mfi);
|
||||
|
@ -92,18 +90,10 @@ static BOOL ios_post_connect(freerdp* instance)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void ios_process_channel_event(rdpChannels* channels, freerdp* instance)
|
||||
{
|
||||
wMessage* event = freerdp_channels_pop_event(channels);
|
||||
if (event)
|
||||
freerdp_event_free(event);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Running the connection
|
||||
|
||||
int
|
||||
ios_run_freerdp(freerdp * instance)
|
||||
int ios_run_freerdp(freerdp* instance)
|
||||
{
|
||||
mfContext* context = (mfContext*)instance->context;
|
||||
mfInfo* mfi = context->mfi;
|
||||
|
@ -133,8 +123,8 @@ ios_run_freerdp(freerdp * instance)
|
|||
void* wfds[32];
|
||||
fd_set rfds_set;
|
||||
fd_set wfds_set;
|
||||
struct timeval timeout;
|
||||
int select_status;
|
||||
struct timeval timeout;
|
||||
int select_status;
|
||||
|
||||
memset(rfds, 0, sizeof(rfds));
|
||||
memset(wfds, 0, sizeof(wfds));
|
||||
|
@ -187,15 +177,17 @@ ios_run_freerdp(freerdp * instance)
|
|||
|
||||
// timeout?
|
||||
if (select_status == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (select_status == -1)
|
||||
{
|
||||
/* these are not really errors */
|
||||
if (!((errno == EAGAIN) ||
|
||||
(errno == EWOULDBLOCK) ||
|
||||
(errno == EINPROGRESS) ||
|
||||
(errno == EINTR))) /* signal occurred */
|
||||
{
|
||||
/* these are not really errors */
|
||||
if (!((errno == EAGAIN) ||
|
||||
(errno == EWOULDBLOCK) ||
|
||||
(errno == EINPROGRESS) ||
|
||||
(errno == EINTR))) /* signal occurred */
|
||||
{
|
||||
NSLog(@"%s: select failed!", __func__);
|
||||
break;
|
||||
}
|
||||
|
@ -222,7 +214,6 @@ ios_run_freerdp(freerdp * instance)
|
|||
NSLog(@"%s: freerdp_chanman_check_fds failed", __func__);
|
||||
break;
|
||||
}
|
||||
ios_process_channel_event(channels, instance);
|
||||
|
||||
[pool release]; pool = nil;
|
||||
}
|
||||
|
@ -235,7 +226,7 @@ ios_run_freerdp(freerdp * instance)
|
|||
freerdp_channels_close(channels, instance);
|
||||
freerdp_disconnect(instance);
|
||||
gdi_free(instance);
|
||||
cache_free(instance->context->cache);
|
||||
cache_free(instance->context->cache);
|
||||
|
||||
[pool release]; pool = nil;
|
||||
return MF_EXIT_SUCCESS;
|
||||
|
@ -277,19 +268,19 @@ freerdp* ios_freerdp_new()
|
|||
inst->PostConnect = ios_post_connect;
|
||||
inst->Authenticate = ios_ui_authenticate;
|
||||
inst->VerifyCertificate = ios_ui_check_certificate;
|
||||
inst->VerifyChangedCertificate = ios_ui_check_changed_certificate;
|
||||
inst->VerifyChangedCertificate = ios_ui_check_changed_certificate;
|
||||
|
||||
inst->ContextSize = sizeof(mfContext);
|
||||
inst->ContextNew = ios_context_new;
|
||||
inst->ContextFree = ios_context_free;
|
||||
freerdp_context_new(inst);
|
||||
|
||||
// determine new home path
|
||||
NSString* home_path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
|
||||
free(inst->settings->HomePath);
|
||||
free(inst->settings->ConfigPath);
|
||||
inst->settings->HomePath = strdup([home_path UTF8String]);
|
||||
inst->settings->ConfigPath = strdup([[home_path stringByAppendingPathComponent:@".freerdp"] UTF8String]);
|
||||
// determine new home path
|
||||
NSString* home_path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
|
||||
free(inst->settings->HomePath);
|
||||
free(inst->settings->ConfigPath);
|
||||
inst->settings->HomePath = strdup([home_path UTF8String]);
|
||||
inst->settings->ConfigPath = strdup([[home_path stringByAppendingPathComponent:@".freerdp"] UTF8String]);
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
@ -303,7 +294,7 @@ void ios_freerdp_free(freerdp* instance)
|
|||
void ios_init_freerdp()
|
||||
{
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0);
|
||||
freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0);
|
||||
}
|
||||
|
||||
void ios_uninit_freerdp()
|
||||
|
|
Loading…
Reference in New Issue