OpenSdkEndpointInfo.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of openSDK.
00003  *
00004  * Copyright (C) 2006-2007 openSDK team
00005  *
00006  * openSDK is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; version 2.
00009  *
00010  * openSDK is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with openSDK; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  *
00019  *     $Id: OpenSdkEndpointInfo.h,v 1.10 2007/04/22 14:34:17 nuno-lopes Exp $
00020  */
00021 
00022 #ifndef __OpenSdkEndpointInfo_h__
00023 #define __OpenSdkEndpointInfo_h__
00024 
00025 #include <OPENR/OPENR.h>
00026 #include <ant.h>
00027 #include <IPAddress.h>
00028 #include <DNSEndpointMsg.h>
00029 #include <pthread.h>
00030 
00031 #define NO_SOCKET -1
00032 
00033 
00034 class OpenSdkEndpointInfo
00035 {
00036 
00037 public:
00038 
00039         OpenSdkEndpointInfo();
00040         OpenSdkEndpointInfo(OpenSdkEndpointInfo&);
00041         ~OpenSdkEndpointInfo();
00042 
00043         enum State {
00044                 NEW,
00045                 LISTENING,
00046                 CONNECTING,
00047                 BINDING,
00048                 ACTIVE,
00049                 CLOSED
00050         } state;
00051 
00052         antEnvMsg *msg;
00053         OServiceEntry entry;
00054 
00055         int server_socket;
00056         int socket;
00057 
00058         void *buffer;
00059         size_t size;
00060 
00061         // connect stuff
00062         short port;
00063         IPAddress ip;
00064 
00065         // listen
00066         pthread_mutex_t *listen_mutex;
00067 
00068         // dns name resolving
00069         char *hostname;
00070 
00071 };
00072 
00073 #endif

Generated on Sun Dec 2 23:04:30 2007 for openSDK by  doxygen 1.3.9.1