1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2007 - 2008 Novell, Inc. |
4 | * Copyright (C) 2007 - 2011 Red Hat, Inc. |
5 | */ |
6 | |
7 | #ifndef __NM_REMOTE_CONNECTION_H__ |
8 | #define __NM_REMOTE_CONNECTION_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-object.h" |
15 | |
16 | G_BEGIN_DECLS |
17 | |
18 | #define NM_TYPE_REMOTE_CONNECTION (nm_remote_connection_get_type()) |
19 | #define NM_REMOTE_CONNECTION(obj) \ |
20 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnection)) |
21 | #define NM_REMOTE_CONNECTION_CLASS(klass) \ |
22 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionClass)) |
23 | #define NM_IS_REMOTE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_REMOTE_CONNECTION)) |
24 | #define NM_IS_REMOTE_CONNECTION_CLASS(klass) \ |
25 | (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_REMOTE_CONNECTION)) |
26 | #define NM_REMOTE_CONNECTION_GET_CLASS(obj) \ |
27 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_REMOTE_CONNECTION, NMRemoteConnectionClass)) |
28 | |
29 | /* Properties */ |
30 | #define NM_REMOTE_CONNECTION_DBUS_CONNECTION "dbus-connection" |
31 | #define NM_REMOTE_CONNECTION_PATH "path" |
32 | #define NM_REMOTE_CONNECTION_UNSAVED "unsaved" |
33 | #define NM_REMOTE_CONNECTION_FLAGS "flags" |
34 | #define NM_REMOTE_CONNECTION_FILENAME "filename" |
35 | #define NM_REMOTE_CONNECTION_VISIBLE "visible" |
36 | |
37 | /** |
38 | * NMRemoteConnection: |
39 | */ |
40 | typedef struct _NMRemoteConnectionClass NMRemoteConnectionClass; |
41 | |
42 | GType nm_remote_connection_get_type(void); |
43 | |
44 | NM_AVAILABLE_IN_1_12 |
45 | void nm_remote_connection_update2(NMRemoteConnection *connection, |
46 | GVariant *settings, |
47 | NMSettingsUpdate2Flags flags, |
48 | GVariant *args, |
49 | GCancellable *cancellable, |
50 | GAsyncReadyCallback callback, |
51 | gpointer user_data); |
52 | NM_AVAILABLE_IN_1_12 |
53 | GVariant *nm_remote_connection_update2_finish(NMRemoteConnection *connection, |
54 | GAsyncResult *result, |
55 | GError **error); |
56 | |
57 | _NM_DEPRECATED_SYNC_METHOD |
58 | gboolean nm_remote_connection_commit_changes(NMRemoteConnection *connection, |
59 | gboolean save_to_disk, |
60 | GCancellable *cancellable, |
61 | GError **error); |
62 | |
63 | void nm_remote_connection_commit_changes_async(NMRemoteConnection *connection, |
64 | gboolean save_to_disk, |
65 | GCancellable *cancellable, |
66 | GAsyncReadyCallback callback, |
67 | gpointer user_data); |
68 | gboolean nm_remote_connection_commit_changes_finish(NMRemoteConnection *connection, |
69 | GAsyncResult *result, |
70 | GError **error); |
71 | |
72 | _NM_DEPRECATED_SYNC_METHOD |
73 | gboolean nm_remote_connection_save(NMRemoteConnection *connection, |
74 | GCancellable *cancellable, |
75 | GError **error); |
76 | |
77 | void nm_remote_connection_save_async(NMRemoteConnection *connection, |
78 | GCancellable *cancellable, |
79 | GAsyncReadyCallback callback, |
80 | gpointer user_data); |
81 | gboolean nm_remote_connection_save_finish(NMRemoteConnection *connection, |
82 | GAsyncResult *result, |
83 | GError **error); |
84 | |
85 | _NM_DEPRECATED_SYNC_METHOD |
86 | gboolean nm_remote_connection_delete(NMRemoteConnection *connection, |
87 | GCancellable *cancellable, |
88 | GError **error); |
89 | |
90 | void nm_remote_connection_delete_async(NMRemoteConnection *connection, |
91 | GCancellable *cancellable, |
92 | GAsyncReadyCallback callback, |
93 | gpointer user_data); |
94 | gboolean nm_remote_connection_delete_finish(NMRemoteConnection *connection, |
95 | GAsyncResult *result, |
96 | GError **error); |
97 | |
98 | _NM_DEPRECATED_SYNC_METHOD |
99 | GVariant *nm_remote_connection_get_secrets(NMRemoteConnection *connection, |
100 | const char *setting_name, |
101 | GCancellable *cancellable, |
102 | GError **error); |
103 | |
104 | void nm_remote_connection_get_secrets_async(NMRemoteConnection *connection, |
105 | const char *setting_name, |
106 | GCancellable *cancellable, |
107 | GAsyncReadyCallback callback, |
108 | gpointer user_data); |
109 | GVariant *nm_remote_connection_get_secrets_finish(NMRemoteConnection *connection, |
110 | GAsyncResult *result, |
111 | GError **error); |
112 | |
113 | gboolean nm_remote_connection_get_unsaved(NMRemoteConnection *connection); |
114 | |
115 | NM_AVAILABLE_IN_1_12 |
116 | NMSettingsConnectionFlags nm_remote_connection_get_flags(NMRemoteConnection *connection); |
117 | |
118 | NM_AVAILABLE_IN_1_12 |
119 | const char *nm_remote_connection_get_filename(NMRemoteConnection *connection); |
120 | |
121 | gboolean nm_remote_connection_get_visible(NMRemoteConnection *connection); |
122 | |
123 | G_END_DECLS |
124 | |
125 | #endif /* __NM_REMOTE_CONNECTION__ */ |
126 | |