~ubuntu-branches/ubuntu/wily/psi/wily

« back to all changes in this revision

Viewing changes to src/psievent.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "psicontactlist.h"
33
33
#include "atomicxmlfile.h"
34
34
#include "psioptions.h"
 
35
#include "avcall/avcall.h"
35
36
 
36
37
// FIXME renames those
37
38
const int eventPriorityHeadline = 0;
610
611
}*/
611
612
 
612
613
//----------------------------------------------------------------------------
 
614
// AvCallEvent
 
615
//----------------------------------------------------------------------------
 
616
AvCallEvent::AvCallEvent(const XMPP::Jid &j, AvCall *_sess, PsiAccount *acc)
 
617
:PsiEvent(acc)
 
618
{
 
619
        v_from = j;
 
620
        sess = _sess;
 
621
}
 
622
 
 
623
AvCallEvent::AvCallEvent(const AvCallEvent &from)
 
624
:PsiEvent(from.account())
 
625
{
 
626
        v_from = from.v_from;
 
627
        sess = new AvCall(*from.sess);
 
628
}
 
629
 
 
630
AvCallEvent::~AvCallEvent()
 
631
{
 
632
        delete sess;
 
633
}
 
634
 
 
635
XMPP::Jid AvCallEvent::from() const
 
636
{
 
637
        return v_from;
 
638
}
 
639
 
 
640
void AvCallEvent::setFrom(const XMPP::Jid &j)
 
641
{
 
642
        v_from = j;
 
643
}
 
644
 
 
645
AvCall *AvCallEvent::takeAvCall()
 
646
{
 
647
        AvCall *_sess = sess;
 
648
        sess = 0;
 
649
        return _sess;
 
650
}
 
651
 
 
652
int AvCallEvent::priority() const
 
653
{
 
654
        return eventPriorityFile; // FIXME
 
655
}
 
656
 
 
657
QString AvCallEvent::description() const
 
658
{
 
659
        return tr("The user is calling you.");
 
660
}
 
661
 
 
662
PsiEvent *AvCallEvent::copy() const
 
663
{
 
664
        return new AvCallEvent(*this);
 
665
}
 
666
 
 
667
//----------------------------------------------------------------------------
613
668
// EventItem
614
669
//----------------------------------------------------------------------------
615
670