├── LICENSE
├── LICENSE.meta
├── README.md
├── README.md.meta
├── Runtime.meta
├── Runtime
├── JSON.meta
├── JSON
│ ├── JSONObject.cs
│ ├── JSONObject.cs.meta
│ ├── LICENSE.md
│ ├── LICENSE.md.meta
│ ├── VectorTemplates.cs
│ ├── VectorTemplates.cs.meta
│ ├── readme.txt
│ └── readme.txt.meta
├── OSC.meta
├── OSC
│ ├── OSCBundle.cs
│ ├── OSCBundle.cs.meta
│ ├── OSCClient.cs
│ ├── OSCClient.cs.meta
│ ├── OSCMessage.cs
│ ├── OSCMessage.cs.meta
│ ├── OSCPacket.cs
│ ├── OSCPacket.cs.meta
│ ├── OSCReceiver.cs
│ ├── OSCReceiver.cs.meta
│ ├── OSCServer.cs
│ └── OSCServer.cs.meta
├── OSCQuery.asmdef
├── OSCQuery.asmdef.meta
├── OSCQuery.cs
├── OSCQuery.cs.meta
├── WSQuery.cs
├── WSQuery.cs.meta
├── WebSocket.meta
├── WebSocket
│ ├── Plugins.meta
│ └── Plugins
│ │ ├── WebSocket.cs
│ │ ├── WebSocket.cs.meta
│ │ ├── WebSocket.jslib
│ │ ├── WebSocket.jslib.meta
│ │ ├── websocket-sharp.dll
│ │ └── websocket-sharp.dll.meta
├── Zeroconf.meta
└── Zeroconf
│ ├── Mono.Zeroconf.Providers.Avahi.meta
│ ├── Mono.Zeroconf.Providers.Avahi
│ ├── AvahiUtils.cs
│ ├── AvahiUtils.cs.meta
│ ├── RegisterService.cs
│ ├── RegisterService.cs.meta
│ ├── ResolvableService.cs
│ ├── ResolvableService.cs.meta
│ ├── Service.cs
│ ├── Service.cs.meta
│ ├── ServiceBrowser.cs
│ ├── ServiceBrowser.cs.meta
│ ├── TxtRecord.cs
│ ├── TxtRecord.cs.meta
│ ├── ZeroconfProvider.cs
│ └── ZeroconfProvider.cs.meta
│ ├── Mono.Zeroconf.Providers.AvahiDBus.meta
│ ├── Mono.Zeroconf.Providers.AvahiDBus
│ ├── AvahiServerState.cs
│ ├── AvahiServerState.cs.meta
│ ├── AvahiUtils.cs
│ ├── AvahiUtils.cs.meta
│ ├── BrowseService.cs
│ ├── BrowseService.cs.meta
│ ├── DBusManager.cs
│ ├── DBusManager.cs.meta
│ ├── EntryGroupState.cs
│ ├── EntryGroupState.cs.meta
│ ├── ErrorCode.cs
│ ├── ErrorCode.cs.meta
│ ├── IAvahiEntryGroup.cs
│ ├── IAvahiEntryGroup.cs.meta
│ ├── IAvahiServer.cs
│ ├── IAvahiServer.cs.meta
│ ├── IAvahiServiceBrowser.cs
│ ├── IAvahiServiceBrowser.cs.meta
│ ├── IAvahiServiceResolver.cs
│ ├── IAvahiServiceResolver.cs.meta
│ ├── LookupFlags.cs
│ ├── LookupFlags.cs.meta
│ ├── LookupResultFlags.cs
│ ├── LookupResultFlags.cs.meta
│ ├── NDesk.DBus.meta
│ ├── NDesk.DBus
│ │ ├── Address.cs
│ │ ├── Address.cs.meta
│ │ ├── Authentication.cs
│ │ ├── Authentication.cs.meta
│ │ ├── Bus.cs
│ │ ├── Bus.cs.meta
│ │ ├── BusObject.cs
│ │ ├── BusObject.cs.meta
│ │ ├── Connection.cs
│ │ ├── Connection.cs.meta
│ │ ├── DBus.cs
│ │ ├── DBus.cs.meta
│ │ ├── DProxy.cs
│ │ ├── DProxy.cs.meta
│ │ ├── ExportObject.cs
│ │ ├── ExportObject.cs.meta
│ │ ├── Introspection.cs
│ │ ├── Introspection.cs.meta
│ │ ├── IntrospectionSchema.cs
│ │ ├── IntrospectionSchema.cs.meta
│ │ ├── Mapper.cs
│ │ ├── Mapper.cs.meta
│ │ ├── MatchRule.cs
│ │ ├── MatchRule.cs.meta
│ │ ├── Message.cs
│ │ ├── Message.cs.meta
│ │ ├── MessageFilter.cs
│ │ ├── MessageFilter.cs.meta
│ │ ├── MessageReader.cs
│ │ ├── MessageReader.cs.meta
│ │ ├── MessageWriter.cs
│ │ ├── MessageWriter.cs.meta
│ │ ├── PendingCall.cs
│ │ ├── PendingCall.cs.meta
│ │ ├── Protocol.cs
│ │ ├── Protocol.cs.meta
│ │ ├── Server.cs
│ │ ├── Server.cs.meta
│ │ ├── Signature.cs
│ │ ├── Signature.cs.meta
│ │ ├── SocketTransport.cs
│ │ ├── SocketTransport.cs.meta
│ │ ├── Transport.cs
│ │ ├── Transport.cs.meta
│ │ ├── TypeDefiner.cs
│ │ ├── TypeDefiner.cs.meta
│ │ ├── TypeImplementer.cs
│ │ ├── TypeImplementer.cs.meta
│ │ ├── UnixMonoTransport.cs
│ │ ├── UnixMonoTransport.cs.meta
│ │ ├── UnixNativeTransport.cs
│ │ ├── UnixNativeTransport.cs.meta
│ │ ├── UnixTransport.cs
│ │ ├── UnixTransport.cs.meta
│ │ ├── Wrapper.cs
│ │ └── Wrapper.cs.meta
│ ├── Protocol.cs
│ ├── Protocol.cs.meta
│ ├── PublishFlags.cs
│ ├── PublishFlags.cs.meta
│ ├── RegisterService.cs
│ ├── RegisterService.cs.meta
│ ├── Service.cs
│ ├── Service.cs.meta
│ ├── ServiceBrowser.cs
│ ├── ServiceBrowser.cs.meta
│ ├── TxtRecord.cs
│ ├── TxtRecord.cs.meta
│ ├── ZeroconfProvider.cs
│ └── ZeroconfProvider.cs.meta
│ ├── Mono.Zeroconf.Providers.Bonjour.meta
│ ├── Mono.Zeroconf.Providers.Bonjour
│ ├── BrowseService.cs
│ ├── BrowseService.cs.meta
│ ├── Native.cs
│ ├── Native.cs.meta
│ ├── Plugins.meta
│ ├── Plugins
│ │ ├── x64.meta
│ │ ├── x86.meta
│ │ ├── x86
│ │ │ ├── dnssd.dll
│ │ │ └── dnssd.dll.meta
│ │ ├── x86_64.meta
│ │ └── x86_64
│ │ │ ├── dnssd.dll
│ │ │ └── dnssd.dll.meta
│ ├── RegisterService.cs
│ ├── RegisterService.cs.meta
│ ├── Service.cs
│ ├── Service.cs.meta
│ ├── ServiceBrowser.cs
│ ├── ServiceBrowser.cs.meta
│ ├── ServiceClass.cs
│ ├── ServiceClass.cs.meta
│ ├── ServiceError.cs
│ ├── ServiceError.cs.meta
│ ├── ServiceErrorException.cs
│ ├── ServiceErrorException.cs.meta
│ ├── ServiceFlags.cs
│ ├── ServiceFlags.cs.meta
│ ├── ServiceRef.cs
│ ├── ServiceRef.cs.meta
│ ├── ServiceType.cs
│ ├── ServiceType.cs.meta
│ ├── TxtRecord.cs
│ ├── TxtRecord.cs.meta
│ ├── TxtRecordEnumerator.cs
│ ├── TxtRecordEnumerator.cs.meta
│ ├── ZeroconfProvider.cs
│ └── ZeroconfProvider.cs.meta
│ ├── Mono.Zeroconf.meta
│ ├── Mono.Zeroconf
│ ├── Mono.Zeroconf.Providers.meta
│ ├── Mono.Zeroconf.Providers
│ │ ├── IZeroconfProvider.cs
│ │ ├── IZeroconfProvider.cs.meta
│ │ ├── ProviderFactory.cs
│ │ ├── ProviderFactory.cs.meta
│ │ ├── ZeroconfProviderAttribute.cs
│ │ └── ZeroconfProviderAttribute.cs.meta
│ ├── Mono.Zeroconf.meta
│ └── Mono.Zeroconf
│ │ ├── AddressProtocol.cs
│ │ ├── AddressProtocol.cs.meta
│ │ ├── IRegisterService.cs
│ │ ├── IRegisterService.cs.meta
│ │ ├── IResolvableService.cs
│ │ ├── IResolvableService.cs.meta
│ │ ├── IService.cs
│ │ ├── IService.cs.meta
│ │ ├── IServiceBrowser.cs
│ │ ├── IServiceBrowser.cs.meta
│ │ ├── ITxtRecord.cs
│ │ ├── ITxtRecord.cs.meta
│ │ ├── RegisterService.cs
│ │ ├── RegisterService.cs.meta
│ │ ├── RegisterServiceEventArgs.cs
│ │ ├── RegisterServiceEventArgs.cs.meta
│ │ ├── RegisterServiceEventHandler.cs
│ │ ├── RegisterServiceEventHandler.cs.meta
│ │ ├── ServiceBrowseEventArgs.cs
│ │ ├── ServiceBrowseEventArgs.cs.meta
│ │ ├── ServiceBrowseEventHandler.cs
│ │ ├── ServiceBrowseEventHandler.cs.meta
│ │ ├── ServiceBrowser.cs
│ │ ├── ServiceBrowser.cs.meta
│ │ ├── ServiceErrorCode.cs
│ │ ├── ServiceErrorCode.cs.meta
│ │ ├── ServiceResolvedEventArgs.cs
│ │ ├── ServiceResolvedEventArgs.cs.meta
│ │ ├── ServiceResolvedEventHandler.cs
│ │ ├── ServiceResolvedEventHandler.cs.meta
│ │ ├── TxtRecord.cs
│ │ ├── TxtRecord.cs.meta
│ │ ├── TxtRecordItem.cs
│ │ └── TxtRecordItem.cs.meta
│ ├── ZeroconfClient.cs
│ └── ZeroconfClient.cs.meta
├── package.json
└── package.json.meta
/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 714fcfcf01e30df41bc4631f23566d25
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity-OSCQuery
2 | A seamless integration of OSCQuery in Unity
3 |
4 | # Installation
5 |
6 | ## From Unity Editor
7 |
8 | - In Unity Editor, open the Project Settings > Package Manager
9 | - Click on the '+' icon to add a Scoped Registry. Then set it up like this :
10 | - Name : Ben Kuper
11 | - URL : https://package.openupm.com
12 | - Scope : com.benkuper
13 |
14 | - When opening Windows > Package Manager, select "My Registry" in the list menu and you should be now able to install OSCQuery under the "Ben Kuper" group.
15 |
16 | ## From manifest.json
17 |
18 | In your Unity project folder, open Packages/manifest.json and edit (or add it not already there) the scopedRegistry section. You can put that anywhere in the JSON file at the root level of the tree structure. More info on the manifest.json file here : https://docs.unity3d.com/2019.3/Documentation/Manual/upm-manifestPrj.html
19 |
20 | ```
21 | "scopedRegistries": [
22 | {
23 | "name": "Ben Kuper",
24 | "url": "https://package.openupm.com",
25 | "scopes": [
26 | "com.benkuper"
27 | ]
28 | }
29 | ]
30 | ```
31 |
32 | # Usage
33 |
34 | Just add the script "OSCQuery" wherever you want and setup the input port you wish to use for communication.
35 |
36 | You can specify a specific object to be used as the root of the hierarchy to expose. Anything outside this object will not be shown in OSCQuery. Leave this field empty to expose all objects in the scene.
37 |
38 | When in play mode, you can check that it's working by going to http://127.0.0.1:9010/ (or whatever port you chose).
39 | You can watch the video to see a basic example.
40 |
41 | # Demo
42 |
43 | You can check out this example project using OSCQuery to control simple cubes : https://github.com/benkuper/Unity-OSCQuery-Example
44 |
45 | Click on the picture to see the youtube video
46 | [](https://www.youtube.com/watch?v=pLfj06am8gU)
47 |
48 | # Kudos and mentions
49 |
50 | This library embeds few other libraries to work :
51 | - The very useful JSONObject library from Defective Studio (It will be removed from the package when this library becomes itself a Package and I can link to it as a package dependency) : https://assetstore.unity.com/packages/tools/input-management/json-object-710
52 | - A modified version of UnityOSC from jorge garcia : https://github.com/jorgegarcia/UnityOSC
53 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b9c8d596cecebc438676bb87c85e60c
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f2b793d194ddfe84c9cea7ad41e60fb5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/JSON.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 03e8180f98f80e64aacc0a87283d5c5f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/JSON/JSONObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 1
2 | guid: 7b704e841df87084c9495d14572145df
3 |
--------------------------------------------------------------------------------
/Runtime/JSON/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2019 Matt Schoen
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Runtime/JSON/LICENSE.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 1
2 | guid: 76b39b4532b688b42842e6bb00e123d4
3 |
--------------------------------------------------------------------------------
/Runtime/JSON/VectorTemplates.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 1
2 | guid: dc0ab2f96c7e5dd409db9aee437c1229
3 |
--------------------------------------------------------------------------------
/Runtime/JSON/readme.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 1
2 | guid: e9307345945009a49bcedea9af207973
3 |
--------------------------------------------------------------------------------
/Runtime/OSC.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1dc86a1b67c50b499f852ff40a07d80
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCBundle.cs:
--------------------------------------------------------------------------------
1 | //
2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine
3 | //
4 | // Copyright (c) 2012 Jorge Garcia Martin
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation
8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions
12 | // of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 | // IN THE SOFTWARE.
19 | //
20 |
21 | using System;
22 | using System.Net;
23 | using System.Text;
24 | using System.Collections.Generic;
25 | using System.Diagnostics;
26 |
27 | namespace OSCQuery.UnityOSC
28 | {
29 | ///
30 | /// Models a Bundle of the OSC protocol.
31 | /// Derived from a OSC Packet over a OSC Stream.
32 | ///
33 | public sealed class OSCBundle : OSCPacket
34 | {
35 |
36 | #region Constructors
37 | public OSCBundle()
38 | {
39 | _address = BUNDLE;
40 | }
41 |
42 | public OSCBundle(long timestamp)
43 | {
44 | _address = BUNDLE;
45 | _timeStamp = timestamp;
46 | }
47 | #endregion
48 |
49 | #region Member Variables
50 | private const string BUNDLE = "#bundle";
51 |
52 | #endregion
53 |
54 | #region Properties
55 | #endregion
56 |
57 | #region Methods
58 |
59 | ///
60 | /// Specifies if the packet is an OSC bundle.
61 | ///
62 | override public bool IsBundle() { return true; }
63 |
64 | ///
65 | /// Packs a bundle to be transported over an OSC stream.
66 | ///
67 | override public void Pack()
68 | {
69 | // TODO: Pack bundle with timestamp in NTP format
70 |
71 | throw new NotImplementedException("OSCBundle.Pack() : Not implemented method.");
72 | }
73 |
74 | ///
75 | /// Unpacks an OSC bundle from a data stream.
76 | ///
77 | ///
78 | /// A
79 | ///
80 | ///
81 | /// A
82 | ///
83 | ///
84 | /// A
85 | ///
86 | ///
87 | /// A
88 | ///
89 | public new static OSCBundle Unpack(byte[] data, ref int start, int end)
90 | {
91 | string address = OSCPacket.UnpackValue(data, ref start);
92 | Trace.Assert(address == BUNDLE);
93 |
94 | long timeStamp = OSCPacket.UnpackValue(data, ref start);
95 | OSCBundle bundle = new OSCBundle(timeStamp);
96 |
97 | while(start < end)
98 | {
99 | int length = OSCPacket.UnpackValue(data, ref start);
100 | int packetEnd = start + length;
101 | bundle.Append(OSCPacket.Unpack(data, ref start, packetEnd));
102 | }
103 |
104 | return bundle;
105 | }
106 |
107 | ///
108 | /// Appends an OSC message to a bundle.
109 | ///
110 | ///
111 | /// A
112 | ///
113 | public override void Append (T msgvalue)
114 | {
115 | Trace.Assert(msgvalue is OSCMessage);
116 | _data.Add(msgvalue);
117 | }
118 | #endregion
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCBundle.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34fc429939da68749b9ce120081aa08b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCClient.cs:
--------------------------------------------------------------------------------
1 | //
2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine
3 | //
4 | // Copyright (c) 2012 Jorge Garcia Martin
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation
8 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
9 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions
12 | // of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
15 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
17 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 | // IN THE SOFTWARE.
19 | //
20 |
21 | using System;
22 | using System.Net;
23 | using System.Net.Sockets;
24 |
25 | namespace OSCQuery.UnityOSC
26 | {
27 | ///
28 | /// Dispatches OSC messages to the specified destination address and port.
29 | ///
30 |
31 | public class OSCClient
32 | {
33 | #region Constructors
34 | public OSCClient (IPAddress address, int port)
35 | {
36 | _ipAddress = address;
37 | _port = port;
38 | Connect();
39 | }
40 | #endregion
41 |
42 | #region Member Variables
43 | private IPAddress _ipAddress;
44 | private int _port;
45 | private UdpClient _udpClient;
46 | #endregion
47 |
48 | #region Properties
49 | public IPAddress ClientIPAddress
50 | {
51 | get
52 | {
53 | return _ipAddress;
54 | }
55 | }
56 |
57 | public int Port
58 | {
59 | get
60 | {
61 | return _port;
62 | }
63 | }
64 | #endregion
65 |
66 | #region Methods
67 | ///
68 | /// Connects the client to a given remote address and port.
69 | ///
70 | public void Connect()
71 | {
72 | if(_udpClient != null) Close();
73 | _udpClient = new UdpClient();
74 | try
75 | {
76 | _udpClient.Connect(_ipAddress, _port);
77 | }
78 | catch
79 | {
80 | throw new Exception(String.Format("Can't create client at IP address {0} and port {1}.", _ipAddress,_port));
81 | }
82 | }
83 |
84 | ///
85 | /// Closes the client.
86 | ///
87 | public void Close()
88 | {
89 | _udpClient.Close();
90 | _udpClient = null;
91 | }
92 |
93 | ///
94 | /// Sends an OSC packet to the defined destination and address of the client.
95 | ///
96 | ///
97 | /// A
98 | ///
99 | public void Send(OSCPacket packet)
100 | {
101 | byte[] data = packet.BinaryData;
102 | try
103 | {
104 | _udpClient.Send(data, data.Length);
105 | }
106 | catch
107 | {
108 | throw new Exception(String.Format("Can't send OSC packet to client {0} : {1}", _ipAddress, _port));
109 | }
110 | }
111 | #endregion
112 | }
113 | }
114 |
115 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f53b86da88b9fb04ca9d7191f3b5a31e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCMessage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ccbb0994610bd54b99ea209ca72a423
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCPacket.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2b8245090658f1a479e1283a8ff07970
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCReceiver.cs:
--------------------------------------------------------------------------------
1 | //
2 | // UnityOSC - Open Sound Control interface for the Unity3d game engine
3 | //
4 | // Copyright (c) 2012 Jorge Garcia Martin
5 | // Last edit: Gerard Llorach 2nd August 2017
6 | //
7 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
8 | // documentation files (the "Software"), to deal in the Software without restriction, including without limitation
9 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
10 | // and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions
13 | // of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
16 | // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
18 | // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 | // IN THE SOFTWARE.
20 | //
21 |
22 |
23 | using System.Collections.Generic;
24 | using UnityEngine;
25 | #if UNITY_EDITOR
26 | using UnityEditor;
27 | #endif
28 |
29 | namespace OSCQuery.UnityOSC
30 | {
31 | public class OSCReceiver
32 | {
33 | Queue _queue = new Queue();
34 | OSCServer _server;
35 |
36 | public void Open(int port)
37 | {
38 | #if UNITY_EDITOR
39 | if(PlayerSettings.runInBackground == false)
40 | {
41 | Debug.LogWarning("Recommend PlayerSettings > runInBackground = true");
42 | }
43 | #endif
44 | if (_server != null)
45 | {
46 | _server.Close();
47 | }
48 | _server = new OSCServer(port);
49 | _server.SleepMilliseconds = 1;
50 | _server.PacketReceivedEvent += didRecievedEvent;
51 | }
52 |
53 | public void Close()
54 | {
55 | if (_server != null)
56 | {
57 | _server.Close();
58 | _server = null;
59 | }
60 | }
61 |
62 | void didRecievedEvent(OSCServer sender, OSCPacket packet)
63 | {
64 | lock (_queue)
65 | {
66 | if (packet.IsBundle())
67 | {
68 | var bundle = packet as OSCBundle;
69 |
70 | foreach(object obj in bundle.Data)
71 | {
72 | OSCMessage msg = obj as OSCMessage;
73 | _queue.Enqueue(msg);
74 | }
75 | }
76 | else
77 | {
78 | _queue.Enqueue(packet as OSCMessage);
79 | }
80 | }
81 | }
82 |
83 | public bool hasWaitingMessages()
84 | {
85 | lock (_queue)
86 | {
87 | return 0 < _queue.Count;
88 | }
89 | }
90 |
91 | public OSCMessage getNextMessage()
92 | {
93 | lock (_queue)
94 | {
95 | return _queue.Dequeue();
96 | }
97 | }
98 | }
99 | }
--------------------------------------------------------------------------------
/Runtime/OSC/OSCReceiver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6231558e552b1d6478386ab3ec436132
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSC/OSCServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d295aa994d5a3e84e8f132fd130f0cc4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/OSCQuery.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OSCQuery"
3 | }
--------------------------------------------------------------------------------
/Runtime/OSCQuery.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ddf836d61cb89dc43a66f631d074fcc3
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/OSCQuery.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9b410c968d301349a7ff6a8fac6be04
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/WSQuery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 | using WebSocketSharp;
4 | using WebSocketSharp.Server;
5 |
6 | public class WSQuery : WebSocketBehavior
7 | {
8 | public delegate void MessageEvent(WSQuery query,string message);
9 | public MessageEvent messageReceived;
10 |
11 | public delegate void DataEvent(WSQuery query, byte[] data);
12 | public DataEvent dataReceived;
13 |
14 | public delegate void WSQueryEvent(WSQuery query);
15 | public WSQueryEvent socketOpened;
16 | public WSQueryEvent socketClosed;
17 | public WSQueryEvent socketError;
18 |
19 | public void sendMessage(string message)
20 | {
21 | Send(message);
22 | }
23 |
24 | public void sendData(byte[] data)
25 | {
26 | Send(data);
27 | }
28 |
29 | protected override void OnOpen()
30 | {
31 | Debug.Log("Socket Opened ");
32 | socketOpened?.Invoke(this);
33 |
34 | }
35 | protected override void OnClose(CloseEventArgs e)
36 | {
37 | Debug.Log("Socket closed " + e.Reason);
38 | socketClosed?.Invoke(this);
39 | }
40 | protected override void OnError(ErrorEventArgs e)
41 | {
42 | Debug.LogWarning("Socket error " + e.Message);
43 | socketError?.Invoke(this);
44 | }
45 |
46 | protected override void OnMessage(MessageEventArgs e)
47 | {
48 | var name = Context.QueryString["name"];
49 | if (e.IsText) messageReceived?.Invoke(this, e.Data);
50 | else if (e.IsBinary) dataReceived?.Invoke(this, e.RawData);
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/Runtime/WSQuery.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 481c72efcc4107b48a0e3b4b6155164c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/WebSocket.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a8d53244e142b54487820caecb2e32f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/WebSocket/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71a899d52a017b14385deeab674e6450
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/WebSocket/Plugins/WebSocket.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aea91fcde4689f64ab5867a7fc6aedaf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/WebSocket/Plugins/WebSocket.jslib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d9f5651a10656c4c9eaf1760bbc6745
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 1
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 0
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | WebGL: WebGL
27 | second:
28 | enabled: 1
29 | settings: {}
30 | userData:
31 | assetBundleName:
32 | assetBundleVariant:
33 |
--------------------------------------------------------------------------------
/Runtime/WebSocket/Plugins/websocket-sharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/benkuper/Unity-OSCQuery/414d3a815cf102ca257fec6e5be7dad67534982e/Runtime/WebSocket/Plugins/websocket-sharp.dll
--------------------------------------------------------------------------------
/Runtime/WebSocket/Plugins/websocket-sharp.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f585500385efc694da50fc2cd568523e
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 1
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fadb17914c8f8034eb66afcf0e5d2ce5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60664e0d4e65f454f8f1dd23b9e1588f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/AvahiUtils.cs:
--------------------------------------------------------------------------------
1 | //
2 | // AvahiUtils.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using AV=Avahi;
34 |
35 | namespace Mono.Zeroconf.Providers.Avahi
36 | {
37 | internal static class AvahiUtils
38 | {
39 | public static ServiceErrorCode ErrorCodeToServiceError(AV.ErrorCode error)
40 | {
41 | switch(error) {
42 | case AV.ErrorCode.Ok: return ServiceErrorCode.None;
43 | case AV.ErrorCode.Collision: return ServiceErrorCode.NameConflict;
44 | default: return ServiceErrorCode.Unknown;
45 | }
46 | }
47 | }
48 | }
49 |
50 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/AvahiUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b485ff9624f9244418aa0312569143c5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/RegisterService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8f034d56bfaabc4c883c30156a658e3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ResolvableService.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ResolvableService.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using System.Net;
34 | using AV=Avahi;
35 | using Mono.Zeroconf;
36 |
37 | namespace Mono.Zeroconf.Providers.Avahi
38 | {
39 | public class ResolvableService : Service, IResolvableService
40 | {
41 | private AV.Client client;
42 |
43 | public event ServiceResolvedEventHandler Resolved;
44 |
45 | public ResolvableService(AV.Client client, AV.ServiceInfo service) : base(service)
46 | {
47 | this.client = client;
48 | }
49 |
50 | public void Resolve()
51 | {
52 | AV.ServiceResolver resolver = new AV.ServiceResolver(client, service);
53 | resolver.Found += OnServiceResolved;
54 | }
55 |
56 | private void OnServiceResolved(object o, AV.ServiceInfoArgs args)
57 | {
58 | service = args.Service;
59 | ((AV.ServiceResolver)o).Dispose();
60 |
61 | ServiceResolvedEventHandler handler = Resolved;
62 | if(handler != null) {
63 | handler(this, new ServiceResolvedEventArgs(this));
64 | }
65 | }
66 |
67 | public string FullName {
68 | get {
69 | return String.Format("{0}.{1}.{2}", service.Name.Replace(" ", "\\032"),
70 | service.ServiceType, service.Domain);
71 | }
72 | }
73 |
74 | public IPHostEntry HostEntry {
75 | get {
76 | IPHostEntry host_entry = new IPHostEntry();
77 | host_entry.AddressList = new IPAddress[1];
78 | host_entry.AddressList[0] = service.Address;
79 | if(service.Protocol == AV.Protocol.IPv6) {
80 | host_entry.AddressList[0].ScopeId = service.NetworkInterface;
81 | }
82 | host_entry.HostName = service.HostName;
83 | return host_entry;
84 | }
85 | }
86 |
87 | public string HostTarget {
88 | get { return service.HostName; }
89 | }
90 |
91 | public int NetworkInterface {
92 | get { return service.NetworkInterface; }
93 | }
94 |
95 | public short Port {
96 | get { return (short)service.Port; }
97 | }
98 | }
99 | }
100 |
101 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ResolvableService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eb50d3adacaade14cae38b8a8dec0425
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/Service.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Service.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using AV=Avahi;
34 | using Mono.Zeroconf;
35 |
36 | namespace Mono.Zeroconf.Providers.Avahi
37 | {
38 | public class Service : Mono.Zeroconf.IService
39 | {
40 | protected AV.ServiceInfo service;
41 |
42 | public Service(AV.ServiceInfo service)
43 | {
44 | this.service = service;
45 | }
46 |
47 | public string Name {
48 | get { return service.Name; }
49 | }
50 |
51 | public string RegType {
52 | get { return service.ServiceType; }
53 | }
54 |
55 | public string ReplyDomain {
56 | get { return service.Domain; }
57 | }
58 |
59 | public ITxtRecord TxtRecord {
60 | get { return new TxtRecord(service.Text); }
61 | set { }
62 | }
63 | }
64 | }
65 |
66 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/Service.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16a53de30fdeb864ba2a7797c107610c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ServiceBrowser.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceBrowser.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 | using AV=Avahi;
33 | using Mono.Zeroconf;
34 |
35 | namespace Mono.Zeroconf.Providers.Avahi
36 | {
37 | public class ServiceBrowser : IServiceBrowser
38 | {
39 | private AV.Client client;
40 | private AV.ServiceBrowser browser;
41 |
42 | public event ServiceBrowseEventHandler ServiceAdded;
43 | public event ServiceBrowseEventHandler ServiceRemoved;
44 |
45 | public ServiceBrowser()
46 | {
47 | }
48 |
49 | public void Dispose()
50 | {
51 | if(client != null) {
52 | client.Dispose();
53 | client = null;
54 | }
55 |
56 | if(browser != null) {
57 | browser.Dispose();
58 | browser = null;
59 | }
60 | }
61 |
62 | public void Browse(string regtype, string domain)
63 | {
64 | Dispose();
65 |
66 | client = new AV.Client();
67 |
68 | browser = new AV.ServiceBrowser(client, regtype, domain);
69 | browser.ServiceAdded += OnServiceAdded;
70 | browser.ServiceRemoved += OnServiceRemoved;
71 | }
72 |
73 | private void OnServiceAdded(object o, AV.ServiceInfoArgs args)
74 | {
75 | ServiceBrowseEventHandler handler = ServiceAdded;
76 | if(handler != null) {
77 | handler(this, new ServiceBrowseEventArgs(new ResolvableService(client, args.Service)));
78 | }
79 | }
80 |
81 | private void OnServiceRemoved(object o, AV.ServiceInfoArgs args)
82 | {
83 | ServiceBrowseEventHandler handler = ServiceRemoved;
84 | if(handler != null) {
85 | handler(this, new ServiceBrowseEventArgs(new ResolvableService(client, args.Service)));
86 | }
87 | }
88 | }
89 | }
90 |
91 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc28da106ccbaed4fb8cf8a35f4141ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/TxtRecord.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9756e342185e6842bcff4c9963a19db
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ZeroconfProvider.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ZeroconfProvider.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using System.Collections;
34 |
35 | using AV=Avahi;
36 |
37 | [assembly:Mono.Zeroconf.Providers.ZeroconfProvider(typeof(Mono.Zeroconf.Providers.Avahi.ZeroconfProvider))]
38 |
39 | namespace Mono.Zeroconf.Providers.Avahi
40 | {
41 | public class ZeroconfProvider : IZeroconfProvider
42 | {
43 | public void Initialize()
44 | {
45 | AV.Client client = new AV.Client();
46 | client.Dispose();
47 | }
48 |
49 | public Type ServiceBrowser {
50 | get { return typeof(Mono.Zeroconf.Providers.Avahi.ServiceBrowser); }
51 | }
52 |
53 | public Type RegisterService {
54 | get { return typeof(Mono.Zeroconf.Providers.Avahi.RegisterService); }
55 | }
56 |
57 | public Type TxtRecord {
58 | get { return typeof(Mono.Zeroconf.Providers.Avahi.TxtRecord); }
59 | }
60 | }
61 | }
62 |
63 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Avahi/ZeroconfProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 061ea29cf5ca8dd4cadc6484c0c74ffb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2e1c0835a09fdf3408c5dc27d7cd5c76
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/AvahiServerState.cs:
--------------------------------------------------------------------------------
1 | //
2 | // AvahiServerState.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2009 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 |
33 | namespace Mono.Zeroconf.Providers.AvahiDBus
34 | {
35 | public enum AvahiServerState
36 | {
37 | Invalid,
38 | Registering,
39 | Running,
40 | Collision,
41 | Failure
42 | }
43 | }
44 |
45 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/AvahiServerState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a3a2198956ff854d9a569a8df14fe4b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/AvahiUtils.cs:
--------------------------------------------------------------------------------
1 | //
2 | // AvahiUtils.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 | using Mono.Zeroconf;
33 |
34 | namespace Mono.Zeroconf.Providers.AvahiDBus
35 | {
36 | public static class AvahiUtils
37 | {
38 | public static Protocol FromMzcProtocol (AddressProtocol addressProtocol)
39 | {
40 | switch (addressProtocol) {
41 | case AddressProtocol.IPv4:
42 | return Protocol.IPv4;
43 | case AddressProtocol.IPv6:
44 | return Protocol.IPv6;
45 | case AddressProtocol.Any:
46 | default:
47 | return Protocol.Unspecified;
48 | }
49 | }
50 |
51 | public static AddressProtocol ToMzcProtocol (Protocol addressProtocol)
52 | {
53 | switch (addressProtocol) {
54 | case Protocol.IPv4:
55 | return AddressProtocol.IPv4;
56 | case Protocol.IPv6:
57 | return AddressProtocol.IPv6;
58 | case Protocol.Unspecified:
59 | default:
60 | return AddressProtocol.Any;
61 | }
62 | }
63 |
64 | public static int FromMzcInterface (uint @interface)
65 | {
66 | // Avahi appears to use a value of -1 for "unspecified" ("any"), and
67 | // zero-based interface indexes... we hope
68 |
69 | switch (@interface) {
70 | case 0: return -1;
71 | default: return (int)@interface - 1;
72 | }
73 | }
74 |
75 | public static uint ToMzcInterface (int @interface)
76 | {
77 | switch (@interface) {
78 | case -1: return 0;
79 | default: return (uint)@interface + 1;
80 | }
81 | }
82 |
83 | public static ServiceErrorCode ErrorCodeToServiceError (ErrorCode error)
84 | {
85 | switch (error) {
86 | case ErrorCode.Ok: return ServiceErrorCode.None;
87 | case ErrorCode.Collision: return ServiceErrorCode.NameConflict;
88 | default: return ServiceErrorCode.Unknown;
89 | }
90 | }
91 | }
92 | }
93 |
94 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/AvahiUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4588c2186533bdc4d8aec69cfd8f6cf8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/BrowseService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bedc472e7b05a794f8e36559463d9138
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/DBusManager.cs:
--------------------------------------------------------------------------------
1 | //
2 | // DBusManager.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007-2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using System.IO;
34 | using System.Reflection;
35 | using System.Threading;
36 |
37 | using NDesk.DBus;
38 |
39 | namespace Mono.Zeroconf.Providers.AvahiDBus
40 | {
41 | internal static class DBusManager
42 | {
43 | private const uint MINIMUM_AVAHI_API_VERSION = 515;
44 |
45 | private static object thread_wait = new object ();
46 | private static bool initialized;
47 | private static Bus bus;
48 | public static Bus Bus {
49 | get { return bus; }
50 | }
51 |
52 | private static IAvahiServer server;
53 | public static IAvahiServer Server {
54 | get { return server; }
55 | }
56 |
57 | private static void ConnectToSystemBus ()
58 | {
59 | string address = Environment.GetEnvironmentVariable ("DBUS_SYSTEM_BUS_ADDRESS");
60 | if (String.IsNullOrEmpty (address)) {
61 | address = "unix:path=/var/run/dbus/system_bus_socket";
62 | }
63 |
64 | bus = Bus.Open (address);
65 | }
66 |
67 | private static void IterateThread (object o)
68 | {
69 | lock (thread_wait) {
70 | ConnectToSystemBus ();
71 | Monitor.Pulse (thread_wait);
72 | }
73 |
74 | while (true) {
75 | bus.Iterate ();
76 | }
77 | }
78 |
79 | public static void Initialize ()
80 | {
81 | if (initialized) {
82 | return;
83 | }
84 |
85 | initialized = true;
86 |
87 | lock (thread_wait) {
88 | ThreadPool.QueueUserWorkItem (IterateThread);
89 | Monitor.Wait (thread_wait);
90 | }
91 |
92 | if (!bus.NameHasOwner("org.freedesktop.Avahi")) {
93 | throw new ApplicationException ("Could not find org.freedesktop.Avahi");
94 | }
95 |
96 | server = GetObject ("/");
97 | uint api_version = server.GetAPIVersion ();
98 |
99 | if (api_version < MINIMUM_AVAHI_API_VERSION) {
100 | throw new ApplicationException (String.Format ("Avahi API version " +
101 | "{0} is required, but {1} is what the server returned.",
102 | MINIMUM_AVAHI_API_VERSION, api_version));
103 | }
104 | }
105 |
106 | public static T GetObject (string objectPath)
107 | {
108 | return GetObject (new ObjectPath (objectPath));
109 | }
110 |
111 | public static T GetObject (ObjectPath objectPath)
112 | {
113 | return bus.GetObject ("org.freedesktop.Avahi", objectPath);
114 | }
115 | }
116 | }
117 |
118 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/DBusManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06e7bf0db8efd1648bb5f09cd8c026b5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/EntryGroupState.cs:
--------------------------------------------------------------------------------
1 | //
2 | // EntryGroupState.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 | using System;
31 |
32 | namespace Mono.Zeroconf.Providers.AvahiDBus
33 | {
34 | public enum EntryGroupState
35 | {
36 | Uncommited,
37 | Registering,
38 | Established,
39 | Collision,
40 | Failure
41 | }
42 | }
43 |
44 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/EntryGroupState.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60a18b56c1cbb0d4299299006bc7dfb0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/ErrorCode.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ErrorCode.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 |
32 | using System;
33 |
34 | namespace Mono.Zeroconf.Providers.AvahiDBus
35 | {
36 | public enum ErrorCode
37 | {
38 | Ok = 0,
39 | Failure = -1,
40 | BadState = -2,
41 | InvalidHostName = - 3,
42 | InvalidDomainName = -4,
43 | NoNetwork = -5,
44 | InvalidTTL = -6,
45 | IsPattern = -7,
46 | Collision = -8,
47 | InvalidRecord = -9,
48 | InvalidServiceName = -10,
49 | InvalidServiceType = -11,
50 | InvalidPort = -12,
51 | InvalidKey = -13,
52 | InvalidAddress = -14,
53 | Timeout = -15,
54 | TooManyClients = -16,
55 | TooManyObjects = -17,
56 | TooManyEntries = -18,
57 | OS = -19,
58 | AccessDenied = -20,
59 | InvalidOperation = -21,
60 | DBusError = -22,
61 | Disconnected = -23,
62 | NoMemory = -24,
63 | InvalidObject = -25,
64 | NoDaemon = -26,
65 | InvalidInterface = -27,
66 | InvalidProtocol = -28,
67 | InvalidFlags = -29,
68 | NotFound = -30,
69 | InvalidConfig = -31,
70 | VersionMismatch = -32,
71 | InvalidServiceSubtype = -33,
72 | InvalidPacket = -34,
73 | InvalidDnsError = -35,
74 | DnsFormErr = -36,
75 | DnsServFail = -37,
76 | DnsNxDomain = -38,
77 | DnsNoTimp = -39,
78 | DnsRefused = -40,
79 | DnsYxDomain = -41,
80 | DnsYxRrSet = -42,
81 | DnsNxRrSet = -43,
82 | DnsNotAuth = -44,
83 | DnsNotZone = -45,
84 | InvalidRData = -46,
85 | InvalidDnsClass = -47,
86 | InvalidDnsType = -48,
87 | NotSupported = -49,
88 | NotPermitted = -50
89 | }
90 | }
91 |
92 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/ErrorCode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 41a7f81e6801e0e429bb0ae00e698935
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiEntryGroup.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IAvahiEntryGroup.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 |
30 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
31 |
32 | using System;
33 | using NDesk.DBus;
34 |
35 | namespace Mono.Zeroconf.Providers.AvahiDBus
36 | {
37 | public delegate void EntryGroupStateChangedHandler (EntryGroupState state, string error);
38 |
39 | [Interface ("org.freedesktop.Avahi.EntryGroup")]
40 | public interface IAvahiEntryGroup
41 | {
42 | event EntryGroupStateChangedHandler StateChanged;
43 |
44 | void Free ();
45 | void Commit ();
46 | void Reset ();
47 | EntryGroupState GetState ();
48 | bool IsEmpty ();
49 |
50 | void AddService (int @interface, Protocol protocol, PublishFlags flags, string name,
51 | string type, string domain, string host, ushort port, byte [][] txt);
52 |
53 | void AddServiceSubtype (int @interface, Protocol protocol, PublishFlags flags,
54 | string name, string type, string domain, string subtype);
55 |
56 | void UpdateServiceTxt (int @interface, Protocol protocol, PublishFlags flags,
57 | string name, string type, string domain, byte [][] txt);
58 |
59 | void AddAddress (int @interface, Protocol protocol, PublishFlags flags, string name, string address);
60 |
61 | void AddRecord (int @interface, Protocol protocol, PublishFlags flags, string name,
62 | ushort clazz, ushort type, uint ttl, byte [] rdata);
63 | }
64 | }
65 |
66 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiEntryGroup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3a75155888f18d94f8a9d66ec5e85f05
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IAvahiServer.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007-2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 |
32 | using System;
33 | using NDesk.DBus;
34 |
35 | namespace Mono.Zeroconf.Providers.AvahiDBus
36 | {
37 | [Interface ("org.freedesktop.Avahi.Server")]
38 | public interface IAvahiServer
39 | {
40 | uint GetAPIVersion ();
41 |
42 | AvahiServerState GetState ();
43 |
44 | ObjectPath ServiceBrowserNew (int @interface, Protocol protocol,
45 | string type, string domain, LookupFlags flags);
46 |
47 | ObjectPath ServiceResolverNew (int @interface, Protocol protocol, string name,
48 | string type, string dmain, Protocol aprotocol, LookupFlags flags);
49 |
50 | ObjectPath EntryGroupNew ();
51 | }
52 | }
53 |
54 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65542c397396f6f47983c0100db18349
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServiceBrowser.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IAvahiServiceBrowser.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007-2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 |
32 | using System;
33 | using NDesk.DBus;
34 |
35 | namespace Mono.Zeroconf.Providers.AvahiDBus
36 | {
37 | public delegate void ServiceBrowserItemHandler (int @interface, Protocol protocol, string name,
38 | string type, string domain, LookupResultFlags flags);
39 |
40 | public delegate void ServiceBrowserHandler ();
41 |
42 | [Interface ("org.freedesktop.Avahi.ServiceBrowser")]
43 | public interface IAvahiServiceBrowser
44 | {
45 | event ServiceBrowserItemHandler ItemNew;
46 | event ServiceBrowserItemHandler ItemRemove;
47 |
48 | event ServiceBrowserHandler AllForNow;
49 | event ServiceBrowserHandler CacheExhausted;
50 |
51 | void Free ();
52 | }
53 | }
54 |
55 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5431a5efacf07664b9498319d26de470
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServiceResolver.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IAvahiServiceResolver.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 | using NDesk.DBus;
33 |
34 | namespace Mono.Zeroconf.Providers.AvahiDBus
35 | {
36 | public delegate void ServiceResolverFoundHandler (int @interface, Protocol protocol, string name,
37 | string type, string domain, string host, Protocol aprotocol, string address,
38 | ushort port, byte [][] txt, LookupResultFlags flags);
39 |
40 | public delegate void ServiceResolverErrorHandler (string error);
41 |
42 | [Interface ("org.freedesktop.Avahi.ServiceResolver")]
43 | public interface IAvahiServiceResolver
44 | {
45 | event ServiceResolverFoundHandler Found;
46 | event ServiceResolverErrorHandler Failure;
47 |
48 | void Free ();
49 | }
50 | }
51 |
52 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/IAvahiServiceResolver.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a458c05980a9a824dbbbb3d9e0945b34
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/LookupFlags.cs:
--------------------------------------------------------------------------------
1 | //
2 | // LookupFlags.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 |
33 | namespace Mono.Zeroconf.Providers.AvahiDBus
34 | {
35 | [Flags]
36 | public enum LookupFlags : uint
37 | {
38 | None = 0,
39 | UseWideArea = 1,
40 | UseMulticast = 2,
41 | NoTxt = 4,
42 | NoAddress = 8
43 | }
44 | }
45 |
46 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/LookupFlags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38c72417d9d9f564d84fcedfcd40405e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/LookupResultFlags.cs:
--------------------------------------------------------------------------------
1 | //
2 | // LookupResultFlags.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 |
33 | namespace Mono.Zeroconf.Providers.AvahiDBus
34 | {
35 | [Flags]
36 | public enum LookupResultFlags : uint
37 | {
38 | None = 0,
39 | Cached = 1,
40 | WideArea = 2,
41 | Multicast = 4,
42 | Local = 8,
43 | OurOwn = 16,
44 | }
45 | }
46 |
47 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/LookupResultFlags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 99909755d0914664690896363ff72f09
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff19eea2916333e49925aad175f91628
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Address.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Text;
9 | using System.Collections.Generic;
10 |
11 | namespace NDesk.DBus
12 | {
13 | public class BadAddressException : Exception
14 | {
15 | public BadAddressException (string reason) : base (reason) {}
16 | }
17 |
18 | class AddressEntry
19 | {
20 | public string Method;
21 | public IDictionary Properties = new Dictionary ();
22 |
23 | public override string ToString ()
24 | {
25 | StringBuilder sb = new StringBuilder ();
26 | sb.Append (Method);
27 | sb.Append (':');
28 |
29 | bool first = true;
30 | foreach (KeyValuePair prop in Properties) {
31 | if (first)
32 | first = false;
33 | else
34 | sb.Append (',');
35 |
36 | sb.Append (prop.Key);
37 | sb.Append ('=');
38 | sb.Append (Escape (prop.Value));
39 | }
40 |
41 | return sb.ToString ();
42 | }
43 |
44 | static string Escape (string str)
45 | {
46 | if (str == null)
47 | return String.Empty;
48 |
49 | StringBuilder sb = new StringBuilder ();
50 | int len = str.Length;
51 |
52 | for (int i = 0 ; i != len ; i++) {
53 | char c = str[i];
54 |
55 | //everything other than the optionally escaped chars _must_ be escaped
56 | if (Char.IsLetterOrDigit (c) || c == '-' || c == '_' || c == '/' || c == '\\' || c == '.')
57 | sb.Append (c);
58 | else
59 | sb.Append (Uri.HexEscape (c));
60 | }
61 |
62 | return sb.ToString ();
63 | }
64 |
65 | static string Unescape (string str)
66 | {
67 | if (str == null)
68 | return String.Empty;
69 |
70 | StringBuilder sb = new StringBuilder ();
71 | int len = str.Length;
72 | int i = 0;
73 | while (i != len) {
74 | if (Uri.IsHexEncoding (str, i))
75 | sb.Append (Uri.HexUnescape (str, ref i));
76 | else
77 | sb.Append (str[i++]);
78 | }
79 |
80 | return sb.ToString ();
81 | }
82 |
83 |
84 | public static AddressEntry Parse (string s)
85 | {
86 | AddressEntry entry = new AddressEntry ();
87 |
88 | string[] parts = s.Split (':');
89 |
90 | if (parts.Length < 2)
91 | throw new BadAddressException ("No colon found");
92 | if (parts.Length > 2)
93 | throw new BadAddressException ("Too many colons found");
94 |
95 | entry.Method = parts[0];
96 |
97 | foreach (string propStr in parts[1].Split (',')) {
98 | parts = propStr.Split ('=');
99 |
100 | if (parts.Length < 2)
101 | throw new BadAddressException ("No equals sign found");
102 | if (parts.Length > 2)
103 | throw new BadAddressException ("Too many equals signs found");
104 |
105 | entry.Properties[parts[0]] = Unescape (parts[1]);
106 | }
107 |
108 | return entry;
109 | }
110 | }
111 |
112 | static class Address
113 | {
114 | //(unix:(path|abstract)=.*,guid=.*|tcp:host=.*(,port=.*)?);? ...
115 | public static AddressEntry[] Parse (string addresses)
116 | {
117 | if (addresses == null)
118 | throw new ArgumentNullException (addresses);
119 |
120 | List entries = new List ();
121 |
122 | foreach (string entryStr in addresses.Split (';'))
123 | entries.Add (AddressEntry.Parse (entryStr));
124 |
125 | return entries.ToArray ();
126 | }
127 |
128 | const string SYSTEM_BUS_ADDRESS = "unix:path=/var/run/dbus/system_bus_socket";
129 | public static string System
130 | {
131 | get {
132 | string addr = Environment.GetEnvironmentVariable ("DBUS_SYSTEM_BUS_ADDRESS");
133 |
134 | if (String.IsNullOrEmpty (addr))
135 | addr = SYSTEM_BUS_ADDRESS;
136 |
137 | return addr;
138 | }
139 | }
140 |
141 | public static string Session
142 | {
143 | get {
144 | return Environment.GetEnvironmentVariable ("DBUS_SESSION_BUS_ADDRESS");
145 | }
146 | }
147 |
148 | public static string Starter
149 | {
150 | get {
151 | return Environment.GetEnvironmentVariable ("DBUS_STARTER_ADDRESS");
152 | }
153 | }
154 |
155 | public static string StarterBusType
156 | {
157 | get {
158 | return Environment.GetEnvironmentVariable ("DBUS_STARTER_BUS_TYPE");
159 | }
160 | }
161 | }
162 | }
163 |
164 |
165 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Address.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8be57f47f4444f84f91a865dd3953284
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Authentication.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 | using System.Text;
11 | using System.Globalization;
12 |
13 | namespace NDesk.DBus.Authentication
14 | {
15 | enum ClientState
16 | {
17 | WaitingForData,
18 | WaitingForOK,
19 | WaitingForReject,
20 | }
21 |
22 | enum ServerState
23 | {
24 | WaitingForAuth,
25 | WaitingForData,
26 | WaitingForBegin,
27 | }
28 |
29 | class SaslClient
30 | {
31 | protected Connection conn;
32 |
33 | protected SaslClient ()
34 | {
35 | }
36 |
37 | public SaslClient (Connection conn)
38 | {
39 | this.conn = conn;
40 | }
41 |
42 | public void Run ()
43 | {
44 | StreamReader sr = new StreamReader (conn.Transport.Stream, Encoding.ASCII);
45 | StreamWriter sw = new StreamWriter (conn.Transport.Stream, Encoding.ASCII);
46 |
47 | sw.NewLine = "\r\n";
48 |
49 | string str = conn.Transport.AuthString ();
50 | byte[] bs = Encoding.ASCII.GetBytes (str);
51 |
52 | string authStr = ToHex (bs);
53 |
54 | sw.WriteLine ("AUTH EXTERNAL {0}", authStr);
55 | sw.Flush ();
56 |
57 | string ok_rep = sr.ReadLine ();
58 |
59 | string[] parts;
60 | parts = ok_rep.Split (' ');
61 |
62 | if (parts.Length < 1 || parts[0] != "OK")
63 | throw new Exception ("Authentication error: AUTH EXTERNAL was not OK: \"" + ok_rep + "\"");
64 |
65 | /*
66 | string guid = parts[1];
67 | byte[] guidData = FromHex (guid);
68 | uint unixTime = BitConverter.ToUInt32 (guidData, 0);
69 | Console.Error.WriteLine ("guid: " + guid + ", " + "unixTime: " + unixTime + " (" + UnixToDateTime (unixTime) + ")");
70 | */
71 |
72 | sw.WriteLine ("BEGIN");
73 | sw.Flush ();
74 | }
75 |
76 | //From Mono.Unix.Native.NativeConvert
77 | //should these methods use long or (u)int?
78 | public static DateTime UnixToDateTime (long time)
79 | {
80 | DateTime LocalUnixEpoch = new DateTime (1970, 1, 1);
81 | TimeSpan LocalUtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.UtcNow);
82 | return LocalUnixEpoch.AddSeconds ((double) time + LocalUtcOffset.TotalSeconds);
83 | }
84 |
85 | public static long DateTimeToUnix (DateTime time)
86 | {
87 | DateTime LocalUnixEpoch = new DateTime (1970, 1, 1);
88 | TimeSpan LocalUtcOffset = TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.UtcNow);
89 | TimeSpan unixTime = time.Subtract (LocalUnixEpoch) - LocalUtcOffset;
90 |
91 | return (long) unixTime.TotalSeconds;
92 | }
93 |
94 | //From Mono.Security.Cryptography
95 | //Modified to output lowercase hex
96 | static public string ToHex (byte[] input)
97 | {
98 | if (input == null)
99 | return null;
100 |
101 | StringBuilder sb = new StringBuilder (input.Length * 2);
102 | foreach (byte b in input) {
103 | sb.Append (b.ToString ("x2", CultureInfo.InvariantCulture));
104 | }
105 | return sb.ToString ();
106 | }
107 |
108 | //From Mono.Security.Cryptography
109 | static private byte FromHexChar (char c)
110 | {
111 | if ((c >= 'a') && (c <= 'f'))
112 | return (byte) (c - 'a' + 10);
113 | if ((c >= 'A') && (c <= 'F'))
114 | return (byte) (c - 'A' + 10);
115 | if ((c >= '0') && (c <= '9'))
116 | return (byte) (c - '0');
117 | throw new ArgumentException ("Invalid hex char");
118 | }
119 |
120 | //From Mono.Security.Cryptography
121 | static public byte[] FromHex (string hex)
122 | {
123 | if (hex == null)
124 | return null;
125 | if ((hex.Length & 0x1) == 0x1)
126 | throw new ArgumentException ("Length must be a multiple of 2");
127 |
128 | byte[] result = new byte [hex.Length >> 1];
129 | int n = 0;
130 | int i = 0;
131 | while (n < result.Length) {
132 | result [n] = (byte) (FromHexChar (hex [i++]) << 4);
133 | result [n++] += FromHexChar (hex [i++]);
134 | }
135 | return result;
136 | }
137 | }
138 | }
139 |
140 |
141 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Authentication.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1aac9e857187d1d49995dda0c68837a6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Bus.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7df68dc32eb998e4a922874411afe9d7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/BusObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a88bfb18d49b910498e0221b2f01a2ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Connection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 693e85c732946a348a40f032840f5c33
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/DBus.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using NDesk.DBus;
10 |
11 | namespace org.freedesktop.DBus
12 | {
13 | [Flags]
14 | public enum NameFlag : uint
15 | {
16 | None = 0,
17 | AllowReplacement = 0x1,
18 | ReplaceExisting = 0x2,
19 | DoNotQueue = 0x4,
20 | }
21 |
22 | public enum RequestNameReply : uint
23 | {
24 | PrimaryOwner = 1,
25 | InQueue,
26 | Exists,
27 | AlreadyOwner,
28 | }
29 |
30 | public enum ReleaseNameReply : uint
31 | {
32 | Released = 1,
33 | NonExistent,
34 | NotOwner,
35 | }
36 |
37 | public enum StartReply : uint
38 | {
39 | //The service was successfully started.
40 | Success = 1,
41 | //A connection already owns the given name.
42 | AlreadyRunning,
43 | }
44 |
45 | public delegate void NameOwnerChangedHandler (string name, string old_owner, string new_owner);
46 | public delegate void NameAcquiredHandler (string name);
47 | public delegate void NameLostHandler (string name);
48 |
49 | [Interface ("org.freedesktop.DBus.Peer")]
50 | public interface Peer
51 | {
52 | void Ping ();
53 | [return: Argument ("machine_uuid")]
54 | string GetMachineId ();
55 | }
56 |
57 | [Interface ("org.freedesktop.DBus.Introspectable")]
58 | public interface Introspectable
59 | {
60 | [return: Argument ("data")]
61 | string Introspect ();
62 | }
63 |
64 | [Interface ("org.freedesktop.DBus.Properties")]
65 | public interface Properties
66 | {
67 | [return: Argument ("value")]
68 | object Get (string @interface, string propname);
69 | void Set (string @interface, string propname, object value);
70 | [return: Argument ("props")]
71 | IDictionary GetAll(string @interface);
72 | }
73 |
74 | [Interface ("org.freedesktop.DBus")]
75 | public interface IBus : Introspectable
76 | {
77 | RequestNameReply RequestName (string name, NameFlag flags);
78 | ReleaseNameReply ReleaseName (string name);
79 | string Hello ();
80 | string[] ListNames ();
81 | string[] ListActivatableNames ();
82 | bool NameHasOwner (string name);
83 | event NameOwnerChangedHandler NameOwnerChanged;
84 | event NameLostHandler NameLost;
85 | event NameAcquiredHandler NameAcquired;
86 | StartReply StartServiceByName (string name, uint flags);
87 | string GetNameOwner (string name);
88 | uint GetConnectionUnixUser (string connection_name);
89 | void AddMatch (string rule);
90 | void RemoveMatch (string rule);
91 |
92 | //undocumented in spec
93 | string[] ListQueuedOwners (string name);
94 | uint GetConnectionUnixProcessID (string connection_name);
95 | byte[] GetConnectionSELinuxSecurityContext (string connection_name);
96 | void ReloadConfig ();
97 | }
98 | }
99 |
100 |
101 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/DBus.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e05d3c50cf251be49856a2fd59e42a66
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/DProxy.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Reflection;
9 | using System.Runtime.Remoting.Proxies;
10 | using System.Runtime.Remoting.Messaging;
11 |
12 | namespace NDesk.DBus
13 | {
14 | //marked internal because this is really an implementation detail and needs to be replaced
15 | internal class DProxy : RealProxy
16 | {
17 | protected BusObject busObject;
18 |
19 | public DProxy (BusObject busObject, Type type) : base(type)
20 | {
21 | this.busObject = busObject;
22 | }
23 |
24 | static MethodInfo mi_GetHashCode = typeof (object).GetMethod ("GetHashCode");
25 | static MethodInfo mi_Equals = typeof (object).GetMethod ("Equals", BindingFlags.Instance);
26 | static MethodInfo mi_ToString = typeof (object).GetMethod ("ToString");
27 | static MethodInfo mi_GetLifetimeService = typeof (MarshalByRefObject).GetMethod ("GetLifetimeService");
28 |
29 | object GetDefaultReturn (MethodBase mi, object[] inArgs)
30 | {
31 | if (mi == mi_GetHashCode)
32 | return busObject.Path.Value.GetHashCode ();
33 | if (mi == mi_Equals)
34 | return busObject.Path.Value == ((BusObject)((MarshalByRefObject)inArgs[0]).GetLifetimeService ()).Path.Value;
35 | if (mi == mi_ToString)
36 | return busObject.Path.Value;
37 | if (mi == mi_GetLifetimeService)
38 | return busObject;
39 |
40 | return null;
41 | }
42 |
43 | public override IMessage Invoke (IMessage message)
44 | {
45 | IMethodCallMessage callMessage = (IMethodCallMessage) message;
46 |
47 | object defaultRetVal = GetDefaultReturn (callMessage.MethodBase, callMessage.InArgs);
48 | if (defaultRetVal != null) {
49 | MethodReturnMessageWrapper defaultReturnMessage = new MethodReturnMessageWrapper ((IMethodReturnMessage) message);
50 | defaultReturnMessage.ReturnValue = defaultRetVal;
51 |
52 | return defaultReturnMessage;
53 | }
54 |
55 | object[] outArgs;
56 | object retVal;
57 | Exception exception;
58 | busObject.Invoke (callMessage.MethodBase, callMessage.MethodName, callMessage.InArgs, out outArgs, out retVal, out exception);
59 |
60 | MethodReturnMessageWrapper returnMessage = new MethodReturnMessageWrapper ((IMethodReturnMessage) message);
61 | returnMessage.Exception = exception;
62 | returnMessage.ReturnValue = retVal;
63 |
64 | return returnMessage;
65 | }
66 |
67 | /*
68 | public override ObjRef CreateObjRef (Type ServerType)
69 | {
70 | throw new System.NotImplementedException ();
71 | }
72 | */
73 |
74 | ~DProxy ()
75 | {
76 | //FIXME: remove handlers/match rules here
77 | if (Protocol.Verbose)
78 | Console.Error.WriteLine ("Warning: Finalization of " + busObject.Path + " not yet supported");
79 | }
80 | }
81 | }
82 |
83 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/DProxy.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 56dd9cd86979bf044ababac8856f08c9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/ExportObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 |
6 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
7 |
8 | using System;
9 | using System.Reflection;
10 | using System.Reflection.Emit;
11 |
12 | using org.freedesktop.DBus;
13 |
14 | namespace NDesk.DBus
15 | {
16 | //TODO: perhaps ExportObject should not derive from BusObject
17 | internal class ExportObject : BusObject //, Peer
18 | {
19 | public readonly object obj;
20 |
21 | public ExportObject (Connection conn, ObjectPath object_path, object obj) : base (conn, null, object_path)
22 | {
23 | this.obj = obj;
24 | }
25 |
26 | //maybe add checks to make sure this is not called more than once
27 | //it's a bit silly as a property
28 | public bool Registered
29 | {
30 | set {
31 | Type type = obj.GetType ();
32 |
33 | foreach (MemberInfo mi in Mapper.GetPublicMembers (type)) {
34 | EventInfo ei = mi as EventInfo;
35 |
36 | if (ei == null)
37 | continue;
38 |
39 | Delegate dlg = GetHookupDelegate (ei);
40 |
41 | if (value)
42 | ei.AddEventHandler (obj, dlg);
43 | else
44 | ei.RemoveEventHandler (obj, dlg);
45 | }
46 | }
47 | }
48 |
49 | public void HandleMethodCall (MethodCall method_call)
50 | {
51 | Type type = obj.GetType ();
52 | //object retObj = type.InvokeMember (msg.Member, BindingFlags.InvokeMethod, null, obj, MessageHelper.GetDynamicValues (msg));
53 |
54 | //TODO: there is no member name mapping for properties etc. yet
55 | MethodInfo mi = Mapper.GetMethod (type, method_call);
56 |
57 | if (mi == null) {
58 | conn.MaybeSendUnknownMethodError (method_call);
59 | return;
60 | }
61 |
62 | object retObj = null;
63 | object[] parmValues = MessageHelper.GetDynamicValues (method_call.message, mi.GetParameters ());
64 |
65 | try {
66 | retObj = mi.Invoke (obj, parmValues);
67 | } catch (TargetInvocationException e) {
68 | if (!method_call.message.ReplyExpected)
69 | return;
70 |
71 | Exception ie = e.InnerException;
72 | //TODO: complete exception sending support
73 |
74 | Error error = new Error (Mapper.GetInterfaceName (ie.GetType ()), method_call.message.Header.Serial);
75 | error.message.Signature = new Signature (DType.String);
76 |
77 | MessageWriter writer = new MessageWriter (Connection.NativeEndianness);
78 | writer.connection = conn;
79 | writer.Write (ie.Message);
80 | error.message.Body = writer.ToArray ();
81 |
82 | //TODO: we should be more strict here, but this fallback was added as a quick fix for p2p
83 | if (method_call.Sender != null)
84 | error.message.Header.Fields[FieldCode.Destination] = method_call.Sender;
85 |
86 | conn.Send (error.message);
87 | return;
88 | }
89 |
90 | if (method_call.message.ReplyExpected) {
91 | Message reply = MessageHelper.ConstructDynamicReply (method_call, mi, retObj, parmValues);
92 | conn.Send (reply);
93 | }
94 | }
95 |
96 | /*
97 | public void Ping ()
98 | {
99 | }
100 |
101 | public string GetMachineId ()
102 | {
103 | //TODO: implement this
104 | return String.Empty;
105 | }
106 | */
107 | }
108 | }
109 |
110 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/ExportObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab4ae7c3a274e7a4f9235777bc30d7bf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Introspection.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 020af899b0623d046855b4ed62f710a5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/IntrospectionSchema.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Xml.Serialization;
9 | using System.Collections.Generic;
10 |
11 | namespace NDesk.DBus.Introspection
12 | {
13 | [XmlRootAttribute(IsNullable=true)]
14 | public class Member {
15 | [XmlAttributeAttribute("name")]
16 | public string Name;
17 | }
18 |
19 | [XmlRootAttribute("node", IsNullable=true)]
20 | public class Node {
21 |
22 | [XmlAttributeAttribute("name")]
23 | public string Name;
24 |
25 | [XmlElementAttribute("interface", Type=typeof(@Interface))]
26 | public Interface[] Interfaces;
27 | [XmlElementAttribute("node", Type=typeof(Node))]
28 | public Node[] Nodes;
29 | }
30 |
31 | [XmlRootAttribute("interface", IsNullable=true)]
32 | public class @Interface {
33 |
34 | [XmlAttributeAttribute("name")]
35 | public string Name;
36 |
37 | /*
38 | [XmlElementAttribute("method", Type=typeof(Method))]
39 | [XmlElementAttribute("signal", Type=typeof(Signal))]
40 | [XmlElementAttribute("property", Type=typeof(Property))]
41 | //[XmlElementAttribute("annotation", Type=typeof(Annotation))]
42 | //public Member[] Members;
43 | */
44 |
45 | [XmlElementAttribute("method", Type=typeof(Method))]
46 | public Method[] Methods;
47 |
48 | [XmlElementAttribute("signal", Type=typeof(Signal))]
49 | public Signal[] Signals;
50 |
51 | [XmlElementAttribute("property", Type=typeof(Property))]
52 | public Property[] Properties;
53 | }
54 |
55 | [XmlRootAttribute(IsNullable=true)]
56 | public class Method : Member {
57 |
58 | /*
59 | [XmlElementAttribute("arg", Type=typeof(Argument))]
60 | [XmlElementAttribute("annotation", Type=typeof(Annotation))]
61 | public object[] Items;
62 | */
63 |
64 | //[System.ComponentModel.DefaultValue(new Argument[0])]
65 | [XmlElementAttribute("arg", Type=typeof(Argument))]
66 | //public List Arguments;
67 | public Argument[] Arguments;
68 | }
69 |
70 | [XmlRootAttribute(IsNullable=true)]
71 | public class Argument {
72 |
73 | [XmlAttributeAttribute("name")]
74 | public string Name = String.Empty;
75 |
76 | [XmlAttributeAttribute("type")]
77 | public string Type;
78 |
79 | [System.ComponentModel.DefaultValue(ArgDirection.@in)]
80 | [XmlAttributeAttribute("direction")]
81 | public ArgDirection Direction = ArgDirection.@in;
82 | }
83 |
84 | public enum ArgDirection {
85 | @in,
86 | @out,
87 | }
88 |
89 | [XmlRootAttribute(IsNullable=true)]
90 | public class Annotation {
91 |
92 | [XmlAttributeAttribute("name")]
93 | public string Name = String.Empty;
94 |
95 | [XmlAttributeAttribute("value")]
96 | public string Value = String.Empty;
97 | }
98 |
99 | [XmlRootAttribute("signal", IsNullable=true)]
100 | public class Signal : Method {
101 | }
102 |
103 | [XmlRootAttribute(IsNullable=true)]
104 | public class Property : Member {
105 | [XmlAttributeAttribute("type")]
106 | public string Type = String.Empty;
107 |
108 | [XmlAttributeAttribute("access")]
109 | public propertyAccess Access;
110 |
111 | [XmlElementAttribute("annotation")]
112 | public Annotation[] Annotations;
113 | }
114 |
115 | public enum propertyAccess {
116 | read,
117 | write,
118 | readwrite,
119 | }
120 | }
121 |
122 |
123 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/IntrospectionSchema.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7f1168721830b704cbd0ffe65f70c9b3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Mapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e96ca5633efc6ab42b1d04aaf72bb933
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/MatchRule.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ff7cf4de9f25db4c82fc22a582242f4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Message.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 |
11 | namespace NDesk.DBus
12 | {
13 | class Message
14 | {
15 | public Message ()
16 | {
17 | Header.Endianness = Connection.NativeEndianness;
18 | Header.MessageType = MessageType.MethodCall;
19 | Header.Flags = HeaderFlag.NoReplyExpected; //TODO: is this the right place to do this?
20 | Header.MajorVersion = Protocol.Version;
21 | Header.Fields = new Dictionary ();
22 | }
23 |
24 | public Header Header;
25 |
26 | public Connection Connection;
27 |
28 | public Signature Signature
29 | {
30 | get {
31 | object o;
32 | if (Header.Fields.TryGetValue (FieldCode.Signature, out o))
33 | return (Signature)o;
34 | else
35 | return Signature.Empty;
36 | } set {
37 | if (value == Signature.Empty)
38 | Header.Fields.Remove (FieldCode.Signature);
39 | else
40 | Header.Fields[FieldCode.Signature] = value;
41 | }
42 | }
43 |
44 | public bool ReplyExpected
45 | {
46 | get {
47 | return (Header.Flags & HeaderFlag.NoReplyExpected) == HeaderFlag.None;
48 | } set {
49 | if (value)
50 | Header.Flags &= ~HeaderFlag.NoReplyExpected; //flag off
51 | else
52 | Header.Flags |= HeaderFlag.NoReplyExpected; //flag on
53 | }
54 | }
55 |
56 | //public HeaderField[] HeaderFields;
57 | //public Dictionary;
58 |
59 | public byte[] Body;
60 |
61 | //TODO: make use of Locked
62 | /*
63 | protected bool locked = false;
64 | public bool Locked
65 | {
66 | get {
67 | return locked;
68 | }
69 | }
70 | */
71 |
72 | public void SetHeaderData (byte[] data)
73 | {
74 | EndianFlag endianness = (EndianFlag)data[0];
75 | MessageReader reader = new MessageReader (endianness, data);
76 |
77 | Header = (Header)reader.ReadStruct (typeof (Header));
78 | }
79 |
80 | public byte[] GetHeaderData ()
81 | {
82 | if (Body != null)
83 | Header.Length = (uint)Body.Length;
84 |
85 | MessageWriter writer = new MessageWriter (Header.Endianness);
86 | writer.WriteValueType (Header, typeof (Header));
87 | writer.CloseWrite ();
88 |
89 | return writer.ToArray ();
90 | }
91 | }
92 | }
93 |
94 |
95 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Message.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1795f9e8b110b7145811f40561da7625
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/MessageFilter.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
5 |
6 | using System;
7 |
8 | namespace NDesk.DBus
9 | {
10 | class MessageFilter
11 | {
12 | //this should probably be made to use HeaderField or similar
13 | //this class is not generalized yet
14 |
15 | public static string MessageTypeToString (MessageType mtype)
16 | {
17 | switch (mtype)
18 | {
19 | case MessageType.MethodCall:
20 | return "method_call";
21 | case MessageType.MethodReturn:
22 | return "method_return";
23 | case MessageType.Error:
24 | return "error";
25 | case MessageType.Signal:
26 | return "signal";
27 | case MessageType.Invalid:
28 | return "invalid";
29 | default:
30 | throw new Exception ("Bad MessageType: " + mtype);
31 | }
32 | }
33 |
34 | public static MessageType StringToMessageType (string text)
35 | {
36 | switch (text)
37 | {
38 | case "method_call":
39 | return MessageType.MethodCall;
40 | case "method_return":
41 | return MessageType.MethodReturn;
42 | case "error":
43 | return MessageType.Error;
44 | case "signal":
45 | return MessageType.Signal;
46 | case "invalid":
47 | return MessageType.Invalid;
48 | default:
49 | throw new Exception ("Bad MessageType: " + text);
50 | }
51 | }
52 |
53 | //TODO: remove this -- left here for the benefit of the monitor tool for now
54 | public static string CreateMatchRule (MessageType mtype)
55 | {
56 | return "type='" + MessageTypeToString (mtype) + "'";
57 | }
58 | }
59 | }
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/MessageFilter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d69e5469160625040ba1a445c875c3d8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/MessageReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aa6c088548e89904cab8a1c34338f70c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/MessageWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b13792f9f79f2444e93bc2166dfcdcdd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/PendingCall.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2007 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.Threading;
9 |
10 | namespace NDesk.DBus
11 | {
12 | class PendingCall
13 | {
14 | Connection conn;
15 | Message reply = null;
16 | object lockObj = new object ();
17 |
18 | public PendingCall (Connection conn)
19 | {
20 | this.conn = conn;
21 | }
22 |
23 | int waiters = 0;
24 |
25 | public Message Reply
26 | {
27 | get {
28 | if (Thread.CurrentThread == conn.mainThread) {
29 | /*
30 | while (reply == null)
31 | conn.Iterate ();
32 | */
33 |
34 | while (reply == null)
35 | conn.HandleMessage (conn.ReadMessage ());
36 |
37 | conn.DispatchSignals ();
38 | } else {
39 | lock (lockObj) {
40 | Interlocked.Increment (ref waiters);
41 |
42 | while (reply == null)
43 | Monitor.Wait (lockObj);
44 |
45 | Interlocked.Decrement (ref waiters);
46 | }
47 | }
48 |
49 | return reply;
50 | } set {
51 | lock (lockObj) {
52 | reply = value;
53 |
54 | if (waiters > 0)
55 | Monitor.PulseAll (lockObj);
56 |
57 | if (Completed != null)
58 | Completed (reply);
59 | }
60 | }
61 | }
62 |
63 | public event Action Completed;
64 | }
65 | }
66 |
67 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/PendingCall.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e02d19ae81e3be14b91ea600d61a07f8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Protocol.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 237bd415a6301e94d9585c7a1c20cc49
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Server.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.IO;
9 | using System.Net;
10 | using System.Net.Sockets;
11 |
12 | namespace NDesk.DBus
13 | {
14 | //TODO: complete this class
15 | class Server
16 | {
17 | public void Listen (string address)
18 | {
19 | this.address = address;
20 | }
21 |
22 | public void Disconnect ()
23 | {
24 | }
25 |
26 | public bool IsConnected
27 | {
28 | get {
29 | return true;
30 | }
31 | }
32 |
33 | protected string address;
34 | public string Address
35 | {
36 | get {
37 | return address;
38 | }
39 | }
40 |
41 | //TODO: new connection event/virtual method
42 | }
43 | }
44 |
45 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Server.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6797591df0f6e5b48b486fbd456782da
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Signature.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d3786f012dcda68468ad9b5576685930
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/SocketTransport.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.IO;
9 | using System.Net;
10 | using System.Net.Sockets;
11 |
12 | namespace NDesk.DBus.Transports
13 | {
14 | class SocketTransport : Transport
15 | {
16 | protected Socket socket;
17 |
18 | public override void Open (AddressEntry entry)
19 | {
20 | string host, portStr;
21 | int port;
22 |
23 | if (!entry.Properties.TryGetValue ("host", out host))
24 | throw new Exception ("No host specified");
25 |
26 | if (!entry.Properties.TryGetValue ("port", out portStr))
27 | throw new Exception ("No port specified");
28 |
29 | if (!Int32.TryParse (portStr, out port))
30 | throw new Exception ("Invalid port: \"" + port + "\"");
31 |
32 | Open (host, port);
33 | }
34 |
35 | public void Open (string host, int port)
36 | {
37 | //TODO: use Socket directly
38 | TcpClient client = new TcpClient (host, port);
39 | Stream = client.GetStream ();
40 | }
41 |
42 | public void Open (Socket socket)
43 | {
44 | this.socket = socket;
45 |
46 | socket.Blocking = true;
47 | SocketHandle = (long)socket.Handle;
48 | //Stream = new UnixStream ((int)socket.Handle);
49 | Stream = new NetworkStream (socket);
50 | }
51 |
52 | public override void WriteCred ()
53 | {
54 | Stream.WriteByte (0);
55 | }
56 |
57 | public override string AuthString ()
58 | {
59 | return String.Empty;
60 | }
61 | }
62 | }
63 |
64 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/SocketTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cabe71c902b273045acc6b52b2c58b06
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Transport.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.IO;
9 |
10 | namespace NDesk.DBus.Transports
11 | {
12 | abstract class Transport
13 | {
14 | public static Transport Create (AddressEntry entry)
15 | {
16 | switch (entry.Method) {
17 | case "tcp":
18 | {
19 | Transport transport = new SocketTransport ();
20 | transport.Open (entry);
21 | return transport;
22 | }
23 | #if !PORTABLE
24 | case "unix":
25 | {
26 | //Transport transport = new UnixMonoTransport ();
27 | Transport transport = new UnixNativeTransport ();
28 | transport.Open (entry);
29 | return transport;
30 | }
31 | #endif
32 | default:
33 | throw new NotSupportedException ("Transport method \"" + entry.Method + "\" not supported");
34 | }
35 | }
36 |
37 | protected Connection connection;
38 |
39 | public Connection Connection
40 | {
41 | get {
42 | return connection;
43 | } set {
44 | connection = value;
45 | }
46 | }
47 |
48 | //TODO: design this properly
49 |
50 | //this is just a temporary solution
51 | public Stream Stream;
52 | public long SocketHandle;
53 | public abstract void Open (AddressEntry entry);
54 | public abstract string AuthString ();
55 | public abstract void WriteCred ();
56 | }
57 | }
58 |
59 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Transport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb07ba6ecf75a7c4b913fea837b0dbf5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/TypeDefiner.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e6b4a7c362584e4428a6d55711336251
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/TypeImplementer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9eee502d1f22a6a4ba2b9e8877bd8886
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/UnixMonoTransport.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 |
8 | using System;
9 | using System.IO;
10 | using System.Net;
11 | using System.Net.Sockets;
12 |
13 | using Mono.Unix;
14 | using Mono.Unix.Native;
15 |
16 | namespace NDesk.DBus.Transports
17 | {
18 | class UnixMonoTransport : UnixTransport
19 | {
20 | protected Socket socket;
21 |
22 | public override void Open (string path, bool @abstract)
23 | {
24 | if (@abstract)
25 | socket = OpenAbstractUnix (path);
26 | else
27 | socket = OpenUnix (path);
28 |
29 | socket.Blocking = true;
30 | SocketHandle = (long)socket.Handle;
31 | //Stream = new UnixStream ((int)socket.Handle);
32 | Stream = new NetworkStream (socket);
33 | }
34 |
35 | //send peer credentials null byte. note that this might not be portable
36 | //there are also selinux, BSD etc. considerations
37 | public override void WriteCred ()
38 | {
39 | Stream.WriteByte (0);
40 | }
41 |
42 | protected Socket OpenAbstractUnix (string path)
43 | {
44 | AbstractUnixEndPoint ep = new AbstractUnixEndPoint (path);
45 |
46 | Socket client = new Socket (AddressFamily.Unix, SocketType.Stream, 0);
47 | client.Connect (ep);
48 |
49 | return client;
50 | }
51 |
52 | public Socket OpenUnix (string path)
53 | {
54 | UnixEndPoint remoteEndPoint = new UnixEndPoint (path);
55 |
56 | Socket client = new Socket (AddressFamily.Unix, SocketType.Stream, 0);
57 | client.Connect (remoteEndPoint);
58 |
59 | return client;
60 | }
61 | }
62 | }
63 |
64 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/UnixMonoTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 901d685035936c64f9ff23e8ace8d2c4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/UnixNativeTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f730f5b6d6ae5649a093aac48f6639a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/UnixTransport.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2006 Alp Toker
2 | // This software is made available under the MIT License
3 | // See COPYING for details
4 |
5 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
6 |
7 | using System;
8 | using System.IO;
9 | using Mono.Unix;
10 |
11 | namespace NDesk.DBus.Transports
12 | {
13 | abstract class UnixTransport : Transport
14 | {
15 | public override void Open (AddressEntry entry)
16 | {
17 | string path;
18 | bool abstr;
19 |
20 | if (entry.Properties.TryGetValue ("path", out path))
21 | abstr = false;
22 | else if (entry.Properties.TryGetValue ("abstract", out path))
23 | abstr = true;
24 | else
25 | throw new Exception ("No path specified for UNIX transport");
26 |
27 | Open (path, abstr);
28 | }
29 |
30 | public override string AuthString ()
31 | {
32 | long uid = UnixUserInfo.GetRealUserId ();
33 |
34 | return uid.ToString ();
35 | }
36 |
37 | public abstract void Open (string path, bool @abstract);
38 | }
39 | }
40 |
41 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/UnixTransport.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c8dccb3b02b3504386f485216d63df8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/NDesk.DBus/Wrapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7678a982b92460d41a5003a461a03bd1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/Protocol.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Protocol.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 |
33 |
34 | namespace Mono.Zeroconf.Providers.AvahiDBus
35 | {
36 | public enum Protocol : int
37 | {
38 | Unspecified = -1,
39 | IPv4 = 0,
40 | IPv6 = 1
41 | }
42 | }
43 |
44 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/Protocol.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4cdef16ad1145b478605672ec5f7db8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/PublishFlags.cs:
--------------------------------------------------------------------------------
1 | //
2 | // PublishFlags.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 |
33 | namespace Mono.Zeroconf.Providers.AvahiDBus
34 | {
35 | [Flags]
36 | public enum PublishFlags : uint
37 | {
38 | None = 0,
39 | Unique = 1,
40 | NoProbe = 2,
41 | NoAnnounce = 4,
42 | AllowMultiple = 8,
43 | NoReverse = 16,
44 | NoCookie = 32,
45 | Update = 64,
46 | UseWideArea = 128,
47 | UseMulticast = 256
48 | }
49 | }
50 |
51 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/PublishFlags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad410b888b4ba5a4ca6ef6e8edee3954
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/RegisterService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d525d1d7bacd84546a15a1be7ed77b60
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/Service.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Service.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 | using Mono.Zeroconf;
33 |
34 | namespace Mono.Zeroconf.Providers.AvahiDBus
35 | {
36 | public class Service : Mono.Zeroconf.IService
37 | {
38 | private string name;
39 | private string regtype;
40 | private string reply_domain;
41 | private int @interface;
42 | private Protocol aprotocol;
43 | private ITxtRecord txt_record;
44 |
45 | public Service ()
46 | {
47 | this.@interface = -1; // Unspecified
48 | }
49 |
50 | public Service (string name, string regtype, string replyDomain, int @interface, Protocol aprotocol)
51 | {
52 | this.name = name;
53 | this.regtype = regtype;
54 | this.reply_domain = replyDomain;
55 | this.@interface = @interface;
56 | this.aprotocol = aprotocol;
57 | }
58 |
59 | protected int AvahiInterface {
60 | get { return @interface; }
61 | set { @interface = value; }
62 | }
63 |
64 | protected Protocol AvahiProtocol {
65 | get { return aprotocol; }
66 | set { aprotocol = value; }
67 | }
68 |
69 | public string Name {
70 | get { return name; }
71 | set { name = value; }
72 | }
73 |
74 | public string RegType {
75 | get { return regtype; }
76 | set { regtype = value; }
77 | }
78 |
79 | public string ReplyDomain {
80 | get { return reply_domain; }
81 | set { reply_domain = value; }
82 | }
83 |
84 | public uint NetworkInterface {
85 | get { return AvahiUtils.ToMzcInterface (@interface); }
86 | }
87 |
88 | public AddressProtocol AddressProtocol {
89 | get { return AvahiUtils.ToMzcProtocol (aprotocol); }
90 | }
91 |
92 | public ITxtRecord TxtRecord {
93 | get { return txt_record; }
94 | set { txt_record = value; }
95 | }
96 | }
97 | }
98 |
99 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/Service.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0803b528cc02bc042957de22b966ddf2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/ServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 599c87689728e6c49801cb7df9ff37f2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/TxtRecord.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bc94a4cfe1a34e4b962ee71887bbe70
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/ZeroconfProvider.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ZeroconfProvider.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007-2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | #if UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX
30 |
31 | using System;
32 | using System.Collections;
33 |
34 | [assembly:Mono.Zeroconf.Providers.ZeroconfProvider (typeof (Mono.Zeroconf.Providers.AvahiDBus.ZeroconfProvider))]
35 |
36 | namespace Mono.Zeroconf.Providers.AvahiDBus
37 | {
38 | public class ZeroconfProvider : IZeroconfProvider
39 | {
40 | public void Initialize ()
41 | {
42 | DBusManager.Initialize ();
43 | }
44 |
45 | public Type ServiceBrowser {
46 | get { return typeof (Mono.Zeroconf.Providers.AvahiDBus.ServiceBrowser); }
47 | }
48 |
49 | public Type RegisterService {
50 | get { return typeof (Mono.Zeroconf.Providers.AvahiDBus.RegisterService); }
51 | }
52 |
53 | public Type TxtRecord {
54 | get { return typeof (Mono.Zeroconf.Providers.AvahiDBus.TxtRecord); }
55 | }
56 | }
57 | }
58 |
59 | #endif
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.AvahiDBus/ZeroconfProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5bbe52a72c8173f46aa395c64d95e644
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 558953308b135874aa4169dbc78b17a4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/BrowseService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9a7793e6558f604d8356345bf987ae6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Native.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4cfbc1ed391c794ea73fc680b591e93
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 56356894df0b27b479e44065b6e6a952
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x64.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38a69b12140dbda4c9f2feccf63c2fff
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c25762dbb2ab8a49a9b082c2731bc08
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86/dnssd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/benkuper/Unity-OSCQuery/414d3a815cf102ca257fec6e5be7dad67534982e/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86/dnssd.dll
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86/dnssd.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 221367021301a60459a56dacb9cb599c
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 1
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | CPU: x86
25 | DefaultValueInitialized: true
26 | - first:
27 | Standalone: Linux64
28 | second:
29 | enabled: 0
30 | settings:
31 | CPU: None
32 | - first:
33 | Standalone: OSXUniversal
34 | second:
35 | enabled: 0
36 | settings:
37 | CPU: x86
38 | - first:
39 | Standalone: Win
40 | second:
41 | enabled: 1
42 | settings:
43 | CPU: AnyCPU
44 | - first:
45 | Standalone: Win64
46 | second:
47 | enabled: 0
48 | settings:
49 | CPU: None
50 | userData:
51 | assetBundleName:
52 | assetBundleVariant:
53 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86_64.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b78c6df51c369894ba0701374992b6da
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86_64/dnssd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/benkuper/Unity-OSCQuery/414d3a815cf102ca257fec6e5be7dad67534982e/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86_64/dnssd.dll
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Plugins/x86_64/dnssd.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 32dbf32cd8f2ea943bdec44f6484f863
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 1
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | CPU: x86_64
25 | DefaultValueInitialized: true
26 | - first:
27 | Standalone: Linux64
28 | second:
29 | enabled: 1
30 | settings:
31 | CPU: x86_64
32 | - first:
33 | Standalone: OSXUniversal
34 | second:
35 | enabled: 0
36 | settings:
37 | CPU: x86_64
38 | - first:
39 | Standalone: Win
40 | second:
41 | enabled: 0
42 | settings:
43 | CPU: None
44 | - first:
45 | Standalone: Win64
46 | second:
47 | enabled: 1
48 | settings:
49 | CPU: AnyCPU
50 | userData:
51 | assetBundleName:
52 | assetBundleVariant:
53 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/RegisterService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9559c7cd69202448bc92a85dcdb01e9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/Service.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18deae2b103874f4e998a380e6f23645
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c17868c99a0271249b695ed42b136a34
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceClass.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceClass.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf.Providers.Bonjour
30 | {
31 | public enum ServiceClass : ushort {
32 | IN = 1 /* Internet */
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceClass.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 551ad76e9665da2409390979f365b9d7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceError.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceError.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf.Providers.Bonjour
30 | {
31 | public enum ServiceError {
32 | NoError = 0,
33 | Unknown = -65537, /* 0xFFFE FFFF */
34 | NoSuchName = -65538,
35 | NoMemory = -65539,
36 | BadParam = -65540,
37 | BadReference = -65541,
38 | BadState = -65542,
39 | BadFlags = -65543,
40 | Unsupported = -65544,
41 | NotInitialized = -65545,
42 | AlreadyRegistered = -65547,
43 | NameConflict = -65548,
44 | Invalid = -65549,
45 | Firewall = -65550,
46 | Incompatible = -65551, /* client library incompatible with daemon */
47 | BadInterfaceIndex = -65552,
48 | Refused = -65553,
49 | NoSuchRecord = -65554,
50 | NoAuth = -65555,
51 | NoSuchKey = -65556,
52 | NATTraversal = -65557,
53 | DoubleNAT = -65558,
54 | BadTime = -65559
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceError.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cbc51b13c5753ef42a4932f1992d734e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceErrorException.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceException.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf.Providers.Bonjour
32 | {
33 | internal class ServiceErrorException : Exception
34 | {
35 | internal ServiceErrorException(ServiceError error) : base(error.ToString())
36 | {
37 | }
38 |
39 | internal ServiceErrorException(string error) : base(error)
40 | {
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceErrorException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6b7735345f875634e921c19da52fa4bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceFlags.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a71479587d686741a4641ecf2bd70ed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceRef.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceRef.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Threading;
31 | using System.Collections;
32 | using System.Runtime.InteropServices;
33 |
34 | namespace Mono.Zeroconf.Providers.Bonjour
35 | {
36 | public struct ServiceRef
37 | {
38 | public static readonly ServiceRef Zero;
39 |
40 | private IntPtr raw;
41 |
42 | public ServiceRef(IntPtr raw)
43 | {
44 | this.raw = raw;
45 | }
46 |
47 | public void Deallocate()
48 | {
49 | Native.DNSServiceRefDeallocate(Raw);
50 | }
51 |
52 | public ServiceError ProcessSingle()
53 | {
54 | return Native.DNSServiceProcessResult(Raw);
55 | }
56 |
57 | public void Process()
58 | {
59 | while(ProcessSingle() == ServiceError.NoError);
60 | }
61 |
62 | public int SocketFD {
63 | get {
64 | return Native.DNSServiceRefSockFD(Raw);
65 | }
66 | }
67 |
68 | public IntPtr Raw {
69 | get {
70 | return raw;
71 | }
72 | }
73 |
74 | public override bool Equals(object o)
75 | {
76 | if(!(o is ServiceRef)) {
77 | return false;
78 | }
79 |
80 | return ((ServiceRef)o).Raw == Raw;
81 | }
82 |
83 | public override int GetHashCode()
84 | {
85 | return Raw.GetHashCode();
86 | }
87 |
88 | public static bool operator ==(ServiceRef a, ServiceRef b)
89 | {
90 | return a.Raw == b.Raw;
91 | }
92 |
93 | public static bool operator !=(ServiceRef a, ServiceRef b)
94 | {
95 | return a.Raw != b.Raw;
96 | }
97 |
98 | public static explicit operator IntPtr(ServiceRef value)
99 | {
100 | return value.Raw;
101 | }
102 |
103 | public static explicit operator ServiceRef(IntPtr value)
104 | {
105 | return new ServiceRef(value);
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceRef.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4d66e435ce6916b42b8ae5095ab3fea3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceType.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceType.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf.Providers.Bonjour
30 | {
31 | public enum ServiceType : ushort {
32 | A = 1, /* Host address. */
33 | NS = 2, /* Authoritative server. */
34 | MD = 3, /* Mail destination. */
35 | MF = 4, /* Mail forwarder. */
36 | CNAME = 5, /* Canonical name. */
37 | SOA = 6, /* Start of authority zone. */
38 | MB = 7, /* Mailbox domain name. */
39 | MG = 8, /* Mail group member. */
40 | MR = 9, /* Mail rename name. */
41 | NULL = 10, /* Null resource record. */
42 | WKS = 11, /* Well known service. */
43 | PTR = 12, /* Domain name pointer. */
44 | HINFO = 13, /* Host information. */
45 | MINFO = 14, /* Mailbox information. */
46 | MX = 15, /* Mail routing information. */
47 | TXT = 16, /* One or more text strings. */
48 | RP = 17, /* Responsible person. */
49 | AFSDB = 18, /* AFS cell database. */
50 | X25 = 19, /* X_25 calling address. */
51 | ISDN = 20, /* ISDN calling address. */
52 | RT = 21, /* Router. */
53 | NSAP = 22, /* NSAP address. */
54 | NSAP_PTR = 23, /* Reverse NSAP lookup (deprecated). */
55 | SIG = 24, /* Security signature. */
56 | KEY = 25, /* Security key. */
57 | PX = 26, /* X.400 mail mapping. */
58 | GPOS = 27, /* Geographical position (withdrawn). */
59 | AAAA = 28, /* IPv6 Address. */
60 | LOC = 29, /* Location Information. */
61 | NXT = 30, /* Next domain (security). */
62 | EID = 31, /* Endpoint identifier. */
63 | NIMLOC = 32, /* Nimrod Locator. */
64 | SRV = 33, /* Server Selection. */
65 | ATMA = 34, /* ATM Address */
66 | NAPTR = 35, /* Naming Authority PoinTeR */
67 | KX = 36, /* Key Exchange */
68 | CERT = 37, /* Certification record */
69 | A6 = 38, /* IPv6 Address (deprecated) */
70 | DNAME = 39, /* Non-terminal DNAME (for IPv6) */
71 | SINK = 40, /* Kitchen sink (experimentatl) */
72 | OPT = 41, /* EDNS0 option (meta-RR) */
73 | TKEY = 249, /* Transaction key */
74 | TSIG = 250, /* Transaction signature. */
75 | IXFR = 251, /* Incremental zone transfer. */
76 | AXFR = 252, /* Transfer zone of authority. */
77 | MAILB = 253, /* Transfer mailbox records. */
78 | MAILA = 254, /* Transfer mail agent records. */
79 | ANY = 255 /* Wildcard match. */
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ServiceType.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5db35240e2456534ea52a6638b254256
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/TxtRecord.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7c09ea557a15db44fba21885af5e4c73
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/TxtRecordEnumerator.cs:
--------------------------------------------------------------------------------
1 | //
2 | // TxtRecordEnumerator.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Collections;
31 |
32 | namespace Mono.Zeroconf.Providers.Bonjour
33 | {
34 | internal class TxtRecordEnumerator : IEnumerator
35 | {
36 | private TxtRecord record;
37 | private TxtRecordItem current_item;
38 | private int index;
39 |
40 | public TxtRecordEnumerator(TxtRecord record)
41 | {
42 | this.record = record;
43 | }
44 |
45 | public void Reset()
46 | {
47 | index = 0;
48 | current_item = null;
49 | }
50 |
51 | public bool MoveNext()
52 | {
53 | if(index < 0 || index >= record.Count) {
54 | return false;
55 | }
56 |
57 | current_item = record.GetItemAt(index++);
58 | return current_item != null;
59 | }
60 |
61 | public object Current {
62 | get { return current_item; }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/TxtRecordEnumerator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d4539a889b2fdeb46a4ad043a0b28c57
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ZeroconfProvider.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ZeroconfProvider.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | [assembly:Mono.Zeroconf.Providers.ZeroconfProvider(typeof(Mono.Zeroconf.Providers.Bonjour.ZeroconfProvider))]
32 |
33 | namespace Mono.Zeroconf.Providers.Bonjour
34 | {
35 | public static class Zeroconf
36 | {
37 | public static void Initialize()
38 | {
39 | ServiceRef sd_ref;
40 | ServiceError error = Native.DNSServiceCreateConnection(out sd_ref);
41 |
42 | if(error != ServiceError.NoError) {
43 | throw new ServiceErrorException(error);
44 | }
45 |
46 | sd_ref.Deallocate();
47 |
48 | return;
49 | }
50 | }
51 |
52 | public class ZeroconfProvider : IZeroconfProvider
53 | {
54 | public void Initialize()
55 | {
56 | Zeroconf.Initialize();
57 | }
58 |
59 | public Type ServiceBrowser {
60 | get { return typeof(ServiceBrowser); }
61 | }
62 |
63 | public Type RegisterService {
64 | get { return typeof(RegisterService); }
65 | }
66 |
67 | public Type TxtRecord {
68 | get { return typeof(TxtRecord); }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.Providers.Bonjour/ZeroconfProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed8a3228e48df9a448abd9f04e9cb051
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d5fc5bea3c2a92f4fb048cf9dcf8fb11
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 21a9eba3cd1719c4b810a4adee5afd4a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers/IZeroconfProvider.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IZeroconfProvider.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf.Providers
32 | {
33 | public interface IZeroconfProvider
34 | {
35 | void Initialize();
36 | Type ServiceBrowser { get; }
37 | Type RegisterService { get; }
38 | Type TxtRecord { get; }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers/IZeroconfProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7b0a8cea4dd1a92459316844b8c3b3ac
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers/ProviderFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0740bbc40ba351c419361ba7603d94df
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers/ZeroconfProviderAttribute.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ZeroconfProviderAttribute.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf.Providers
32 | {
33 | [AttributeUsage(AttributeTargets.Assembly)]
34 | public class ZeroconfProviderAttribute : Attribute
35 | {
36 | private Type provider_type;
37 |
38 | public ZeroconfProviderAttribute(Type providerType)
39 | {
40 | this.provider_type = providerType;
41 | }
42 |
43 | public Type ProviderType {
44 | get { return provider_type; }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.Providers/ZeroconfProviderAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f3ea2155ad901e145a12b714b47f0055
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 796fb508ab008224caa4049efe407990
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/AddressProtocol.cs:
--------------------------------------------------------------------------------
1 | //
2 | // AddressProtocol.cs
3 | //
4 | // Author:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2008 Novell, Inc.
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public enum AddressProtocol
34 | {
35 | Any,
36 | IPv4,
37 | IPv6
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/AddressProtocol.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2c25a8b35625cde4ab4af5d3b59a09c3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IRegisterService.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IRegisterService.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public interface IRegisterService : IService, IDisposable
34 | {
35 | event RegisterServiceEventHandler Response;
36 |
37 | void Register();
38 |
39 | new string Name { get; set; }
40 | new string RegType { get; set; }
41 | new string ReplyDomain { get; set; }
42 |
43 | short Port { get; set; }
44 | ushort UPort { get; set; }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IRegisterService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4107b4fde703e0241b75cf96dd306382
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IResolvableService.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IResolvableService.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Net;
31 |
32 | namespace Mono.Zeroconf
33 | {
34 | public interface IResolvableService : IService
35 | {
36 | event ServiceResolvedEventHandler Resolved;
37 |
38 | void Resolve();
39 |
40 | string FullName { get; }
41 | IPHostEntry HostEntry { get; }
42 | string HostTarget { get; }
43 | uint NetworkInterface { get; }
44 | AddressProtocol AddressProtocol { get; }
45 | short Port { get; }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IResolvableService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f3c68ce3ff3edce488b90a929349f776
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IService.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IService.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf
30 | {
31 | public interface IService
32 | {
33 | string Name { get; }
34 | string RegType { get; }
35 | string ReplyDomain { get; }
36 | ITxtRecord TxtRecord { get; set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4cd978982dc4784cb1340569427a7c7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IServiceBrowser.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IServiceBrowser.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Collections.Generic;
31 |
32 | namespace Mono.Zeroconf
33 | {
34 | public interface IServiceBrowser : IEnumerable, IDisposable
35 | {
36 | event ServiceBrowseEventHandler ServiceAdded;
37 | event ServiceBrowseEventHandler ServiceRemoved;
38 |
39 | void Browse (uint interfaceIndex, AddressProtocol addressProtocol, string regtype, string domain);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/IServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98a0b2c3f29ed684f800fd670aa5c742
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ITxtRecord.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ITxtRecord.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Collections;
31 |
32 | namespace Mono.Zeroconf
33 | {
34 | public interface ITxtRecord : IEnumerable, IDisposable
35 | {
36 | void Add(string key, string value);
37 | void Add(string key, byte [] value);
38 | void Add(TxtRecordItem item);
39 |
40 | void Remove(string key);
41 |
42 | TxtRecordItem GetItemAt(int index);
43 |
44 | TxtRecordItem this[string key] { get; }
45 | int Count { get; }
46 |
47 | ITxtRecord BaseRecord { get; }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ITxtRecord.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4565f180b2be40d48bafae546776fbea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterService.cs:
--------------------------------------------------------------------------------
1 | //
2 | // RegisterService.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using Mono.Zeroconf.Providers;
31 |
32 | namespace Mono.Zeroconf
33 | {
34 | public class RegisterService : IRegisterService
35 | {
36 | private IRegisterService register_service;
37 |
38 | public RegisterService()
39 | {
40 | register_service = (IRegisterService)Activator.CreateInstance(
41 | ProviderFactory.SelectedProvider.RegisterService);
42 | }
43 |
44 | public void Register()
45 | {
46 | register_service.Register();
47 | }
48 |
49 | public void Dispose()
50 | {
51 | register_service.Dispose();
52 | }
53 |
54 | public event RegisterServiceEventHandler Response {
55 | add { register_service.Response += value; }
56 | remove { register_service.Response -= value; }
57 | }
58 |
59 | public string Name {
60 | get { return register_service.Name; }
61 | set { register_service.Name = value; }
62 | }
63 |
64 | public string RegType {
65 | get { return register_service.RegType; }
66 | set { register_service.RegType = value; }
67 | }
68 |
69 | public string ReplyDomain {
70 | get { return register_service.ReplyDomain; }
71 | set { register_service.ReplyDomain = value; }
72 | }
73 |
74 | public ITxtRecord TxtRecord {
75 | get { return register_service.TxtRecord; }
76 | set { register_service.TxtRecord = value; }
77 | }
78 |
79 | public short Port {
80 | get { return register_service.Port; }
81 | set { register_service.Port = value; }
82 | }
83 |
84 | public ushort UPort {
85 | get { return register_service.UPort; }
86 | set { register_service.UPort = value; }
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterService.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 944b8cc27dd6d1d41b91f4c48c87617e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterServiceEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // RegisterServiceEventArgs.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public class RegisterServiceEventArgs : EventArgs
34 | {
35 | private IRegisterService service;
36 | private bool is_registered;
37 | private ServiceErrorCode error;
38 |
39 | public RegisterServiceEventArgs()
40 | {
41 | }
42 |
43 | public RegisterServiceEventArgs(IRegisterService service, bool isRegistered, ServiceErrorCode error)
44 | {
45 | this.service = service;
46 | this.is_registered = isRegistered;
47 | this.error = error;
48 | }
49 |
50 | public IRegisterService Service {
51 | get { return service; }
52 | set { service = value; }
53 | }
54 |
55 | public bool IsRegistered {
56 | get { return is_registered; }
57 | set { is_registered = value; }
58 | }
59 |
60 | public ServiceErrorCode ServiceError {
61 | get { return error; }
62 | set { error = value; }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterServiceEventArgs.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1c3eb10c109fd349b0eb6b5736d18ea
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterServiceEventHandler.cs:
--------------------------------------------------------------------------------
1 | //
2 | // RegisterServiceEventHandler.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public delegate void RegisterServiceEventHandler(object o, RegisterServiceEventArgs args);
34 | }
35 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/RegisterServiceEventHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0043feead2bb2f74998795ca655dce2c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowseEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IServiceBrowser.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public class ServiceBrowseEventArgs : EventArgs
34 | {
35 | private IResolvableService service;
36 |
37 | public ServiceBrowseEventArgs(IResolvableService service)
38 | {
39 | this.service = service;
40 | }
41 |
42 | public IResolvableService Service {
43 | get { return service; }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowseEventArgs.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 43ee4e2f7da87b248ab330d8a05cc0bd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowseEventHandler.cs:
--------------------------------------------------------------------------------
1 | //
2 | // IServiceBrowser.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf
30 | {
31 | public delegate void ServiceBrowseEventHandler(object o, ServiceBrowseEventArgs args);
32 | }
33 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowseEventHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5ff60868739eb0c448e75de745e15ae0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowser.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceBrowser.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Collections.Generic;
31 | using Mono.Zeroconf.Providers;
32 |
33 | namespace Mono.Zeroconf
34 | {
35 | public class ServiceBrowser : IServiceBrowser
36 | {
37 | private IServiceBrowser browser;
38 |
39 | public ServiceBrowser ()
40 | {
41 | browser = (IServiceBrowser)Activator.CreateInstance (ProviderFactory.SelectedProvider.ServiceBrowser);
42 | }
43 |
44 | public void Dispose ()
45 | {
46 | browser.Dispose ();
47 | }
48 |
49 | public void Browse (uint interfaceIndex, AddressProtocol addressProtocol, string regtype, string domain)
50 | {
51 | browser.Browse (interfaceIndex, addressProtocol, regtype, domain ?? "local");
52 | }
53 |
54 | public void Browse (uint interfaceIndex, string regtype, string domain)
55 | {
56 | Browse (interfaceIndex, AddressProtocol.Any, regtype, domain);
57 | }
58 |
59 | public void Browse (AddressProtocol addressProtocol, string regtype, string domain)
60 | {
61 | Browse (0, addressProtocol, regtype, domain);
62 | }
63 |
64 | public void Browse (string regtype, string domain)
65 | {
66 | Browse (0, AddressProtocol.Any, regtype, domain);
67 | }
68 |
69 | public IEnumerator GetEnumerator ()
70 | {
71 | return browser.GetEnumerator ();
72 | }
73 |
74 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
75 | {
76 | return browser.GetEnumerator ();
77 | }
78 |
79 | public event ServiceBrowseEventHandler ServiceAdded {
80 | add { browser.ServiceAdded += value; }
81 | remove { browser.ServiceRemoved -= value; }
82 | }
83 |
84 | public event ServiceBrowseEventHandler ServiceRemoved {
85 | add { browser.ServiceRemoved += value; }
86 | remove { browser.ServiceRemoved -= value; }
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceBrowser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6c507a405dafe4342bae17a602676980
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceErrorCode.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceErrorCode.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf
30 | {
31 | // These are just copied from Bonjour
32 |
33 | public enum ServiceErrorCode {
34 | None = 0,
35 | Unknown = -65537, /* 0xFFFE FFFF */
36 | NoSuchName = -65538,
37 | NoMemory = -65539,
38 | BadParam = -65540,
39 | BadReference = -65541,
40 | BadState = -65542,
41 | BadFlags = -65543,
42 | Unsupported = -65544,
43 | NotInitialized = -65545,
44 | AlreadyRegistered = -65547,
45 | NameConflict = -65548,
46 | Invalid = -65549,
47 | Firewall = -65550,
48 | Incompatible = -65551, /* client library incompatible with daemon */
49 | BadInterfaceIndex = -65552,
50 | Refused = -65553,
51 | NoSuchRecord = -65554,
52 | NoAuth = -65555,
53 | NoSuchKey = -65556,
54 | NATTraversal = -65557,
55 | DoubleNAT = -65558,
56 | BadTime = -65559
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceErrorCode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 36ce16c14b0e59e49b80492aeeb2b915
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceResolvedEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceResolvedEventArgs.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 |
31 | namespace Mono.Zeroconf
32 | {
33 | public class ServiceResolvedEventArgs : EventArgs
34 | {
35 | private IResolvableService service;
36 |
37 | public ServiceResolvedEventArgs(IResolvableService service)
38 | {
39 | this.service = service;
40 | }
41 |
42 | public IResolvableService Service {
43 | get { return service; }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceResolvedEventArgs.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 521d24655469b2e4dae22e8fcb209f74
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceResolvedEventHandler.cs:
--------------------------------------------------------------------------------
1 | //
2 | // ServiceResolvedEventHandler.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | namespace Mono.Zeroconf
30 | {
31 | public delegate void ServiceResolvedEventHandler(object o, ServiceResolvedEventArgs args);
32 | }
33 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/ServiceResolvedEventHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e36e95da26849c54ba018418bd2fbb90
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/TxtRecord.cs:
--------------------------------------------------------------------------------
1 | //
2 | // TxtRecord.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Collections;
31 | using Mono.Zeroconf.Providers;
32 |
33 | namespace Mono.Zeroconf
34 | {
35 | public class TxtRecord : ITxtRecord
36 | {
37 | private ITxtRecord record;
38 |
39 | public TxtRecord()
40 | {
41 | record = (ITxtRecord)Activator.CreateInstance(ProviderFactory.SelectedProvider.TxtRecord);
42 | }
43 |
44 | public void Add(string key, string value)
45 | {
46 | record.Add(key, value);
47 | }
48 |
49 | public void Add(string key, byte [] value)
50 | {
51 | record.Add(key, value);
52 | }
53 |
54 | public void Add(TxtRecordItem item)
55 | {
56 | record.Add(item);
57 | }
58 |
59 | public void Remove(string key)
60 | {
61 | record.Remove(key);
62 | }
63 |
64 | public TxtRecordItem GetItemAt(int index)
65 | {
66 | return record.GetItemAt(index);
67 | }
68 |
69 | public IEnumerator GetEnumerator()
70 | {
71 | return record.GetEnumerator();
72 | }
73 |
74 | public void Dispose()
75 | {
76 | record.Dispose();
77 | }
78 |
79 | public TxtRecordItem this[string index] {
80 | get { return record[index]; }
81 | }
82 |
83 | public int Count {
84 | get { return record.Count; }
85 | }
86 |
87 | public ITxtRecord BaseRecord {
88 | get { return record; }
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/TxtRecord.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c625f21a257e7334d9d192bddbb1c60d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/TxtRecordItem.cs:
--------------------------------------------------------------------------------
1 | //
2 | // TxtRecordItem.cs
3 | //
4 | // Authors:
5 | // Aaron Bockover
6 | //
7 | // Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
8 | //
9 | // Permission is hereby granted, free of charge, to any person obtaining
10 | // a copy of this software and associated documentation files (the
11 | // "Software"), to deal in the Software without restriction, including
12 | // without limitation the rights to use, copy, modify, merge, publish,
13 | // distribute, sublicense, and/or sell copies of the Software, and to
14 | // permit persons to whom the Software is furnished to do so, subject to
15 | // the following conditions:
16 | //
17 | // The above copyright notice and this permission notice shall be
18 | // included in all copies or substantial portions of the Software.
19 | //
20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 | //
28 |
29 | using System;
30 | using System.Text;
31 |
32 | namespace Mono.Zeroconf
33 | {
34 | public class TxtRecordItem
35 | {
36 | private string key;
37 | private byte [] value_raw;
38 | private string value_string;
39 |
40 | private static readonly Encoding encoding = new UTF8Encoding();
41 |
42 | public TxtRecordItem(string key, byte [] valueRaw)
43 | {
44 | this.key = key;
45 | ValueRaw = valueRaw;
46 | }
47 |
48 | public TxtRecordItem(string key, string valueString)
49 | {
50 | this.key = key;
51 | ValueString = valueString;
52 | }
53 |
54 | public override string ToString()
55 | {
56 | return String.Format("{0} = {1}", Key, ValueString);
57 | }
58 |
59 | public string Key {
60 | get { return key; }
61 | }
62 |
63 | public byte [] ValueRaw {
64 | get { return value_raw; }
65 | set { value_raw = value; }
66 | }
67 |
68 | public string ValueString {
69 | get {
70 | if(value_string != null) {
71 | return value_string;
72 | }
73 |
74 | value_string = encoding.GetString(value_raw);
75 | return value_string;
76 | }
77 |
78 | set {
79 | value_string = value;
80 | value_raw = encoding.GetBytes(value);
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/Mono.Zeroconf/Mono.Zeroconf/TxtRecordItem.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7455e8aeefa3caf4cac2e3a1190805b7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Zeroconf/ZeroconfClient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 61461c31954a79d42b7dc52ed388d10f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Ben Kuper",
3 | "description": "Seamless OSCQuery integration in Unity.",
4 | "displayName": "OSCQuery",
5 | "keywords": [
6 | "unity"
7 | ],
8 | "license": "GPL v3",
9 | "name": "com.benkuper.oscquery",
10 | "repository": "github:benkper/Unity-OSCQuery",
11 | "unity": "2023.2",
12 | "unityRelease": "20f1",
13 | "version": "1.2.1"
14 | }
15 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c01c52b5eb29fe5429461269f039b714
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------