コード例 #1
0
ファイル: wamanager.py プロジェクト: davec555/wazapp
    def proceed(self):
        account = AccountsManager.getCurrentAccount()
        self._d(account)

        if (account is None):
            #self.d("Forced reg");
            return self.regFallback()
            #gui.forceRegistration();
            #self.app.exit();

        imsi = Utilities.getImsi()
        store = DataStore(imsi)

        if store.status == False:
            #or exit
            store.reset()

        store.prepareGroupConversations()
        store.prepareMedia()
        store.updateDatabase()
        store.initModels()

        gui = WAUI(account.jid)
        gui.setAccountPushName(account.pushName)
        #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml')
        #gui.setSource(url)
        gui.initConnections(store)

        self.app.focusChanged.connect(gui.focusChanged)
        gui.quit.connect(self.quit)

        #gui.populatePhoneContacts();

        print "SHOW FULL SCREEN"
        gui.showFullScreen()

        gui.onProcessEventsRequested()

        self.createDirs()

        self.processVersionTriggers()

        gui.populateContacts("ALL")

        gui.populateConversations()

        gui.populatePhoneContacts()

        gui.initializationDone = True
        gui.initialized.emit()

        print "INIT CONNECTION"
        gui.initConnection()
        #splash.finish(gui);
        gui.setMyAccount(account.jid)

        self.gui = gui

        self.gui.whatsapp.eventHandler.setMyAccount(account.jid)
コード例 #2
0
    def createOrUpdateAccount(self, data):

        if self.accountInstance is None:
            self.accountInstance = AccountsManager.manager.createAccount(
                "waxmpp")
            self.accountInstance.sync()
            self.setAccountData(self.accountInstance.id(), data, True)
        else:
            self.setAccountData(self.accountInstance.id(), data, False)

        if not self.account:
            self.account = AccountsManager.getCurrentAccount()
コード例 #3
0
ファイル: wamanager.py プロジェクト: airlanggacahya/wazapp
	def proceed(self):
		account = AccountsManager.getCurrentAccount();
		self._d(account)
	
	
		if(account is None):
			self.d("Forced reg");
			return self.regFallback()
			#gui.forceRegistration();
			#self.app.exit();
			
		imsi = Utilities.getImsi();
		store = DataStore(imsi);
		
		if store.status == False:
			#or exit
			store.reset();
			
		
		store.prepareGroupConversations();
		store.prepareMedia()
		store.updateDatabase()
		store.initModels()
		
		gui = WAUI();
		#url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml')
		#gui.setSource(url)
		gui.initConnections(store);
	
		self.app.focusChanged.connect(gui.focusChanged)
		gui.quit.connect(self.quit);

		gui.populateContacts();
		
		gui.populateConversations();
		
		gui.showFullScreen();
		
		
		
		
		

		gui.initConnection();
		#splash.finish(gui);
		
		self.gui = gui;
		
		self.gui.whatsapp.eventHandler.initialConnCheck()
コード例 #4
0
    def proceed(self):

        #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/WASplash.qml')
        #gui.setSource(url)

        #check db_state

        #gui.initConnection();
        #pixmap = QPixmap("/opt/waxmppplugin/bin/wazapp/UI/pics/wasplash.png");
        #splash = QSplashScreen(pixmap);
        #splash.show();

        account = AccountsManager.getCurrentAccount()

        print account

        if (account is None):
            Utilities.debug("Forced reg")
            return self.regFallback()
            #gui.forceRegistration();
            #self.app.exit();

        imsi = Utilities.getImsi()
        store = DataStore(imsi)

        if store.status == False:
            #or exit
            store.reset()

        gui = WAUI()
        #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml')
        #gui.setSource(url)
        gui.initConnections(store)

        self.app.focusChanged.connect(gui.focusChanged)
        gui.quit.connect(self.quit)

        gui.populateContacts()

        gui.showFullScreen()

        gui.initConnection()
        #splash.finish(gui);

        self.gui = gui

        self.gui.whatsapp.eventHandler.initialConnCheck()
