Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Side by Side Diff: chrome/browser/chromeos/contacts/contact.proto

Issue 10830052: chromeos: Use protocol buffers for Contact class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: store original untrusted photos Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 // Protocol buffer definitions for the user's contacts.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 package contacts;
12
13 // A contact, roughly based on the GData Contact kind:
14 // https://developers.google.com/gdata/docs/2.0/elements#gdContactKind
15 // All strings are UTF-8.
16 message Contact {
17 // Next ID to use: 15
18
19 // Provider-assigned unique identifier.
20 optional string provider_id = 1;
21
22 // Last time at which this contact was updated within the upstream provider.
23 optional int64 update_time = 2;
24
25 // Has the contact been deleted recently within the upstream provider?
26 optional bool deleted = 3 [default = false];
27
28 // Taken from https://developers.google.com/gdata/docs/2.0/elements#gdName.
29 optional string full_name = 4;
30 optional string given_name = 5;
31 optional string additional_name = 6;
32 optional string family_name = 7;
33 optional string name_prefix = 8;
34 optional string name_suffix = 9;
35
36 // Raw photo data as supplied by the provider. This data is untrusted and
37 // must be decoded within a sandbox by e.g. ImageDecoder before being used.
38 // Unset if no photo is available.
39 optional bytes raw_untrusted_photo = 10;
40
41 // Describes an address-like message's type.
42 message AddressType {
43 // Next ID to use: 3
44 enum Relation {
45 HOME = 0;
46 WORK = 1;
47 MOBILE = 2;
48 OTHER = 3;
49 }
50 optional Relation relation = 1 [default = OTHER];
51 optional string label = 2;
52 }
53
54 message EmailAddress {
55 // Next ID to use: 4
56 optional string address = 1;
57 optional AddressType type = 2;
58 optional bool primary = 3 [default = false];
59 }
60 repeated EmailAddress email_addresses = 11;
61
62 message PhoneNumber {
63 // Next ID to use: 4
64 optional string number = 1;
65 optional AddressType type = 2;
66 optional bool primary = 3 [default = false];
67 }
68 repeated PhoneNumber phone_numbers = 12;
69
70 message PostalAddress {
71 // Next ID to use: 4
72 optional string address = 1;
73 optional AddressType type = 2;
74 optional bool primary = 3 [default = false];
75 }
76 repeated PostalAddress postal_addresses = 13;
77
78 message InstantMessagingAddress {
79 // Next ID to use: 5
80 optional string address = 1;
81 // Taken from https://developers.google.com/gdata/docs/2.0/elements#gdIm.
82 enum Protocol {
83 AIM = 0;
84 MSN = 1;
85 YAHOO = 2;
86 SKYPE = 3;
87 QQ = 4;
88 GOOGLE_TALK = 5;
89 ICQ = 6;
90 JABBER = 7;
91 OTHER = 8;
92 }
93 optional Protocol protocol = 2 [default = OTHER];
94 optional AddressType type = 3;
95 optional bool primary = 4 [default = false];
96 }
97 repeated InstantMessagingAddress instant_messaging_addresses = 14;
98 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/contacts/contact.cc ('k') | chrome/browser/chromeos/contacts/contact_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698