~people-project/people-core/deep-refactoring

« back to all changes in this revision

Viewing changes to backends/google/contact.vala

  • Committer: Ali Sabil
  • Date: 2009-01-16 23:35:15 UTC
  • Revision ID: ali.sabil@gmail.com-20090116233515-zj6e2qu8vujms7yl
- Updated the Google backend

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                        var operation = pending_operations.get (msg);
74
74
 
75
75
                        if (msg.status_code != KnownStatusCode.OK) {
76
 
                                async_operation_error (operation,
77
 
                                                new Backend.ContactSourceError.INTERNAL_ERROR ("User does not exist"));
 
76
                                async_operation_error (operation, new Backend.Error.INTERNAL_ERROR ("User does not exist"));
78
77
                                pending_operations.remove (msg);
79
78
                                return;
80
79
                        }
110
109
                        pending_requests_fields.remove (msg);
111
110
 
112
111
                        if (msg.status_code != KnownStatusCode.OK) {
113
 
                                async_operation_error (operation,
114
 
                                                new Backend.ContactSourceError.INTERNAL_ERROR ("User does not exist"));
 
112
                                async_operation_error (operation, new Backend.Error.INTERNAL_ERROR ("User does not exist"));
115
113
                                pending_operations.remove (msg);
116
114
                                return;
117
115
                        }
121
119
                                                (ulong) msg.response_body.data.size);
122
120
 
123
121
                        var defined_fields = extract_fields (parser);
124
 
                        var result = new Gee.HashMap<string, string> (str_hash, str_equal, str_equal);
 
122
                        var fields = new Gee.HashMap<string, string> (str_hash, str_equal, str_equal);
125
123
                        foreach (string field_name in requested_fields) {
126
124
                                if (defined_fields.contains (field_name)) {
127
 
                                        result.set (field_name, defined_fields.get (field_name));
 
125
                                        fields.set (field_name, defined_fields.get (field_name));
128
126
                                }
129
127
                        }
130
 
                        async_operation_emit (operation, result);
 
128
                        async_operation_emit (operation, fields);
131
129
                }
132
130
 
133
131
                public override AsyncOperation<ContactFieldSpec> get_field_spec (string field_name) {