summaryrefslogtreecommitdiff
path: root/libopie/pim/odatebookaccess.cpp
blob: 08e61ff6a116cb2a558ed5858dd084deddadbc95 (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
#include "obackendfactory.h"
#include "odatebookaccess.h"

ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
    : OPimAccessTemplate<OEvent>( back )
{
    if (!back )
        back = OBackendFactory<ODateBookAccessBackend>::Default("datebook", QString::null );

    m_backEnd = back;
    setBackEnd( m_backEnd );
}
ODateBookAccess::~ODateBookAccess() {
}
ODateBookAccess::List ODateBookAccess::rawEvents()const {
    QArray<int> ints = m_backEnd->rawEvents();

    List lis( ints, this );
    return lis;
}
ODateBookAccess::List ODateBookAccess::rawRepeats()const {
    QArray<int> ints = m_backEnd->rawRepeats();

    List lis( ints, this );
    return lis;
}
ODateBookAccess::List ODateBookAccess::nonRepeats()const {
    QArray<int> ints = m_backEnd->nonRepeats();

    List lis( ints, this );
    return lis;
}
OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) {
    return m_backEnd->effecticeEvents( from, to );
}
OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) {
    return m_backEnd->effecticeEvents( start );
}