1
# Copyright (C) 2010 Matthew McGowan
6
# This program is free software; you can redistribute it and/or modify it under
7
# the terms of the GNU General Public License as published by the Free Software
8
# Foundation; version 3.
10
# This program is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15
# You should have received a copy of the GNU General Public License along with
16
# this program; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
#from dbus.mainloop.glib import DBusGMainLoop
23
#DBusGMainLoop(set_as_default=True)
26
from gwibber.lib import GwibberPublic
27
_gwibber_is_available = True
28
Gwibber = GwibberPublic()
29
Gwibber.service.refresh()
31
_gwibber_is_available = False
34
def gwibber_service_available():
35
if not _gwibber_is_available:
37
return len(json.loads(Gwibber.GetAccounts())) > 0
39
GWIBBER_SERVICE_AVAILABLE = gwibber_service_available()
40
#print 'Gwibber Serice Available: %s' % GWIBBER_SERVICE_AVAILABLE