Commit Graph

20 Commits

Author SHA1 Message Date
Frediano Ziglio
d8fe0cbb84 codegen: Remove bytes array length support
This syntax was only used in protocol 1 which has been removed
time ago.
Beside not being used it's confusing and prone to errors,
array size is specified using 2 identifiers, one reporting
bytes and the other number of items, one used for marshalling,
the other for demarshalling.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2020-10-06 13:09:56 +01:00
Frediano Ziglio
61ce54ef6c proto: Allows to specify @deprecated option for flags and enums
We want to obsolete from enumeration values, currently CELT.
The removal of check in has_attr is not an issue, as the attributes
are already checked by fix_attributes calls.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2020-04-07 10:22:33 +01:00
Marc-André Lureau
c5e7d92dc6 docs: add spice URI scheme
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-02-21 14:22:18 +00:00
Marc-André Lureau
57f2c61712 build-sys: improve asciidoc rules to allow multiple targets
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-15 17:35:58 +04:00
Jonathon Jongsma
bb55f06a51 Fix some additional typos
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-11-28 07:57:31 +00:00
Frediano Ziglio
aee2b91fe2 docs: Document to_ptr protocol attribute
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2018-11-21 17:28:30 +00:00
Frediano Ziglio
5b6878e72c docs: Fix typos and grammar
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2018-11-21 17:27:54 +00:00
Frediano Ziglio
ddfb8807c6 codegen: Remove minor attribute
The idea in version 1 of the protocol was to extend it using the minor
version. However this was replaced by the usage of capabilities and the
minor attribute (which was not much used in version 1) was abandoned in
version 2.
This patch create a big difference in the code generated but only because
the minor version was passed between all possible functions as argument.
Note that exported functions retain the minor argument for compatibility
reasons.
The demarshaller code export directly spice_get_client_channel_parser or
spice_get_server_channel_parser functions which returns internal module
functions which parse message of specific channels.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-15 10:58:38 +01:00
Frediano Ziglio
8a68e67afa codegen: Remove fixedsize attribute
This attribute was used only in SPICE version 1.
The intention was use fixed size for switch type in the protocol.
However this does not bring any improvement, just increase network
bytes used.
Generated code does not change.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-15 10:58:38 +01:00
Frediano Ziglio
979717350d codegen: Remove bytes_count attribute
This attribute was used only in SPICE version 1.
Its usage was confusing, and was replaced by the simple usage of
array size.
Generated code does not change.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-10-15 10:58:38 +01:00
Christophe Fergeau
a526fea413 build: Remove docs/.gitignore
It was added together with the meson build, but it's currently being
managed by git.mk, so it should not be in git

Acked-by: Victor Toso <victortoso@redhat.com>
2018-06-18 14:08:07 +01:00
Eduardo Lima (Etrunko)
55070333f6 Add support for building with meson/ninja
In a comparison with current autotools build system, meson/ninja
provides a huge improvement in build speed, while keeping the same
functionalities currently available and being considered more user
friendly.

The new system coexists within the same repository with the current one,
so we can do more extensive testing of its functionality before deciding
if the old system can be removed, or for some reason, has to stay for
good.

- Meson: https://mesonbuild.com

  This is the equivalent of autogen/configure step in autotools. It
  generates the files that will be used by ninja to actually build the
  source code.

  The project has received lots of traction recently, with many GNOME
  projects willing to move to this new build system. The following wiki
  page has more details of the status of the many projects being ported:

    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

  Meson has a python-like syntax, easy to read, and the documentation
  on the project is very complete, with a dedicated page on how to port
  from autotools, explaining how most common use cases can be
  implemented using meson.

    http://mesonbuild.com/Porting-from-autotools.html

  Other important sources of information:

    http://mesonbuild.com/howtox.html
    http://mesonbuild.com/Syntax.html
    http://mesonbuild.com/Reference-manual.html

- Ninja: https://ninja-build.org

  Ninja is the equivalent of make in an autotools setup, which actually
  builds the source code. It has being used by large and complex
  projects such as Google Chrome, Android and LLVM. There is not much to
  say about ninja (other than it is much faster than make) because we
  won't interact directly with it as much, as meson does the middle man
  job here. The reasoning for creating ninja in the first place is
  explained on the following post:

    http://neugierig.org/software/chromium/notes/2011/02/ninja.html

  Also its manual provides more in-depth information about the design
  principles:

    https://ninja-build.org/manual.html

- Basic workflow:

  Meson package is available for most if not all distros, so, taking
  Fedora as an example, we only need to run:

    # dnf -y install meson ninja-build.

  With Meson, building in-tree is not possible at all, so we need to
  pass a directory as argument to meson where we want the build to be
  done. This has the advantage of creating builds with different options
  under the same parent directory, e.g.:

    $ meson ./build --prefix=/usr
    $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true

  After configuration is done, we call ninja to actually do the build.

    $ ninja -C ./build
    $ ninja -C ./build install

  Ninja defaults to parallel builds, and this can be changed with the -j
  flag.

    $ ninja -j 10 -C ./build

- Hacking:

  * meson.build: Mandatory for the project root and usually found under
                 each directory you want something to be built.

  * meson_options.txt: Options that can interfere with the result of the
                       build.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-06-01 21:27:04 +01:00
Marc-André Lureau
1fd73d0a98 build-sys: don't dist spice-protocol.html
The HTML file is not built by default.
This fixes make distcheck in spice-gtk.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-28 14:57:50 +02:00
Victor Toso
215b7571d4 Fix gitignore with new docs folder
The generated spice_protocol.html file and the Makefile were not
included in gitignore. This patch fixes it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2016-10-27 18:05:12 +02:00
Frediano Ziglio
e5a03766ec Add protocol documentation for "channel" and "protocol"
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-18 14:57:13 +01:00
Frediano Ziglio
ced5c55925 Fix BNF notation in documentation
Definition names have no angular brackets.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-18 14:57:13 +01:00
Frediano Ziglio
4673a61cce More work on attribute protocol documentation
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-17 11:43:49 +01:00
Frediano Ziglio
7773c0d59b Extended protocol documentation
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-17 11:43:47 +01:00
Frediano Ziglio
89426e491e Start writing some documentation on protocol
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-17 11:43:45 +01:00
Frediano Ziglio
3983097ed5 Start adding protocol file documentation
The protocol file is not documented and people have to read code to
understand the specification.
This can lead to unexpected or not optimal results so it's better
to have it documented.
The m4/spice_manual.m4 came from spice server and is meant to be
reused.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-10-17 11:43:26 +01:00