Commit fc2a959f authored by Kai Vehmanen's avatar Kai Vehmanen

Added nua-glib module to the tree.

darcs-hash:20060309145454-7659e-deac57254296619e462dda0672fe145715549cdc.gz
parent e98cf56b
PROJECT_NAME = "nua-glib"
OUTPUT_DIRECTORY = ../docs/html/nua-glib
INPUT = nua_glib.docs . sofia-sip
@INCLUDE = ../docs/Doxyfile.conf
TAGFILES += ../docs/doxytags_docs=../docs
TAGFILES += ../docs/doxytags_su=../su
TAGFILES += ../docs/doxytags_ipt=../ipt
TAGFILES += ../docs/doxytags_bnf=../bnf
TAGFILES += ../docs/doxytags_url=../url
TAGFILES += ../docs/doxytags_msg=../msg
TAGFILES += ../docs/doxytags_sip=../sip
TAGFILES += ../docs/doxytags_sresolv=../sresolv
TAGFILES += ../docs/doxytags_tport=../tport
TAGFILES += ../docs/doxytags_nta=../nta
TAGFILES += ../docs/doxytags_sdp=../sdp
TAGFILES += ../docs/doxytags_nua=../nua
GENERATE_TAGFILE = ../docs/doxytags_nua_glib
ALIASES +=
#
# Makefile.am for nua-glib module
#
# Copyright (C) 2006 Nokia Corporation
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
# Licensed under LGPL. See file COPYING.
#
if HAVE_GLIB
GLIB_BUILT = nua_glib_marshal.c \
nua_glib_marshal.h
else
GLIB_BUILT =
endif
# ----------------------------------------------------------------------
# Header paths
S_BASE=../../libsofia-sip-ua
INCLUDES = -I$(srcdir)/$(S_BASE)/bnf -I$(S_BASE)/bnf \
-I$(srcdir)/$(S_BASE)/ipt -I$(S_BASE)/ipt \
-I$(srcdir)/$(S_BASE)/iptsec -I$(S_BASE)/iptsec \
-I$(srcdir)/$(S_BASE)/http -I$(S_BASE)/http \
-I$(srcdir)/$(S_BASE)/msg -I$(S_BASE)/msg \
-I$(srcdir)/$(S_BASE)/nea -I$(S_BASE)/nea \
-I$(srcdir)/$(S_BASE)/nta -I$(S_BASE)/nta \
-I$(srcdir)/$(S_BASE)/nth -I$(S_BASE)/nth \
-I$(srcdir)/$(S_BASE)/nua -I$(S_BASE)/nua \
-I$(srcdir)/$(S_BASE)/sdp -I$(S_BASE)/sdp \
-I$(srcdir)/$(S_BASE)/sip -I$(S_BASE)/sip \
-I$(srcdir)/$(S_BASE)/soa -I$(S_BASE)/soa \
-I$(srcdir)/$(S_BASE)/tport -I$(S_BASE)/tport \
-I$(srcdir)/$(S_BASE)/url -I$(S_BASE)/url \
-I$(srcdir)/$(S_BASE)/su -I$(S_BASE)/su \
$(GLIB_CFLAGS)
# ----------------------------------------------------------------------
# Build targets
noinst_LTLIBRARIES = libnua-glib.la
# ----------------------------------------------------------------------
# Rules for building the targets
BUILT_SOURCES = $(GLIB_BUILT)
nobase_include_sofia_HEADERS = \
sofia-sip/nua_glib.h
noinst_HEADERS = nua_glib_priv.h
noinst_PROGRAMS = test_nua_glib
libnua_glib_la_SOURCES = \
nua_glib.c \
$(GLIB_BUILT)
LDADD = $(GLIB_LIBS) -lgobject-2.0 \
libnua-glib.la \
../../libsofia-sip-ua/libsofia-sip-ua.la
test_nua_glib_LDFLAGS = -static
test_nua_glib_SOURCES = test_nua_glib.c
if HAVE_GLIB
%_marshal.h: %_marshal.list Makefile
glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*_marshal.h
%_marshal.c: %_marshal.list Makefile
glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*_marshal.c
endif
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile nua_glib.docs $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
This diff is collapsed.
/**@mainpage Sofia-SIP nua-glib Module
@section stun_meta Module Meta Information
The nua-glib module is a highlevel interface for building
SIP user-agent software, using the glib object system based.
It is basicly provides gobject bindings to the Sofia-SIP nua
module interface.
@CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
@STATUS Core library
@LICENSE LGPL
@section todo Todo
- see sourceforge.net issue tracker for sofia-sip
*/
VOID:POINTER,INT,STRING
VOID:POINTER,INT,STRING
VOID:POINTER,INT,STRING,STRING,STRING,STRING
VOID:POINTER,INT,INT,INT,INT,STRING,STRING
VOID:POINTER,INT
VOID:POINTER,POINTER
VOID:POINTER,STRING,STRING,STRING,POINTER
VOID:POINTER,STRING,STRING,STRING
VOID:INT,STRING
/*
* 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 __NUA_GLIB_H__
#define __NUA_GLIB_H__
#include <glib-object.h>
#include <sofia-sip/sip.h>
#include <sofia-sip/sip_status.h>
G_BEGIN_DECLS
/**@file nua_glib.h Glib Interface Sofia-SIP 'nua'
*
* @author Kai Vehmanen <Kai.Vehmanen@nokia.com>
* @author Rob Taylor <rob.taylor@collabora.co.uk>
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*/
typedef struct _NuaGlibClass NuaGlibClass;
typedef struct _NuaGlib NuaGlib;
typedef struct _NuaGlibPrivate NuaGlibPrivate;
typedef struct _NuaGlibOp NuaGlibOp;
struct _NuaGlibClass {
GObjectClass parent_class;
};
struct _NuaGlib {
GObject parent;
NuaGlibPrivate *priv;
};
GType nua_glib_get_type(void);
/* TYPE MACROS */
#define NUA_GLIB_TYPE \
(nua_glib_get_type())
#define NUA_GLIB(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NUA_GLIB_TYPE, NuaGlib))
#define NUA_GLIB_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NUA_GLIB_TYPE, NuaGlibClass))
#define NUA_GLIB_IS(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NUA_GLIB_TYPE))
#define NUA_GLIB_IS_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NUA_GLIB_TYPE))
#define NUA_GLIB_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NUA_GLIB_TYPE, NuaGlibClass))
/*value enums*/
/**
* enum for describing media availiability
*/
typedef enum {
NUA_GLIB_MEDIA_DISABLED = -4, /**< Media not negotiated */
NUA_GLIB_MEDIA_REJECTED = -8, /**< Media rejected in negotiation */
NUA_GLIB_MEDIA_INACTIVE = 0, /**< SDP O-A state for media */
NUA_GLIB_MEDIA_SENDONLY = 1, /**< SDP O-A state for media */
NUA_GLIB_MEDIA_RECVONLY = 2, /**< SDP O-A state for media */
NUA_GLIB_MEDIA_SENDRECV = NUA_GLIB_MEDIA_SENDONLY
| NUA_GLIB_MEDIA_RECVONLY
} NuaGlibMediaActive;
NuaGlibOp * nua_glib_invite (NuaGlib *self, const char *destination, const char *local_sdp);
void nua_glib_answer (NuaGlib *self, NuaGlibOp *op, int status, const char *phrase, const char *sdp);
void nua_glib_bye (NuaGlib *cli, NuaGlibOp *op);
void nua_glib_cancel (NuaGlib *cli, NuaGlibOp *op);
NuaGlibOp* nua_glib_options (NuaGlib *self, const char *destination);
NuaGlibOp* nua_glib_message (NuaGlib *self, const char *destination, const char *message);
void nua_glib_info (NuaGlib *self, NuaGlibOp *op, const char *content_type, const char *message);
void nua_glib_refer (NuaGlib *self, NuaGlibOp *op, const char* destination);
void nua_glib_follow_refer (NuaGlib *cli, NuaGlibOp *op);
void nua_glib_hold (NuaGlib *self, NuaGlibOp *op, int hold);
void nua_glib_notify (NuaGlib *self, NuaGlibOp* op);
NuaGlibOp* nua_glib_watch (NuaGlib *self, char *event);
NuaGlibOp* nua_glib_subscribe (NuaGlib *self, const char *uri, gboolean eventlist);
void nua_glib_unsubscribe (NuaGlib *self, NuaGlibOp *op);
void nua_glib_reregister (NuaGlib *self, NuaGlibOp *op);
NuaGlibOp* nua_glib_register (NuaGlib *self, const char *registrar);
void nua_glib_unregister (NuaGlib *self, NuaGlibOp *op);
NuaGlibOp *nua_glib_unregister_direct (NuaGlib *self, const char *registrar);
void nua_glib_republish (NuaGlib *self, NuaGlibOp *op, const char *note);
NuaGlibOp* nua_glib_publish (NuaGlib *self, const char *note);
void nua_glib_unpublish (NuaGlib *cli, NuaGlibOp *op);
NuaGlibOp* nua_glib_unpublish_direct (NuaGlib *self);
void nua_glib_redirect(NuaGlib *self, NuaGlibOp *op, const char *contact);
/*helper functions*/
gpointer nua_glib_op_get_data(NuaGlibOp *op);
void nua_glib_op_set_data (NuaGlibOp *op, gpointer data);
NuaGlib *nua_glib_op_owner (NuaGlibOp *op);
sip_method_t nua_glib_op_method_type (NuaGlibOp *op);
const gchar * nua_glib_op_get_identity(NuaGlibOp *op);
G_END_DECLS
#endif /* __NUA_GLIB_H__ */
#include <glib.h>
#include "sofia-sip/nua_glib.h"
int main(int argc, char *argv[]) {
NuaGlib *self;
g_type_init();
self = g_object_new(NUA_GLIB_TYPE,
"address", "sip:foo@localhost",
NULL);
g_message ("NuaGlib instance %p created\n", self);
g_object_unref(self);
return 0;
}
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