diff --git a/include/webfuse/provider/client_config.h b/include/webfuse/provider/client_config.h index fe138f6..26654bc 100644 --- a/include/webfuse/provider/client_config.h +++ b/include/webfuse/provider/client_config.h @@ -45,14 +45,6 @@ typedef void wfp_connected_fn( typedef void wfp_disconnected_fn( void * user_data); -//------------------------------------------------------------------------------ -/// \brief Callback to signal when a timer event occued. -/// -/// \param user_data user defined context -//------------------------------------------------------------------------------ -typedef void wfp_ontimer_fn( - void * user_data); - //------------------------------------------------------------------------------ /// \brief Creates a new client configuration. /// @@ -145,18 +137,6 @@ extern WFP_API void wfp_client_config_set_ondisconnected( struct wfp_client_config * config, wfp_disconnected_fn * handler); -//------------------------------------------------------------------------------ -/// \brief Sets ontimer handler. -/// -/// The handler is invoked, when a timer event occured. -/// -/// \param config pointer to client configuration -/// \param handler pointer to handler -//------------------------------------------------------------------------------ -extern WFP_API void wfp_client_config_set_ontimer( - struct wfp_client_config * config, - wfp_ontimer_fn * handler); - //------------------------------------------------------------------------------ /// \brief Sets onlookup handler. /// diff --git a/lib/webfuse/provider/api.c b/lib/webfuse/provider/api.c index 0c916d2..ad288bd 100644 --- a/lib/webfuse/provider/api.c +++ b/lib/webfuse/provider/api.c @@ -116,13 +116,6 @@ void wfp_client_config_set_ondisconnected( wfp_impl_client_config_set_ondisconnected(config, handler); } -void wfp_client_config_set_ontimer( - struct wfp_client_config * config, - wfp_ontimer_fn * handler) -{ - wfp_impl_client_config_set_ontimer(config, handler); -} - void wfp_client_config_set_onlookup( struct wfp_client_config * config, wfp_lookup_fn * handler) diff --git a/lib/webfuse/provider/impl/client_config.c b/lib/webfuse/provider/impl/client_config.c index 9e6489b..cd7b015 100644 --- a/lib/webfuse/provider/impl/client_config.c +++ b/lib/webfuse/provider/impl/client_config.c @@ -69,13 +69,6 @@ void wfp_impl_client_config_set_ondisconnected( config->provider.disconnected = handler; } -void wfp_impl_client_config_set_ontimer( - struct wfp_client_config * config, - wfp_ontimer_fn * handler) -{ - config->provider.ontimer = handler; -} - void wfp_impl_client_config_set_onlookup( struct wfp_client_config * config, wfp_lookup_fn * handler) diff --git a/lib/webfuse/provider/impl/client_config.h b/lib/webfuse/provider/impl/client_config.h index a15ff87..9e588b0 100644 --- a/lib/webfuse/provider/impl/client_config.h +++ b/lib/webfuse/provider/impl/client_config.h @@ -47,10 +47,6 @@ extern void wfp_impl_client_config_set_ondisconnected( struct wfp_client_config * config, wfp_disconnected_fn * handler); -extern void wfp_impl_client_config_set_ontimer( - struct wfp_client_config * config, - wfp_ontimer_fn * handler); - extern void wfp_impl_client_config_set_onlookup( struct wfp_client_config * config, wfp_lookup_fn * handler); diff --git a/lib/webfuse/provider/impl/provider.c b/lib/webfuse/provider/impl/provider.c index c9c159f..397a563 100644 --- a/lib/webfuse/provider/impl/provider.c +++ b/lib/webfuse/provider/impl/provider.c @@ -66,7 +66,6 @@ void wfp_impl_provider_init( provider->read = &wfp_impl_read_default; provider->connected = &wfp_impl_connected_default; provider->disconnected = &wfp_impl_disconnected_default; - provider->ontimer = &wfp_impl_ontimer_default; provider->get_credentials = NULL; } @@ -82,7 +81,6 @@ void wfp_impl_provider_init_from_prototype( provider->read = prototype->read; provider->connected = prototype->connected; provider->disconnected = prototype->disconnected; - provider->ontimer = prototype->ontimer; provider->get_credentials = prototype->get_credentials; } @@ -119,14 +117,6 @@ void wfp_impl_disconnected_default( // empty } -void wfp_impl_ontimer_default( - void * user_data) -{ - (void) user_data; - - // empty -} - bool wfp_impl_provider_is_authentication_enabled( struct wfp_provider * provider) { diff --git a/lib/webfuse/provider/impl/provider.h b/lib/webfuse/provider/impl/provider.h index 1e8ec1f..aff4420 100644 --- a/lib/webfuse/provider/impl/provider.h +++ b/lib/webfuse/provider/impl/provider.h @@ -18,7 +18,6 @@ struct wfp_provider { wfp_connected_fn * connected; wfp_disconnected_fn * disconnected; - wfp_ontimer_fn * ontimer; wfp_lookup_fn * lookup; wfp_getattr_fn * getattr; wfp_readdir_fn * readdir; @@ -56,9 +55,6 @@ extern void wfp_impl_connected_default( extern void wfp_impl_disconnected_default( void * user_data); -extern void wfp_impl_ontimer_default( - void * user_data); - #ifdef __cplusplus } #endif diff --git a/test/webfuse/mocks/mock_provider.cc b/test/webfuse/mocks/mock_provider.cc index a81b302..1aab4cf 100644 --- a/test/webfuse/mocks/mock_provider.cc +++ b/test/webfuse/mocks/mock_provider.cc @@ -18,13 +18,6 @@ static void webfuse_test_MockProvider_disconnected( provider->disconnected(); } -static void webfuse_test_MockProvider_on_timer( - void * user_data) -{ - auto * provider = reinterpret_cast(user_data); - provider->on_timer(); -} - static void webfuse_test_MockProvider_lookup( wfp_request * request, ino_t parent, @@ -100,7 +93,6 @@ static wfp_provider const webfuse_test_MockProvider = { &webfuse_test_MockProvider_connected, &webfuse_test_MockProvider_disconnected, - &webfuse_test_MockProvider_on_timer, &webfuse_test_MockProvider_lookup, &webfuse_test_MockProvider_getattr, &webfuse_test_MockProvider_readdir, diff --git a/test/webfuse/mocks/mock_provider_client.cc b/test/webfuse/mocks/mock_provider_client.cc index ff73bd9..779c0ef 100644 --- a/test/webfuse/mocks/mock_provider_client.cc +++ b/test/webfuse/mocks/mock_provider_client.cc @@ -21,13 +21,6 @@ static void webfuse_test_iproviderclient_ondisconnected( self->OnDisconnected(); } -static void webfuse_test_iproviderclient_ontimer( - void * user_data) -{ - auto * self = reinterpret_cast(user_data); - self->OnTimer(); -} - static void webfuse_test_iproviderclient_onlookup( struct wfp_request * request, ino_t parent, @@ -207,7 +200,6 @@ void IProviderClient::AttachTo(wfp_client_config * config, bool enableAuthentica wfp_client_config_set_userdata(config, self); wfp_client_config_set_onconnected(config, &webfuse_test_iproviderclient_onconnected); wfp_client_config_set_ondisconnected(config, &webfuse_test_iproviderclient_ondisconnected); - wfp_client_config_set_ontimer(config, &webfuse_test_iproviderclient_ontimer); wfp_client_config_set_onlookup(config, &webfuse_test_iproviderclient_onlookup); wfp_client_config_set_ongetattr(config, &webfuse_test_iproviderclient_ongetattr); diff --git a/test/webfuse/mocks/mock_provider_client.hpp b/test/webfuse/mocks/mock_provider_client.hpp index 57db042..b60e743 100644 --- a/test/webfuse/mocks/mock_provider_client.hpp +++ b/test/webfuse/mocks/mock_provider_client.hpp @@ -23,7 +23,6 @@ namespace webfuse_test virtual ~IProviderClient() = default; virtual void OnConnected() = 0; virtual void OnDisconnected() = 0; - virtual void OnTimer() = 0; virtual void Lookup(ino_t parent, char const * name, struct stat * result) = 0; virtual void GetAttr(ino_t inode, struct stat * buffer) = 0; virtual void ReadDir(ino_t directory, wfp_dirbuffer * buffer) = 0; @@ -41,7 +40,6 @@ namespace webfuse_test ~MockProviderClient() override = default; MOCK_METHOD0( OnConnected, void()); MOCK_METHOD0( OnDisconnected, void()); - MOCK_METHOD0( OnTimer, void()); MOCK_METHOD3( Lookup, void(ino_t parent, char const * name, struct stat * result)); MOCK_METHOD2( GetAttr, void(ino_t inode, struct stat * buffer)); MOCK_METHOD2( ReadDir, void(ino_t directory, wfp_dirbuffer * buffer));