| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [DartPackage="mojo_services"] | |
| 6 module contacts; | |
| 7 | |
| 8 // A user contact. | |
| 9 struct Contact { | |
| 10 int64 id; | |
| 11 string name; | |
| 12 }; | |
| 13 | |
| 14 // Interface to query current user contacts. | |
| 15 interface ContactsService { | |
| 16 | |
| 17 // Returns the number of contacts that match the given |filter|. |filter| | |
| 18 // will be matched against the contact name without considering the case. A | |
| 19 // contact will match as soon as a part of the name match the filter. | |
| 20 GetCount(string? filter) => (uint64 count); | |
| 21 | |
| 22 // Returns an extract of the list of contacts matching |filter|. |filter| | |
| 23 // will be matched against the contact name without considering the case. A | |
| 24 // contact will match as soon as a part of the name match the filter. | |
| 25 // Contacts are ordered by |name|. The |offset| first contacts are skipped | |
| 26 // and at most |limit| contacts are returned. | |
| 27 Get(string? filter, uint32 offset, uint32 limit) => (array<Contact> contacts); | |
| 28 | |
| 29 // Returns the emails associated with the contact with the given |id|. | |
| 30 GetEmails(int64 id) => (array<string> emails); | |
| 31 | |
| 32 // Returns an url of the photo for the contact with the given |id|. If | |
| 33 // |high_resolution| is true, a high resolution photo is returned, otherwise | |
| 34 // a thumbnail is returned. | |
| 35 GetPhoto(int64 id, bool high_resolution) => (string? photo_url); | |
| 36 }; | |
| OLD | NEW |