X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fhandle.h;h=14a0e54072a0fb570a7c61ad5cd1f01a056f5c14;hb=11927a7859022cf38a4153767cc96fda4987070d;hp=b1057efe530bc2865bbc3a2dad6d1a5c75b36a31;hpb=1239a312e7e0e4c33948fdaf04e7637cb93c8b10;p=lttng-tools.git diff --git a/include/lttng/handle.h b/include/lttng/handle.h index b1057efe5..14a0e5407 100644 --- a/include/lttng/handle.h +++ b/include/lttng/handle.h @@ -1,24 +1,15 @@ /* - * Copyright (C) 2014 - David Goulet + * Copyright (C) 2014 David Goulet * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_HANDLE_H #define LTTNG_HANDLE_H #include +#include #ifdef __cplusplus extern "C" { @@ -29,9 +20,9 @@ extern "C" { * * The structures should be initialized to zero before use. */ -#define LTTNG_HANDLE_PADDING1 16 +#define LTTNG_HANDLE_PADDING1 16 struct lttng_handle { - char session_name[NAME_MAX]; + char session_name[LTTNG_NAME_MAX]; struct lttng_domain domain; char padding[LTTNG_HANDLE_PADDING1]; @@ -43,19 +34,22 @@ struct lttng_handle { * This handle contains the session name and domain on which the command will * be executed. A domain is basically a tracer like the kernel or user space. * - * Return an newly allocated handle that should be freed using + * A NULL domain indicates that the handle is not bound to a specific domain. + * This is mostly used for actions that apply on a session and not on a domain + * (e.g lttng_set_consumer_url). + * + * Return a newly allocated handle that should be freed using * lttng_destroy_handle. On error, NULL is returned. */ -extern struct lttng_handle *lttng_create_handle(const char *session_name, - struct lttng_domain *domain); +LTTNG_EXPORT extern struct lttng_handle *lttng_create_handle(const char *session_name, + struct lttng_domain *domain); /* * Destroy an handle that has been previously created with lttng_create_handle. * * It free the given pointer making it unusable. */ -extern void lttng_destroy_handle(struct lttng_handle *handle); - +LTTNG_EXPORT extern void lttng_destroy_handle(struct lttng_handle *handle); #ifdef __cplusplus }