Use a string to identify xauth backends, no need for integer types

This commit is contained in:
Martin Willi
2012-03-20 17:31:15 +01:00
parent 4e73f85b81
commit 1fe6cdfac2
11 changed files with 52 additions and 187 deletions
@@ -72,12 +72,6 @@ METHOD(xauth_method_t, initiate_server, status_t,
return NEED_MORE;
}
METHOD(xauth_method_t, get_type, xauth_type_t,
private_xauth_null_t *this, u_int32_t *vendor)
{
return XAUTH_NULL;
}
METHOD(xauth_method_t, destroy, void,
private_xauth_null_t *this)
{
@@ -89,7 +83,7 @@ METHOD(xauth_method_t, destroy, void,
* Described in header.
*/
xauth_null_t *xauth_null_create_peer(identification_t *server,
identification_t *peer)
identification_t *peer)
{
private_xauth_null_t *this;
@@ -98,7 +92,6 @@ xauth_null_t *xauth_null_create_peer(identification_t *server,
.xauth_method = {
.initiate = _initiate_peer,
.process = _process_peer,
.get_type = _get_type,
.destroy = _destroy,
},
},
@@ -121,7 +114,6 @@ xauth_null_t *xauth_null_create_server(identification_t *server,
.xauth_method = {
.initiate = _initiate_server,
.process = _process_server,
.get_type = _get_type,
.destroy = _destroy,
},
},
@@ -44,7 +44,7 @@ struct xauth_null_t {
* @return xauth_null_t object
*/
xauth_null_t *xauth_null_create_server(identification_t *server,
identification_t *peer);
identification_t *peer);
/**
* Creates the XAuth method XAuth NULL, acting as peer.
@@ -54,6 +54,6 @@ xauth_null_t *xauth_null_create_server(identification_t *server,
* @return xauth_null_t object
*/
xauth_null_t *xauth_null_create_peer(identification_t *server,
identification_t *peer);
identification_t *peer);
#endif /** XAUTH_NULL_H_ @}*/
@@ -29,9 +29,9 @@ METHOD(plugin_t, get_features, int,
{
static plugin_feature_t f[] = {
PLUGIN_CALLBACK(xauth_method_register, xauth_null_create_server),
PLUGIN_PROVIDE(XAUTH_SERVER, XAUTH_NULL),
PLUGIN_PROVIDE(XAUTH_SERVER, "null"),
PLUGIN_CALLBACK(xauth_method_register, xauth_null_create_peer),
PLUGIN_PROVIDE(XAUTH_PEER, XAUTH_NULL),
PLUGIN_PROVIDE(XAUTH_PEER, "null"),
};
*features = f;
return countof(f);