/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-19 17:41:04 UTC
  • Revision ID: tim@ed.am-20121219174104-ly9xyjxdhqt0tu9b
ignore temporary files in eclipse project

Show diffs side-by-side

added added

removed removed

39
39
         */
40
40
        public void deleteContact( Long id );
41
41
 
42
 
        @SuppressWarnings("serial")
43
 
        public class ContactCreationException extends Exception { };
44
 
 
45
42
        /**
46
43
         * Add a contact to the device.
47
 
         * @param name name of the new contact, or null if there isn't one
48
 
         * @return the new contact's id
49
 
         * @throws ContactCreationException
 
44
         * @param name name of the new contact
 
45
         * @return the new contact's id, or null on failure
50
46
         */
51
 
        public Long addContact( String name ) throws ContactCreationException;
 
47
        public Long addContact( String name );
52
48
 
53
49
        /**
54
50
         * Add a phone number to an existing contact on the device.
55
51
         * @param id the existing contact's id
56
52
         * @param number the phone number
57
53
         * @param data data about the number
58
 
         * @throws ContactCreationException
59
54
         */
60
55
        public void addContactPhone( Long id, String number,
61
 
                ContactData.PreferredDetail data ) throws ContactCreationException;
 
56
                ContactData.PreferredDetail data );
62
57
 
63
58
        /**
64
59
         * Add an email address to an existing contact on the device.
65
60
         * @param id the existing contact's id
66
61
         * @param email the email address
67
62
         * @param data data about the email address
68
 
         * @throws ContactCreationException
69
63
         */
70
64
        public void addContactEmail( Long id, String email,
71
 
                ContactData.PreferredDetail data ) throws ContactCreationException;
 
65
                ContactData.PreferredDetail data );
72
66
 
73
67
        /**
74
68
         * Add an address to an existing contact on the device.
75
69
         * @param id the existing contact's id
76
70
         * @param address the address
77
71
         * @param data data about the address
78
 
         * @throws ContactCreationException
79
72
         */
80
73
        public void addContactAddresses( Long id, String address,
81
 
                ContactData.TypeDetail data ) throws ContactCreationException;
 
74
                ContactData.TypeDetail data );
82
75
 
83
76
        /**
84
77
         * Add a title and organisation to an existing contact on the device.
85
78
         * @param id the existing contact's id
86
79
         * @param organisation the organisation
87
80
         * @param data data about the organisation
88
 
         * @throws ContactCreationException
89
81
         */
90
82
        public void addContactOrganisation( Long id, String organisation,
91
 
                ContactData.ExtraDetail data ) throws ContactCreationException;
92
 
 
93
 
        /**
94
 
         * Add a note to an existing contact on the device.
95
 
         * @param id the existing contact's id
96
 
         * @param note the note
97
 
         * @throws ContactCreationException
98
 
         */
99
 
        public void addContactNote( Long id, String note )
100
 
                throws ContactCreationException;
101
 
 
 
83
                ContactData.ExtraDetail data );
102
84
}