| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "dbus/message.h" | 5 #include "dbus/message.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 Response* Response::CreateEmpty() { | 398 Response* Response::CreateEmpty() { |
| 399 Response* response = new Response; | 399 Response* response = new Response; |
| 400 response->Init(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN)); | 400 response->Init(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN)); |
| 401 return response; | 401 return response; |
| 402 } | 402 } |
| 403 // | 403 // |
| 404 // ErrorResponse implementation. | 404 // ErrorResponse implementation. |
| 405 // | 405 // |
| 406 | 406 |
| 407 ErrorResponse::ErrorResponse() : Message() { | 407 ErrorResponse::ErrorResponse() : Response() { |
| 408 } | 408 } |
| 409 | 409 |
| 410 ErrorResponse* ErrorResponse::FromRawMessage(DBusMessage* raw_message) { | 410 ErrorResponse* ErrorResponse::FromRawMessage(DBusMessage* raw_message) { |
| 411 DCHECK_EQ(DBUS_MESSAGE_TYPE_ERROR, dbus_message_get_type(raw_message)); | 411 DCHECK_EQ(DBUS_MESSAGE_TYPE_ERROR, dbus_message_get_type(raw_message)); |
| 412 | 412 |
| 413 ErrorResponse* response = new ErrorResponse; | 413 ErrorResponse* response = new ErrorResponse; |
| 414 response->Init(raw_message); | 414 response->Init(raw_message); |
| 415 return response; | 415 return response; |
| 416 } | 416 } |
| 417 | 417 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 } | 930 } |
| 931 | 931 |
| 932 bool MessageReader::PopVariantOfBasic(int dbus_type, void* value) { | 932 bool MessageReader::PopVariantOfBasic(int dbus_type, void* value) { |
| 933 dbus::MessageReader variant_reader(message_); | 933 dbus::MessageReader variant_reader(message_); |
| 934 if (!PopVariant(&variant_reader)) | 934 if (!PopVariant(&variant_reader)) |
| 935 return false; | 935 return false; |
| 936 return variant_reader.PopBasic(dbus_type, value); | 936 return variant_reader.PopBasic(dbus_type, value); |
| 937 } | 937 } |
| 938 | 938 |
| 939 } // namespace dbus | 939 } // namespace dbus |
| OLD | NEW |