On a possibility of hiding AllJoyn interface - alljoyn

Is it possible to hide an AllJoyn interface ? I.e. not expose via introspection, about etc., but invoke when a specific call is made.
Thanks !

You can create a bus object that doesn't support the org.allseen.Introspectable or org.freedesktop.DBus.Introspectable interfaces.
This is difficult to do, however, because you would basically need to change the implementation of ajn::BusAttachment::Internal so that it doesn't automatically add these interfaces (i.e., the calls to org::freedesktop::DBus::CreateInterfaces() and org::alljoyn::CreateInterfaces() located in BusAttachment.cc). This would mean building your own version of AllJoyn Core based on this modified implementation. NOTE: Doing this would mean your product is not using a compliant base implementation of AllJoyn Core and would therefore likely not pass AllJoyn Certification.

Related

How to upgrade REDHAWK SDR framework to support SCA 4.1 specification(Software Communication Architecture)

I am going through the source code of the REDHAWK SDR framework and want to upgrade it to support SCA 4.1 specification. It already is partially compliant to SCA 2.2.2 version.
I have the IDL descriptions for the interfaces of the SCA 4.1 and compiled them with omniORB IDL compiler with C++ mapping. The skeleton and stub codes are generated properly. Now I want to understand how to do the following:
where to place these generated skeleton and stub codes in the
REDHAWK source code.
Where to place the server and client codes based on these skeleton
and stub codes in the redhawk source code
I also want to upgrade to logging as specified in SCA 4.1 and available at link https://www.omg.org/spec/LtLOG/1.1/PDF. Here again I have generated the skeleton and stub codes but do not know how to proceed further.
Am I missing something(or a lot).
Any pointers will be helpful.Please ask for any information I have not included as I am also in the learning stage.
REDHAWK is an extension of SCA 2.2.2 rather than an implementation of it. Because of this, the IDL is not a complete one-to-one mapping of behavior, so even when switching the interfaces, you'll run into issues with mismatches in the underlying behavior. Also, REDHAWK extended the XML profile to include things like complex basic types and sequences as members of structures, which are not part of SCA 4.1.
You're also suggesting switching logging from log4cxx/log4j to the cos lightweight logging. Logging is embedded in the base classes of pretty much the entire code base and replacing it will be a substantial challenge
As a guide for the level of effort that you're considering, take a look at: https://github.com/Geontech/sca-jtnc. That project modified REDHAWK to implement the SCA 4.1 spec for the Python sandbox, code generators, a subset of device/component base classes, and a converter to transform REDHAWK projects into SCA 4.1 projects. It had to import multiple interfaces from REDHAWK and it does not include any of the system services (like the Domain Manager) or any updates to the IDE. That project can give you a working starting point to get you moving in the right direction and it should also provide you with some insight into the level of effort needed for the change.
It is fairly easy to write a very minimal implementation of CosLwLogService that supports just write_records, write_record. I chose to write one as a front end to log4cxx. This allows an application to make the standard CosLwLog calls and for the entries to print to the same log file used by the redhawk core framework (or redirected as log4cxx allows). I use log4cxx calls directly in my platform devices and services but this allows an SCA application to only use the standard CosLwLog calls. Of course, it is much more work to support the more complex features of CosLwLog but these are not as often needed by an SCA application.

What reflection mechanisms are available in C++/WinRT?

I remember C++ had some runtime type information (RTTI) added sometime after Bjarne Stroustrup's original The C++ Programming Language, but I never had call to use it.
I am familiar with some of the COM and CLR reflection APIs including ITypeInfo and System.Reflection. Would any of these work in against types declared in compiled C++/WinRT app?
This question addressed a similar question 5 years back for C++/CX, have there been changes?
C++ /WinRT doesn't add to the native reflection capabilities of C++. However, the xlang metadata reader APIs can be used to inspect Windows Runtime metadata files (.winmd) that describe WinRT types. You can see the metadata reader library here (and there are examples of usage in the various tools in this repo):
https://github.com/Microsoft/xlang/blob/master/src/library/meta_reader.h
You can use that in conjunction with the Windows function RoGetMetadataFile to locate the metadata for a type at runtime.
https://learn.microsoft.com/en-us/windows/desktop/api/rometadataresolution/nf-rometadataresolution-rogetmetadatafile
Note that C++ /WinRT itself does not use the winmd file at runtime, and as such, code built with C++ /WinRT does not require the winmd to be available at runtime. If the winmd isn't present, you won't be able to rely on it for type information.
If the metadata file is supplied for a type written in C++ /WinRT, the .NET runtime can use the winmd to reflect over the projected types in much the same way that it can reflect over types written using the .NET runtime.
C++ /WinRT does not provide any support at this time for dynamic invocation of types. This is an infrequent but recurring ask and is on our backlog.
Thanks,
Ben

