* Change some functions to use `ZSubscription_t`
* Cleanup redundant `zephyr_triple` allocations
* Inline `zephyr_subscribe_failed`
* Replace `find_sub_by_sub` and `find_sub_by_id` with `g_slist_find_custom`
* Rename functions related to `zephyr_triple`
Testing Done:
Compile.
Reviewed at https://reviews.imfreedom.org/r/450/
/* This file is part of the Project Athena Zephyr Notification System.
* It contains global definitions
*
* Created by: Robert French
*
* Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
* Technology. For copying and distribution information, see the
* file "mit-copyright.h".
*/
#ifndef PURPLE_ZEPHYR_ZEPHYR_INTERNAL_H
#define PURPLE_ZEPHYR_ZEPHYR_INTERNAL_H
#ifdef HAVE_CONFIG_H
#include<config.h>
#endif
#include<glib.h>
#include<gio/gio.h>
#include<sys/types.h>
#include<sys/time.h>
#include<zephyr_err.h>
#ifndef IPPROTO_MAX /* Make sure not already included */
#ifndef WIN32
#include<netinet/in.h>
#endif
#endif
#include<stdarg.h>
#ifdef WIN32
/* this really should be uint32_t */
/*typedef unsigned int in_addr_t;
struct in_addr
{
in_addr_t s_addr;
}; */
#include<winsock2.h>
#endif
/* Service names */
#define HM_SVCNAME "zephyr-hm"
#define HM_SRV_SVCNAME "zephyr-hm-srv"
#define SERVER_SVCNAME "zephyr-clt"
#define SERVER_SERVICE "zephyr"
#define SERVER_INSTANCE "zephyr"
#define ZVERSIONHDR "ZEPH"
#define ZVERSIONMAJOR 0
#define ZVERSIONMINOR 2
#define Z_MAXPKTLEN 1024
#define Z_MAXHEADERLEN 800
#define Z_MAXOTHERFIELDS 10 /* Max unknown fields in ZNotice_t */
#define Z_NUMFIELDS 17
/* Authentication levels returned by ZCheckAuthentication */
#define ZAUTH_FAILED (-1)
#define ZAUTH_YES 1
#define ZAUTH_NO 0
#define SERVER_SVC_FALLBACK (2103)
#define HM_SVC_FALLBACK (2104)
#define HM_SRV_SVC_FALLBACK (2105)
#define ZAUTH_UNSET (-3) /* Internal to client library. */
#define Z_MAXFRAGS 500 /* Max number of packet fragments */
#define Z_MAXNOTICESIZE 400000 /* Max size of incoming notice */
#define Z_MAXQUEUESIZE 1500000 /* Max size of input queue notices */
#define Z_FRAGFUDGE 13 /* Room to for multinotice field */
#define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */
#define Z_INITFILTERSIZE 30 /* Starting size of uid filter */