Exemplo n.º 1
0
    def new_item (self, item):
        """Add the specified item to the folder."""

        if item.__class__.__name__ == 'GCContact':
            con = item
        else:
            con = GCContact(self, con=item)

        eid = con.save()
        return eid
Exemplo n.º 2
0
    def new_item(self, item):
        """Add the specified item to the folder."""

        if item.__class__.__name__ == 'GCContact':
            con = item
        else:
            con = GCContact(self, con=item)

        eid = con.save()
        return eid
Exemplo n.º 3
0
    def test_create_contact(self, f=None):
        if not f:
            f = self.gout

        c = GCContact(f)
        c.set_name("ScrewBall Joseph")

        cid = c.save()
        if cid:
            print "Successfully added contact. ID: ", cid
        else:
            print "D" "oh. Failed."
Exemplo n.º 4
0
    def test_create_contact(self, f=None):
        if not f:
            f = self.gout

        c = GCContact(f)
        c.set_name("ScrewBall Joseph")

        cid = c.save()
        if cid:
            print 'Successfully added contact. ID: ', cid
        else:
            print 'D' 'oh. Failed.'
Exemplo n.º 5
0
def create_gc_contact (asynk, uinps):
    gc     = asynk.get_db('gc')
    gcfid  = uinps.gcfid
    gcf, t = gc.find_folder(gcfid)

    con = GCContact(gcf)
    con.set_name('Sri Venkata Sri Rama Subramanya Anjeneya Annapurna Sharma')
    con.set_prefix('Mr.')
    con.set_nickname('Karra')
    #    con.set_gender('Male')
    con.add_phone_mob(('Mobile', '+91 90084 88997'))
    con.add_notes('And so it goes...')

    # FIXME: We should do a more exhaustive sort of contact, with multiple
    # entries of each type of possible entry and so on...

    return con.save()
Exemplo n.º 6
0
def create_gc_contact (asynk, uinps):
    gc     = asynk.get_db('gc')
    gcfid  = uinps.gcfid
    gcf, t = gc.find_folder(gcfid)

    con = GCContact(gcf)
    con.set_name('Sri Venkata Sri Rama Subramanya Anjeneya Annapurna Sharma')
    con.set_prefix('Mr.')
    con.set_nickname('Karra')
    #    con.set_gender('Male')
    con.add_phone_mob(('Mobile', '+91 90084 88997'))
    con.add_notes('And so it goes...')

    # FIXME: We should do a more exhaustive sort of contact, with multiple
    # entries of each type of possible entry and so on...

    return con.save()