summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimxrefmanager.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimxrefmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimxrefmanager.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimxrefmanager.cpp b/libopie2/opiepim/core/opimxrefmanager.cpp
index 58bfd24..bf6fed6 100644
--- a/libopie2/opiepim/core/opimxrefmanager.cpp
+++ b/libopie2/opiepim/core/opimxrefmanager.cpp
@@ -1,26 +1,55 @@
1#include "opimxrefmanager.h" 1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
29#include <opie2/opimxrefmanager.h>
2 30
31namespace Opie {
3 32
4OPimXRefManager::OPimXRefManager() { 33OPimXRefManager::OPimXRefManager() {
5} 34}
6OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) { 35OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) {
7 m_list = ref.m_list; 36 m_list = ref.m_list;
8} 37}
9OPimXRefManager::~OPimXRefManager() { 38OPimXRefManager::~OPimXRefManager() {
10} 39}
11OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) { 40OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) {
12 m_list = ref.m_list; 41 m_list = ref.m_list;
13 return *this; 42 return *this;
14} 43}
15bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) { 44bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) {
16 // if ( m_list == ref.m_list ) return true; 45 // if ( m_list == ref.m_list ) return true;
17 46
18 return false; 47 return false;
19} 48}
20void OPimXRefManager::add( const OPimXRef& ref) { 49void OPimXRefManager::add( const OPimXRef& ref) {
21 m_list.append( ref ); 50 m_list.append( ref );
22} 51}
23void OPimXRefManager::remove( const OPimXRef& ref) { 52void OPimXRefManager::remove( const OPimXRef& ref) {
24 m_list.remove( ref ); 53 m_list.remove( ref );
25} 54}
26void OPimXRefManager::replace( const OPimXRef& ref) { 55void OPimXRefManager::replace( const OPimXRef& ref) {
@@ -48,24 +77,26 @@ OPimXRef::ValueList OPimXRefManager::list()const {
48 return m_list; 77 return m_list;
49} 78}
50OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{ 79OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{
51 OPimXRef::ValueList list; 80 OPimXRef::ValueList list;
52 OPimXRef::ValueList::ConstIterator it; 81 OPimXRef::ValueList::ConstIterator it;
53 82
54 for ( it = m_list.begin(); it != m_list.end(); ++it ) { 83 for ( it = m_list.begin(); it != m_list.end(); ++it ) {
55 if ( (*it).containsString( appName ) ) 84 if ( (*it).containsString( appName ) )
56 list.append( (*it) ); 85 list.append( (*it) );
57 } 86 }
58 87
59 return list; 88 return list;
60} 89}
61OPimXRef::ValueList OPimXRefManager::list( int uid )const { 90OPimXRef::ValueList OPimXRefManager::list( int uid )const {
62 OPimXRef::ValueList list; 91 OPimXRef::ValueList list;
63 OPimXRef::ValueList::ConstIterator it; 92 OPimXRef::ValueList::ConstIterator it;
64 93
65 for ( it = m_list.begin(); it != m_list.end(); ++it ) { 94 for ( it = m_list.begin(); it != m_list.end(); ++it ) {
66 if ( (*it).containsUid( uid ) ) 95 if ( (*it).containsUid( uid ) )
67 list.append( (*it) ); 96 list.append( (*it) );
68 } 97 }
69 98
70 return list; 99 return list;
71} 100}
101
102}