Access files on client with qml using WebGL - c++

I have written a qml based application on a linux machine which is started with
"-platform webgl" for using on a remote client in the browser with webgl. With the qml FileDialog class I can only access the files from the linux machine, not from the remote client.
How can I archive this?
Maybe I have to write a separate part in the application to handle these remote network access or do I have to use javascript or html5?

Access is controlled by the browser. It's like trying to access local files from the JavaScript code of the webpage.

Related

Qt with webRTC how to implement

I need to transfer live desktop screen data(like remote desktop) to a client application a browser, and user can view remote desktop in browser, I am thinking of implementing it with webRTC and Qt. the webRTC data channel I can use to transfer the desktop data. Only problem is how to interface it with QT. When I look in internet I have few methods.
Implement with native c++ webRTC and communicate with the browser. I searched lot to get a working c++ webRTC application but couldn't successfully run.
Implement with Qt webengine and java script. I read documentation about Qt webkit bridge, I hope I can pass data between Qt C++ part and Javascript part without much delay.
And I am not sure is there any good method exist. Please suggest me the right method.

HTML <--> C++ communication

I would like to let my C++ program get some data from an HTML page. Is it possible to use HTML5 local storage for this purpose? Is there an accessible file generated by the browser?
If this is not feasible in this way, are there any other options?
For now the browser and my executable run on the same computer, and I would prefer to only use the fstream C++ library.
The most appropriate communication channel would probably be FCGI (http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html). You would need to set up a local HTTP server and configure it to process specific HTTP requests using your FCGI-compliant C++ application. Modifying your C++ application to support the FCGI protocol may be non-trivial, but the protocol itself is simple.
Here is a useful article detailing how to get started:
http://chriswu.me/blog/writing-hello-world-in-fcgi-with-c-plus-plus/

How can I call an UWP API from a C++ desktop application

I would like to access Bluetooth LE devices using the corresponding UWP APIs. However, my application is a "classic" C++ application (3D game) that can't run as a UWP app. Is there a way to do that? Accorind to enter link description here these APIs are published, but I don't know the steps to access them I have only found some posts for Windows 8/8.1 apps that include the Windows.winmd and Platform.winmd metadata files and set the /ZW compilation flag, but this doesn't seem to apply to Windows 10.
You should be able to do this, as the Bluetooth classes (e.g., BluetoothLEAdvertisement) are marked up with DualApiPartitionAttribute (callable from desktop and UWP apps).
Using one of the older Win8.1 desktop samples should give you a good starting point for calling the APIs without requiring /ZW or referencing the winmd files. A good example is the desktop toast API sample.
If you go that route, you can use classic COM to create the UWP/WinRT classes via WRL helpers.
You can use the web that you make a web server and the C++ application use the same server and if UWP send the info to server then it will send the info to C++ application.
To safe,the UWP can't use the desktop app.

Control Firefox application from another c++ program using xpcom

So far, all xpcom examples I saw are Firefox addons. You write some C++ code, build, and register it. This resembles Microsoft COM in-process server, but instead of Windows registry the component information is stored in Firefox profile.
Does Firefox have out-of-the box ability to control it from another process using same API? Somthing like COM's local server application
When you start a second firefox instance, it communicates with the existing firefox process and tells it to open a new window, then dies. I suspect it uses some remote form of xpcom.

if i need oparete small web server in my application ,does it recognase as virus?

i need to operate smell web server in my application play flash swf files in my embedded browser , this application will be distributed to local users to desktop users
what is the best way to implement it in desktop application i mean ports / local host ?
If you simply want to show something in your embedded browser there's no need to set up a local web server, just point it to appropriate local files that will be located in your application's directory (using the file:// protocol).