aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/msofficecomm/MessengerContact.java
blob: abf9d152b833f86b8b1e710ed5c65fe4d0f6675a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.plugin.msofficecomm;

/**
 * Represents the Java counterpart of a native <tt>IMessengerContact</tt>
 * implementation.
 *
 * @author Lyubomir Marinov
 */
public class MessengerContact
{
    /**
     * The sign-in name associated with the native <tt>IMessengerContact</tt>
     * implementation represented by this instance.
     */
    public final String signinName;

    /**
     * Initializes a new <tt>MessengerContact</tt> instance which is to
     * represent the Java counterpart of a native <tt>IMessengerContact</tt>
     * implementation associated with a specific sign-in name.
     *
     * @param signinName the sign-in name associated with the native
     * <tt>IMessengerContact</tt> implementation which is to be represented by
     * the new instance
     */
    public MessengerContact(String signinName)
    {
        this.signinName = signinName;
    }

    /**
     * Gets the connection/presence status of the contact associated with this
     * instance in the form of a <tt>MISTATUS</tt> value.
     *
     * @return a <tt>MISTATUS</tt> value which specifies the connection/presence
     * status of the contact associated with this instance
     */
    public int getStatus()
    {
        return Messenger.getStatus(this);
    }

    /**
     * Gets the indicator which determines whether this
     * <tt>MessengerContact</tt> is the same user as the current client user.
     *
     * @return <tt>true</tt> if this <tt>MessengerContact</tt> is the same user
     * as the current client user; otherwise, <tt>false</tt>
     */
    public boolean isSelf()
    {
        return Messenger.isSelf(this);
    }
}