|
29 | 29 |
|
30 | 30 | /* Forward declarations. These are internal (opaque) structs. */ |
31 | 31 | struct libnvmf_discovery_args; |
| 32 | +struct libnvmf_uri; |
32 | 33 |
|
33 | 34 | /**************************************************************************** |
34 | 35 | * Accessors for: struct libnvmf_discovery_args |
@@ -67,4 +68,130 @@ void libnvmf_discovery_args_set_lsp(struct libnvmf_discovery_args *p, __u8 lsp); |
67 | 68 | */ |
68 | 69 | __u8 libnvmf_discovery_args_get_lsp(const struct libnvmf_discovery_args *p); |
69 | 70 |
|
| 71 | +/**************************************************************************** |
| 72 | + * Accessors for: struct libnvmf_uri |
| 73 | + ****************************************************************************/ |
| 74 | + |
| 75 | +/** |
| 76 | + * libnvmf_uri_set_scheme() - Set scheme. |
| 77 | + * @p: The &struct libnvmf_uri instance to update. |
| 78 | + * @scheme: New string; a copy is stored. Pass NULL to clear. |
| 79 | + */ |
| 80 | +void libnvmf_uri_set_scheme(struct libnvmf_uri *p, const char *scheme); |
| 81 | + |
| 82 | +/** |
| 83 | + * libnvmf_uri_get_scheme() - Get scheme. |
| 84 | + * @p: The &struct libnvmf_uri instance to query. |
| 85 | + * |
| 86 | + * Return: The value of the scheme field, or NULL if not set. |
| 87 | + */ |
| 88 | +const char *libnvmf_uri_get_scheme(const struct libnvmf_uri *p); |
| 89 | + |
| 90 | +/** |
| 91 | + * libnvmf_uri_set_protocol() - Set protocol. |
| 92 | + * @p: The &struct libnvmf_uri instance to update. |
| 93 | + * @protocol: New string; a copy is stored. Pass NULL to clear. |
| 94 | + */ |
| 95 | +void libnvmf_uri_set_protocol(struct libnvmf_uri *p, const char *protocol); |
| 96 | + |
| 97 | +/** |
| 98 | + * libnvmf_uri_get_protocol() - Get protocol. |
| 99 | + * @p: The &struct libnvmf_uri instance to query. |
| 100 | + * |
| 101 | + * Return: The value of the protocol field, or NULL if not set. |
| 102 | + */ |
| 103 | +const char *libnvmf_uri_get_protocol(const struct libnvmf_uri *p); |
| 104 | + |
| 105 | +/** |
| 106 | + * libnvmf_uri_set_userinfo() - Set userinfo. |
| 107 | + * @p: The &struct libnvmf_uri instance to update. |
| 108 | + * @userinfo: New string; a copy is stored. Pass NULL to clear. |
| 109 | + */ |
| 110 | +void libnvmf_uri_set_userinfo(struct libnvmf_uri *p, const char *userinfo); |
| 111 | + |
| 112 | +/** |
| 113 | + * libnvmf_uri_get_userinfo() - Get userinfo. |
| 114 | + * @p: The &struct libnvmf_uri instance to query. |
| 115 | + * |
| 116 | + * Return: The value of the userinfo field, or NULL if not set. |
| 117 | + */ |
| 118 | +const char *libnvmf_uri_get_userinfo(const struct libnvmf_uri *p); |
| 119 | + |
| 120 | +/** |
| 121 | + * libnvmf_uri_set_host() - Set host. |
| 122 | + * @p: The &struct libnvmf_uri instance to update. |
| 123 | + * @host: New string; a copy is stored. Pass NULL to clear. |
| 124 | + */ |
| 125 | +void libnvmf_uri_set_host(struct libnvmf_uri *p, const char *host); |
| 126 | + |
| 127 | +/** |
| 128 | + * libnvmf_uri_get_host() - Get host. |
| 129 | + * @p: The &struct libnvmf_uri instance to query. |
| 130 | + * |
| 131 | + * Return: The value of the host field, or NULL if not set. |
| 132 | + */ |
| 133 | +const char *libnvmf_uri_get_host(const struct libnvmf_uri *p); |
| 134 | + |
| 135 | +/** |
| 136 | + * libnvmf_uri_set_port() - Set port. |
| 137 | + * @p: The &struct libnvmf_uri instance to update. |
| 138 | + * @port: Value to assign to the port field. |
| 139 | + */ |
| 140 | +void libnvmf_uri_set_port(struct libnvmf_uri *p, int port); |
| 141 | + |
| 142 | +/** |
| 143 | + * libnvmf_uri_get_port() - Get port. |
| 144 | + * @p: The &struct libnvmf_uri instance to query. |
| 145 | + * |
| 146 | + * Return: The value of the port field. |
| 147 | + */ |
| 148 | +int libnvmf_uri_get_port(const struct libnvmf_uri *p); |
| 149 | + |
| 150 | +/** |
| 151 | + * libnvmf_uri_set_path_segments() - Set path_segments. |
| 152 | + * @p: The &struct libnvmf_uri instance to update. |
| 153 | + * @path_segments: New NULL-terminated string array; deep-copied. |
| 154 | + */ |
| 155 | +void libnvmf_uri_set_path_segments( |
| 156 | + struct libnvmf_uri *p, |
| 157 | + const char *const *path_segments); |
| 158 | + |
| 159 | +/** |
| 160 | + * libnvmf_uri_get_path_segments() - Get path_segments. |
| 161 | + * @p: The &struct libnvmf_uri instance to query. |
| 162 | + * |
| 163 | + * Return: The value of the path_segments field. |
| 164 | + */ |
| 165 | +const char *const *libnvmf_uri_get_path_segments(const struct libnvmf_uri *p); |
| 166 | + |
| 167 | +/** |
| 168 | + * libnvmf_uri_set_query() - Set query. |
| 169 | + * @p: The &struct libnvmf_uri instance to update. |
| 170 | + * @query: New string; a copy is stored. Pass NULL to clear. |
| 171 | + */ |
| 172 | +void libnvmf_uri_set_query(struct libnvmf_uri *p, const char *query); |
| 173 | + |
| 174 | +/** |
| 175 | + * libnvmf_uri_get_query() - Get query. |
| 176 | + * @p: The &struct libnvmf_uri instance to query. |
| 177 | + * |
| 178 | + * Return: The value of the query field, or NULL if not set. |
| 179 | + */ |
| 180 | +const char *libnvmf_uri_get_query(const struct libnvmf_uri *p); |
| 181 | + |
| 182 | +/** |
| 183 | + * libnvmf_uri_set_fragment() - Set fragment. |
| 184 | + * @p: The &struct libnvmf_uri instance to update. |
| 185 | + * @fragment: New string; a copy is stored. Pass NULL to clear. |
| 186 | + */ |
| 187 | +void libnvmf_uri_set_fragment(struct libnvmf_uri *p, const char *fragment); |
| 188 | + |
| 189 | +/** |
| 190 | + * libnvmf_uri_get_fragment() - Get fragment. |
| 191 | + * @p: The &struct libnvmf_uri instance to query. |
| 192 | + * |
| 193 | + * Return: The value of the fragment field, or NULL if not set. |
| 194 | + */ |
| 195 | +const char *libnvmf_uri_get_fragment(const struct libnvmf_uri *p); |
| 196 | + |
70 | 197 | #endif /* _ACCESSORS_FABRICS_H_ */ |
0 commit comments