Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > contrib-release-debug > by-pkgid > 69710aa523c75aae90cbd19e022a4e3b > files > 258

centerim-debug-4.22.10-1mdv2011.0.i586.rpm

#ifndef __imcontact_H__
#define __imcontact_H__

#include "icqcommon.h"

enum protocolname {
    icq = 0,
    yahoo,
    msn,
    aim,
    irc,
    jabber,
    rss,
    livejournal,
    gadu,
    infocard,

    protocolname_size
};

ENUM_PLUSPLUS(protocolname)

enum imstatus {
    offline = 0,
    available,
    invisible,
    freeforchat,
    dontdisturb,
    occupied,
    notavail,
    away,
    outforlunch,
    imstatus_size
};

ENUM_PLUSPLUS(imstatus)

static char imstatus2char[imstatus_size] = {
    '_', 'o', 'i', 'f', 'd', 'c', 'n', 'a', 'l'
};

class icqcontact;

struct imcontact {
    imcontact();
    imcontact(unsigned long auin, protocolname apname);
    imcontact(const string &anick, protocolname apname);
    imcontact(const icqcontact *c);

    string nickname;
    unsigned long uin;
    protocolname pname;

    bool operator == (const imcontact &ainfo) const;
    bool operator != (const imcontact &ainfo) const;
    bool operator < (const imcontact &ainfo) const;

    bool operator == (protocolname pname) const;
    bool operator != (protocolname pname) const;
    bool operator < (protocolname pname) const;

    bool empty() const;
    string totext() const;
};

extern imcontact contactroot;

bool ischannel(const imcontact &cont);
bool islivejournal(const icqcontact *c);
bool islivejournal(const imcontact &cont);
string imstatus2str(imstatus st);

#endif