blob: 4f49b794e369c8509022f43392e77b21792ff91b [file] [log] [blame]
Stepan Salenikovich75a39172015-07-10 13:21:08 -04001/*
Stepan Salenikovichbe87d2c2016-01-25 14:14:34 -05002 * Copyright (C) 2015-2016 Savoir-faire Linux Inc.
Stepan Salenikovich75a39172015-07-10 13:21:08 -04003 * Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Stepan Salenikovich75a39172015-07-10 13:21:08 -040018 */
19
20#ifndef _ACCOUNTS_H
21#define _ACCOUNTS_H
22
23#include <gtk/gtk.h>
24
Stepan Salenikovich30e134e2015-09-24 21:20:25 -040025class Account;
26
Stepan Salenikovich75a39172015-07-10 13:21:08 -040027/**
28 * returns TRUE if a RING account exists; FALSE otherwise
29 */
30gboolean
31has_ring_account();
32
33/**
Stepan Salenikovich30e134e2015-09-24 21:20:25 -040034 * iterates through all existing accounts and make sure all RING accounts have
Stepan Salenikovich75a39172015-07-10 13:21:08 -040035 * a display name set; if a display name is empty, it is set to the alias of the
36 * account
37 */
38void
39force_ring_display_name();
40
Stepan Salenikovich30e134e2015-09-24 21:20:25 -040041/**
42 * Finds and returns the first RING account, in order of priority:
43 * 1. registered
44 * 2. enabled
45 * 3. existing
46 *
47 * Returns a nullptr if no RING acconts exist
48 */
49Account*
50get_active_ring_account();
51
Stepan Salenikovich75a39172015-07-10 13:21:08 -040052#endif /* _ACCOUNTS_H */