~crisoagf/do-plugins/do-music

« back to all changes in this revision

Viewing changes to BundledLibraries/telepathy-sharp/telepathy-sharp/MissionControl.cs

  • Committer: Christopher James Halse Rogers
  • Date: 2011-02-06 08:01:08 UTC
  • mfrom: (687.1.12 empathy)
  • Revision ID: raof@ubuntu.com-20110206080108-cuzq3femqkmsiagy
Merge the long-sought Empathy plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 2009 Neil Loknath <neil.loknath@gmail.com>
 
3
 * 
 
4
 *   This program is free software: you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU Lesser General Public License as published 
 
6
 *   by the Free Software Foundation, either version 3 of the License, or
 
7
 *   (at your option) any later version.
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *   GNU Lesser General Public License for more details.
 
13
 *
 
14
 *   You should have received a copy of the GNU Lesser General Public License
 
15
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 *   This program is free software: you can redistribute it and/or modify
 
17
 *   it under the terms of the GNU LesserGeneral Public License as published 
 
18
 *   by the Free Software Foundation, either version 3 of the License, or
 
19
 *   (at your option) any later version.
 
20
 */
 
21
 
 
22
#define USE_DBUS_PROPERTIES
 
23
 
 
24
using System;
 
25
using System.Collections.Generic;
 
26
using DBus;
 
27
 
 
28
namespace Telepathy.MissionControl
 
29
{
 
30
        
 
31
    [Interface ("org.freedesktop.Telepathy.MissionControl")]
 
32
    public interface IMissionControl
 
33
    {
 
34
        string[] GetOnlineConnections ();
 
35
        void GetConnection (string @account_name, out string @bus_name, out ObjectPath @object_path);
 
36
        McStatus GetConnectionStatus (string @account_name);
 
37
        
 
38
        string GetPresenceMessageActual ();
 
39
        McPresence GetPresenceActual ();
 
40
        string GetPresenceMessage ();
 
41
        McPresence GetPresence ();
 
42
        void SetPresence (McPresence @presence, string message);
 
43
        
 
44
        string GetAccountForConnection (string @object_path);
 
45
 
 
46
        event StatusActualHandler StatusActual;
 
47
        event PresenceStatusActualHandler PresenceStatusActual;
 
48
        event PresenceChangedHandler PresenceChanged;
 
49
        event PresenceStatusRequestedHandler PresenceStatusRequested;
 
50
        event PresenceRequestedHandler PresenceRequested;
 
51
        event AccountStatusChangedHandler AccountStatusChanged;
 
52
        event AccountPresenceChangedHandler AccountPresenceChanged;
 
53
 
 
54
    }
 
55
 
 
56
    public struct McAccountStatus
 
57
    {
 
58
        public string UniqueName;
 
59
        public Telepathy.ConnectionStatus status;
 
60
        public McPresence presence;
 
61
        public Telepathy.ConnectionStatusReason reason;
 
62
    }
 
63
 
 
64
    public enum McPresence : uint
 
65
    {
 
66
        Unset = 0,
 
67
        Offline = 1, Available = 2, Away = 3, ExtendedAway = 4, Hidden = 5,
 
68
        DoNotDisturb = 6, Last = 7
 
69
    }
 
70
    
 
71
    public enum McStatus : uint
 
72
    {
 
73
        Connected = 0, Connecting = 1, Disconnected = 2,
 
74
    }
 
75
 
 
76
    public delegate void StatusActualHandler (McStatus @status, McPresence @presence);
 
77
    public delegate void PresenceStatusActualHandler (McPresence @presence);
 
78
    public delegate void PresenceChangedHandler (McPresence @presence, string @message);
 
79
    public delegate void PresenceStatusRequestedHandler (McPresence @presence);
 
80
    public delegate void PresenceRequestedHandler (McPresence @presence, string @message);
 
81
    public delegate void AccountStatusChangedHandler (McStatus @status, McPresence @presence, ConnectionStatusReason @reason, string @account_id);
 
82
    public delegate void AccountPresenceChangedHandler (McStatus @status, McPresence @presence, string @message, ConnectionStatusReason @reason, string @account_id);
 
83
}    
 
 
b'\\ No newline at end of file'