summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics/wayland/waltham-transmitter-plugin.bb
blob: 466985f41a261e218bd98bf8d08e101c5ea1c1da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
DESCRIPTION = "Waltham transmitter is a libweston plug-in that adds support for receiving input events from a surface streamed on a remote output"
HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/src/waltham-transmitter-plugin.git"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3"

DEPENDS += "wayland wayland-native waltham weston"

SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/waltham-transmitter-plugin.git;protocol=https;branch=${AGL_BRANCH}"
SRCREV = "c9d23a045e6cb46c023c15f8189ef3ee8b1ddf20"

S = "${WORKDIR}/git"

inherit meson pkgconfig python3native

FILES:${PN} += "${libdir}/*"
FILES:${PN} += "${bindir}/*"
old } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (C) 2016, 2017 "IoT.bzh"
 * Author: José Bollo <jose.bollo@iot.bzh>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

/* defined here */
struct afb_arg;
struct afb_request;
struct afb_request_itf;

/* referenced here */
#include <stdarg.h>
struct json_object;
struct afb_req;
struct afb_event;
struct afb_eventid;
struct afb_dynapi;
struct afb_stored_req;

/*
 * Describes an argument (or parameter) of a request
 */
struct afb_arg
{
	const char *name;	/* name of the argument or NULL if invalid */
	const char *value;	/* string representation of the value of the argument */
				/* original filename of the argument if path != NULL */
	const char *path;	/* if not NULL, path of the received file for the argument */
				/* when the request is finalized this file is removed */
};

/*
 * structure for the request
 */
struct afb_request
{
	/* interface for the request */
	const struct afb_request_itf *itf;

	/* current dynapi (if any) */
	struct afb_dynapi *dynapi;

	/* closure associated with the callback processing the verb of the request
	 * as given at its declaration */
	void *vcbdata;

	/* the name of the called verb */
	const char *api;

	/* the name of the called verb */
	const char *verb;
};

/*
 * Interface for handling requests.
 * It records the functions to be called for the request.
 * Don't use this structure directly.
 * Use the helper functions
 */
struct afb_request_itf
{
	/* CAUTION: respect the order, add at the end */

	struct json_object *(*json)(
			struct afb_request *request);

	struct afb_arg (*get)(
			struct afb_request *request,
			const char *name);

	void (*success)(
			struct afb_request *request,
			struct json_object *obj,
			const char *info);

	void (*fail)(
			struct afb_request *request,
			const char *status,
			const char *info);

	void (*vsuccess)(
			struct afb_request *request,
			struct json_object *obj,
			const char *fmt,
			va_list args);

	void (*vfail)(
			struct afb_request *request,
			const char *status,
			const char *fmt,
			va_list args);

	void *(*context_get)(
			struct afb_request *request);

	void (*context_set)(
			struct afb_request *request,
			void *value,
			void (*free_value)(void*));

	struct afb_request *(*addref)(
			struct afb_request *request);

	void (*unref)(
			struct afb_request *request);

	void (*session_close)(
			struct afb_request *request);

	int (*session_set_LOA)(
			struct afb_request *request,
			unsigned level);

	int (*subscribe)(
			struct afb_request *request,
			struct afb_event event);

	int (*unsubscribe)(
			struct afb_request *request,
			struct afb_event event);

	void (*subcall)(
			struct afb_request *request,
			const char *api,
			const char *verb,
			struct json_object *args,
			void (*callback)(void*, int, struct json_object*),
			void *cb_closure);

	int (*subcallsync)(
			struct afb_request *request,
			const char *api,
			const char *verb,
			struct json_object *args,
			struct json_object **result);

	void (*vverbose)(
			struct afb_request *request,
			int level,
			const char *file,
			int line,
			const char * func,
			const char *fmt,
			va_list args);

	struct afb_stored_req *(*store)(
			struct afb_request *request);

	void (*subcall_req)(
			struct afb_request *request,
			const char *api,
			const char *verb,
			struct json_object *args,
			void (*callback)(void*, int, struct json_object*, struct afb_req),
			void *cb_closure);

	int (*has_permission)(
			struct afb_request *request,
			const char *permission);

	char *(*get_application_id)(
			struct afb_request *request);

	void *(*context_make)(
			struct afb_request *request,
			int replace,
			void *(*create_value)(void *creation_closure),
			void (*free_value)(void*),
			void *creation_closure);

	int (*subscribe_eventid)(
			struct afb_request *request,
			struct afb_eventid *eventid);

	int (*unsubscribe_eventid)(
			struct afb_request *request,
			struct afb_eventid *eventid);

	void (*subcall_request)(
			struct afb_request *request,
			const char *api,
			const char *verb,
			struct json_object *args,
			void (*callback)(void*, int, struct json_object*, struct afb_request *request),
			void *cb_closure);

	int (*get_uid)(
			struct afb_request *request);

};