mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-07 16:26:09 +00:00
39 lines
775 B
Objective-C
39 lines
775 B
Objective-C
//
|
|
// TemporaryApp.m
|
|
// Moonlight
|
|
//
|
|
// Created by Cameron Gutman on 9/30/15.
|
|
// Copyright © 2015 Moonlight Stream. All rights reserved.
|
|
//
|
|
|
|
#import "TemporaryApp.h"
|
|
#import "App.h"
|
|
|
|
@implementation TemporaryApp
|
|
|
|
- (id) initFromApp:(App*)app withTempHost:(TemporaryHost*)tempHost {
|
|
self = [self init];
|
|
|
|
self.parent = app;
|
|
|
|
self.id = app.id;
|
|
self.image = app.image;
|
|
self.name = app.name;
|
|
self.host = tempHost;
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void) propagateChangesToParent {
|
|
self.parent.id = self.id;
|
|
self.parent.image = self.image;
|
|
self.parent.name = self.name;
|
|
self.parent.host = self.host.parent;
|
|
}
|
|
|
|
- (NSComparisonResult)compareName:(TemporaryApp *)other {
|
|
return [self.name caseInsensitiveCompare:other.name];
|
|
}
|
|
|
|
@end
|