00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 * Thanks: Jose Renato Santos 00017 * 00018 */ 00019 00020 #ifndef __RIOTCPTYPES_H_ 00021 #define __RIOTCPTYPES_H_ 00022 00023 const unsigned short RioTCPport = 5300; 00024 const unsigned short RioTCPportPL = 5301; 00025 00026 /* TCP commands */ 00027 /* Start a TCP connection */ 00028 const unsigned int RioTCPCommandConnect = 1; 00029 /* Accept a TCP connection or a disconnection */ 00030 const unsigned int RioTCPCommandAccept = 2; 00031 /* Reject a TCP connection */ 00032 const unsigned int RioTCPCommandReject = 3; 00033 /* Method call */ 00034 const unsigned int RioTCPCommandCall = 4; 00035 /* Method return (with result) */ 00036 const unsigned int RioTCPCommandCallError = 5; 00037 /* Method return (with result) */ 00038 const unsigned int RioTCPCommandResult = 6; 00039 /* Finish a TCP connection */ 00040 const unsigned int RioTCPCommandDisconnect = 7; 00041 /* TCP tag: All message should have this tag */ 00042 const unsigned int RioTCPTag = 0x37214709; 00043 00044 /* TCP version : Interface version 0.6.14 */ 00045 /* convention <ver>.<subver>.<subsubver> */ 00046 /* <ver>: 16 bits */ 00047 /* <subver>: 8 bits */ 00048 /* <subsubver>: 8bits */ 00049 const unsigned int RioTCPVersion = 0x00060e00; 00050 /* Modes of Interface: Server or Client */ 00051 const int ModeInvalid = 0; 00052 const int ModeClient = 1; 00053 const int ModeServer = 2; 00054 const int ModeServerMaster = 3; 00055 00056 #endif //__RIOTCPTYPES_H_