/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts

« back to all changes in this revision

Viewing changes to src/am/ed/importcontacts/Backend.java

  • Committer: edam
  • Date: 2012-12-18 12:56:41 UTC
  • Revision ID: tim@ed.am-20121218125641-1w4o2nrwcry1ipiz
renamed homepage to webpage

Show diffs side-by-side

added added

removed removed

21
21
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 */
23
23
 
 
24
 
24
25
package am.ed.importcontacts;
25
26
 
26
27
import am.ed.importcontacts.Importer.ContactData;
27
28
 
 
29
 
28
30
public interface Backend
29
31
{
30
32
        /**
34
36
        public void populateCache( ContactsCache cache );
35
37
 
36
38
        /**
37
 
         * Delete a contact from the device.
 
39
         * Delete a contact
38
40
         * @param id of the contact to delete
39
41
         */
40
42
        public void deleteContact( Long id );
41
43
 
42
44
        /**
43
 
         * Add a contact to the device.
 
45
         * Add a contact
44
46
         * @param name name of the new contact
45
 
         * @return the new contact's id, or null on failure
 
47
         * @return the new contact's id, or 0 on failure
46
48
         */
47
49
        public Long addContact( String name );
48
50
 
49
51
        /**
50
 
         * Add a phone number to an existing contact on the device.
 
52
         * Add a phone number to an existing contact
51
53
         * @param id the existing contact's id
52
54
         * @param number the phone number
53
55
         * @param data data about the number
56
58
                ContactData.PreferredDetail data );
57
59
 
58
60
        /**
59
 
         * Add an email address to an existing contact on the device.
 
61
         * Add an email address to an existing contact
60
62
         * @param id the existing contact's id
61
63
         * @param email the email address
62
64
         * @param data data about the email address
65
67
                ContactData.PreferredDetail data );
66
68
 
67
69
        /**
68
 
         * Add an address to an existing contact on the device.
 
70
         * Add an address to an existing contact
69
71
         * @param id the existing contact's id
70
72
         * @param address the address
71
73
         * @param data data about the address
74
76
                ContactData.TypeDetail data );
75
77
 
76
78
        /**
77
 
         * Add a title and organisation to an existing contact on the device.
 
79
         * Add a title and organisation to an existing contact
78
80
         * @param id the existing contact's id
79
81
         * @param organisation the organisation
80
82
         * @param data data about the organisation