Discussion:
Searching for a C++ API
R developer
2018-01-29 10:45:23 UTC
Permalink
Hello all,

I have been involved in writing a closed source application that among
other things maintains a checkout from an SVN repository, the application
used to be written in C# so at the moment we are used to SharpSvn. Recently
the decision was made to incorporate the functionality into a mobile c++
app (yes, I do wish we could use a different language, but for now that's
out of our scope).

Is there a C++ library available somewhere?
One that can be used in a closed source app and compiles both on Windows
and Linux (and preferably other platforms like OSx, iOS, Android).
Usage of c++11, boost and/or Qt frameworks is fine as our app already uses
them.

When we started searching; we found several dead ends. Either GPL code
which we can't use or outdated and no longer compiling.

What is the preferred/easiest way of doing a simple checkout/update of a
svn repository folder in a c++ application?
(Any leads will be appreciated as we are quite new to this topic)

Thanks,
Richard
Branko Čibej
2018-01-29 12:54:28 UTC
Permalink
Post by R developer
Hello all,
I have been involved in writing a closed source application that among
other things maintains a checkout from an SVN repository, the
application used to be written in C# so at the moment we are used to
SharpSvn. Recently the decision was made to incorporate the
functionality into a mobile c++ app (yes, I do wish we could use a
different language, but for now that's out of our scope).
Is there a C++ library available somewhere?
One that can be used in a closed source app and compiles both on
Windows and Linux (and preferably other platforms like OSx, iOS, Android).
Usage of c++11, boost and/or Qt frameworks is fine as our app already
uses them.
When we started searching; we found several dead ends. Either GPL code
which we can't use or outdated and no longer compiling.
What is the preferred/easiest way of doing a simple checkout/update of
a svn repository folder in a c++ application?
(Any leads will be appreciated as we are quite new to this topic)
There is no C++ API that I'm aware of. However, the C API can quite
handily be used from C++.

-- Brane
R developer
2018-01-30 09:22:55 UTC
Permalink
Post by R developer
Post by R developer
Hello all,
I have been involved in writing a closed source application that among
other things maintains a checkout from an SVN repository, the
application used to be written in C# so at the moment we are used to
SharpSvn. Recently the decision was made to incorporate the
functionality into a mobile c++ app (yes, I do wish we could use a
different language, but for now that's out of our scope).
Is there a C++ library available somewhere?
One that can be used in a closed source app and compiles both on
Windows and Linux (and preferably other platforms like OSx, iOS,
Android).
Post by R developer
Usage of c++11, boost and/or Qt frameworks is fine as our app already
uses them.
When we started searching; we found several dead ends. Either GPL code
which we can't use or outdated and no longer compiling.
What is the preferred/easiest way of doing a simple checkout/update of
a svn repository folder in a c++ application?
(Any leads will be appreciated as we are quite new to this topic)
There is no C++ API that I'm aware of. However, the C API can quite
handily be used from C++.
-- Brane
So far i found that rapidsvn contains libsvncpp; but its GPL
https://github.com/RapidSVN/RapidSVN
And there is svnqt, which is old and I couldn't find documentation (LGPL)
https://github.com/MIRAvzw/svnqt
Does anyone know of a better / free to use C++ library?

I'm not that familiar with the C API unless I'm missing something (which is
very well possible) one would have to manage the apr pools himself?
for instance
https://svn.apache.org/repos/asf/subversion/trunk/tools/examples/minimal_client.c
does seem very complex to me for the tasks it performs
is there any easier C example out there?

Kind Regards,
Richard
Daniel Shahaf
2018-01-30 12:30:35 UTC
Permalink
Post by R developer
I'm not that familiar with the C API unless I'm missing something
(which is very well possible) one would have to manage the apr pools
himself?
In the C API, the caller of a function passes to it a result_pool and a
scratch_pool, and decides when to reclaim or free their memory space
(apr_pool_clear / apr_pool_destroy).
Post by R developer
for instance
https://svn.apache.org/repos/asf/subversion/trunk/tools/examples/minimal_client.c
does seem very complex to me for the tasks it performs is there any
easier C example out there?
svnlook? svnmucc? subversion/tests/cmdline/*.c?

There were C++ language bindings developed in trunk, see
subversion/bindings/cxxhl/. I don't know what the state of the art on
that is --- quite possibly they aren't stable yet --- but they are
Apache Licensed, so perhaps you could build on them. If they don't
yet provide some functionality which you require, please do send
patches :-).

Cheers,

Daniel
Branko Čibej
2018-01-30 13:37:42 UTC
Permalink
Post by Daniel Shahaf
Post by R developer
I'm not that familiar with the C API unless I'm missing something
(which is very well possible) one would have to manage the apr pools
himself?
In the C API, the caller of a function passes to it a result_pool and a
scratch_pool, and decides when to reclaim or free their memory space
(apr_pool_clear / apr_pool_destroy).
Post by R developer
for instance
https://svn.apache.org/repos/asf/subversion/trunk/tools/examples/minimal_client.c
does seem very complex to me for the tasks it performs is there any
easier C example out there?
svnlook? svnmucc? subversion/tests/cmdline/*.c?
There were C++ language bindings developed in trunk, see
subversion/bindings/cxxhl/. I don't know what the state of the art on
that is --- quite possibly they aren't stable yet --- but they are
Apache Licensed, so perhaps you could build on them. If they don't
yet provide some functionality which you require, please do send
patches :-).
There's hardly any art there that could be in a state. Most of that
effort was making things compile ... there's no real substance there
(but there is a false start or two).

-- Brane
Bert Huijben
2018-01-31 13:07:24 UTC
Permalink
-----Original Message-----
Sent: maandag 29 januari 2018 13:54
Subject: Re: Searching for a C++ API
Post by R developer
Hello all,
I have been involved in writing a closed source application that among
other things maintains a checkout from an SVN repository, the
application used to be written in C# so at the moment we are used to
SharpSvn. Recently the decision was made to incorporate the
functionality into a mobile c++ app (yes, I do wish we could use a
different language, but for now that's out of our scope).
Is there a C++ library available somewhere?
One that can be used in a closed source app and compiles both on
Windows and Linux (and preferably other platforms like OSx, iOS, Android).
Usage of c++11, boost and/or Qt frameworks is fine as our app already
uses them.
It is not a real C++ library, but there might be some code that you can copy from the SharpSvn library code for your usage. SharpSvn is C++/CLI, to allow operation with the .Net environment, but there is enough plain C++ inside that might be able to get you started with the C library. The code is Apache licensed so you can mostly use it however you like.

Bert
R developer
2018-03-20 19:27:47 UTC
Permalink
Converting CLI is not my best skill, but still thanks for the suggestion :-)

Received a final answer on my request;
libsvncpp from https://github.com/RapidSVN/RapidSVN is now LGPL
Post by R developer
-----Original Message-----
Sent: maandag 29 januari 2018 13:54
Subject: Re: Searching for a C++ API
Post by R developer
Hello all,
I have been involved in writing a closed source application that among
other things maintains a checkout from an SVN repository, the
application used to be written in C# so at the moment we are used to
SharpSvn. Recently the decision was made to incorporate the
functionality into a mobile c++ app (yes, I do wish we could use a
different language, but for now that's out of our scope).
Is there a C++ library available somewhere?
One that can be used in a closed source app and compiles both on
Windows and Linux (and preferably other platforms like OSx, iOS,
Android).
Post by R developer
Usage of c++11, boost and/or Qt frameworks is fine as our app already
uses them.
It is not a real C++ library, but there might be some code that you can
copy from the SharpSvn library code for your usage. SharpSvn is C++/CLI, to
allow operation with the .Net environment, but there is enough plain C++
inside that might be able to get you started with the C library. The code
is Apache licensed so you can mostly use it however you like.
Bert
Continue reading on narkive:
Loading...