[refactor] add prefix to public functions of teleport-browser
This commit is contained in:
@@ -170,7 +170,7 @@ teleport_app_activate (GApplication *app) {
|
|||||||
*/
|
*/
|
||||||
run_http_server();
|
run_http_server();
|
||||||
run_avahi_publish_service((char *) g_get_host_name());
|
run_avahi_publish_service((char *) g_get_host_name());
|
||||||
run_avahi_service(peerList);
|
teleport_browser_run_avahi_service(peerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static void browse_callback(
|
|||||||
switch (event) {
|
switch (event) {
|
||||||
case AVAHI_BROWSER_FAILURE:
|
case AVAHI_BROWSER_FAILURE:
|
||||||
fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b))));
|
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);
|
//avahi_simple_poll_quit(simple_poll);
|
||||||
return;
|
return;
|
||||||
case AVAHI_BROWSER_NEW:
|
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 */
|
/* Called whenever the client or server state changes */
|
||||||
if (state == AVAHI_CLIENT_FAILURE) {
|
if (state == AVAHI_CLIENT_FAILURE) {
|
||||||
fprintf(stderr, "Server connection failure: %s\n", avahi_strerror(avahi_client_errno(c)));
|
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);
|
//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;
|
int error;
|
||||||
peerList = peers;
|
peerList = peers;
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ int run_avahi_service(TeleportPeer *peers) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void avahi_shutdown(void) {
|
void teleport_browser_avahi_shutdown(void) {
|
||||||
/* Call this when the app shuts down */
|
/* Call this when the app shuts down */
|
||||||
|
|
||||||
avahi_threaded_poll_stop(threaded_poll);
|
avahi_threaded_poll_stop(threaded_poll);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef __TELEPORT_BROWSER_H
|
#ifndef __TELEPORT_BROWSER_H
|
||||||
#define __TELEPORT_BROWSER_H
|
#define __TELEPORT_BROWSER_H
|
||||||
|
|
||||||
extern int run_avahi_service(TeleportPeer *);
|
int teleport_browser_run_avahi_service(TeleportPeer *);
|
||||||
void avahi_shutdown(void);
|
void teleport_browser_avahi_shutdown(void);
|
||||||
|
|
||||||
#endif /* __TELEPORT_BROWSER_H */
|
#endif /* __TELEPORT_BROWSER_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user