How to use the scenario.ContactDeleteScenario function in scenario

To help you get started, we’ve selected a few scenario examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drf / amsn2 / pymsn / pymsn / service / AddressBook / address_book.py View on Github external
def delete_contact(self, contact):
        def callback():
            self.contacts.discard(contact)
            self.emit('contact-deleted', contact)
        dc = scenario.ContactDeleteScenario(self._ab,
                (callback,),
                (self.__common_errback,))
        dc.contact_guid = contact.id
        dc()
github emesene / emesene / emesene / e3 / papylib / papyon / papyon / service / AddressBook / address_book.py View on Github external
def delete_contact(self, contact, done_cb=None, failed_cb=None):
        def callback():
            self.__remove_contact(contact, Membership.FORWARD, done_cb)

        dc = scenario.ContactDeleteScenario(self._sharing,
                self._ab,
                (callback,),
                (self.__common_errback, failed_cb))
        dc.contact_guid = contact.id
        dc.account = contact.account
        dc.memberships = contact.memberships
        dc.network = contact.network_id
        dc()
github emesene / emesene / mesinyer / papyon / service / AddressBook / address_book.py View on Github external
def delete_contact(self, contact, done_cb=None, failed_cb=None):
        def callback():
            contact._remove_membership(Membership.FORWARD)
            self.__common_callback('contact-deleted', done_cb, contact)
            contact._reset()
            if contact.memberships == Membership.NONE:
                self.contacts.discard(contact)

        dc = scenario.ContactDeleteScenario(self._ab,
                (callback,),
                (self.__common_errback, failed_cb))
        dc.contact_guid = contact.id
        dc()
github Kjir / papyon / papyon / service / AddressBook / address_book.py View on Github external
def delete_contact(self, contact, done_cb=None, failed_cb=None):
        def callback():
            contact._remove_membership(Membership.FORWARD)
            contact._reset()
            self.__common_callback('contact-deleted', done_cb, contact)
            if contact.memberships == Membership.NONE:
                self.contacts.discard(contact)

        dc = scenario.ContactDeleteScenario(self._ab,
                (callback,),
                (self.__common_errback, failed_cb))
        dc.contact_guid = contact.id
        dc()