Commit b2b871ea authored by Matthias Wimmer's avatar Matthias Wimmer

Include jabberdlib in parts instead of a big include file.

The goal is to isolate code modules more from each other and to have less
recompilation in case of changes in headers.
parent 90847409
......@@ -56,6 +56,11 @@ A->B
#include "dialback.h"
#include <hash.hh>
#include <hmac.hh>
#include <messages.hh>
#include <namespaces.hh>
/**
* helper structure used to pass an xmlnode as well as a jid when only one
* pointer can be passed
......
......@@ -44,6 +44,9 @@
#include "dialback.h"
#include <base64.hh>
#include <namespaces.hh>
/*
On incoming connections, it's our job to validate any packets we receive on this
server
......
......@@ -54,6 +54,10 @@
*/
#include "dialback.h"
#include <base64.hh>
#include <messages.hh>
#include <namespaces.hh>
/* forward declaration */
void dialback_out_read(mio m, int flags, void *arg, xmlnode x, char *unused1,
int unused2);
......
......@@ -42,6 +42,9 @@
#include "jabberd.h"
#include "srv_resolv.h"
#include <namespaces.hh>
#include <sys/wait.h>
#include <unistd.h>
......
......@@ -41,6 +41,8 @@
#include "jabberd.h"
#include <namespaces.hh>
/* I really don't like having this as a global variable */
extern xmlnode greymatter__;
......
......@@ -44,6 +44,8 @@
* components to use the XML routing functionality.
*/
#include <pool.hh>
#include "jabberd.h"
void base_accept(pool p);
......
......@@ -36,6 +36,10 @@
#include "jabberd.h"
#include <hash.hh>
#include <messages.hh>
#include <namespaces.hh>
#define A_ERROR -1
#define A_READY 1
......
......@@ -30,6 +30,9 @@
#include "jabberd.h"
#include <hash.hh>
#include <namespaces.hh>
/**
* @file base_connect.cc
* @brief connects to another instance using the component protocol
......
......@@ -37,6 +37,10 @@
#include "jabberd.h"
#include <expat.hh>
#include <hash.hh>
#include <namespaces.hh>
#include <dirent.h>
#include <unistd.h>
......
......@@ -32,6 +32,10 @@
*/
#include "jabberd.h"
#include <expat.hh>
#include <namespaces.hh>
#include <dirent.h>
/**
......
......@@ -35,6 +35,9 @@
#include "jabberd.h"
#include <hash.hh>
#include <namespaces.hh>
static result base_to_deliver(instance id, dpacket p, void *arg) {
char *log_data = xmlnode_get_data(p->x);
xmlnode message;
......
......@@ -37,6 +37,9 @@
#include "jabberd.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* generate and send unsubscribe/unsubscribed packets
*
......
......@@ -35,6 +35,10 @@
#include "jabberd.h"
#include <expat.hh>
#include <messages.hh>
#include <namespaces.hh>
#include <fcntl.h>
#include <iostream>
#include <unistd.h>
......
......@@ -150,6 +150,10 @@ deliver()
</jer> */
#include "jabberd.h"
#include <messages.hh>
#include <namespaces.hh>
#include <set>
extern xmlnode greymatter__;
......
......@@ -28,6 +28,9 @@
*/
#include <jabberd.h>
#include <namespaces.hh>
#include <stdexcept>
namespace xmppd {
......
......@@ -46,6 +46,8 @@
#include "jabberd.h"
#include <namespaces.hh>
#ifdef HAVE_SYSLOG
#include <syslog.h>
#endif
......
......@@ -124,9 +124,18 @@
#include <config.h>
#endif
#include <jid.hh>
#include <jpacket.hh>
#include <jutil.hh>
#include <karma.hh>
#include <rate.hh>
#include <xmlnode.hh>
#include <xstream.hh>
#include <set>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include <jabberdlib.h>
#include <pth.h>
/** Packet types */
......
noinst_LTLIBRARIES = libjabberdlib.la
include_HEADERS = base64.hh expat.hh hash.hh hmac.hh jabberid.hh jabberdlib.h jid.hh jpacket.hh jutil.hh karma.hh lwresc.hh messages.hh pool.hh rate.hh socket.hh str.hh xhash.hh xmlnode.hh xstream.hh
include_HEADERS = base64.hh expat.hh hash.hh hmac.hh jabberid.hh jid.hh jpacket.hh jutil.hh karma.hh lwresc.hh messages.hh pool.hh rate.hh socket.hh str.hh xhash.hh xmlnode.hh xstream.hh
libjabberdlib_la_SOURCES = base64.cc karma.cc xhash.cc jid.cc jabberid.cc pool.cc expat.cc jpacket.cc socket.cc jutil.cc rate.cc str.cc xstream.cc hash.cc hmac.cc messages.cc xmlnode.cc lwresc.cc
libjabberdlib_la_LDFLAGS = @LDFLAGS@
......
/*
* Copyrights
*
* Portions created by or assigned to Jabber.com, Inc. are
* Copyright (c) 1999-2002 Jabber.com, Inc. All Rights Reserved. Contact
* information for Jabber.com, Inc. is available at http://www.jabber.com/.
*
* Portions Copyright (c) 1998-1999 Jeremie Miller.
*
* Portions Copyright (c) 2006-2007 Matthias Wimmer
*
* This file is part of jabberd14.
*
* This software 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 2 of the
* License, or (at your option) any later version.
*
* This software 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 this software; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
/**
* @dir lib
* @brief Contains basic functionality, that is needed to form the server and
* its components
*
* In this directory there is the basic functionality on which the jabber server
* is build.
*
* Maybe the most basic file in here is pool.cc which contains the memory
* management of jabberd14. Memory in jabberd14 is managed in this pools, which
* means, that all memory allocated on a pool gets freed together when this pool
* is freed. This allows, that we do not need that many single memory freeings,
* and therefore the risk that freeing memory is forgotten gets reduced.
*
* Another basic module is in jid.cc which contains the functionality to manage
* XMPP addresses (JIDs). It can be used to modify and compare JIDs as well as
* to get them normalized.
*
* The third most basic module is in xmlnode.cc which contains a DOM-like
* interface to XML trees. Based on this XML interface jabberd14 builds the
* jpacket_struct which combines an XML document (a stanza) with fields of
* relevant information about this stanza (stanza type, sender and receipient,
* ...) jpackets are implemented in jpacket.cc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef __JABBERDLIB_H
#define __JABBERDLIB_H
#include "hash.hh"
#include "pool.hh"
#include "socket.hh"
#include "str.hh"
#include "base64.hh"
#include "xhash.hh"
#include "xmlnode.hh"
#include "expat.hh"
#include "xstream.hh"
#include "hmac.hh"
#include "jabberid.hh"
#include "jid.hh"
#include "jpacket.hh"
#include "rate.hh"
#include "karma.hh"
#include "namespaces.hh"
#include "jutil.hh"
#include "messages.hh"
#include "lwresc.hh"
#endif // __JABBERDLIB_H
......@@ -40,6 +40,8 @@
#include "jabberd.h"
#include <namespaces.hh>
#include <syslog.h>
int _debug_facility = -1; /**< facility to use for sending debugging messages to
......
......@@ -44,6 +44,9 @@
#include <jabberd.h>
#include <namespaces.hh>
#include <socket.hh>
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
......
......@@ -35,6 +35,8 @@
*/
#include "jabberd.h"
#include <namespaces.hh>
#include <fcntl.h>
#include <gcrypt.h>
#include <iostream>
......
......@@ -40,6 +40,10 @@
#include <jabberd.h>
#include <expat.hh>
#include <namespaces.hh>
#include <xmlnode.hh>
#include <fstream>
#include <libgen.h>
#include <sys/stat.h>
......
......@@ -35,6 +35,8 @@
#include "jabberd.h"
#include <namespaces.hh>
/**
* ::o_PRECOND packet handler that filters the packets incoming for the instance
* to look for xdb packets
......
......@@ -29,6 +29,9 @@
*/
#include "jsm.h"
#include <namespaces.hh>
#include <time.h>
/**
......
......@@ -30,6 +30,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file jsm/deliver.cc
* @brief handle incoming packets and check how they can be delivered
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file jsm.cc
* @brief main part of the jsm (Jabberd session manager) module
......
......@@ -30,6 +30,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_admin.cc
* @brief Admin functionallity for the session manager
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_agents.cc
* @brief handling jabber:iq:agents (XEP-0094) and jabber:iq:agent
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_announce.cc
* @brief This session manager module implements the message of the day and the
......
......@@ -30,6 +30,10 @@
#include "jsm.h"
#include <base64.hh>
#include <hash.hh>
#include <namespaces.hh>
/**
* @file mod_auth_crypt.cc
* @brief handle (non-SASL) authentication using plain text passwords on the
......
......@@ -30,6 +30,9 @@
#include <jsm.h>
#include <hash.hh>
#include <namespaces.hh>
/**
* @file mod_auth_digest.cc
* @brief Handle authentication using hashed passwords on the wire (requires
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_auth_plain.cc
* @brief handles authentication using plaintext password with plaintext
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_browse.cc
* @brief implement handling of the jabber:iq:browse namespace (XEP-0011) in the
......
......@@ -32,6 +32,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_disco.cc
* @brief implement handling of service discovery (XEP-0030) in the session
......
......@@ -24,6 +24,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_dynamic.cc
* @brief implements dynamic adding and removing of hosts from the JSM instance
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_example.cc
* @brief example how to implement your own Jabber session manager (jsm) module
......
......@@ -30,6 +30,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_last.cc
* @brief Implement handling of jabber:iq:last (XEP-0012) in the session manager
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_log.cc
* @brief write a log entry if a session ends, optionally forward all messages
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_offline.cc
* @brief Handle offline messages to users (including message expiration
......
......@@ -24,6 +24,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_ping.cc
* @brief implements XEP-0199 - XMPP Ping
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_presence.cc
* @brief handles presences: send to subscribers, send offline on session end,
......
......@@ -24,6 +24,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_privacy.cc
* @brief implements XEP-0016 - Privacy Lists
......
......@@ -30,6 +30,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_register.cc
* @brief handles in-band registrations (XEP-0077)
......
......@@ -30,6 +30,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/**
* @file mod_roster.cc
* @brief handle subscription state changes and the user's access to his roster
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_time.cc
* @brief implement the Entity Time protocol (XEP-0090)
......
......@@ -24,6 +24,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_useridpolicy.cc
* @brief checks new user registrations against a policy for allowed/forbidden
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_vcard.cc
* @brief Implement handling of namespace 'vcard-temp' (XEP-0054)
......
......@@ -29,6 +29,9 @@
*/
#include "jsm.h"
#include <namespaces.hh>
#include <sys/utsname.h>
/**
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file mod_xml.cc
* @brief handling jabber:iq:private (XEP-0049) requests
......
......@@ -24,6 +24,9 @@
#include "jsm.h"
#include <expat.hh>
#include <namespaces.hh>
/**
* @file serialization.cc
* @brief functions for serialization an deserialization of JSM state
......
......@@ -35,6 +35,9 @@
#include "jsm.h"
#include <messages.hh>
#include <namespaces.hh>
/* forward declarations */
void _js_session_start(void *arg);
void _js_session_to(void *arg);
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file users.cc
* @brief functions for manipulating data for logged in users
......
......@@ -30,6 +30,8 @@
#include "jsm.h"
#include <namespaces.hh>
/**
* @file util.cc
* @brief utility functions for jsm
......
......@@ -30,8 +30,12 @@
* bytestreams.
*/
#include <ctime>
#include <proxy65.h>
#include <hash.hh>
#include <namespaces.hh>
#include <ctime>
#include <stdexcept>
#include <vector>
......
......@@ -64,6 +64,9 @@
*/
#include <jabberd.h>
#include <namespaces.hh>
#define DEFAULT_AUTH_TIMEOUT 120
#define DEFAULT_HEARTBEAT 60
......
......@@ -32,6 +32,8 @@
#include <resolver.h>
#include <namespaces.hh>
namespace xmppd {
namespace resolver {
resend_service::resend_service(xmlnode resend) : weight_sum(0) {
......
......@@ -32,6 +32,9 @@
#include <resolver.h>
#include <namespaces.hh>
#include <socket.hh>
namespace xmppd {
namespace resolver {
resolver::resolver(instance i, xmlnode x)
......
......@@ -24,6 +24,8 @@
#include <jabberd.h>
#include <lwresc.hh>
namespace xmppd {
namespace resolver {
......
......@@ -41,6 +41,9 @@
#include <jabberd.h>
#include <expat.hh>
#include <namespaces.hh>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
......
......@@ -22,8 +22,12 @@
*
*/
#include <dlfcn.h>
#include <jabberd.h>
#include <expat.hh>
#include <namespaces.hh>
#include <dlfcn.h>
#include <popt.h>
#include <iostream>
......
......@@ -23,6 +23,9 @@
*/
#include <jabberd.h>
#include <namespaces.hh>
#include <list>
#include <map>
#include <sstream>
......
Markdown is supported
0%