Add wg-quick related model properties.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-05-24 06:21:46 +02:00
parent c5237d5342
commit d2dd61cf0c
6 changed files with 83 additions and 7 deletions

View File

@ -25,6 +25,8 @@
4A4BAD2120B6026900F12B28 /* Peer+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1D20B6026900F12B28 /* Peer+CoreDataClass.swift */; };
4A4BAD2220B6026900F12B28 /* Interface+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1E20B6026900F12B28 /* Interface+CoreDataProperties.swift */; };
4A4BAD2320B6026900F12B28 /* Interface+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BAD1F20B6026900F12B28 /* Interface+CoreDataClass.swift */; };
4A7F6EDD20B674CD00B260B7 /* Address+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A7F6EDB20B674CD00B260B7 /* Address+CoreDataClass.swift */; };
4A7F6EDE20B674CD00B260B7 /* Address+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A7F6EDC20B674CD00B260B7 /* Address+CoreDataProperties.swift */; };
DA734B3636730B94E9C22F47 /* Pods_Wireguard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BF50C7EC60CD91BBA05E51F /* Pods_Wireguard.framework */; };
/* End PBXBuildFile section */
@ -61,6 +63,8 @@
4A4BAD1D20B6026900F12B28 /* Peer+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Peer+CoreDataClass.swift"; path = "/Users/jeroenleenarts/code/wireguard-ios/Wireguard/Models/Peer+CoreDataClass.swift"; sourceTree = "<absolute>"; };
4A4BAD1E20B6026900F12B28 /* Interface+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Interface+CoreDataProperties.swift"; path = "/Users/jeroenleenarts/code/wireguard-ios/Wireguard/Models/Interface+CoreDataProperties.swift"; sourceTree = "<absolute>"; };
4A4BAD1F20B6026900F12B28 /* Interface+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "Interface+CoreDataClass.swift"; path = "/Users/jeroenleenarts/code/wireguard-ios/Wireguard/Models/Interface+CoreDataClass.swift"; sourceTree = "<absolute>"; };
4A7F6EDB20B674CD00B260B7 /* Address+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Address+CoreDataClass.swift"; sourceTree = "<group>"; };
4A7F6EDC20B674CD00B260B7 /* Address+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Address+CoreDataProperties.swift"; sourceTree = "<group>"; };
82069F3AE97A82448F990CFB /* Pods-Wireguard.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wireguard.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard.debug.xcconfig"; sourceTree = "<group>"; };
8BF50C7EC60CD91BBA05E51F /* Pods_Wireguard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Wireguard.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FB0ABC1036F5A16B24286D3C /* Pods-Wireguard.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wireguard.release.xcconfig"; path = "Pods/Target Support Files/Pods-Wireguard/Pods-Wireguard.release.xcconfig"; sourceTree = "<group>"; };
@ -160,6 +164,8 @@
4A4BAD1420B5F8C000F12B28 /* Models */ = {
isa = PBXGroup;
children = (
4A7F6EDB20B674CD00B260B7 /* Address+CoreDataClass.swift */,
4A7F6EDC20B674CD00B260B7 /* Address+CoreDataProperties.swift */,
4A4BAD1D20B6026900F12B28 /* Peer+CoreDataClass.swift */,
4A4BAD1C20B6026900F12B28 /* Peer+CoreDataProperties.swift */,
4A4BAD1F20B6026900F12B28 /* Interface+CoreDataClass.swift */,
@ -379,6 +385,7 @@
files = (
4A4BAD0C20B5F6AA00F12B28 /* AppCoordinator.swift in Sources */,
4A4BAD2220B6026900F12B28 /* Interface+CoreDataProperties.swift in Sources */,
4A7F6EDE20B674CD00B260B7 /* Address+CoreDataProperties.swift in Sources */,
4A4BAD1320B5F82400F12B28 /* Identifyable.swift in Sources */,
4A4BAD1720B5F8DE00F12B28 /* Wireguard.xcdatamodeld in Sources */,
4A4BAD1A20B5F8FF00F12B28 /* Profile+CoreDataClass.swift in Sources */,
@ -387,6 +394,7 @@
4A4BAD0E20B5F6C300F12B28 /* Coordinator.swift in Sources */,
4A4BAD2020B6026900F12B28 /* Peer+CoreDataProperties.swift in Sources */,
4A4BAD2320B6026900F12B28 /* Interface+CoreDataClass.swift in Sources */,
4A7F6EDD20B674CD00B260B7 /* Address+CoreDataClass.swift in Sources */,
4A4BAD2120B6026900F12B28 /* Peer+CoreDataClass.swift in Sources */,
4A4BAD1B20B5F8FF00F12B28 /* Profile+CoreDataProperties.swift in Sources */,
4A4BACE620B5F1BF00F12B28 /* AppDelegate.swift in Sources */,

View File

@ -0,0 +1,16 @@
//
// Address+CoreDataClass.swift
// Wireguard
//
// Created by Jeroen Leenarts on 24-05-18.
// Copyright © 2018 Wireguard. All rights reserved.
//
//
import Foundation
import CoreData
@objc(Address)
public class Address: NSManagedObject {
}

View File

@ -0,0 +1,22 @@
//
// Address+CoreDataProperties.swift
// Wireguard
//
// Created by Jeroen Leenarts on 24-05-18.
// Copyright © 2018 Wireguard. All rights reserved.
//
//
import Foundation
import CoreData
extension Address {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Address> {
return NSFetchRequest<Address>(entityName: "Address")
}
@NSManaged public var address: String?
@NSManaged public var interface: Interface?
}

View File

@ -1,8 +1,9 @@
//
// Interface+CoreDataProperties.swift
//
// Wireguard
//
// Created by Jeroen Leenarts on 23-05-18.
// Created by Jeroen Leenarts on 24-05-18.
// Copyright © 2018 Wireguard. All rights reserved.
//
//
@ -15,9 +16,30 @@ extension Interface {
return NSFetchRequest<Interface>(entityName: "Interface")
}
@NSManaged public var privateKey: String?
@NSManaged public var listenPort: Int16
@NSManaged public var fwMark: Int32
@NSManaged public var listenPort: Int16
@NSManaged public var privateKey: String?
@NSManaged public var mtu: Int32
@NSManaged public var dns: String?
@NSManaged public var table: String?
@NSManaged public var profile: Profile?
@NSManaged public var adresses: NSSet?
}
// MARK: Generated accessors for adresses
extension Interface {
@objc(addAdressesObject:)
@NSManaged public func addToAdresses(_ value: Address)
@objc(removeAdressesObject:)
@NSManaged public func removeFromAdresses(_ value: Address)
@objc(addAdresses:)
@NSManaged public func addToAdresses(_ values: NSSet)
@objc(removeAdresses:)
@NSManaged public func removeFromAdresses(_ values: NSSet)
}

View File

@ -10,7 +10,6 @@
import Foundation
import CoreData
extension Profile {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Profile> {

View File

@ -1,9 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14133" systemVersion="17E202" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Address" representedClassName="Address" syncable="YES">
<attribute name="address" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="interface" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Interface" inverseName="adresses" inverseEntity="Interface" syncable="YES"/>
</entity>
<entity name="Interface" representedClassName="Interface" syncable="YES">
<attribute name="dns" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="fwMark" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="listenPort" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="mtu" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="privateKey" attributeType="String" syncable="YES"/>
<attribute name="table" optional="YES" attributeType="String" syncable="YES"/>
<relationship name="adresses" toMany="YES" deletionRule="Cascade" destinationEntity="Address" inverseName="interface" inverseEntity="Address" syncable="YES"/>
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="interface" inverseEntity="Profile" syncable="YES"/>
</entity>
<entity name="Peer" representedClassName="Peer" syncable="YES">
@ -20,8 +28,9 @@
<relationship name="peers" toMany="YES" minCount="1" deletionRule="Cascade" destinationEntity="Peer" inverseName="profile" inverseEntity="Peer" syncable="YES"/>
</entity>
<elements>
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
<element name="Interface" positionX="-54" positionY="-9" width="128" height="105"/>
<element name="Interface" positionX="-54" positionY="-9" width="128" height="165"/>
<element name="Peer" positionX="-36" positionY="9" width="128" height="135"/>
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
<element name="Address" positionX="-54" positionY="45" width="128" height="75"/>
</elements>
</model>