forked from FreeRDP/FreeRDP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the initial release of iFreeRDP the FreeRDP iOS client. Build instructions can be found in docs/README.ios.
- Loading branch information
Showing
183 changed files
with
18,818 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
iOS | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# XCode files | ||
project.xcworkspace/ | ||
xcuserdata/ | ||
bin/ | ||
build/ | ||
project.pbxproj | ||
!iFreeRDP.xcodeproj/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// OrderedDictionary.h | ||
// OrderedDictionary | ||
// | ||
// Modified version (Added indexForKey/Value functions) | ||
// | ||
// Created by Matt Gallagher on 19/12/08. | ||
// Copyright 2008 Matt Gallagher. All rights reserved. | ||
// | ||
// This software is provided 'as-is', without any express or implied | ||
// warranty. In no event will the authors be held liable for any damages | ||
// arising from the use of this software. Permission is granted to anyone to | ||
// use this software for any purpose, including commercial applications, and to | ||
// alter it and redistribute it freely, subject to the following restrictions: | ||
// | ||
// 1. The origin of this software must not be misrepresented; you must not | ||
// claim that you wrote the original software. If you use this software | ||
// in a product, an acknowledgment in the product documentation would be | ||
// appreciated but is not required. | ||
// 2. Altered source versions must be plainly marked as such, and must not be | ||
// misrepresented as being the original software. | ||
// 3. This notice may not be removed or altered from any source | ||
// distribution. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface OrderedDictionary : NSMutableDictionary | ||
{ | ||
NSMutableDictionary *dictionary; | ||
NSMutableArray *array; | ||
} | ||
|
||
- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex; | ||
- (id)keyAtIndex:(NSUInteger)anIndex; | ||
- (NSUInteger)indexForValue:(id)value; | ||
- (NSUInteger)indexForKey:(id)key; | ||
- (NSEnumerator *)reverseKeyEnumerator; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
// | ||
// OrderedDictionary.m | ||
// OrderedDictionary | ||
// | ||
// Modified version (Added indexForKey/Value functions) | ||
// | ||
// Created by Matt Gallagher on 19/12/08. | ||
// Copyright 2008 Matt Gallagher. All rights reserved. | ||
// | ||
// This software is provided 'as-is', without any express or implied | ||
// warranty. In no event will the authors be held liable for any damages | ||
// arising from the use of this software. Permission is granted to anyone to | ||
// use this software for any purpose, including commercial applications, and to | ||
// alter it and redistribute it freely, subject to the following restrictions: | ||
// | ||
// 1. The origin of this software must not be misrepresented; you must not | ||
// claim that you wrote the original software. If you use this software | ||
// in a product, an acknowledgment in the product documentation would be | ||
// appreciated but is not required. | ||
// 2. Altered source versions must be plainly marked as such, and must not be | ||
// misrepresented as being the original software. | ||
// 3. This notice may not be removed or altered from any source | ||
// distribution. | ||
// | ||
|
||
#import "OrderedDictionary.h" | ||
|
||
NSString *DescriptionForObject(NSObject *object, id locale, NSUInteger indent) | ||
{ | ||
NSString *objectString; | ||
if ([object isKindOfClass:[NSString class]]) | ||
{ | ||
objectString = (NSString *)[[object retain] autorelease]; | ||
} | ||
else if ([object respondsToSelector:@selector(descriptionWithLocale:indent:)]) | ||
{ | ||
objectString = [(NSDictionary *)object descriptionWithLocale:locale indent:indent]; | ||
} | ||
else if ([object respondsToSelector:@selector(descriptionWithLocale:)]) | ||
{ | ||
objectString = [(NSSet *)object descriptionWithLocale:locale]; | ||
} | ||
else | ||
{ | ||
objectString = [object description]; | ||
} | ||
return objectString; | ||
} | ||
|
||
@implementation OrderedDictionary | ||
|
||
- (id)init | ||
{ | ||
return [self initWithCapacity:0]; | ||
} | ||
|
||
- (id)initWithCapacity:(NSUInteger)capacity | ||
{ | ||
self = [super init]; | ||
if (self != nil) | ||
{ | ||
dictionary = [[NSMutableDictionary alloc] initWithCapacity:capacity]; | ||
array = [[NSMutableArray alloc] initWithCapacity:capacity]; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
[dictionary release]; | ||
[array release]; | ||
[super dealloc]; | ||
} | ||
|
||
- (id)copy | ||
{ | ||
return [self mutableCopy]; | ||
} | ||
|
||
- (void)setObject:(id)anObject forKey:(id)aKey | ||
{ | ||
if (![dictionary objectForKey:aKey]) | ||
{ | ||
[array addObject:aKey]; | ||
} | ||
[dictionary setObject:anObject forKey:aKey]; | ||
} | ||
|
||
- (void)removeObjectForKey:(id)aKey | ||
{ | ||
[dictionary removeObjectForKey:aKey]; | ||
[array removeObject:aKey]; | ||
} | ||
|
||
- (NSUInteger)count | ||
{ | ||
return [dictionary count]; | ||
} | ||
|
||
- (id)objectForKey:(id)aKey | ||
{ | ||
return [dictionary objectForKey:aKey]; | ||
} | ||
|
||
- (NSEnumerator *)keyEnumerator | ||
{ | ||
return [array objectEnumerator]; | ||
} | ||
|
||
- (NSEnumerator *)reverseKeyEnumerator | ||
{ | ||
return [array reverseObjectEnumerator]; | ||
} | ||
|
||
- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex | ||
{ | ||
if ([dictionary objectForKey:aKey]) | ||
{ | ||
[self removeObjectForKey:aKey]; | ||
} | ||
[array insertObject:aKey atIndex:anIndex]; | ||
[dictionary setObject:anObject forKey:aKey]; | ||
} | ||
|
||
- (id)keyAtIndex:(NSUInteger)anIndex | ||
{ | ||
return [array objectAtIndex:anIndex]; | ||
} | ||
|
||
- (NSUInteger)indexForKey:(id)key | ||
{ | ||
return [array indexOfObject:key]; | ||
} | ||
|
||
- (NSUInteger)indexForValue:(id)value | ||
{ | ||
NSArray* keys = [self allKeysForObject:value]; | ||
if ([keys count] > 0) | ||
{ | ||
return [self indexForKey:[keys objectAtIndex:0]]; | ||
} | ||
|
||
return NSNotFound; | ||
} | ||
|
||
- (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level | ||
{ | ||
NSMutableString *indentString = [NSMutableString string]; | ||
NSUInteger i, count = level; | ||
for (i = 0; i < count; i++) | ||
{ | ||
[indentString appendFormat:@" "]; | ||
} | ||
|
||
NSMutableString *description = [NSMutableString string]; | ||
[description appendFormat:@"%@{\n", indentString]; | ||
for (NSObject *key in self) | ||
{ | ||
[description appendFormat:@"%@ %@ = %@;\n", | ||
indentString, | ||
DescriptionForObject(key, locale, level), | ||
DescriptionForObject([self objectForKey:key], locale, level)]; | ||
} | ||
[description appendFormat:@"%@}\n", indentString]; | ||
return description; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Additions to Cocoa touch classes | ||
Copyright 2013 Thinstuff Technologies GmbH, Authors: Dorian Johnson, Martin Fleisz | ||
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSObject (TSXAdditions) | ||
- (void)setValuesForKeyPathsWithDictionary:(NSDictionary *)keyedValues; | ||
@end | ||
|
||
#pragma mark - | ||
@interface NSString (TSXAdditions) | ||
+ (NSString*)stringWithUUID; | ||
- (NSData*)dataFromHexString; | ||
+ (NSString*)hexStringFromData:(const unsigned char *)data ofSize:(unsigned int)size withSeparator:(NSString *)sep afterNthChar:(int)sepnth; | ||
@end | ||
|
||
@interface NSDictionary (TSXAdditions) | ||
- (id)mutableDeepCopy; | ||
@end | ||
|
||
@interface NSData (TSXAdditions) | ||
- (NSString *)hexadecimalString; | ||
- (NSString *)base64EncodedString; | ||
@end |
Oops, something went wrong.