Blame library/adattrs.h

Packit Service 6d40f9
/*
Packit Service 6d40f9
 * adcli
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * Copyright (C) 2013 Red Hat Inc.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * This program is free software; you can redistribute it and/or modify
Packit Service 6d40f9
 * it under the terms of the GNU Lesser General Public License as
Packit Service 6d40f9
 * published by the Free Software Foundation; either version 2.1 of
Packit Service 6d40f9
 * the License, or (at your option) any later version.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * This program is distributed in the hope that it will be useful, but
Packit Service 6d40f9
 * WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 6d40f9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 6d40f9
 * Lesser General Public License for more details.
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * You should have received a copy of the GNU Lesser General Public
Packit Service 6d40f9
 * License along with this program; if not, write to the Free Software
Packit Service 6d40f9
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
Packit Service 6d40f9
 * MA 02110-1301 USA
Packit Service 6d40f9
 *
Packit Service 6d40f9
 * Author: Stef Walter <stefw@redhat.com>
Packit Service 6d40f9
 */
Packit Service 6d40f9
Packit Service 6d40f9
#ifndef ADATTR_H_
Packit Service 6d40f9
#define ADATTR_H_
Packit Service 6d40f9
Packit Service 6d40f9
typedef struct _adcli_attrs adcli_attrs;
Packit Service 6d40f9
Packit Service 6d40f9
#ifndef GNUC_NULL_TERMINATED
Packit Service 6d40f9
#if __GNUC__ >= 4
Packit Service 6d40f9
#define GNUC_NULL_TERMINATED __attribute__((__sentinel__))
Packit Service 6d40f9
#else
Packit Service 6d40f9
#define GNUC_NULL_TERMINATED
Packit Service 6d40f9
#endif
Packit Service 6d40f9
#endif
Packit Service 6d40f9
Packit Service 6d40f9
adcli_attrs *      adcli_attrs_new                    (void);
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_add1                   (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name,
Packit Service 6d40f9
                                                       const char *value);
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_add                    (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name,
Packit Service 6d40f9
                                                       const char *value,
Packit Service 6d40f9
                                                       ...) GNUC_NULL_TERMINATED;
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_replace                (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name,
Packit Service 6d40f9
                                                       const char *value,
Packit Service 6d40f9
                                                       ...) GNUC_NULL_TERMINATED;
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_delete1                (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name,
Packit Service 6d40f9
                                                       const char *value);
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_delete                 (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name,
Packit Service 6d40f9
                                                       const char *value,
Packit Service 6d40f9
                                                       ...) GNUC_NULL_TERMINATED;
Packit Service 6d40f9
Packit Service 6d40f9
int                adcli_attrs_have                   (adcli_attrs *attrs,
Packit Service 6d40f9
                                                       const char *name);
Packit Service 6d40f9
Packit Service 6d40f9
void               adcli_attrs_free                   (adcli_attrs *attrs);
Packit Service 6d40f9
Packit Service 6d40f9
#endif /* ADATTR_H_ */