/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 13:00:43 UTC
  • Revision ID: tim@ed.am-20121218130043-4zhj1cdeaqko3c4b
cleanup; fixed some typos; updated TODO

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