~ubuntu-branches/ubuntu/vivid/ekiga/vivid-proposed

« back to all changes in this revision

Viewing changes to plugins/resource-list/rl-presentity.h

  • Committer: Bazaar Package Importer
  • Author(s): Kilian Krause
  • Date: 2011-07-17 00:24:50 UTC
  • mfrom: (5.1.5 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110717002450-ytg3wsrc1ptd3153
Tags: 3.3.1-1
* New upstream release.
 - Required libpt-dev 2.10 and libopal-dev 3.10
* Fix debian/watch to catch new version
* Remove libnotify0.7.patch - included upstream
* Add libboost-dev and libboost-signals-dev to Build-Depends
* debian/rules: Don't install *.la files for new internal shared libs
* Fix Vcs URIs to point to correct desktop/experimental/ekiga tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Ekiga -- A VoIP and Video-Conferencing application
 
4
 * Copyright (C) 2000-2009 Damien Sandras <dsandras@seconix.com>
 
5
 
 
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.
 
13
 *
 
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.
 
17
 *
 
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.
 
24
 */
 
25
 
 
26
 
 
27
/*
 
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
 
33
 *
 
34
 */
 
35
 
 
36
 
 
37
 
 
38
#ifndef __RL_PRESENTITY_H__
 
39
#define __RL_PRESENTITY_H__
 
40
 
 
41
#include <libxml/tree.h>
 
42
#include <boost/smart_ptr.hpp>
 
43
 
 
44
#include "form.h"
 
45
#include "presence-core.h"
 
46
#include "presentity.h"
 
47
#include "xcap-path.h"
 
48
 
 
49
namespace RL
 
50
{
 
51
  class Presentity:
 
52
    public Ekiga::Presentity
 
53
  {
 
54
  public:
 
55
 
 
56
    Presentity (Ekiga::ServiceCore &_core,
 
57
                boost::shared_ptr<XCAP::Path> path_,
 
58
                boost::shared_ptr<xmlDoc> doc_,
 
59
                xmlNodePtr _node,
 
60
                bool writable_);
 
61
 
 
62
    ~Presentity ();
 
63
 
 
64
    const std::string get_name () const;
 
65
 
 
66
    const std::string get_presence () const;
 
67
 
 
68
    const std::string get_status () const;
 
69
 
 
70
    const std::set<std::string> get_groups () const;
 
71
 
 
72
    const std::string get_uri () const;
 
73
 
 
74
    bool has_uri (const std::string uri) const;
 
75
 
 
76
    void set_presence (const std::string _presence);
 
77
 
 
78
    void set_status (const std::string _status);
 
79
 
 
80
    bool populate_menu (Ekiga::MenuBuilder &);
 
81
 
 
82
    boost::signal0<void> trigger_reload;
 
83
 
 
84
  private:
 
85
 
 
86
    void edit_presentity ();
 
87
 
 
88
    void edit_presentity_form_submitted (bool submitted,
 
89
                                         Ekiga::Form &result);
 
90
 
 
91
    void save (bool reload);
 
92
 
 
93
    void remove ();
 
94
 
 
95
    void save_result (std::string error,
 
96
                      bool reload);
 
97
 
 
98
    void erase_result (std::string error);
 
99
 
 
100
    Ekiga::ServiceCore &services;
 
101
 
 
102
    boost::shared_ptr<XCAP::Path> path;
 
103
    boost::shared_ptr<xmlDoc> doc;
 
104
    xmlNodePtr node;
 
105
    bool writable;
 
106
 
 
107
    xmlNodePtr name_node;
 
108
 
 
109
    std::string uri;
 
110
    std::string presence;
 
111
    std::string status;
 
112
 
 
113
    std::map<std::string, xmlNodePtr> group_nodes;
 
114
    std::set<std::string> groups;
 
115
  };
 
116
 
 
117
  typedef boost::shared_ptr<Presentity> PresentityPtr;
 
118
 
 
119
};
 
120
 
 
121
#endif