Browse Source

xmpp: initialize stub plugin

master
eta 2 months ago
parent
commit
ca854a289f
  1. 1
      CMakeLists.txt
  2. 4
      src/plugins/CMakeLists.txt
  3. 26
      src/plugins/xmpp/CMakeLists.txt
  4. 48
      src/plugins/xmpp/xmpp.c
  5. 28
      src/plugins/xmpp/xmpp.h

1
CMakeLists.txt

@ -117,6 +117,7 @@ option(ENABLE_ENCHANT "Enable Enchant lib for Spell checker plugin" OFF)
option(ENABLE_TRIGGER "Enable Trigger plugin" ON)
option(ENABLE_TYPING "Enable Tryping plugin" ON)
option(ENABLE_XFER "Enable Xfer plugin" ON)
option(ENABLE_XMPP "Enable XMPP plugin" ON)
option(ENABLE_MAN "Enable build of man page" OFF)
option(ENABLE_DOC "Enable build of documentation" OFF)
option(ENABLE_TESTS "Enable tests" OFF)

4
src/plugins/CMakeLists.txt

@ -192,4 +192,8 @@ if(ENABLE_XFER)
add_subdirectory(xfer)
endif()
if(ENABLE_XMPP)
add_subdirectory(xmpp)
endif()
install(FILES weechat-plugin.h DESTINATION ${INCLUDEDIR})

26
src/plugins/xmpp/CMakeLists.txt

@ -0,0 +1,26 @@
# Copyright (C) 2021 eta <github@eta.st>
#
# This file is part of WeeChat, the extensible chat client.
#
# WeeChat is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# WeeChat is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
add_library(xmpp MODULE
xmpp.c xmpp.h
)
set_target_properties(xmpp PROPERTIES PREFIX "")
target_link_libraries(xmpp coverage_config)
install(TARGETS xmpp LIBRARY DESTINATION ${WEECHAT_LIBDIR}/plugins)

48
src/plugins/xmpp/xmpp.c

@ -0,0 +1,48 @@
/*
* xmpp.c - incredibly cursed XMPP plugin
*
* Copyright (C) 2021 eta <git@eta.st>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "../weechat-plugin.h"
#include "xmpp.h"
struct t_weechat_plugin *weechat_xmpp_plugin = NULL;
WEECHAT_PLUGIN_NAME(XMPP_PLUGIN_NAME);
WEECHAT_PLUGIN_DESCRIPTION(N_("Cursed XMPP plugin"));
WEECHAT_PLUGIN_AUTHOR("eta <git@eta.st>");
WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION);
WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE);
WEECHAT_PLUGIN_PRIORITY(8000);
int weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char **argv) {
weechat_plugin = plugin;
weechat_printf(NULL, "xmpp: init");
return WEECHAT_RC_OK;
}
int weechat_plugin_end(struct t_weechat_plugin *plugin) {
weechat_printf(NULL, "xmpp: end");
return WEECHAT_RC_OK;
}

28
src/plugins/xmpp/xmpp.h

@ -0,0 +1,28 @@
/*
* Copyright (C) 2021 eta <git@eta.st>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_PLUGIN_XMPP_H
#define WEECHAT_PLUGIN_XMPP_H
#define weechat_plugin weechat_xmpp_plugin
#define XMPP_PLUGIN_NAME "xmpp"
extern struct t_weechat_plugin *weechat_xmpp_plugin;
#endif
Loading…
Cancel
Save