How to use WinPcap in Xamarin (Forms)

There are many .Net wrappers in C# for WinPcap like SharpPcap and PcapDotNet
I have tried to add these Nuget packages to my Xamarin Forms projects but it does not work. I want to create a wifi/packet scanner but I am not sure how to do this in Xamarin. Is it even possible?
When I clone the GitHub repo and build my own version of SharpPcap, the application runs, but I get the error:
System.DllNotFoundException: wpcap
The wpcap.dll is the dll that all these packages are wrapped around and use [DllImport("wpcap.dll")] to work. This wont work in Xamarin (I think).
Another way to use dll's is when you embed them as an application resource, is there any library which I can use that does that?
WinPcap consists of a driver, that extends the operating system to
provide low-level network access, and a library that is used to easily
access the low-level network layers. This library also contains the
Windows version of the well known libpcap Unix API.
Source: https://www.winpcap.org/
There is nothing impossible, however in mobile world you don't have that low level access to drivers and etc. unless you have a root on your device. It is unclear what exactly you want to build. But I know that on both iOS & Android there is an app called Fing. It scans your WiFi network for connected devices. It is written natively per platform. On Android there used to be many different applications that used MITM technique. For example DroidSheep. But I am not aware of any cross-platform solution that is able to scan the network or sniff packages.

Connect to internet with Qt for symbian

I'm creating a Qt Symbian application and need to connect to internet. In some way I need to let the user choose a connection when the app starts. I could use Qt Mobility to get it working but when Nokia approves I wan't do publish my application on Ovi Store. As the Qt Mobility is not included in Qt 4.6 it might be a problem to publish my app later. So for this reason I'm thinking of using native APIs instead.
The idea is to use: qt_SetDefaultIap() to set the connection on start. I have been looking at this to actually understand what it is doing. If I have two connections that the app could use, one with WIFI and one through mobile internet, which one will qt_SetDefaultIap() choose? And can I in some way with native api make the user choose a connection on start up? (qt_SetDefaultIap seems to just set a default connection on its own, without user choice)
Thanks!
Qt 4.7 is now released, and although not all of the Mobility APIs have made it into the core, QNetworkSession has.
Mrbiggerm: it looks like you've found the sym_iap_util.h file that's included in the QFtp example code in the Qt SDK. Rather than calling qt_SetDefaultIap(), try calling qt_OfferIapDialog(), and passing its return value to qt_SetDefaultIapName(). That should do what you're after. (Although this is a bit of a hack, it's often a preferred option as it presents a native S60 UI rather than making you implement your own list of access points.)
Do you expect to finish your program before Qt 4.7 release (I don't know the exact release date, but I'd estimate it will be around July), which AFAIK will contain Qt Mobility?
If the answer is no, don't worry about releasing issues, use custom build of QtMobility for development, wait for 4.7 and don't worry about releasing issues.
If the answer is yes, what stops you from deploying your program with custom QtMobility build? Internally it uses the same native API calls you want to use, not some super secret Nokia API, so there should be no problem with code validation (in fact, there will probably be less problems, since you won't have a chance to screw up code covered by QtMobility libraries).

scanning a system for shared folders in lan

I am developing an application in flex 3 using action script 3.........
I have some range of ip address in LAN(wired or wireless both).....i want to check which all the systems available...and also want to see their shared folders.....can anyone give some code or reference in action script....
Thanks to everyone...
Actually, I don't think it's possible at all with Flex due to sandbox violation of the Flash Player and/or not supporting it.
I don't know if Air supports network access in this way. Check this out for more information on Adobe Air.
MysticEarth is right, Flex cannot access the operating system directly because of security issues that might arise.
However, you can solve it in two ways:
Adobe AIR 2.0 Command-Line Integration:
Server-side script
Adobe AIR 2.0 can now run native processes! So you could have it access your operating system, check the systems available, shared folders, etc. Here's an example on how to execute native processes with AIR 2.0
The current standard is to just use Flex and HTTP to a server side script. To do something like what you're describing, I would create a ruby/php/python script or whatever, send a restful GET HTTP request to that script (say GET /shared_folders), and have that search the OS for what it needs, and return it as XML. Then you can use Flex. If you don't want to do that, AIR 2.0 is the only option.

Resources