1951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen/* 2951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * Copyright (C) 2012 The Android Open Source Project 3951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * 4951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * Licensed under the Apache License, Version 2.0 (the "License"); 5951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * you may not use this file except in compliance with the License. 6951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * You may obtain a copy of the License at 7951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * 8951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * http://www.apache.org/licenses/LICENSE-2.0 9951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * 10951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * Unless required by applicable law or agreed to in writing, software 11951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * distributed under the License is distributed on an "AS IS" BASIS, 12951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * See the License for the specific language governing permissions and 14951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen * limitations under the License. 15951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen */ 16951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 17951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#ifndef ANDROID_LIBCOMMONCLOCK_UTILS_H 18951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#define ANDROID_LIBCOMMONCLOCK_UTILS_H 19951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 20951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#include <linux/socket.h> 21951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 22951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#include <binder/Parcel.h> 23951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#include <utils/Errors.h> 24951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 25951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chennamespace android { 26951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 27951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chenextern bool canSerializeSockaddr(const struct sockaddr_storage* addr); 28951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chenextern void serializeSockaddr(Parcel* p, const struct sockaddr_storage* addr); 29951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chenextern status_t deserializeSockaddr(const Parcel* p, 30951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen struct sockaddr_storage* addr); 31951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 32951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen}; // namespace android 33951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen 34951bd8d1ad9581a414e171ad8605a9515d0ad667Mike J. Chen#endif // ANDROID_LIBCOMMONCLOCK_UTILS_H 35