Ejemplo n.º 1
0
    def __init__(self, app_name, icon_name):
        AgentThreadedBase.__init__(self)
        self.app_name=app_name
        self.icon_name=icon_name
        pynotify.init(app_name)        

        self.types=["w", "e", "warning", "error"]
Ejemplo n.º 2
0
    def __init__(self):
        """
        @param interval: interval in seconds
        """
        AgentThreadedBase.__init__(self)

        self.srx=SignalRx(self)
Ejemplo n.º 3
0
 def __init__(self):
     """
     @param interval: interval in seconds
     """
     AgentThreadedBase.__init__(self)
     self.client=OauthClient()
     self.consumer=None
     self.signature_method_plaintext = oauth.OAuthSignatureMethod_PLAINTEXT()
     self.signature_method_hmac_sha1 = oauth.OAuthSignatureMethod_HMAC_SHA1()
     self.token=None
Ejemplo n.º 4
0
 def __init__(self, app_name, logpath):
     """
     @param interval: interval in seconds
     """
     AgentThreadedBase.__init__(self)
     self._logger=None
     self.fhdlr=None
     self._shutdown=False
     self.appname=app_name
     self.logpath=os.path.expanduser(logpath)
     self._setup()        
Ejemplo n.º 5
0
 def __init__(self, end_point, server, port, consumer_key, consumer_secret, debug=False):
     AgentThreadedBase.__init__(self, debug)
     self.server=server
     self.port=port
     self.consumer_key=consumer_key
     self.consumer_secret=consumer_secret
     self.end_point=end_point
     self.akey=None
     self.asecret=None
     self.token=None
     self.consumer = oauth.OAuthConsumer(self.consumer_key, 
                                         self.consumer_secret)
     self.signature_method_hmac_sha1 = oauth.OAuthSignatureMethod_HMAC_SHA1()
     self.connection = httplib.HTTPConnection("%s:%d" % (self.server, self.port))
Ejemplo n.º 6
0
 def __init__(self, app_name, logpath, credits={}):
     """
     @param interval: interval in seconds
     """
     AgentThreadedBase.__init__(self)
     self.credits=credits or self.DEFAULTS
     self.buckets={}
     self.dailyQuotaReached={}
     
     self._logger=None
     self.fhdlr=None
     self._shutdown=False
     self.appname=app_name
     self.logpath=os.path.expanduser(logpath)
     self._setup() 
     self._resetBuckets()       
Ejemplo n.º 7
0
    def __init__(self, dbpath):
        AgentThreadedBase.__init__(self)

        self.dbpath = dbpath
        self.path = os.path.expanduser(self.dbpath)
        self.conn = sqlite3.connect(self.path, check_same_thread=False)
        self.c = self.conn.cursor()

        self.c.execute(
            """create table if not exists tracks (id integer primary key,
                            created integer,
                            updated integer,
                            track_name text,  track_mbid text,
                            artist_name text, artist_mbid text)
                        """
        )

        self.refresh_counter = 0
Ejemplo n.º 8
0
 def __init__(self, app_name, server, port, consumer_key, consumer_secret, base):
     """
     @param interval: interval in seconds
     """
     AgentThreadedBase.__init__(self)
     self.server=server
     self.port=port
     self.base=base
     
     self.consumer_key=consumer_key
     self.consumer_secret=consumer_secret
     self.app_name=app_name
     self.client=OauthClient(server, port, base)
     self.consumer=None
     self.signature_method_plaintext = oauth.OAuthSignatureMethod_PLAINTEXT()
     self.signature_method_hmac_sha1 = oauth.OAuthSignatureMethod_HMAC_SHA1()
     self.token=None
     self.sm=StateManager(self.app_name)
Ejemplo n.º 9
0
 def __init__(self):
     AgentThreadedBase.__init__(self)
     self.timeout = 0
Ejemplo n.º 10
0
    def __init__(self):
        AgentThreadedBase.__init__(self)

        self.qinfo=Queue(self.QUEUE_INFO_SIZE)
        self.qtodo=Queue(self.QUEUE_TODO_SIZE)
        self.refresh_count=0
Ejemplo n.º 11
0
    def __init__(self):
        AgentThreadedBase.__init__(self)

        self.srx=MBSignalRx(self)
Ejemplo n.º 12
0
 def __init__(self):
     AgentThreadedBase.__init__(self)
     self.srx=RatingsSignalRx(self)
Ejemplo n.º 13
0
 def __init__(self):
     AgentThreadedBase.__init__(self)
     self.c=0