csocket.h
Go to the documentation of this file.
00001 #ifndef __CSOCKET
00002 #define __CSOCKET
00003 
00004 #include "cphidget.h"
00005 #include "cphidgetmanager.h"
00006 #include "cphidgetdictionary.h"
00007 
00008 #ifndef EXTERNALPROTO
00009 
00010 #include "cphidgetsbc.h"
00011 
00012 extern CThread_mutex_t serverLock;
00013 extern CThread_mutex_t zeroconfPhidgetsLock;
00014 extern CPhidgetListHandle zeroconfPhidgets;
00015 extern CPhidgetRemoteListHandle zeroconfServers;
00016 extern CPhidgetListHandle zeroconfPhidgets;
00017 extern CPhidgetSBCListHandle zeroconfSBCs;
00018 extern CThread_mutex_t zeroconfServersLock;
00019 extern CThread_mutex_t zeroconfPhidgetsLock;
00020 extern CThread_mutex_t zeroconfSBCsLock;
00021 extern CPhidgetListHandle activeRemotePhidgets;
00022 extern CPhidgetManagerListHandle activeRemoteManagers;
00023 extern CPhidgetDictionaryListHandle activeRemoteDictionaries;
00024 extern CPhidgetSBCManagerListHandle activeSBCManagers;
00025 extern CThread_mutex_t activeRemotePhidgetsLock;
00026 extern CThread_mutex_t activeRemoteManagersLock;
00027 extern CThread_mutex_t activeRemoteDictionariesLock;
00028 extern CThread_mutex_t activeSBCManagersLock;
00029 extern CThread_mutex_t zeroconfInitLock;
00030 
00031 void internal_async_network_error_handler(const char *error, void *phid);
00032 int unregisterRemotePhidget(CPhidgetHandle phid);
00033 int unregisterRemoteDictionary(CPhidgetDictionaryHandle dict);
00034 int unregisterRemoteManager(CPhidgetManagerHandle phidm);
00035 int unregisterSBCManager(CPhidgetSBCManagerHandle sbcm);
00036 CThread_func_return_t DisconnectPhidgetThreadFunction(CThread_func_arg_t lpdwParam);
00037 int getZeroconfHostPort(CPhidgetRemoteHandle networkInfo);
00038 int refreshZeroconfPhidget(CPhidgetHandle phid);
00039 int refreshZeroconfSBC(CPhidgetSBCHandle sbc);
00040 int CCONV CPhidgetRemote_areEqual(void *arg1, void *arg2);
00041 void CCONV CPhidgetRemote_free(void *arg);
00042 int CCONV CPhidgetRemote_create(CPhidgetRemoteHandle *arg);
00043 
00044 PHIDGET21_API void CCONV CPhidgetSocketClient_free(void *arg);
00045 PHIDGET21_API int CCONV CPhidgetSocketClient_areEqual(void *arg1, void *arg2);
00046 PHIDGET21_API int CCONV CPhidgetSocketClient_create(CPhidgetSocketClientHandle *arg);
00047 
00048 #define SET_RUNNING_EVENT(phid) \
00049         CThread_mutex_lock(&phid->lock); \
00050         if(phid->networkInfo && phid->networkInfo->server) \
00051                 phid->networkInfo->server->runningEvent = PTRUE; \
00052         CThread_mutex_unlock(&phid->lock);
00053 
00054 #define CLEAR_RUNNING_EVENT(phid) \
00055         CThread_mutex_lock(&phid->lock); \
00056         if(phid->networkInfo && phid->networkInfo->server) \
00057         { \
00058                 setTimeNow(&phid->networkInfo->server->lastHeartbeatTime); \
00059                 phid->networkInfo->server->runningEvent = PFALSE; \
00060         } \
00061         CThread_mutex_unlock(&phid->lock);
00062 
00063 #endif
00064 
00075 PHIDGET21_API int CCONV CPhidget_openRemote(CPhidgetHandle phid, int serial, const char *serverID, const char *password);
00083 PHIDGET21_API int CCONV CPhidget_openLabelRemote(CPhidgetHandle phid, const char *label, const char *serverID, const char *password);
00092 PHIDGET21_API int CCONV CPhidget_openRemoteIP(CPhidgetHandle phid, int serial, const char *address, int port, const char *password);
00101 PHIDGET21_API int CCONV CPhidget_openLabelRemoteIP(CPhidgetHandle phid, const char *label, const char *address, int port, const char *password);
00113 PHIDGET21_API int CCONV CPhidgetManager_openRemote(CPhidgetManagerHandle phidm, const char *serverID, const char *password);
00121 PHIDGET21_API int CCONV CPhidgetManager_openRemoteIP(CPhidgetManagerHandle phidm, const char *address, int port, const char *password);
00133 PHIDGET21_API int CCONV CPhidgetDictionary_openRemote(CPhidgetDictionaryHandle dict, const char *serverID, const char *password);
00141 PHIDGET21_API int CCONV CPhidgetDictionary_openRemoteIP(CPhidgetDictionaryHandle dict, const char *address, int port, const char *password);
00144 #endif


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:21