Git Product home page Git Product logo

alljoyndotnet's Introduction

AllJoynDotNet

A .NET wrapper for the AllJoyn C Library

Note: This is very much a work in progress!

Features:

  • Code generator that auto-generates the Interop from the AllJoyn C-API, including full code-summaries (make sure you pull the submodule for this to work).
  • Library for Windows Universal, Windows Desktop, Xamarin-Android, and Xamarin-iOS.

What's not working:

  • Besides limited creation of bus attachments, no classes has been done for the rest yet.
  • Generated interop code is mostly untested, but so far seems to work in most places.
  • Xamarin-Android hardly works (ER_OS_ERROR when connecting the BusAttachment).
  • Xamarin-iOS hasn't been started yet (help wanted).

FAQ

Windows 10 UWP already has AllJoyn. Do I need this?

  • The WinRT APIs are far too limited, and the provided code-generation tools can't create proper certifiable services. You still need C++ to create a proper client. When running under UWP, no AllJoyn native library is needed, since the one provided with Windows 10 is used (Xamarin Android deploys the native library, and Desktop you have to manually copy them).

Why?

  • Because I don't like to write too much code in C++. I'm faster in C#. Also building AllJoyn clients often mean running on mobile, so we need a cross platform way like Xamarin

A code sample:

// Create the bus attachment
var bus = new BusAttachment("ServiceTest", true);
bus.Start();
bus.Connect();
Debug.WriteLine("Bus started successfully. Unique name: " + bus.UniqueName);
//Create interface
string interfaceName = "org.test.a1234.AnnounceHandlerTest";
string interfaceQcc = "<node>" +
						$"<interface name='{interfaceName}'>" +
						"  <method name='Foo'>" +
						"  </method>" +
						"</interface>" +
						"</node>";
bus.CreateInterfacesFromXml(interfaceQcc);
//Test if the interface is there
var iface = bus.GetInterface(interfaceName);
var secure = iface.IsSecure;
var name = iface.Name;

alljoyndotnet's People

Contributors

dotmorten avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.