~renatofilho/buteo-sync-plugins-contacts/solve-eds-conflict

« back to all changes in this revision

Viewing changes to tests/unittest/MockAuthenticator.cpp

  • Committer: CI Train Bot
  • Author(s): Renato Araujo Oliveira Filho
  • Date: 2015-09-24 17:50:44 UTC
  • mfrom: (1.3.53 initial-vr)
  • Revision ID: ci-train-bot@canonical.com-20150924175044-rp0akjs0h1xwxmpj
Implemented buteo contacts sync plugin for google, heavily based on:
  - https://github.com/nemomobile-graveyard/buteo-sync-plugins-google
  - https://github.com/nemomobile/buteo-sync-plugins-social
Approved by: Michael Sheldon

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of buteo-gcontact-plugin package
 
3
 *
 
4
 * Copyright (C) 2015 Canonical Ltd.
 
5
 *
 
6
 * Contributors: Renato Araujo Oliveira Filho <renato.filho@canonical.com>
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public License
 
10
 * version 2.1 as published by the Free Software Foundation.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
15
 * Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public
 
18
 * License along with this library; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
20
 * 02110-1301 USA
 
21
 *
 
22
 */
 
23
 
 
24
#include "MockAuthenticator.h"
 
25
 
 
26
MockAuthenticator::MockAuthenticator(QObject *parent)
 
27
    : UAuth(parent)
 
28
{
 
29
}
 
30
 
 
31
MockAuthenticator::~MockAuthenticator()
 
32
{
 
33
}
 
34
 
 
35
bool MockAuthenticator::authenticate()
 
36
{
 
37
    // simulate authentication sucess
 
38
    emit success();
 
39
    return true;
 
40
}
 
41
 
 
42
bool MockAuthenticator::init(const quint32 accountId, const QString serviceName)
 
43
{
 
44
    m_accountId = accountId;
 
45
    m_serviceName = serviceName;
 
46
    m_initialized = true;
 
47
    return true;
 
48
}
 
49