mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-16 05:31:01 +00:00
Parse and persist ServerCodecModeSupport attribute for hosts
This commit is contained in:
@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (nonatomic, retain) NSString *mac;
|
@property (nonatomic, retain) NSString *mac;
|
||||||
@property (nonatomic, retain) NSString *name;
|
@property (nonatomic, retain) NSString *name;
|
||||||
@property (nonatomic, retain) NSString *uuid;
|
@property (nonatomic, retain) NSString *uuid;
|
||||||
|
@property (nonatomic) int serverCodecModeSupport;
|
||||||
@property (nonatomic, retain) NSMutableSet *appList;
|
@property (nonatomic, retain) NSMutableSet *appList;
|
||||||
|
|
||||||
- (id) initFromHost:(Host*)host;
|
- (id) initFromHost:(Host*)host;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
self.name = host.name;
|
self.name = host.name;
|
||||||
self.uuid = host.uuid;
|
self.uuid = host.uuid;
|
||||||
self.pairState = [host.pairState intValue];
|
self.pairState = [host.pairState intValue];
|
||||||
|
self.serverCodecModeSupport = host.serverCodecModeSupport;
|
||||||
|
|
||||||
NSMutableSet *appList = [[NSMutableSet alloc] init];
|
NSMutableSet *appList = [[NSMutableSet alloc] init];
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
}
|
}
|
||||||
parentHost.name = self.name;
|
parentHost.name = self.name;
|
||||||
parentHost.uuid = self.uuid;
|
parentHost.uuid = self.uuid;
|
||||||
|
parentHost.serverCodecModeSupport = self.serverCodecModeSupport;
|
||||||
parentHost.pairState = [NSNumber numberWithInt:self.pairState];
|
parentHost.pairState = [NSNumber numberWithInt:self.pairState];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<attribute name="mac" optional="YES" attributeType="String" syncable="YES"/>
|
<attribute name="mac" optional="YES" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="name" attributeType="String" syncable="YES"/>
|
<attribute name="name" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="pairState" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="pairState" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
|
||||||
|
<attribute name="serverCodecModeSupport" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
|
<attribute name="uuid" optional="YES" attributeType="String" syncable="YES"/>
|
||||||
<relationship name="appList" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="App" inverseName="host" inverseEntity="App" syncable="YES"/>
|
<relationship name="appList" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="App" inverseName="host" inverseEntity="App" syncable="YES"/>
|
||||||
</entity>
|
</entity>
|
||||||
|
|||||||
@@ -39,6 +39,11 @@
|
|||||||
} else {
|
} else {
|
||||||
host.pairState = PairStateUnknown;
|
host.pairState = PairStateUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSString *serverCodecModeString = [self getStringTag:@"ServerCodecModeSupport"];
|
||||||
|
if (serverCodecModeString != nil) {
|
||||||
|
host.serverCodecModeSupport = [[serverCodecModeString trim] intValue];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user