blob: 875d926b9db2a1cda5694131d69c80c3ddfcc1e3 (
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
61
62
63
64
65
66
67
68
|
/*
videodevicepool.h - Kopete Multiple Video Device handler Class
Copyright (c) 2005-2006 by Cláudio da Silveira Pinheiro <[email protected]>
Kopete (c) 2002-2003 by the Kopete developers <[email protected]>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include "videodevicemodelpool.h"
namespace Kopete {
namespace AV {
VideoDeviceModelPool::VideoDeviceModelPool()
{
}
VideoDeviceModelPool::~VideoDeviceModelPool()
{
}
void VideoDeviceModelPool::clear()
{
m_devicemodel.clear();
}
size_t VideoDeviceModelPool::size()
{
return m_devicemodel.size();
}
size_t VideoDeviceModelPool::addModel( TQString newmodel )
{
VideoDeviceModel newdevicemodel;
newdevicemodel.model=newmodel;
newdevicemodel.count=0;
if(m_devicemodel.size())
{
for ( size_t loop = 0 ; loop < m_devicemodel.size(); loop++)
if (newmodel == m_devicemodel[loop].model)
{
kdDebug() << k_funcinfo << "Model " << newmodel << " already exists." << endl;
m_devicemodel[loop].count++;
return m_devicemodel[loop].count;
}
}
m_devicemodel.push_back(newdevicemodel);
m_devicemodel[m_devicemodel.size()-1].model = newmodel;
m_devicemodel[m_devicemodel.size()-1].count = 0;
return 0;
}
}
}
|