From 466edaa9fb54f7f976c176635fb836f7cd85b456 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Mon, 20 Aug 2012 14:08:02 +0200 Subject: tubes: move getContacts() to TeleManager where it belongs, I believe Change-Id: I69ca3bde24890d809d8fad60398687c54aa1ca54 --- tubes/inc/tubes/contact-list.hxx | 62 ---------------------------------------- tubes/inc/tubes/manager.hxx | 14 ++++++--- 2 files changed, 10 insertions(+), 66 deletions(-) delete mode 100644 tubes/inc/tubes/contact-list.hxx (limited to 'tubes/inc') diff --git a/tubes/inc/tubes/contact-list.hxx b/tubes/inc/tubes/contact-list.hxx deleted file mode 100644 index cc4ba29bc28f..000000000000 --- a/tubes/inc/tubes/contact-list.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * Version: MPL 1.1 / GPLv3+ / LGPLv3+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Collabora Ltd. - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 3 or later (the "GPLv3+"), or - * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), - * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable - * instead of those above. - */ - -#ifndef INCLUDED_TUBES_CONTACT_LIST_HXX -#define INCLUDED_TUBES_CONTACT_LIST_HXX - -#include - -#include -#include -#include - -typedef struct _TpAccount TpAccount; -typedef struct _TpContact TpContact; -typedef struct _TpAccountManager TpAccountManager; - -typedef ::std::pair< TpAccount *, TpContact * > AccountContactPair; -typedef ::std::vector< AccountContactPair > AccountContactPairV; - -class ContactList -{ -public: - ContactList(TpAccountManager *pAccountManager); - ~ContactList(); - - // exported for unit test - TUBES_DLLPUBLIC AccountContactPairV getContacts(); - -private: - TpAccountManager* mpAccountManager; - std::set< TpContact* > maRegistered; - -}; - -#endif // INCLUDED_TUBES_CONTACT_LIST_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx index 032f5390f8d8..27dcec7bb585 100644 --- a/tubes/inc/tubes/manager.hxx +++ b/tubes/inc/tubes/manager.hxx @@ -33,6 +33,9 @@ #include #include +#include +#include + // For testing purposes, we might need more in future. #define LIBO_TUBES_DBUS_INTERFACE "org.libreoffice.calc" #define LIBO_TUBES_DBUS_MSG_METHOD "LibOMsg" @@ -40,12 +43,15 @@ namespace osl { class Mutex; } class Collaboration; -class ContactList; class TeleConference; class TeleManagerImpl; typedef struct _TpAccount TpAccount; typedef struct _TpContact TpContact; +typedef ::std::pair< TpAccount *, TpContact * > AccountContactPair; +typedef ::std::vector< AccountContactPair > AccountContactPairV; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /** Interface to Telepathy DBus Tubes. Fragile, not working yet. @@ -78,11 +84,11 @@ public: /** Setup client handlers. */ static bool registerClients(); - /** Fetches the contact list. Returns 0 before connect() is called successfully. - Is non-functional until prepareAccountManager(). + /** Fetches the contact list. + Is non-functional until createAccountManager(). */ // exported for unit test - TUBES_DLLPUBLIC static ContactList* getContactList(); + TUBES_DLLPUBLIC static AccountContactPairV getContacts(); /** Start a demo session where all local documents are shared to each other */ static TeleConference* startDemoSession(); -- cgit