3
* Ekiga -- A VoIP and Video-Conferencing application
4
* Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or (at
9
* your option) any later version. This program is distributed in the hope
10
* that it will be useful, but WITHOUT ANY WARRANTY; without even the
11
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
* See the GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Ekiga is licensed under the GPL license and as a special exception, you
19
* have permission to link or otherwise combine this program with the
20
* programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
21
* applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
22
* programs, as long as you do follow the requirements of the GNU GPL for all
23
* the rest of the software thus combined.
28
* rl-presentity.h - description
29
* ------------------------------------------
30
* begin : written in 2008 by Julien Puydt
31
* copyright : (c) 2008 by Julien Puydt
32
* description : declaration of a presentity in a resource-list
38
#ifndef __RL_PRESENTITY_H__
39
#define __RL_PRESENTITY_H__
41
#include <libxml/tree.h>
42
#include <boost/smart_ptr.hpp>
45
#include "presence-core.h"
46
#include "presentity.h"
47
#include "xcap-path.h"
52
public Ekiga::Presentity
56
Presentity (Ekiga::ServiceCore &_core,
57
boost::shared_ptr<XCAP::Path> path_,
58
boost::shared_ptr<xmlDoc> doc_,
64
const std::string get_name () const;
66
const std::string get_presence () const;
68
const std::string get_status () const;
70
const std::set<std::string> get_groups () const;
72
const std::string get_uri () const;
74
bool has_uri (const std::string uri) const;
76
void set_presence (const std::string _presence);
78
void set_status (const std::string _status);
80
bool populate_menu (Ekiga::MenuBuilder &);
82
boost::signal0<void> trigger_reload;
86
void edit_presentity ();
88
void edit_presentity_form_submitted (bool submitted,
91
void save (bool reload);
95
void save_result (std::string error,
98
void erase_result (std::string error);
100
Ekiga::ServiceCore &services;
102
boost::shared_ptr<XCAP::Path> path;
103
boost::shared_ptr<xmlDoc> doc;
107
xmlNodePtr name_node;
110
std::string presence;
113
std::map<std::string, xmlNodePtr> group_nodes;
114
std::set<std::string> groups;
117
typedef boost::shared_ptr<Presentity> PresentityPtr;