I am trying to create a signal/textsecure client using qt and C++, however i cant seem to fibd any C++ bindings for it.
the only bindings i can find are for Go (https://github.com/nanu-c/textsecure/)
is there any way to connect C++ with signal?
edit:
i wanted to clarify some things:
-im talking about the messaging app called Signal (https://signal.org)
-i am trying to write an app for ubuntu touch and am developing on manjaro linux.
On Linux or Unix, you probably want to communicate with other remote applications using some communication protocol, such as HTTP or HTTPS or SOAP or JSONRPC or ONCRPC. Of course read about socket(7) and before that Advanced Linux Programming then about syscalls(2). Consider reading a textbook on Operating Systems
Be sure to study the source code related to Signal. Read their technical documentation.
You surely need to understand the details. So take a few days or weeks to read more about them.
If you want to use some web service, you need to read and understand its documentation and when and how you are allowed to use it. There could be legal or financial issues.
Then you might use HTTP related libraries (e.g. Wt or libonion server side, and libcurl or curlpp client side).
See also in April 2020 the ongoing HelpCovid free software project (for Linux), at least for inspiration. We are coding it in C++.
after a little more digging i found that textsecure bindings are now renamed to libsignal.
after finding that out i found a lib for c/c++
https://github.com/signalapp/libsignal-protocol-c
Related
I'm trying to write a C++ command line program for peer-to-peer file transfer. My idea is to establish a connection with another machine, and send file data directly. My target platform is Windows, but interoperability with Linux and MacOS would be nice. I want this program to be standalone and not require a web browser.
I did some research and it seems that WebRTC would fit the bill, but I can't find much information on using it with C++.
Is it possible to build a standalone executable that utilizes WebRTC without requiring users to download any dependencies in order to use my program?
As the name suggests - to have the "RTC", it requires "Web" component, either in form of browser or a library.
The C++ library is quite huge and it's not a trivial task to understand and write it in a short period. Browser provides APIs in form of JavaScript calls, which are relatively easier to implement.
There might be commercial APIs in C++ available over internet.
Is it possible to use a Go API in a Qt C++ project?
I would like to use the following Google API written in Go: https://cloud.google.com/speech-to-text/docs/reference/libraries#client-libraries-install-go
Is it possible to use a Go API in a Qt C++ project?
It could be possible, but it might not be easy and would be very brittle to run Go and Qt code in the same process, since Go and Qt have very different thread (goroutine) and memory models.
However, Go has (in its standard library) many powerful packages to ease the development of server programs, in particular of HTTP or JSONRPC servers.
Perhaps you might consider running two different processes using inter-process communication facilities. Details are operating system specific. I assume you run Linux. Your Qt application could then start the Go program using QProcess and later communicate with it (behaving as a client to your Go specialized "server"-like program).
Then you could use HTTP or JSONRPC to remotely call your Go functions from your Qt application. You need some HTTP client library in Qt (it is there already under Qt Network, and you might also use libcurl) or some JSONRPC client library. Your Go program would be some specialized HTTP or JSONRPC server (and some Google Speech to Text client) and your Qt program would be its only client (and would start it). So your Go program would be some specialized proxy. You could even use pipe(7)-s, unix(7) sockets, or fifo(7)-s to increase the "privacy" of the communication channel.
If the Google Speech to Text API is huge (but it probably is not) you might use Go reflective or introspective abilities to generate some C++ glue code for Qt: go/ast, go/build, go/parser, go/importer, etc
BTW, it seems that Google Speech to Text protocol is using JSON with HTTP (it seems to be some Web API) and has a documented REST API, so you might directly code in C++ the relevant code doing that (of course you need to understand all the details of the protocol: relevant HTTP requests and JSON formats), without any Go code (or process). If you go that route, I recommend making your Qt (or C++) code for Google Speech to Text some separate free software library (to be able to get feedback and help from outside).
I am trying to connect my scidb server directly via sockets using C++ under windows environment (Winsock2).
I could only find a python example below for the above purpose which seems quite outdated.
https://github.com/artyom-smirnov/scidb4py
The .proto file shipped with the SciDB 14.12 and the one used in the python example are very much different so the example does not work with the SciDB 14.12.
If someone could help me with preferably a C++ (Windows/Linux) working example or update the existing python example.
Atleast if someone could guide me to the documentation part which explains how to use the message format outlined in the .proto file and what to expect in return.
Thanks.
I believe what you may be looking for is https://github.com/Paradigm4/shim.
It is a HTTP API for SciDB. All you have to do is to install this together with your SciDB. You would then use directly your Winsock (or a HTTP protocol library) directly in C/C++, connecting to the SHIM instance.
Im quite new on Android and I have some question for all of you who are experts!
Ok, my problem...
I implemented a client-server application based on socket programming. The server encode some packets, send them to the client through a socket and the clinet decode them.
I tested the code with two linux machines and it works fine but in my experiment it is required to include another node (this will be the Android). So the server (linux machine) will encode the packets and send through socket to client1(linux machine) and client2(Android).
For this reason I want to port the native binary of my code (which is in C++) to Android.
In which way could I do this?
Please give me some help!
Really im totally stucked!
Thanks,
Zenia
when you want to port native code C/C++ to android you want to look up android ndk and jni
http://developer.android.com/sdk/ndk/index.html
http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
There are some examples in the ndk on how to do this.
be warned that C is fully supported but C++ support apis is very limited on android (the list is in the docs of the ndk) so you might have problems porting your code.
I would recommend using directly java if you can, since working with JNI is tedious lol
how else can you port this? start learning android i did a quick check noticed it's sdk uses java you can start by looking at
http://developer.android.com/reference/java/net/Socket.html
Thanks for the reply,
I first tried to write my own code totally in java using sockets, however i had to port some optimized libraries to Android and I could figure out how to do that (i could port a simple small library but not the one that I wanted). I gave up and I right now im trying to play with jni and ndk. however i dont know if indeed i could port my binary as it is non static (like hello world). Thats why im asking. if anyone else have some experince on that please let me know. thanks a lot,
Zenia
What you should probably do is install the SDK and NDK and build the hello-jni ndk example.
Then look up how to access the android logcat output from C, and write yourself a nice little printf-like wrapper for that (probably using the vargs version of the underlying function) so you can easily generate debug output from your native code.
Then graft your native executable onto the hello-jni example code, so you'll have a java wrapper that does very little other than start things with a call to the native code. Just remember not to do much processing in the UI thread or native code called under that thread, or you will risk an application not responding timeout.
It is also possible to (ab)use the ndk's gcc to produce stand alone native executables with no java wrapper, but this is discouraged. It's hard to find a reliable place to install them on a non-rooted phone, and android's process management isn't happy about unknown native processes. In other words, that's a path that's fine for personal experiments on your own device, but a difficult and non-future-proof one for an application deployed to others.
I am writing a cross-platform c++ application that needs to connect to Exchange servers and download mails using ActiveSync.
Is there any library available for ActiveSync (preferably open-source)?
I can't use Windows APIs as they won't run in Linux & Mac.
I used to work with the SynCE project on supporting Windows Mobile devices connected to desktop Linux machines so can offer a few pointers.
Do you mean ActiveSync or AirSync? AirSync is the protocol that used over the air and by ActiveSync to actually shift the data, ActiveSync is the whole stack for syncing a WinMo device connected to your computer. SynCE is the only open source "full stack" equivalent to ActiveSync that I know of, from driver to AirSync to GUI's and integration with OpenSync, and I don't know any open source projects that present themselves as a WinMo device to ActiveSync.
I don't know of any C or C++ implementations of AirSync, but I believe that the Samba and OpenChange teams have made good progress at supporting Exchange servers natively. About a year and a half ago I was told that even supporting the HTTP(s) transport wasn't far away in terms of work needed (but i'm not sure if its been a priority).
While not in C++ and while not even a client library, the SynCE project has open source python code which might be a useful reference if another library cannot be found.
Here is an example of a push mail server that was written by one of the SynCE developers: SynCE Airmail
And the main sync engine can be found here: SynCE SyncEngine
Within that code, I think SyncEngine/airsync.py will be most useful to you.
Digging around the SynCE wiki http://www.synce.org and their mailing list archive is a good way of finding out about problems encountered and surprising details about what the protocol is and isnt sensitive about.
You may find http://libwbxml.opensync.org useful - after the wbxml layer has been decoded AirSync is just XML passing.
And finally, Microsoft do provide documentation for the protocol:
ActiveSync HTTP Protocol Specification
Open Specification Support Team Blog: More ActiveSync
TechNet wiki Exchange ActiveSync Overview
Z-Push might provide you with the start you need.