[refactor] add prefix to public functions of teleport-browser

This commit is contained in:
Julian Sparber
2017-10-02 20:16:36 +02:00
parent a44f896fcd
commit bcc42a2f7c
3 changed files with 7 additions and 7 deletions

View File

@@ -170,7 +170,7 @@ teleport_app_activate (GApplication *app) {
*/
run_http_server();
run_avahi_publish_service((char *) g_get_host_name());
run_avahi_service(peerList);
teleport_browser_run_avahi_service(peerList);
}
static void

View File

@@ -87,7 +87,7 @@ static void browse_callback(
switch (event) {
case AVAHI_BROWSER_FAILURE:
fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b))));
avahi_shutdown();
teleport_browser_avahi_shutdown();
//avahi_simple_poll_quit(simple_poll);
return;
case AVAHI_BROWSER_NEW:
@@ -118,7 +118,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN
/* Called whenever the client or server state changes */
if (state == AVAHI_CLIENT_FAILURE) {
fprintf(stderr, "Server connection failure: %s\n", avahi_strerror(avahi_client_errno(c)));
avahi_shutdown();
teleport_browser_avahi_shutdown();
//avahi_simple_poll_quit(simple_poll);
}
}
@@ -166,7 +166,7 @@ fail:
}
*/
int run_avahi_service(TeleportPeer *peers) {
int teleport_browser_run_avahi_service(TeleportPeer *peers) {
int error;
peerList = peers;
@@ -198,7 +198,7 @@ int run_avahi_service(TeleportPeer *peers) {
return 0;
}
void avahi_shutdown(void) {
void teleport_browser_avahi_shutdown(void) {
/* Call this when the app shuts down */
avahi_threaded_poll_stop(threaded_poll);

View File

@@ -1,7 +1,7 @@
#ifndef __TELEPORT_BROWSER_H
#define __TELEPORT_BROWSER_H
extern int run_avahi_service(TeleportPeer *);
void avahi_shutdown(void);
int teleport_browser_run_avahi_service(TeleportPeer *);
void teleport_browser_avahi_shutdown(void);
#endif /* __TELEPORT_BROWSER_H */