From 8d2d71bacb602c93516c56b570e5ac99358d1680 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 3 Aug 2013 00:48:22 +0100 Subject: [PATCH] Renamed plugins files --- Makefile.am | 4 ++-- src/plugins/{api.c => plugins.c} | 6 +++--- src/plugins/{api.h => plugins.h} | 12 +++++++----- src/profanity.c | 6 +++--- 4 files changed, 15 insertions(+), 13 deletions(-) rename src/plugins/{api.c => plugins.c} (98%) rename src/plugins/{api.h => plugins.h} (88%) diff --git a/Makefile.am b/Makefile.am index c2c7c299..25f55a2a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ profanity_SOURCES = \ src/config/accounts.c src/config/accounts.h \ src/config/preferences.c src/config/preferences.h \ src/config/theme.c src/config/theme.h \ - src/plugins/api.h src/plugins/api.c + src/plugins/plugins.h src/plugins/plugins.c TESTS = tests/testsuite check_PROGRAMS = tests/testsuite @@ -49,7 +49,7 @@ tests_testsuite_SOURCES = \ src/config/accounts.c src/config/accounts.h \ src/config/preferences.c src/config/preferences.h \ src/config/theme.c src/config/theme.h \ - src/plugins/api.h src/plugins/api.c \ + src/plugins/plugins.h src/plugins/plugins.c \ tests/test_roster.c tests/test_common.c tests/test_history.c \ tests/test_autocomplete.c tests/testsuite.c tests/test_parser.c \ tests/test_jid.c diff --git a/src/plugins/api.c b/src/plugins/plugins.c similarity index 98% rename from src/plugins/api.c rename to src/plugins/plugins.c index 2c122941..a8d4fe81 100644 --- a/src/plugins/api.c +++ b/src/plugins/plugins.c @@ -22,7 +22,7 @@ #include -#include "plugins/api.h" +#include "plugins/plugins.h" #include "ui/ui.h" static GSList* _get_module_names(void); @@ -51,7 +51,7 @@ static PyMethodDef apiMethods[] = { }; void -api_init(void) +plugins_init(void) { plugins = NULL; PyObject *p_module; @@ -88,7 +88,7 @@ api_init(void) } void -api_shutdown(void) +plugins_shutdown(void) { Py_Finalize(); } diff --git a/src/plugins/api.h b/src/plugins/plugins.h similarity index 88% rename from src/plugins/api.h rename to src/plugins/plugins.h index 99e56227..de70970a 100644 --- a/src/plugins/api.h +++ b/src/plugins/plugins.h @@ -1,5 +1,5 @@ /* - * api.h + * plugins.h * * Copyright (C) 2012, 2013 James Booth * @@ -20,11 +20,13 @@ * */ -#ifndef API_H -#define API_H +#ifndef PLUGINS_H +#define PLUGINS_H + +void plugins_init(void); -void api_init(void); void plugins_on_connect(void); -void api_shutdown(void); + +void plugins_shutdown(void); #endif diff --git a/src/profanity.c b/src/profanity.c index 2c6bf7d7..a688f68c 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -31,7 +31,7 @@ #include "profanity.h" -#include "plugins/api.h" +#include "plugins/plugins.h" #include "chat_session.h" #include "config/accounts.h" #include "config/preferences.h" @@ -635,7 +635,7 @@ _init(const int disable_tls, char *log_level) roster_init(); muc_init(); atexit(_shutdown); - api_init(); + plugins_init(); } static void @@ -652,7 +652,7 @@ _shutdown(void) accounts_close(); cmd_close(); log_close(); - api_shutdown(); + plugins_shutdown(); } static void