1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2007 - 2008 Red Hat, Inc.
4 * Copyright (C) 2007 - 2008 Novell, Inc.
5 */
6
7#ifndef __NM_SETTING_SERIAL_H__
8#define __NM_SETTING_SERIAL_H__
9
10#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
11#error "Only <NetworkManager.h> can be included directly."
12#endif
13
14#include "nm-setting.h"
15
16G_BEGIN_DECLS
17
18#define NM_TYPE_SETTING_SERIAL (nm_setting_serial_get_type())
19#define NM_SETTING_SERIAL(obj) \
20 (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_SERIAL, NMSettingSerial))
21#define NM_SETTING_SERIAL_CLASS(klass) \
22 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_SERIAL, NMSettingSerialClass))
23#define NM_IS_SETTING_SERIAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_SERIAL))
24#define NM_IS_SETTING_SERIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_SERIAL))
25#define NM_SETTING_SERIAL_GET_CLASS(obj) \
26 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_SERIAL, NMSettingSerialClass))
27
28#define NM_SETTING_SERIAL_SETTING_NAME "serial"
29
30/**
31 * NMSettingSerialParity:
32 * @NM_SETTING_SERIAL_PARITY_NONE: No parity bits (default)
33 * @NM_SETTING_SERIAL_PARITY_EVEN: Even parity
34 * @NM_SETTING_SERIAL_PARITY_ODD: Odd parity
35 *
36 * The parity setting of a serial port.
37 */
38typedef enum {
39 NM_SETTING_SERIAL_PARITY_NONE = 0,
40 NM_SETTING_SERIAL_PARITY_EVEN,
41 NM_SETTING_SERIAL_PARITY_ODD
42} NMSettingSerialParity;
43
44#define NM_SETTING_SERIAL_BAUD "baud"
45#define NM_SETTING_SERIAL_BITS "bits"
46#define NM_SETTING_SERIAL_PARITY "parity"
47#define NM_SETTING_SERIAL_STOPBITS "stopbits"
48#define NM_SETTING_SERIAL_SEND_DELAY "send-delay"
49
50typedef struct _NMSettingSerialClass NMSettingSerialClass;
51
52GType nm_setting_serial_get_type(void);
53
54NMSetting *nm_setting_serial_new(void);
55guint nm_setting_serial_get_baud(NMSettingSerial *setting);
56guint nm_setting_serial_get_bits(NMSettingSerial *setting);
57NMSettingSerialParity nm_setting_serial_get_parity(NMSettingSerial *setting);
58guint nm_setting_serial_get_stopbits(NMSettingSerial *setting);
59guint64 nm_setting_serial_get_send_delay(NMSettingSerial *setting);
60
61G_END_DECLS
62
63#endif /* __NM_SETTING_SERIAL_H__ */
64

source code of include/libnm/nm-setting-serial.h