30
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: VideoCollectionWrapper class implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
58
|
18 |
// Version : %version: 32 %
|
36
|
19 |
|
30
|
20 |
// INCLUDE FILES
|
|
21 |
#include <qabstractitemmodel.h>
|
36
|
22 |
|
30
|
23 |
#include "videocollectionwrapper.h"
|
|
24 |
#include "videocollectionwrapper_p.h"
|
58
|
25 |
#include "videoproxymodelgeneric.h"
|
36
|
26 |
#include "videocollectiontrace.h"
|
30
|
27 |
|
|
28 |
// -----------------------------------------------------------------------------
|
|
29 |
// VideoCollectionWrapper::CVideoCollectionWrapper()
|
|
30 |
// -----------------------------------------------------------------------------
|
|
31 |
//
|
34
|
32 |
VideoCollectionWrapper &VideoCollectionWrapper::instance()
|
30
|
33 |
{
|
36
|
34 |
FUNC_LOG;
|
34
|
35 |
static VideoCollectionWrapper _staticWrapper;
|
30
|
36 |
|
34
|
37 |
return _staticWrapper;
|
30
|
38 |
}
|
|
39 |
|
|
40 |
// -----------------------------------------------------------------------------
|
|
41 |
// VideoCollectionWrapper::VideoCollectionWrapper()
|
|
42 |
// -----------------------------------------------------------------------------
|
|
43 |
//
|
|
44 |
VideoCollectionWrapper::VideoCollectionWrapper() :
|
|
45 |
d( new VideoCollectionWrapperPrivate ),
|
|
46 |
mReferenceCount(0)
|
|
47 |
{
|
36
|
48 |
FUNC_LOG;
|
30
|
49 |
}
|
|
50 |
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
// CVideoCollectionWrapper::~CVideoCollectionWrapper()
|
|
53 |
// -----------------------------------------------------------------------------
|
|
54 |
//
|
|
55 |
VideoCollectionWrapper::~VideoCollectionWrapper()
|
|
56 |
{
|
36
|
57 |
FUNC_LOG;
|
40
|
58 |
delete d;
|
30
|
59 |
}
|
|
60 |
|
|
61 |
// -----------------------------------------------------------------------------
|
58
|
62 |
// CVideoCollectionWrapper::getGenericModel()
|
30
|
63 |
// -----------------------------------------------------------------------------
|
|
64 |
//
|
58
|
65 |
VideoProxyModelGeneric* VideoCollectionWrapper::getGenericModel()
|
|
66 |
{
|
|
67 |
FUNC_LOG;
|
|
68 |
if(d)
|
|
69 |
{
|
|
70 |
return d->getGenericModel();
|
|
71 |
}
|
|
72 |
return 0;
|
|
73 |
}
|
|
74 |
|
|
75 |
// -----------------------------------------------------------------------------
|
|
76 |
// CVideoCollectionWrapper::getAllVideosModel()
|
|
77 |
// -----------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
VideoProxyModelGeneric* VideoCollectionWrapper::getAllVideosModel()
|
30
|
80 |
{
|
36
|
81 |
FUNC_LOG;
|
30
|
82 |
if(d)
|
|
83 |
{
|
58
|
84 |
return d->getAllVideosModel();
|
|
85 |
}
|
|
86 |
return 0;
|
|
87 |
}
|
|
88 |
|
|
89 |
// -----------------------------------------------------------------------------
|
|
90 |
// CVideoCollectionWrapper::getCollectionsModel()
|
|
91 |
// -----------------------------------------------------------------------------
|
|
92 |
//
|
|
93 |
VideoProxyModelGeneric* VideoCollectionWrapper::getCollectionsModel()
|
|
94 |
{
|
|
95 |
FUNC_LOG;
|
|
96 |
if(d)
|
|
97 |
{
|
|
98 |
return d->getCollectionsModel();
|
|
99 |
}
|
|
100 |
return 0;
|
|
101 |
}
|
|
102 |
|
|
103 |
// -----------------------------------------------------------------------------
|
|
104 |
// CVideoCollectionWrapper::getCollectionContentModel()
|
|
105 |
// -----------------------------------------------------------------------------
|
|
106 |
//
|
|
107 |
VideoProxyModelGeneric* VideoCollectionWrapper::getCollectionContentModel()
|
|
108 |
{
|
|
109 |
FUNC_LOG;
|
|
110 |
if(d)
|
|
111 |
{
|
|
112 |
return d->getCollectionContentModel();
|
30
|
113 |
}
|
|
114 |
return 0;
|
|
115 |
}
|
|
116 |
|
|
117 |
// -----------------------------------------------------------------------------
|
|
118 |
// VideoCollectionWrapper::sendAsyncStatus()
|
|
119 |
// -----------------------------------------------------------------------------
|
|
120 |
//
|
|
121 |
void VideoCollectionWrapper::sendAsyncStatus(int statusCode, QVariant &additional)
|
|
122 |
{
|
36
|
123 |
FUNC_LOG;
|
30
|
124 |
emit asyncStatus(statusCode, additional);
|
|
125 |
}
|
|
126 |
|
|
127 |
// End of file
|