00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the 00007 * "License"); you may not use this file except in compliance 00008 * with the License. You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, 00013 * software distributed under the License is distributed on an 00014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 00015 * KIND, either express or implied. See the License for the 00016 * specific language governing permissions and limitations 00017 * under the License. 00018 */ 00019 00020 #ifndef _GUAC_SOCKET_FNTYPES_H 00021 #define _GUAC_SOCKET_FNTYPES_H 00022 00029 #include "socket-types.h" 00030 00031 #include <unistd.h> 00032 00043 typedef ssize_t guac_socket_read_handler(guac_socket* socket, 00044 void* buf, size_t count); 00045 00056 typedef ssize_t guac_socket_write_handler(guac_socket* socket, 00057 const void* buf, size_t count); 00058 00070 typedef int guac_socket_select_handler(guac_socket* socket, int usec_timeout); 00071 00083 typedef ssize_t guac_socket_flush_handler(guac_socket* socket); 00084 00093 typedef void guac_socket_lock_handler(guac_socket* socket); 00094 00103 typedef void guac_socket_unlock_handler(guac_socket* socket); 00104 00113 typedef int guac_socket_free_handler(guac_socket* socket); 00114 00115 #endif 00116