~content-hub-team/content-hub/trunk

« back to all changes in this revision

Viewing changes to import/Ubuntu/Content/contentstore.cpp

  • Committer: Tarmac
  • Author(s): Ken VanDine
  • Date: 2013-09-30 18:39:00 UTC
  • mfrom: (48.1.1 content-hub-lp1231368)
  • Revision ID: tarmac-20130930183900-61vw3dr45uph3six
Pulled back in all the changes that were reverted in rev 47.  Bug (LP: #1231368) seemed to be caused by gallery-app needing a rebuild against this version of content-hub.

Approved by PS Jenkins bot, Günter Schwann.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#include "contentstore.h"
 
18
 
 
19
#include <QDebug>
 
20
 
 
21
/*!
 
22
 * \qmltype ContentStore
 
23
 * \instantiates ContentStore
 
24
 * \inqmlmodule Ubuntu.Content 0.1
 
25
 * \brief FIXME add documentation
 
26
 *
 
27
 * FIXME add documentation
 
28
 *
 
29
 * See documentation for \ContentHub
 
30
 */
 
31
 
 
32
namespace cuc = com::ubuntu::content;
 
33
 
 
34
ContentStore::ContentStore(QObject *parent)
 
35
    : QObject(parent),
 
36
      m_store(0)
 
37
{
 
38
    qDebug() << Q_FUNC_INFO;
 
39
}
 
40
 
 
41
/*!
 
42
 * \qmlproperty uri ContentStore::uri
 
43
 *
 
44
 * URI of the content store
 
45
 */
 
46
const QString &ContentStore::uri() const
 
47
{
 
48
    qDebug() << Q_FUNC_INFO;
 
49
    return m_store->uri();
 
50
}
 
51
 
 
52
/*!
 
53
 * \brief ContentStore::store
 
54
 * \return
 
55
 */
 
56
const com::ubuntu::content::Store *ContentStore::store() const
 
57
{
 
58
    qDebug() << Q_FUNC_INFO;
 
59
    return m_store;
 
60
}
 
61
 
 
62
/*!
 
63
 * \brief ContentStore::setStore
 
64
 * \param store
 
65
 */
 
66
void ContentStore::setStore(const com::ubuntu::content::Store *store)
 
67
{
 
68
    qDebug() << Q_FUNC_INFO;
 
69
    //if (store == m_store)
 
70
    //    return;
 
71
 
 
72
    m_store = store;
 
73
    Q_EMIT uriChanged();
 
74
}