コード例 #5
0
ファイル: wamanager.py プロジェクト: nivertech/wazapp
    def proceed(self):

        # url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/WASplash.qml')
        # gui.setSource(url)

        # check db_state

        # gui.initConnection();
        # pixmap = QPixmap("/opt/waxmppplugin/bin/wazapp/UI/pics/wasplash.png");
        # splash = QSplashScreen(pixmap);
        # splash.show();

        account = AccountsManager.getCurrentAccount()

        print account

        if account is None:
            Utilities.debug("Forced reg")
            return self.regFallback()
            # gui.forceRegistration();
            # self.app.exit();

        imsi = Utilities.getImsi()
        store = DataStore(imsi)

        if store.status == False:
            # or exit
            store.reset()

        gui = WAUI()
        # url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml')
        # gui.setSource(url)
        gui.initConnections(store)

        self.app.focusChanged.connect(gui.focusChanged)
        gui.quit.connect(self.quit)

        gui.populateContacts()

        gui.showFullScreen()

        gui.initConnection()
        # splash.finish(gui);

        self.gui = gui

        self.gui.whatsapp.eventHandler.initialConnCheck()
コード例 #6
0
ファイル: contacts.py プロジェクト: AbinashBishoyi/wazapp
	def __init__(self,store, contactsManager, mode,userid = None):
		WADebug.attach(self);
		self.store = store;
		self.mode = mode
		self.uid = userid;
		
		super(ContactsSyncer,self).__init__();
		
		acc = AccountsManager.getCurrentAccount();
		
		if not acc:
			self.contactsRefreshFail.emit()
			
		
		username = str(acc.username)
		password = acc.password
		
		self.contactsManager = contactsManager
			
		self.syncer = WAContactsSyncRequest(username, password, [])	
コード例 #7
0
ファイル: wamanager.py プロジェクト: cuckoohello/wazapp
	def proceed(self):
		account = AccountsManager.getCurrentAccount();
		self._d(account)
	
	
		if(account is None):
			#self.d("Forced reg");
			return self.regFallback()
			#gui.forceRegistration();
			#self.app.exit();
			
		imsi = Utilities.getImsi();
		store = DataStore(imsi);
		
		if store.status == False:
			#or exit
			store.reset();
			
		
		store.prepareGroupConversations();
		store.prepareMedia()
		store.updateDatabase()
		store.initModels()
		
		gui = WAUI(account.jid);
		gui.setAccountPushName(account.pushName)
		#url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml')
		#gui.setSource(url)
		gui.initConnections(store);
	
		self.app.focusChanged.connect(gui.focusChanged)
		gui.quit.connect(self.quit);

		#gui.populatePhoneContacts();
		
		
		print "SHOW FULL SCREEN"
		gui.showFullScreen();
		
		gui.onProcessEventsRequested()
		
				
		self.createDirs()
		
		
		self.processVersionTriggers()

		gui.populateContacts("ALL");
		
		gui.populateConversations();
		
		gui.populatePhoneContacts()
		
		gui.initializationDone = True
		gui.initialized.emit()
		
		
		print "INIT CONNECTION"
		gui.initConnection();
		#splash.finish(gui);
		gui.setMyAccount(account.jid);

		self.gui = gui;
		
		self.gui.whatsapp.eventHandler.setMyAccount(account.jid)
コード例 #8
0
ファイル: datastore.py プロジェクト: yashodhank/wazapp
 def __init__(self, current_id):
     self.user_id = current_id
     self.account = AccountsManager.getCurrentAccount()
コード例 #9
0
ファイル: datastore.py プロジェクト: AbinashBishoyi/wazapp
	def __init__(self,current_id):
		self.user_id = current_id;
		self.account = AccountsManager.getCurrentAccount();