freenect_network.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OpenKinect Project. http://www.openkinect.org
3  *
4  * Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file
5  * for details.
6  *
7  * This code is licensed to you under the terms of the Apache License, version
8  * 2.0, or, at your option, the terms of the GNU General Public License,
9  * version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
10  * or the following URLs:
11  * http://www.apache.org/licenses/LICENSE-2.0
12  * http://www.gnu.org/licenses/gpl-2.0.txt
13  *
14  * If you redistribute this file in source form, modified or unmodified, you
15  * may:
16  * 1) Leave this header intact and distribute it under the same terms,
17  * accompanying it with the APACHE20 and GPL20 files, or
18  * 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
19  * 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
20  * In all cases you must keep the copyright notice intact and include a copy
21  * of the CONTRIB file.
22  *
23  * Binary distributions must follow the binary distribution requirements of
24  * either License.
25  */
26 
27 #pragma once
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <stdio.h>
34 #include <stdlib.h>
35 #ifndef _WIN32
36  #include <unistd.h>
37  #include <arpa/inet.h>
38 #else
39  #include <winsock2.h>
40  #include <ws2tcpip.h>
41  #pragma comment(lib, "Ws2_32.lib")
42  #include <stdint.h>
43  #include <windows.h>
44 #endif
45 #include <string.h>
46 #include <signal.h>
47 #include <math.h>
48 
49  typedef void (*callback)(void);
52  void freenect_network_read(char *buff, int *len);
53  int freenect_network_sendMessage(int first, int second, unsigned char *data, int len);
54  void freenect_network_wait();
55  #ifdef _WIN32
56  int freenect_network_initSocket(struct addrinfo si_type, PCSTR conf_port, SOCKET *the_socket);
57  #else
58  int freenect_network_initSocket(struct sockaddr_in si_type, int conf_port, int *the_socket);
59  #endif
60 
61 #ifdef __cplusplus
62 }
63 #endif
int freenect_network_init(callback cb)
void freenect_network_wait()
int freenect_network_sendMessage(int first, int second, unsigned char *data, int len)
void(* callback)(void)
int freenect_network_initSocket(struct sockaddr_in si_type, int conf_port, int *the_socket)
typedef void(ONI_CALLBACK_TYPE *DeviceConnectedCallback)(const OniDeviceInfo *
void freenect_network_read(char *buff, int *len)
void freenect_network_close()


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38