Commit 002e7e8d authored by Pekka Pessi's avatar Pekka Pessi

Added <nea_tag.h> for NEA tags. (mm)

darcs-hash:20051128173248-65a35-246be18372a71ea8b32fc89fc589797375ce6fa6.gz
parent 9cd554a7
......@@ -26,7 +26,7 @@ TESTS =
BUILT_SOURCES = nea_tag_ref.c
include_sofia_HEADERS = nea.h nea_debug.h
include_sofia_HEADERS = nea.h nea_debug.h nea_tag.h
libnea_la_SOURCES = nea.c nea_event.c \
nea_server.c nea_debug.c nea_tag.c nea_tag_ref.c
......
......@@ -37,7 +37,6 @@
#include <su_alloc.h>
#endif
#include <su_tag.h>
#include <su_tag.h>
#ifndef NTA_H
......@@ -49,6 +48,10 @@
#define NEA_DEFAULT_EXPIRES 3600
#ifndef NEA_TAG_H
#include <nea_tag.h>
#endif
#ifndef NEA_DLL
#ifndef WIN32
#define NEA_DLL
......@@ -87,15 +90,6 @@ typedef NEA_EMAGIC_T nea_emagic_t;
/** Event view context */
typedef NEA_EVMAGIC_T nea_evmagic_t;
/** Event states */
typedef enum {
nea_extended = -1,
nea_embryonic = 0, /** Before first notify */
nea_pending,
nea_active,
nea_terminated
} nea_state_t;
/** Description of subscription */
typedef struct nea_subnode_t {
nea_state_t sn_state; /**< Subscription state */
......@@ -205,6 +199,13 @@ NEA_DLL extern tag_typedef_t neatag_dialog;
#define NEATAG_DIALOG_REF(x) neatag_dialog_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_dialog_ref;
#define NEATAG_SUB(x) neatag_sub, tag_ptr_v((x))
NEA_DLL extern tag_typedef_t neatag_sub;
#define NEATAG_SUB_REF(x) neatag_sub_ref, tag_ptr_vr((&x), (x))
NEA_DLL extern tag_typedef_t neatag_sub_ref;
/** Shutdown an event server */
int nea_server_shutdown(nea_server_t *nes, int retry_after);
......@@ -291,11 +292,13 @@ int nea_server_notify_one(nea_server_t *nes,
#define nea_server_auth nea_sub_auth
/** Get nta_incoming_t from nea_sub_t */
nta_incoming_t *nea_sub_get_request(nea_sub_t *sub);
/** Authorize a subscription */
int nea_sub_auth(nea_sub_t *, nea_state_t state,
tag_type_t, tag_value_t, ...);
/** Get nta_incoming_t from sn->sn_subscriber */
nta_incoming_t *nea_subnode_get_incoming(nea_subnode_t *sn);
/** Set subscriber version sequence */
......
......@@ -1300,7 +1300,13 @@ nea_event_t *nea_event_get(nea_server_t const *nes, char const *e)
return ev;
}
/* ----------------------------------------------------------------- */
nta_incoming_t *nea_sub_get_request(nea_sub_t *sub)
{
assert(sub);
return sub->s_irq;
}
/** Invoke the event callback.
*
......
......@@ -57,6 +57,7 @@ tag_typedef_t neatag_exstate = STRTAG_TYPEDEF(exstate);
tag_typedef_t neatag_version = INTTAG_TYPEDEF(version);
tag_typedef_t neatag_view = PTRTAG_TYPEDEF(view);
tag_typedef_t neatag_evmagic = PTRTAG_TYPEDEF(evmagic);
tag_typedef_t neatag_sub = PTRTAG_TYPEDEF(sub);
tag_typedef_t neatag_reliable = BOOLTAG_TYPEDEF(reliable);
tag_typedef_t neatag_sub = PTRTAG_TYPEDEF(sub);
......
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef NEA_TAG_H /** Defined when <nea_tag.h> has been included. */
#define NEA_TAG_H
/**@file nea_tag.h
* @brief Tags for Nokia User Agent Library
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Mon Feb 19 18:54:26 EET 2001 ppessi
*/
#ifndef SU_TAG_H
#include <su_tag.h>
#endif
#ifndef URL_TAG_H
#include <url_tag.h>
#endif
#ifndef SIP_TAG_H
#include <sip_tag.h>
#endif
#ifndef NTA_TAG_H
#include <nta_tag.h>
#endif
/** Event states */
typedef enum {
nea_extended = -1,
nea_embryonic = 0, /** Before first notify */
nea_pending,
nea_active,
nea_terminated
} nea_state_t;
/** List of all NEA tags. */
/* extern tag_type_t nea_tag_list[]; */
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment