jautolock.h   jautolock.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_AUTO_LOCK_H #ifndef J_AUTOLOCK_H
#define J_AUTO_LOCK_H #define J_AUTOLOCK_H
#include "jmutex.h" #include "jmutex.h"
#include "jobject.h" #include "jobject.h"
namespace jthread{ namespace jthread{
/** /**
* \brief AutoLock helps in use of mutexes. * \brief AutoLock helps in use of mutexes.
* *
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jbufferexception.h   jbufferexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_BUFFER_EXCEPTION_H #ifndef J_BUFFEREXCEPTION_H
#define J_BUFFER_EXCEPTION_H #define J_BUFFEREXCEPTION_H
#include "jobject.h" #include "jobject.h"
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jthread{ namespace jthread{
/** /**
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jcalendardialogbox.h   jcalendardialogbox.h 
skipping to change at line 61 skipping to change at line 61
int red; int red;
int green; int green;
int blue; int blue;
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class CalendarDialogBox : public jgui::Frame, public jgui::ButtonListener, public jgui::SelectListener, public FrameInputListener{ class CalendarDialogBox : public jgui::Frame, public jgui::ButtonListener, public jgui::SelectListener{
private: private:
jthread::Mutex _cal_mutex; jthread::Mutex _cal_mutex;
std::vector<CalendarListener *> _calendar_listeners; std::vector<CalendarListener *> _calendar_listeners;
std::vector<jcalendar_warnning_t> _warnning_days; std::vector<jcalendar_warnning_t> _warnning_days;
std::vector<Button *> _buttons; std::vector<Button *> _buttons;
Label *ldom, Label *ldom,
*lseg, *lseg,
skipping to change at line 190 skipping to change at line 190
/** /**
* \brief * \brief
* *
*/ */
virtual void ItemChanged(SelectEvent *event); virtual void ItemChanged(SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void InputChanged(jgui::KeyEvent *event); virtual void InputReceived(jgui::KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void RegisterCalendarListener(CalendarListener *list ener); virtual void RegisterCalendarListener(CalendarListener *list ener);
/** /**
* \brief * \brief
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jcomponent.h   jcomponent.h 
skipping to change at line 191 skipping to change at line 191
/** /**
* \brief * \brief
* *
*/ */
virtual Container * GetParent(); virtual Container * GetParent();
/** /**
* \brief * \brief
* *
*/ */
virtual Container * GetTopLevelAncestor();
/**
* \brief
*
*/
virtual int GetBaseline(int width, int height); virtual int GetBaseline(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual jcomponent_behavior_t GetBaselineResizeBehavior(); virtual jcomponent_behavior_t GetBaselineResizeBehavior();
/** /**
* \brief * \brief
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 jconnection.h   jconnection.h 
skipping to change at line 38 skipping to change at line 38
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#include <winsock.h> #include <winsock.h>
#else #else
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
namespace jsocket { namespace jsocket {
#ifdef _WIN32
typedef SOCKET jsocket_t;
#else
typedef int jsocket_t;
#endif
/** /**
* \brief * \brief
* *
*/ */
enum jconnection_type_t { enum jconnection_type_t {
TCP_SOCKET, TCP_SOCKET,
UDP_SOCKET, UDP_SOCKET,
MCAST_SOCKET, MCAST_SOCKET,
RTP_SOCKET, RTP_SOCKET,
RAW_SOCKET, RAW_SOCKET,
skipping to change at line 65 skipping to change at line 71
*/ */
class Connection : public virtual jcommon::Object{ class Connection : public virtual jcommon::Object{
friend class DatagramSocket; friend class DatagramSocket;
friend class Socket; friend class Socket;
friend class RTPSocket; friend class RTPSocket;
friend class MulticastSocket; friend class MulticastSocket;
friend class RawSocket; friend class RawSocket;
protected: protected:
/** \brief */ /** \brief */
jconnection_type_t _type; jconnection_type_t _type;
/** \brief */ /** \brief */
bool _is_closed; bool _is_closed;
/** /**
* \brief * \brief
* *
*/ */
Connection(jconnection_type_t type); Connection(jconnection_type_t type);
public: public:
/** /**
* \brief * \brief
* *
*/ */
virtual jconnection_type_t GetType(); virtual jconnection_type_t GetType();
/** /**
* \brief Send bytes to a destination. * \brief Send bytes to a destination.
* *
*/ */
virtual bool IsClosed(); virtual int Send(const char *b_, int size_, bool block_ = tr
ue) = 0;
/** /**
* \brief Send bytes to a destination. * \brief Send bytes to a destination.
* *
*/ */
virtual int Send(const char *b_, int size_, bool block_ = true) = 0; virtual int Send(const char *b_, int size_, int time_) = 0;
/** /**
* \brief Send bytes to a destination. * \brief Receive bytes from a source.
* *
*/ * \return the number of bytes received, or 0 if the peer ha
virtual int Send(const char *b_, int size_, int time_) = 0; s shutdown.
*
* \exception SocketException an error occurred.
*
*/
virtual int Receive(char *data_, int data_length_, bool bloc
k_ = true) = 0;
/** /**
* \brief Receive bytes from a source. * \brief Receive bytes from a source.
* *
* \return the number of bytes received, or 0 if the peer has shutdo * \return the number of bytes received, or 0 if the peer ha
wn. s shutdown.
* *
* \exception SocketException an error occurred. * \exception SocketException an error occurred.
* *
*/ */
virtual int Receive(char *data_, int data_length_, bool block_ = tru virtual int Receive(char *data_, int data_length_, int time_
e) = 0; ) = 0;
/** /**
* \brief Receive bytes from a source. * \brief
* *
* \return the number of bytes received, or 0 if the peer has shutdo */
wn. virtual bool IsClosed();
*
* \exception SocketException an error occurred.
*
*/
virtual int Receive(char *data_, int data_length_, int time_) = 0;
/** /**
* \brief Close the socket. * \brief Close the socket.
* *
*/ */
virtual void Close() = 0; virtual void Close() = 0;
/** /**
* \brief * \brief
* *
*/ */
#ifdef _WIN32 virtual jsocket_t GetHandler() = 0;
virtual SOCKET GetHandler() = 0;
#else
virtual int GetHandler() = 0;
#endif
/** /**
* \brief * \brief
* *
*/ */
virtual jio::InputStream * GetInputStream() = 0; virtual jio::InputStream * GetInputStream() = 0;
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream() = 0; virtual jio::OutputStream * GetOutputStream() = 0;
/** /**
* \brief Get the bytes sent to a destination. * \brief Get the bytes sent to a destination.
* *
*/ */
virtual int64_t GetSentBytes() = 0; virtual int64_t GetSentBytes() = 0;
/** /**
* \brief Get de bytes received from a source. * \brief Get de bytes received from a source.
* *
*/ */
virtual int64_t GetReadedBytes() = 0; virtual int64_t GetReadedBytes() = 0;
}; };
} }
#endif #endif
 End of changes. 15 change blocks. 
84 lines changed or deleted 88 lines changed or added


 jconnectionpipe.h   jconnectionpipe.h 
skipping to change at line 57 skipping to change at line 57
SENDER_PIPE SENDER_PIPE
}; };
/** /**
* \brief ConnectionPipe. * \brief ConnectionPipe.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ConnectionPipe : public jsocket::Connection, public jthread::Thread{ class ConnectionPipe : public jsocket::Connection, public jthread::Thread{
private: private:
/** \brief Use to bind the socket in a free port. */ /** \brief Use to bind the socket in a free port. */
static int _used_port; static int _used_port;
#ifdef _WIN32 #ifdef _WIN32
/** \brief */ /** \brief */
HANDLE *_pipe; HANDLE *_pipe;
/** \brief */ /** \brief */
HANDLE _thread; HANDLE _thread;
/** \brief */ /** \brief */
DWORD _thread_id; DWORD _thread_id;
/** \brief */ /** \brief */
DWORD _stackSize; DWORD _stackSize;
/** \brief */ /** \brief */
DWORD _executeFlag; DWORD _executeFlag;
/** \brief */ /** \brief */
LPTHREAD_START_ROUTINE _threadFunction; LPTHREAD_START_ROUTINE _threadFunction;
/** \brief */ /** \brief */
LPVOID _threadArgument; LPVOID _threadArgument;
/** \brief */ /** \brief */
LPSECURITY_ATTRIBUTES _sa; LPSECURITY_ATTRIBUTES _sa;
#else #else
/** \brief */ /** \brief */
int _pipe[2]; int _pipe[2];
/** \brief */ /** \brief */
pthread_t _thread; pthread_t _thread;
#endif #endif
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
bool _stream; bool _stream;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** \brief */ /** \brief */
jconnection_pipe_t _pipe_type;
/** \brief */
bool _is_running; bool _is_running;
/** \brief */ /** \brief */
int _current_send; int _current_send;
/** \brief */ /** \brief */
int _sent_bytes; int _sent_bytes;
/** \brief */ /** \brief */
int _receive_bytes; int _receive_bytes;
/** \brief */ /** \brief */
int _size_pipe; int _size_pipe;
/** \brief */
jconnection_pipe_t _pipe_type;
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void main_pipe_receiver(); void main_pipe_receiver();
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void main_pipe_sender(); void main_pipe_sender();
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
ConnectionPipe(Connection *conn, jconnection_pipe_t type_, int size ConnectionPipe(Connection *conn, jconnection_pipe_t type_, i
_pipe_ = 4096, int timeout_ = 0, bool stream_ = false); nt size_pipe_ = 4096, int timeout_ = 0, bool stream_ = false);
/** /**
* \brief Destructor virtual. * \brief Destructor virtual.
* *
*/ */
virtual ~ConnectionPipe(); virtual ~ConnectionPipe();
/** /**
* \brief * \brief
* *
*/ */
bool IsRunning(); bool IsRunning();
/** /**
* \brief Read data from a source. * \brief Read data from a source.
* *
*/ */
int Receive(char *data_, int size_, bool block_ = true); int Receive(char *data_, int size_, bool block_ = true);
/** /**
* \brief Read data from a source. * \brief Read data from a source.
* *
*/ */
int Receive(char *data_, int size_, int time_); int Receive(char *data_, int size_, int time_);
/** /**
* \brief Write data to a source. * \brief Write data to a source.
* *
*/ */
int Send(const char *data_, int size_, bool block_ = true); int Send(const char *data_, int size_, bool block_ = true);
/** /**
* \brief Write data to a source. * \brief Write data to a source.
* *
*/ */
int Send(const char *data_, int size_, int time_); int Send(const char *data_, int size_, int time_);
/** /**
* \brief Close the socket. The pipe would be interrupted before clo * \brief Close the socket. The pipe would be interrupted be
sed. fore closed.
* *
*/ */
void Close(); void Close();
/** /**
* \brief * \brief
* *
*/ */
#ifdef _WIN32 virtual jsocket_t GetHandler();
virtual SOCKET GetHandler();
#else
virtual int GetHandler();
#endif
/** /**
* \brief * \brief
* *
*/ */
virtual jio::InputStream * GetInputStream(); virtual jio::InputStream * GetInputStream();
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream(); virtual jio::OutputStream * GetOutputStream();
/** /**
* \brief Get sent bytes to destination. * \brief Get sent bytes to destination.
* *
*/ */
int64_t GetSentBytes(); int64_t GetSentBytes();
/** /**
* \brief Get received bytes from a source. * \brief Get received bytes from a source.
* *
*/ */
int64_t GetReadedBytes(); int64_t GetReadedBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Run();
}; };
} }
 End of changes. 34 change blocks. 
93 lines changed or deleted 89 lines changed or added


 jcontainer.h   jcontainer.h 
skipping to change at line 105 skipping to change at line 105
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetWorkingScreenSize(); virtual jsize_t GetWorkingScreenSize();
/** /**
* \brief * \brief
* *
*/ */
virtual Container * GetParent();
/**
* \brief
*
*/
virtual void SetLayout(jgui::Layout *layout); virtual void SetLayout(jgui::Layout *layout);
/** /**
* \brief * \brief
* *
*/ */
virtual jgui::Layout * GetLayout(); virtual jgui::Layout * GetLayout();
/** /**
* \brief * \brief
skipping to change at line 255 skipping to change at line 249
/** /**
* \brief * \brief
* *
*/ */
virtual void Repaint(int x, int y, int width, int height); virtual void Repaint(int x, int y, int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual void Repaint(Component *c, int x, int y, int width, int height); virtual void Repaint(Component *c);
/** /**
* \brief * \brief
* *
*/ */
virtual Component * GetTargetComponent(Container *target, in t x, int y, int *dx = NULL, int *dy = NULL); virtual Component * GetTargetComponent(Container *target, in t x, int y, int *dx = NULL, int *dy = NULL);
/** /**
* \brief * \brief
* *
 End of changes. 2 change blocks. 
7 lines changed or deleted 1 lines changed or added


 jdatagramsocket.h   jdatagramsocket.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_DATAGRAM_SOCKET_H #ifndef J_DATAGRAMSOCKET_H
#define J_DATAGRAM_SOCKET_H #define J_DATAGRAMSOCKET_H
#include "jinetaddress.h" #include "jinetaddress.h"
#include "jsocketoption.h" #include "jsocketoption.h"
#include "jsocketinputstream.h" #include "jsocketinputstream.h"
#include "jsocketoutputstream.h" #include "jsocketoutputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
skipping to change at line 54 skipping to change at line 54
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class DatagramSocket : public jsocket::Connection{ class DatagramSocket : public jsocket::Connection{
private: private:
/** \brief Use to bind the socket in a free port. */ /** \brief Use to bind the socket in a free port. */
static int _used_port; static int _used_port;
/** \brief Socket handler. */ /** \brief Socket handler. */
#ifdef _WIN32 jsocket_t _fd;
SOCKET _fd;
#else
int _fd;
#endif
/** \brief Local socket. */ /** \brief Local socket. */
sockaddr_in _lsock; struct sockaddr_in _lsock;
/** \brief Server socket UDP. */ /** \brief Server socket UDP. */
sockaddr_in _server_sock; struct sockaddr_in _server_sock;
/** \brief Local inetaddress. */ /** \brief Local inetaddress. */
InetAddress *_local; InetAddress *_local;
/** \brief Remote inetaddress. */ /** \brief Remote inetaddress. */
InetAddress *_address; InetAddress *_address;
/** \brief Input stream. */ /** \brief Input stream. */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief Output stream. */ /** \brief Output stream. */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
int64_t _sent_bytes; int64_t _sent_bytes;
skipping to change at line 123 skipping to change at line 119
* *
*/ */
DatagramSocket(int port_, bool stream_ = false, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); DatagramSocket(int port_, bool stream_ = false, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
/** /**
* \brief Destructor virtual. * \brief Destructor virtual.
* *
*/ */
virtual ~DatagramSocket(); virtual ~DatagramSocket();
#ifdef _WIN32 /**
virtual SOCKET GetHandler(); * \brief
#else *
virtual int GetHandler(); */
#endif virtual jsocket_t GetHandler();
/** /**
* \brief * \brief
* *
*/ */
virtual jio::InputStream * GetInputStream(); virtual jio::InputStream * GetInputStream();
/** /**
* \brief * \brief
* *
skipping to change at line 172 skipping to change at line 168
*/ */
virtual int Send(const char *data_, int size_, int time_); virtual int Send(const char *data_, int size_, int time_);
/** /**
* \brief Close the socket. * \brief Close the socket.
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief
*
*/
sockaddr_in LocalAddress();
/**
* \brief
*
*/
sockaddr_in RemoteAddress();
/**
* \brief Get InetAddress. * \brief Get InetAddress.
* *
*/ */
InetAddress * GetInetAddress(); InetAddress * GetInetAddress();
/** /**
* \brief Get the local port. * \brief Get the local port.
* *
*/ */
int GetLocalPort(); int GetLocalPort();
 End of changes. 6 change blocks. 
26 lines changed or deleted 10 lines changed or added


 jfifoexception.h   jfifoexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_FIFO_EXCEPTION_H #ifndef J_FIFOEXCEPTION_H
#define J_FIFO_EXCEPTION_H #define J_FIFOEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jshared { namespace jshared {
/** /**
* \brief SocketException. * \brief SocketException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jfile.h   jfile.h 
skipping to change at line 307 skipping to change at line 307
/** /**
* \brief * \brief
* *
*/ */
std::string GetCurrentDirectory(); std::string GetCurrentDirectory();
/** /**
* \brief * \brief
* *
*/ */
std::vector<std::string> * ListFiles(std::string extension = std::string("")); std::vector<std::string> ListFiles(std::string extension = s td::string(""));
/** /**
* \brief * \brief
* *
*/ */
void Close(); void Close();
/** /**
* \brief * \brief
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jfilechooserdialogbox.h   jfilechooserdialogbox.h 
skipping to change at line 63 skipping to change at line 63
FILE_ONLY, FILE_ONLY,
DIRECTORY_ONLY, DIRECTORY_ONLY,
FILE_AND_DIRECTORY FILE_AND_DIRECTORY
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class FileChooserDialogBox : public jgui::Frame, public jgui::SelectListene r, public jgui::FrameInputListener{ class FileChooserDialogBox : public jgui::Frame, public jgui::SelectListene r{
private: private:
std::vector<std::string> _extensions; std::vector<std::string> _extensions;
jthread::Mutex _mutex; jthread::Mutex _mutex;
jgui::Label *_label; jgui::Label *_label;
jgui::ListBox *_list; jgui::ListBox *_list;
jgui::TextField *_file; jgui::TextField *_file;
std::string _base_dir, std::string _base_dir,
_current_dir; _current_dir;
jfilechooser_type_t _type; jfilechooser_type_t _type;
skipping to change at line 88 skipping to change at line 88
/** /**
* \brief * \brief
* *
*/ */
bool ShowFiles(std::string current_dir); bool ShowFiles(std::string current_dir);
/** /**
* \brief * \brief
* *
*/ */
std::vector<std::string> * ListFiles(std::string dirPath); std::vector<std::string> ListFiles(std::string dirPath);
/** /**
* \brief * \brief
* *
*/ */
bool IsDirectory(std::string path); bool IsDirectory(std::string path);
/** /**
* \brief * \brief
* *
skipping to change at line 168 skipping to change at line 168
/** /**
* \brief * \brief
* *
*/ */
virtual void ItemSelected(jgui::SelectEvent *event); virtual void ItemSelected(jgui::SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void InputChanged(jgui::KeyEvent *event); virtual void InputReceived(jgui::KeyEvent *event);
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 jframe.h   jframe.h 
skipping to change at line 29 skipping to change at line 29
************************************************************************** */ ************************************************************************** */
#ifndef J_FRAME_H #ifndef J_FRAME_H
#define J_FRAME_H #define J_FRAME_H
#include "jkeylistener.h" #include "jkeylistener.h"
#include "jmouselistener.h" #include "jmouselistener.h"
#include "jinputmanager.h" #include "jinputmanager.h"
#include "jwindow.h" #include "jwindow.h"
#include "jfont.h" #include "jfont.h"
#include "jcontainer.h" #include "jcontainer.h"
#include "jframeinputlistener.h"
#include "jicon.h" #include "jicon.h"
#include "jthread.h" #include "jthread.h"
#include "jmutex.h" #include "jmutex.h"
#include "jdate.h" #include "jdate.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <map> #include <map>
skipping to change at line 96 skipping to change at line 95
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseReleased(MouseEvent *event); virtual void MouseReleased(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseClicked(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseMoved(MouseEvent *event); virtual void MouseMoved(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseWheel(MouseEvent *event); virtual void MouseWheel(MouseEvent *event);
protected: protected:
std::vector<frame_subtitle_t> _subtitles;
jthread::Mutex _input_mutex, jthread::Mutex _input_mutex,
_paint_mutex; _paint_mutex;
jthread::Condition _frame_sem; jthread::Condition _frame_sem;
std::vector<FrameInputListener *> _key_listeners;
std::vector<frame_subtitle_t> _subtitles;
std::string _title, std::string _title,
_icon; _icon;
int _init_type, int _init_type,
_relative_mouse_x, _relative_mouse_x,
_relative_mouse_y, _relative_mouse_y,
_relative_mouse_w, _relative_mouse_w,
_relative_mouse_h, _relative_mouse_h,
_mouse_state; _mouse_state;
int _old_x, int _old_x,
_old_y, _old_y,
skipping to change at line 301 skipping to change at line 291
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void RegisterInputListener(FrameInputListener *liste virtual void InputReceived(KeyEvent *event);
ner);
/**
* \brief
*
*/
virtual void RemoveInputListener(FrameInputListener *listene
r);
/** /**
* \brief * \brief
* *
*/ */
virtual std::vector<FrameInputListener *> & GetFrameInputLis teners(); virtual void InputReceived(MouseEvent *event);
}; };
} }
#endif #endif
 End of changes. 6 change blocks. 
21 lines changed or deleted 3 lines changed or added


 jgraphics.h   jgraphics.h 
skipping to change at line 333 skipping to change at line 333
/** /**
* \brief * \brief
* *
*/ */
virtual jpoint_t TranslateImage(); virtual jpoint_t TranslateImage();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetClip(int x, int y, int width, int height); virtual jregion_t ClipRect(int xp, int yp, int wp, int hp);
/**
* \brief
*
*/
virtual void SetClip(int xp, int yp, int wp, int hp);
/** /**
* \brief * \brief
* *
*/ */
virtual jregion_t GetClip(); virtual jregion_t GetClip();
/** /**
* \brief * \brief
* *
skipping to change at line 739 skipping to change at line 745
/** /**
* \brief * \brief
* *
*/ */
virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000); virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000);
/** /**
* \brief * \brief
* *
*/ */
virtual void GetRGB(int startxp, int startyp, int widthp, in t heightp, uint32_t **rgb, int scansize); virtual void GetRGB(uint32_t **rgb, int startxp, int startyp , int widthp, int heightp, int scansize);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetRGB(int xp, int yp, uint32_t rgb); virtual void SetRGB(uint32_t rgb, int xp, int yp);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetRGB(uint32_t *rgb, int xp, int yp, int wp, i nt hp, int scanline); virtual void SetRGB(uint32_t *rgb, int xp, int yp, int wp, i nt hp, int scanline);
/** /**
* \brief * \brief
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added


 jimage.h   jimage.h 
skipping to change at line 161 skipping to change at line 161
/** /**
* \brief * \brief
* *
*/ */
static Image * CreateImage(Image *image); static Image * CreateImage(Image *image);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetWorkingScreenSize();
/**
* \brief
*
*/
virtual Graphics * GetGraphics(); virtual Graphics * GetGraphics();
/** /**
* \brief * \brief
* *
*/ */
virtual Image * Scaled(int width, int height); virtual Image * Scaled(int width, int height);
/** /**
* \brief * \brief
skipping to change at line 203 skipping to change at line 209
/** /**
* \brief * \brief
* *
*/ */
virtual int GetHeight(); virtual int GetHeight();
/** /**
* \brief * \brief
* *
*/ */
virtual int GetScaleWidth();
/**
* \brief
*
*/
virtual int GetScaleHeight();
/**
* \brief
*
*/
virtual void Release(); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
virtual void Restore(); virtual void Restore();
}; };
 End of changes. 2 change blocks. 
12 lines changed or deleted 6 lines changed or added


 jindexedimage.h   jindexedimage.h 
skipping to change at line 41 skipping to change at line 41
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class IndexedImage : public jgui::Image{ class IndexedImage : public jgui::Image{
private: private:
uint32_t *_palette; uint32_t *_palette;
int _palette_size; int _palette_size;
uint8_t *_data; uint8_t *_data;
private:
uint8_t * ScaleArray(uint8_t *array, int width, int height);
public: public:
/** /**
* \brief * \brief
* *
*/ */
IndexedImage(uint32_t *palette, int palette_size, uint8_t *d ata, int width, int height); IndexedImage(uint32_t *palette, int palette_size, uint8_t *d ata, int width, int height);
/** /**
* \brief * \brief
* *
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added


 jinetaddress.h   jinetaddress.h 
skipping to change at line 46 skipping to change at line 46
namespace jsocket { namespace jsocket {
/** /**
* \brief InetAddress. * \brief InetAddress.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class InetAddress : public virtual jcommon::Object{ class InetAddress : public virtual jcommon::Object{
private: protected:
/** \brief Host name. */ /**
std::string _host; * \brief Constructor private.
/** \brief Host ip. */ *
in_addr _ip; */
InetAddress();
/**
* \brief Constructor private.
*
*/
InetAddress(std::string, struct in_addr);
public:
/**
* \brief Destructor virtual.
*
*/
virtual ~InetAddress();
/**
* \brief Get adresses by name.
*
*/
static InetAddress * GetByName(std::string);
/** public:
* \brief Get all addresses from a host. /**
* * \brief Destructor virtual.
*/ *
static std::vector<InetAddress *> GetAllByName(std::string); */
virtual ~InetAddress();
/** /**
* \brief Get the local host. * \brief
* *
*/ */
static InetAddress * GetLocalHost(); static bool IsReachable(std::string host);
/** /**
* \brief Get the host name. * \brief Get the host name.
* *
*/ */
std::string GetHostName(); virtual std::string GetHostName();
/** /**
* \brief Get the host address. * \brief Get the host address.
* *
*/ */
std::string GetHostAddress(); virtual std::string GetHostAddress();
/** /**
* \brief Get the address IPv4. * \brief Get the address IPv4.
* *
*/ */
std::vector<uint8_t> GetAddress(); virtual std::vector<uint32_t> GetAddress();
}; };
} }
#endif #endif
 End of changes. 6 change blocks. 
49 lines changed or deleted 32 lines changed or added


 jinputmanager.h   jinputmanager.h 
skipping to change at line 91 skipping to change at line 91
private: private:
static InputManager *instance; static InputManager *instance;
jthread::Mutex _mutex; jthread::Mutex _mutex;
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
IDirectFBEventBuffer *events; IDirectFBEventBuffer *events;
#endif #endif
std::vector<EventBroadcaster *> _broadcasters; std::vector<EventBroadcaster *> _broadcasters;
uint64_t _last_keypress;
jsize_t _screen, jsize_t _screen,
_scale; _scale;
int _mouse_x, int _mouse_x,
_mouse_y; _mouse_y,
_click_delay,
_click_count;
bool _initialized, bool _initialized,
_is_key_enabled, _is_key_enabled,
_is_mouse_enabled, _is_mouse_enabled,
_skip_key_events, _skip_key_events,
_skip_mouse_events; _skip_mouse_events;
/** /**
* \brief * \brief
* *
*/ */
skipping to change at line 222 skipping to change at line 225
/** /**
* \brief * \brief
* *
*/ */
virtual bool IsMouseEventsEnabled(); virtual bool IsMouseEventsEnabled();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetClickDelay(int ms);
/**
* \brief
*
*/
virtual int GetClickDelay();
/**
* \brief
*
*/
virtual void PostEvent(KeyEvent *event); virtual void PostEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void PostEvent(MouseEvent *event); virtual void PostEvent(MouseEvent *event);
/** /**
* \brief * \brief
 End of changes. 3 change blocks. 
1 lines changed or deleted 16 lines changed or added


 jkeyboard.h   jkeyboard.h 
skipping to change at line 58 skipping to change at line 58
FULL_NUMERIC_KEYBOARD, FULL_NUMERIC_KEYBOARD,
SMALL_NUMERIC_KEYBOARD, SMALL_NUMERIC_KEYBOARD,
FULL_WEB_KEYBOARD FULL_WEB_KEYBOARD
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Keyboard : public jgui::Frame, public jgui::ButtonListener, public jg ui::FrameInputListener, public jgui::TextListener { class Keyboard : public jgui::Frame, public jgui::ButtonListener, public jg ui::TextListener {
private: private:
jthread::Mutex _key_mutex; jthread::Mutex _key_mutex;
std::vector<KeyboardListener *> _keyboard_listeners; std::vector<KeyboardListener *> _keyboard_listeners;
std::vector<Button *> _buttons; std::vector<Button *> _buttons;
TextArea *display; TextArea *display;
Component *_current_button; Component *_current_button;
jkeyboard_type_t _type; jkeyboard_type_t _type;
skipping to change at line 173 skipping to change at line 173
/** /**
* \brief * \brief
* *
*/ */
virtual void ActionPerformed(ButtonEvent *event); virtual void ActionPerformed(ButtonEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void InputChanged(jgui::KeyEvent *event); virtual void InputReceived(jgui::KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void TextChanged(TextEvent *event); virtual void TextChanged(TextEvent *event);
/** /**
* \brief * \brief
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jmemoryexception.h   jmemoryexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MEMORY_EXCEPTION_H #ifndef J_MEMORYEXCEPTION_H
#define J_MEMORY_EXCEPTION_H #define J_MEMORYEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jshared { namespace jshared {
/** /**
* \brief SocketException. * \brief SocketException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jmenu.h   jmenu.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MENU_H #ifndef J_MENU_H
#define J_MENU_H #define J_MENU_H
#include "jframe.h" #include "jframe.h"
#include "jframeinputlistener.h"
#include "jimage.h" #include "jimage.h"
#include "jmouselistener.h" #include "jmouselistener.h"
#include "jitemcomponent.h" #include "jitemcomponent.h"
#include "jthememanager.h" #include "jthememanager.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
skipping to change at line 52 skipping to change at line 51
enum jmenu_align_t { enum jmenu_align_t {
MENU_ALIGN, MENU_ALIGN,
SUBMENU_ALIGN SUBMENU_ALIGN
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Menu : public jgui::ItemComponent, public jgui::FrameInputListener, p ublic jgui::ThemeListener{ class Menu : public KeyListener, public MouseListener, public jgui::ItemCom ponent, public jgui::ThemeListener{
private: private:
jthread::Mutex _menu_mutex; jthread::Mutex _menu_mutex;
jthread::Condition _menu_sem; jthread::Condition _menu_sem;
std::vector<Menu *> _menus; std::vector<Menu *> _menus;
jgui::Frame *_frame; jgui::Frame *_frame;
jgui::Image *prefetch; jgui::Image *_check;
jmenu_align_t _menu_align; jmenu_align_t _menu_align;
std::string _title; std::string _title;
int _top_index, int _top_index,
_item_size, _item_size,
_visible_items; _visible_items;
bool _centered_interaction; bool _centered_interaction;
private: private:
/** /**
* \brief * \brief
* *
*/ */
virtual void MousePressed(MouseEvent *event); virtual void KeyPressed(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseReleased(MouseEvent *event); virtual void MousePressed(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseClicked(MouseEvent *event); virtual void MouseReleased(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseMoved(MouseEvent *event); virtual void MouseMoved(MouseEvent *event);
/** /**
* \brief * \brief
* *
skipping to change at line 278 skipping to change at line 277
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void InputChanged(KeyEvent *event);
/**
* \brief
*
*/
virtual void RegisterInputListener(FrameInputListener *liste
ner);
/**
* \brief
*
*/
virtual void RemoveInputListener(FrameInputListener *listene
r);
/**
* \brief
*
*/
virtual std::vector<FrameInputListener *> & GetFrameInputLis
teners();
/**
* \brief
*
*/
virtual void ThemeChanged(ThemeEvent *event); virtual void ThemeChanged(ThemeEvent *event);
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
33 lines changed or deleted 5 lines changed or added


 jmessageexception.h   jmessageexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MESSAGE_EXCEPTION_H #ifndef J_MESSAGEEXCEPTION_H
#define J_MESSAGE_EXCEPTION_H #define J_MESSAGEEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jshared { namespace jshared {
/** /**
* \brief SocketException. * \brief SocketException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jmouseevent.h   jmouseevent.h 
skipping to change at line 43 skipping to change at line 43
#include <time.h> #include <time.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
*/ */
enum jmouse_event_t { enum jmouse_event_t {
JMOUSE_UNKNOWN_EVENT, JMOUSE_UNKNOWN_EVENT,
JMOUSE_CLICKED_EVENT,
JMOUSE_PRESSED_EVENT, JMOUSE_PRESSED_EVENT,
JMOUSE_RELEASED_EVENT, JMOUSE_RELEASED_EVENT,
JMOUSE_MOVED_EVENT, JMOUSE_MOVED_EVENT,
JMOUSE_WHEEL_EVENT JMOUSE_WHEEL_EVENT
}; };
/** /**
* \brief * \brief
* *
*/ */
skipping to change at line 71 skipping to change at line 70
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class MouseEvent : public jcommon::EventObject{ class MouseEvent : public jcommon::EventObject{
private: private:
int _x, int _x,
_y, _y,
_click_count; _click_count;
jmouse_event_t _type; jmouse_event_t _type;
jmouse_button_t _button; jmouse_button_t _button;
public: public:
/** /**
* \brief * \brief
* *
*/ */
MouseEvent(void *source, jmouse_event_t type, jmouse_button_ t button, int click_count, int x, int y); MouseEvent(void *source, jmouse_event_t type, jmouse_button_ t button, int click_count, int x, int y);
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added


 jmouselistener.h   jmouselistener.h 
skipping to change at line 66 skipping to change at line 66
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseReleased(MouseEvent *event); virtual void MouseReleased(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseClicked(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseMoved(MouseEvent *event); virtual void MouseMoved(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseWheel(MouseEvent *event); virtual void MouseWheel(MouseEvent *event);
}; };
 End of changes. 1 change blocks. 
6 lines changed or deleted 0 lines changed or added


 jmulticastsocket.h   jmulticastsocket.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MULTICAST_SOCKET_H #ifndef J_MULTICASTSOCKET_H
#define J_MULTICAST_SOCKET_H #define J_MULTICASTSOCKET_H
#include "jinetaddress.h" #include "jinetaddress.h"
#include "jsocketoption.h" #include "jsocketoption.h"
#include "jsocketinputstream.h" #include "jsocketinputstream.h"
#include "jsocketoutputstream.h" #include "jsocketoutputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include "jobject.h" #include "jobject.h"
#include <iostream> #include <iostream>
skipping to change at line 60 skipping to change at line 60
* \brief MulticastSocket. * \brief MulticastSocket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class MulticastSocket : public jsocket::Connection{ class MulticastSocket : public jsocket::Connection{
private: private:
/** \brief Use to bind the socket in a free port */ /** \brief Use to bind the socket in a free port */
static int _used_port; static int _used_port;
#ifdef _WIN32
/** \brief Socket handler. */ /** \brief Socket handler. */
SOCKET _fds, _fdr; jsocket_t _fds, _fdr;
#else
/** \brief Descriptor */
int _fds, _fdr;
#endif
/** \brief Local socket */ /** \brief Local socket */
sockaddr_in _sock_s, _sock_r; struct sockaddr_in _sock_s, _sock_r;
/** \brief Input stream */ /** \brief Input stream */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief Output stream */ /** \brief Output stream */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief */ /** \brief */
int64_t _sent_bytes; int64_t _sent_bytes;
/** \brief */ /** \brief */
int64_t _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
std::vector<std::string> _groups; std::vector<std::string> _groups;
skipping to change at line 117 skipping to change at line 112
* *
*/ */
MulticastSocket(std::string addr_, int port_, int rbuf_ = 65 535, int wbuf_ = 4096); MulticastSocket(std::string addr_, int port_, int rbuf_ = 65 535, int wbuf_ = 4096);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~MulticastSocket(); virtual ~MulticastSocket();
#ifdef _WIN32 /**
virtual SOCKET GetHandler(); * \brief
#else *
virtual int GetHandler(); */
#endif virtual jsocket_t GetHandler();
/** /**
* \brief * \brief
* *
*/ */
virtual jio::InputStream * GetInputStream(); virtual jio::InputStream * GetInputStream();
/** /**
* \brief * \brief
* *
 End of changes. 5 change blocks. 
14 lines changed or deleted 9 lines changed or added


 jmutexexception.h   jmutexexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MUTEX_EXCEPTION_H #ifndef J_MUTEXEXCEPTION_H
#define J_MUTEX_EXCEPTION_H #define J_MUTEXEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jthread{ namespace jthread{
/** /**
* \brief MutexException. * \brief MutexException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jnullgraphics.h   jnullgraphics.h 
skipping to change at line 125 skipping to change at line 125
/** /**
* \brief * \brief
* *
*/ */
virtual jpoint_t TranslateImage(); virtual jpoint_t TranslateImage();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetClip(int x, int y, int width, int height); virtual jregion_t ClipRect(int xp, int yp, int wp, int hp);
/**
* \brief
*
*/
virtual void SetClip(int xp, int yp, int wp, int hp);
/** /**
* \brief * \brief
* *
*/ */
virtual jregion_t GetClip(); virtual jregion_t GetClip();
/** /**
* \brief * \brief
* *
skipping to change at line 531 skipping to change at line 537
/** /**
* \brief * \brief
* *
*/ */
virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000); virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000);
/** /**
* \brief * \brief
* *
*/ */
virtual void GetRGB(int startxp, int startyp, int widthp, in t heightp, uint32_t **rgb, int offset, int scansize); virtual void GetRGB(uint32_t **rgb, int xp, int yp, int wp, int hp, int scansize);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetRGB(int xp, int yp, uint32_t rgb); virtual void SetRGB(uint32_t rgb, int xp, int yp);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetRGB(uint32_t *rgb, int xp, int yp, int wp, i nt hp, int scanline); virtual void SetRGB(uint32_t *rgb, int xp, int yp, int wp, i nt hp, int scanline);
/** /**
* \brief * \brief
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added


 jpipe.h   jpipe.h 
skipping to change at line 38 skipping to change at line 38
namespace jshared { namespace jshared {
/** /**
* \brief Socket. * \brief Socket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Pipe : public virtual jcommon::Object{ class Pipe : public virtual jcommon::Object{
private: private:
#ifdef _WIN32 #ifdef _WIN32
/** \brief Socket handler. */ /** \brief Socket handler. */
HANDLE _fdr, _fdw; HANDLE _fdr, _fdw;
#else #else
/** \brief */ /** \brief */
int _pipe[2]; int _pipe[2];
#endif #endif
/** \brief */ /** \brief */
bool _is_open; bool _is_closed;
public: public:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
Pipe(int size_, int perms_); Pipe(int size_, int mode_);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~Pipe(); virtual ~Pipe();
/** /**
* \brief * \brief
* *
*/ */
int Send(const char *b_, int size_); int Send(const char *data_, int data_length);
/** /**
* \brief * \brief
* *
*/ */
int Receive(char *data_, int data_length_); int Receive(char *data_, int data_length_);
/** /**
* \brief
*
*/
bool IsClosed();
/**
* \brief Close. * \brief Close.
* *
*/ */
void Close(); void Close();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
11 lines changed or deleted 17 lines changed or added


 jpolicies.h   jpolicies.h 
skipping to change at line 81 skipping to change at line 81
/** /**
* \brief * \brief
* *
*/ */
void AddPolice(std::string police); void AddPolice(std::string police);
/** /**
* \brief * \brief
* *
*/ */
std::vector<std::string> * GetPolicies(); std::vector<std::string> GetPolicies();
/** /**
* \brief * \brief
* *
*/ */
std::string GetPoliceByName(std::string police); std::string GetPoliceByName(std::string police);
/** /**
* \brief * \brief
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jprocessexception.h   jprocessexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_PROCESS_EXCEPTION_H #ifndef J_PROCESSEXCEPTION_H
#define J_PROCESS_EXCEPTION_H #define J_PROCESSEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jshared { namespace jshared {
/** /**
* \brief SocketException. * \brief SocketException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jproperties.h   jproperties.h 
skipping to change at line 48 skipping to change at line 48
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Properties : public virtual jcommon::Object{ class Properties : public virtual jcommon::Object{
private: private:
/** \brief */ /** \brief */
jthread::Mutex _mutex; jthread::Mutex _mutex;
/** \brief */ /** \brief */
std::map<std::string, std::string> _props; std::vector<struct jproperty_t> _properties;
/** \brief */
std::vector<struct jproperty_t> properties;
/** \brief */ /** \brief */
std::string _filename; std::string _filename;
/** \brief */ /** \brief */
std::string _escape; std::string _escape;
/** /**
* \brief Construtor default. * \brief Construtor default.
* *
*/ */
int LeftTrim(char **str, int length); int LeftTrim(char **str, int length);
skipping to change at line 139 skipping to change at line 137
/** /**
* \brief * \brief
* *
*/ */
void RemovePropertyByIndex(int index); void RemovePropertyByIndex(int index);
/** /**
* \brief * \brief
* *
*/ */
std::vector<std::string> * GetProperties(); std::vector<std::string> GetProperties();
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
4 lines changed or deleted 2 lines changed or added


 jrawsocket.h   jrawsocket.h 
skipping to change at line 136 skipping to change at line 136
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class RawSocket : public jsocket::Connection{ class RawSocket : public jsocket::Connection{
private: private:
/** \brief Use to bind the socket in a free port. */ /** \brief Use to bind the socket in a free port. */
static int _used_port; static int _used_port;
/** \brief Socket handler. */ /** \brief Socket handler. */
#ifdef _WIN32 jsocket_t _fd;
SOCKET _fd;
#else
int _fd;
#endif
/** \brief Local socket. */ /** \brief Local socket. */
sockaddr_in _lsock; sockaddr_in _lsock;
/** \brief Server socket UDP. */ /** \brief Server socket UDP. */
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief Local inetaddress. */ /** \brief Local inetaddress. */
InetAddress *_local; InetAddress *_local;
/** \brief Remote inetaddress. */ /** \brief Remote inetaddress. */
InetAddress *_address; InetAddress *_address;
/** \brief Input stream. */ /** \brief Input stream. */
SocketInputStream *_is; SocketInputStream *_is;
skipping to change at line 215 skipping to change at line 211
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream(); virtual jio::OutputStream * GetOutputStream();
/** /**
* \brief * \brief
* *
*/ */
#ifdef _WIN32 virtual jsocket_t GetHandler();
virtual SOCKET GetHandler();
#else
virtual int GetHandler();
#endif
/** /**
* \brief Read data from a source. * \brief Read data from a source.
* *
*/ */
virtual int Receive(char *data_, int size_, int time_); virtual int Receive(char *data_, int size_, int time_);
/** /**
* \brief Read data from a source. * \brief Read data from a source.
* *
skipping to change at line 252 skipping to change at line 244
*/ */
virtual int Send(const char *data_, int size_, bool block_ = true); virtual int Send(const char *data_, int size_, bool block_ = true);
/** /**
* \brief Close the socket. * \brief Close the socket.
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief
*
*/
sockaddr_in LocalAddress();
/**
* \brief
*
*/
sockaddr_in RemoteAddress();
/**
* \brief Get InetAddress. * \brief Get InetAddress.
* *
*/ */
InetAddress * GetInetAddress(); InetAddress * GetInetAddress();
/** /**
* \brief Get the local port. * \brief Get the local port.
* *
*/ */
int GetLocalPort(); int GetLocalPort();
 End of changes. 3 change blocks. 
22 lines changed or deleted 2 lines changed or added


 jsemaphoreexception.h   jsemaphoreexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SEMAPHORE_EXCEPTION_H #ifndef J_SEMAPHOREEXCEPTION_H
#define J_SEMAPHORE_EXCEPTION_H #define J_SEMAPHOREEXCEPTION_H
#include "jobject.h" #include "jobject.h"
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jthread { namespace jthread {
/** /**
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jsemaphoretimeoutexception.h   jsemaphoretimeoutexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SEMAPHORETIMEOUT_EXCEPTION_H #ifndef J_SEMAPHORETIMEOUTEXCEPTION_H
#define J_SEMAPHORETIMEOUT_EXCEPTION_H #define J_SEMAPHORETIMEOUTEXCEPTION_H
#include "jobject.h" #include "jobject.h"
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jthread { namespace jthread {
/** /**
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jserversocket.h   jserversocket.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SERVER_SOCKET_H #ifndef J_SERVERSOCKET_H
#define J_SERVER_SOCKET_H #define J_SERVERSOCKET_H
#include "jconnection.h"
#include "jinetaddress.h" #include "jinetaddress.h"
#include "jobject.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#include <winsock.h> #include <winsock.h>
#else #else
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
#include <stdint.h> #include <stdint.h>
namespace jsocket { namespace jsocket {
class Socket; class Socket;
/** /**
* \brief ServerSocket. * \brief ServerSocket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ServerSocket : public virtual jcommon::Object{ class ServerSocket : public virtual jcommon::Object{
private: private:
#ifdef _WIN32 /** \brief Socket handler. */
/** \brief Socket handler. */ jsocket_t _fd;
SOCKET _fd; /** \brief Local socket. */
#else struct sockaddr_in _lsock;
/** \brief Socket handler. */ /** \brief Remote socket. */
int _fd; struct sockaddr_in _rsock;
#endif /** \brief */
/** \brief Local socket. */ InetAddress *_local;
sockaddr_in _lsock; /** \brief */
/** \brief Remote socket. */
sockaddr_in _rsock;
/** \brief */
InetAddress *_local;
/** \brief */
bool _is_closed; bool _is_closed;
/** /**
* \brief * \brief
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
* \brief * \brief
* *
*/ */
void BindSocket(InetAddress *, int); void BindSocket(InetAddress *, int);
/** /**
* \brief * \brief
* *
*/ */
void ListenSocket(int); void ListenSocket(int);
public: public:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
ServerSocket(int port, int backlog = 5, InetAddress * = NULL); ServerSocket(int port, int backlog = 5, InetAddress * = NULL
);
/** /**
* \brief Destructor virtual. * \brief Destructor virtual.
* *
*/ */
virtual ~ServerSocket(); virtual ~ServerSocket();
/** /**
* \brief Accept a new socket. * \brief Accept a new socket.
* *
*/ */
Socket * Accept(); Socket * Accept();
/** /**
* \brief * \brief
* *
*/ */
InetAddress * GetInetAddress(); InetAddress * GetInetAddress();
/** /**
* \brief Get the local port. * \brief Get the local port.
* *
*/ */
int GetLocalPort(); int GetLocalPort();
/** /**
* \brief Close the server socket. * \brief Close the server socket.
* *
*/ */
void Close(); void Close();
}; };
} }
#endif #endif
 End of changes. 13 change blocks. 
65 lines changed or deleted 60 lines changed or added


 jsocket.h   jsocket.h 
skipping to change at line 57 skipping to change at line 57
/** /**
* \brief Socket. * \brief Socket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Socket : public jsocket::Connection{ class Socket : public jsocket::Connection{
friend class ServerSocket; //Socket * ServerSocket::Accept(); friend class ServerSocket; //Socket * ServerSocket::Accept();
private: private:
#ifdef _WIN32
/** \brief Socket handler. */
SOCKET _fd;
#else
/** \brief Socket handler. */ /** \brief Socket handler. */
int _fd; jsocket_t _fd;
#endif
/** \brief */ /** \brief */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief */ /** \brief */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief */ /** \brief */
sockaddr_in _lsock; struct sockaddr_in _lsock;
/** \brief */ /** \brief */
sockaddr_in _server_sock; struct sockaddr_in _server_sock;
/** \brief */ /** \brief */
InetAddress *_address; InetAddress *_address;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
int64_t _sent_bytes; int64_t _sent_bytes;
/** \brief Bytes received. */ /** \brief Bytes received. */
int64_t _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** /**
skipping to change at line 105 skipping to change at line 100
* *
*/ */
void ConnectSocket(InetAddress *, int); void ConnectSocket(InetAddress *, int);
/** /**
* \brief * \brief
* *
*/ */
void InitStreams(int64_t rbuf_, int64_t wbuf_); void InitStreams(int64_t rbuf_, int64_t wbuf_);
public: protected:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
Socket(int handler_, sockaddr_in server_, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); Socket(jsocket_t handler_, struct sockaddr_in server_, int t imeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
public:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
Socket(InetAddress *addr_, int port_, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); Socket(InetAddress *addr_, int port_, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
skipping to change at line 142 skipping to change at line 138
* *
*/ */
Socket(std::string host_, int port_, InetAddress *local_addr _, int local_port_, int timeout_ = 0, int rbuf_ = 4096, int wbuf_ = 4096); Socket(std::string host_, int port_, InetAddress *local_addr _, int local_port_, int timeout_ = 0, int rbuf_ = 4096, int wbuf_ = 4096);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~Socket(); virtual ~Socket();
#ifdef _WIN32 /**
virtual SOCKET GetHandler(); * \brief
#else *
virtual int GetHandler(); */
#endif virtual jsocket_t GetHandler();
/** /**
* \brief Send bytes to a destination. * \brief Send bytes to a destination.
* *
*/ */
virtual int Send(const char *b_, int size_, bool block_ = tr ue); virtual int Send(const char *b_, int size_, bool block_ = tr ue);
/** /**
* \brief Send bytes to a destination waiting a timeout. * \brief Send bytes to a destination waiting a timeout.
* *
 End of changes. 8 change blocks. 
15 lines changed or deleted 11 lines changed or added


 jsocketexception.h   jsocketexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_EXCEPTION_H #ifndef J_SOCKETEXCEPTION_H
#define J_SOCKET_EXCEPTION_H #define J_SOCKETEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketException. * \brief SocketException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jsockethandler.h   jsockethandler.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_LOGGERSOCKETHANDLER_H #ifndef J_LOGGERSOCKETHANDLER_H
#define J_LOGGERSOCKETHANDLER_H #define J_LOGGERSOCKETHANDLER_H
#include "jstreamhandler.h" #include "jstreamhandler.h"
#include "jserversocket.h"
#include "jsocket.h"
#include "jthread.h" #include "jthread.h"
#include "jserversocket.h"
#include <deque> #include <deque>
namespace jlogger { namespace jlogger {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added


 jsocketinputstream.h   jsocketinputstream.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_INPUT_STREAM_H #ifndef J_SOCKETINPUTSTREAM_H
#define J_SOCKET_INPUT_STREAM_H #define J_SOCKETINPUTSTREAM_H
#include "jobject.h" #include "jobject.h"
#include "jinputstream.h" #include "jinputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <cstring> #include <cstring>
#ifdef _WIN32 #ifdef _WIN32
skipping to change at line 48 skipping to change at line 48
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketInputStream. * \brief SocketInputStream.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SocketInputStream : public jio::InputStream{ class SocketInputStream : public jio::InputStream{
private: private:
#ifdef _WIN32
/** \brief */ /** \brief */
SOCKET _fd; jsocket_t _fd;
#else
/** \brief */
int _fd;
#endif
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
struct sockaddr *_address;
/** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int64_t _buffer_length; int64_t _buffer_length;
/** \brief */ /** \brief */
int64_t _current_index; int64_t _current_index;
/** \brief */ /** \brief */
int64_t _end_index; int64_t _end_index;
/** \brief */ /** \brief */
int64_t _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
sockaddr_in _server_sock;
/** \brief */
bool *_is_closed; bool *_is_closed;
/** \brief */ /** \brief */
bool _stream; bool _stream;
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketInputStream(Connection *conn_, bool *is_closed _, int64_t size_ = 65535LL); SocketInputStream(Connection *conn_, bool *is_closed _, int64_t size_ = 65535LL);
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketInputStream(Connection *conn_, bool *is_closed _, sockaddr_in server_sock_, int64_t size_ = 65535LL); SocketInputStream(Connection *conn_, bool *is_closed _, struct sockaddr *address_, int64_t size_ = 65535LL);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~SocketInputStream(); virtual ~SocketInputStream();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
 End of changes. 6 change blocks. 
11 lines changed or deleted 6 lines changed or added


 jsocketlib.h   jsocketlib.h 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKLIB_H #ifndef J_SOCKLIB_H
#define J_SOCKLIB_H #define J_SOCKLIB_H
#include <string>
#include <vector>
enum jaddress_family_t {
AIF_UNKNOWN,
AIF_INET,
AIF_INET6,
AIF_NETBIOS
};
enum jaddress_type_t {
AIT_UNKNOW,
AIT_STREAM,
AIT_DGRAM,
AIT_RAW,
AIT_RDM,
AIT_SEQPACKET
};
enum jaddress_protocol_t {
AIP_UNKNOWN,
AIP_TCP,
AIP_UDP
};
struct jaddress_info_t {
jaddress_family_t family;
jaddress_type_t type;
jaddress_protocol_t protocol;
std::string name;
std::string address;
};
void InitWindowsSocket(); void InitWindowsSocket();
void ReleaseWindowsSocket(); void ReleaseWindowsSocket();
std::vector<struct jaddress_info_t> RequestAddressInfo(std::string host, st
d::string service);
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 36 lines changed or added


 jsocketoption.h   jsocketoption.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_OPTION_H #ifndef J_SOCKETOPTION_H
#define J_SOCKET_OPTION_H #define J_SOCKETOPTION_H
#include "jconnection.h" #include "jconnection.h"
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#else #else
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h>
#endif #endif
namespace jsocket { namespace jsocket {
class Socket; class Socket;
class SSLSocket; class Socket6;
class DatagramSocket; class DatagramSocket;
class DatagramSocket6;
class SSLSocket;
class SSLSocket6;
class MulticastSocket;
class MulticastSocket6;
class LocalSocket;
class LocalDatagramSocket;
/** /**
* \brief * \brief
* *
*/ */
enum socket_shutdown_t { enum socket_shutdown_t {
#ifdef _WIN32 #ifdef _WIN32
SHUTDOWN_READ = 0, SHUTDOWN_READ = 0,
SHUTDOWN_WRITE = 1, SHUTDOWN_WRITE = 1,
SHUTDOWN_READ_WRITE = 2 SHUTDOWN_READ_WRITE = 2
#else #else
SHUTDOWN_READ = SHUT_RD, SHUTDOWN_READ = SHUT_RD,
SHUTDOWN_WRITE = SHUT_WR, SHUTDOWN_WRITE = SHUT_WR,
SHUTDOWN_READ_WRITE = SHUT_RDWR SHUTDOWN_READ_WRITE = SHUT_RDWR
#endif #endif
}; };
/** /**
* \brief SocketOptions. * \brief SocketOptions.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SocketOption : public virtual jcommon::Object{ class SocketOption : public virtual jcommon::Object{
#ifdef _WIN32
#else
friend class SSLSocket;
#endif
friend class Socket; friend class Socket;
friend class DatagramSocket; friend class Socket6;
friend class RawSocket; friend class DatagramSocket;
friend class MulticastSocket; friend class DatagramSocket6;
friend class SocketPipe; friend class SSLSocket;
friend class PromiscSocket; friend class SSLSocket6;
friend class MulticastSocket;
friend class MulticastSocket6;
friend class RawSocket;
friend class SocketPipe;
friend class PromiscSocket;
friend class LocalSocket;
friend class LocalDatagramSocket;
private: private:
#ifdef _WIN32 /** \brief Socket handler. */
/** \brief Socket handler. */ jsocket_t _fd;
SOCKET _fd; /** \brief Type of socket */
#else jconnection_type_t _type;
/** \brief Socket handler. */
int _fd;
#endif
/** \brief Type of socket */
jconnection_type_t _type;
/** /**
* \brief * \brief
* *
*/ */
#ifdef _WIN32 SocketOption(jsocket_t fd_, jconnection_type_t type_);
SocketOption(SOCKET fd_, jconnection_type_t type_);
#else
SocketOption(int fd_, jconnection_type_t type_);
#endif
public: public:
/** /**
* \brief Virtual destructor * \brief Virtual destructor
* *
*/ */
virtual ~SocketOption(); virtual ~SocketOption();
/** /**
* \brief Enable sending of keep-alive messages on connection-orien * \brief Enable sending of keep-alive messages on connectio
ted sockets. n-oriented sockets.
* *
*/ */
void SetKeepAlive(bool b_); void SetKeepAlive(bool b_);
/** /**
* \brief If this option is enabled, out-of-band data is directly p * \brief If this option is enabled, out-of-band data is dir
laced into the receive data stream. ectly placed into the receive data stream.
* Otherwise out-of-band data is only passed when the MSG_OOB flag * Otherwise out-of-band data is only passed when the MSG_OO
is set during receiving. B flag is set during receiving.
* *
*/ */
void SetOutOfBandInLine(bool b_); void SetOutOfBandInLine(bool b_);
/** /**
* \brief Specify the sending or receiving timeouts until reporting * \brief Specify the sending or receiving timeouts until re
an error. porting an error.
* They are fixed to a protocol specific setting in Linux an * They are fixed to a protocol specific setting in L
d cannot be read or written. inux and cannot be read or written.
* *
*/ */
void SetSendTimeout(int time_); void SetSendTimeout(int time_);
/** /**
* \brief Specify the sending or receiving timeouts until reporting * \brief Specify the sending or receiving timeouts until re
an error. porting an error.
* They are fixed to a protocol specific setting in Linux an * They are fixed to a protocol specific setting in L
d cannot be read or written. inux and cannot be read or written.
* *
*/ */
void SetReceiveTimeout(int time_); void SetReceiveTimeout(int time_);
/** /**
* \brief Enable or disable the receiving of the SCM_CREDENTIALS co * \brief Enable or disable the receiving of the SCM_CREDENT
ntrol message. IALS control message.
* *
*/ */
void SetPassCredentials(bool opt_); void SetPassCredentials(bool opt_);
/** /**
* \brief Return the credentials of the foreign process connec * \brief Return the credentials of the foreign process
ted to this socket. connected to this socket.
* *
*/ */
void GetPeerCredentials(void *opt); void GetPeerCredentials(void *opt);
/** /**
* \brief Bind this socket to a particular device like "eth0", as s * \brief Bind this socket to a particular device like "eth0
pecified in the passed ", as specified in the passed
* interface name. If the name is an empty string or the option * interface name. If the name is an empty string or the
length is zero, option length is zero,
* the socket device binding is removed. * the socket device binding is removed.
* *
*/ */
void BindToDevice(std::string dev_); void BindToDevice(std::string dev_);
/** /**
* \brief Indicates that the rules used in validating addresses sup * \brief Indicates that the rules used in validating addres
plied in a bind call ses supplied in a bind call
* should allow reuse of local addresses. For PF_INET sockets * should allow reuse of local addresses. For PF_INET s
this means that a socket ockets this means that a socket
* may bind, except when there is an active listening socket bound * may bind, except when there is an active listening socket
to the address. When bound to the address. When
* the listening socket is bound to INADDR_ANY with a specific port * the listening socket is bound to INADDR_ANY with a specif
then it is not possible ic port then it is not possible
* to bind to this port for any local address. * to bind to this port for any local address.
* *
*/ */
void SetReuseAddress(bool opt_); void SetReuseAddress(bool opt_);
/** /**
* \brief * \brief
* *
*/ */
void SetReusePort(bool opt_); void SetReusePort(bool opt_);
/** /**
* \brief Gets the socket type * \brief Gets the socket type
* *
*/ */
virtual jconnection_type_t GetType(); virtual jconnection_type_t GetType();
/** /**
* \brief Returns a value indicating whether or not this socket has * \brief Returns a value indicating whether or not this soc
been marked to accept ket has been marked to accept
* connections with listen. * connections with listen.
* *
*/ */
bool GetSocketAcceptConnection(); bool GetSocketAcceptConnection();
/** /**
* \brief Don't send via a gateway, only send to directly connecte * \brief Don't send via a gateway, only send to directly c
d hosts. onnected hosts.
* *
*/ */
void SetRoute(bool opt_); void SetRoute(bool opt_);
/** /**
* \brief Set or get the broadcast flag. When enabled, datagram soc * \brief Set or get the broadcast flag. When enabled, datag
kets receive packets ram sockets receive packets
* sent to a broadcast address and they are allowed to send p * sent to a broadcast address and they are allowed to
ackets to a broadcast send packets to a broadcast
* address. This option has no effect on stream-oriented sockets. * address. This option has no effect on stream-oriented soc
* kets.
*/ *
void SetBroadcast(bool opt_); */
void SetBroadcast(bool opt_);
/** /**
* \brief * \brief
* *
*/ */
void SetNoDelay(bool b_); void SetNoDelay(bool b_);
/** /**
* \brief Sets or gets the maximum socket send buffer in bytes * \brief Sets or gets the maximum socket send buffer in byt
* es
*/ *
void SetSendMaximumBuffer(int length_); */
void SetSendMaximumBuffer(int length_);
/** /**
* \brief Sets or gets the maximum socket receive buffer in bytes. * \brief Sets or gets the maximum socket receive buffer in
* bytes.
*/ *
void SetReceiveMaximumBuffer(int length_); */
void SetReceiveMaximumBuffer(int length_);
/** /**
* \brief Sets or gets the maximum socket send buffer in bytes. * \brief Sets or gets the maximum socket send buffer in byt
* es.
*/ *
int GetSendMaximumBuffer(); */
int GetSendMaximumBuffer();
/** /**
* \brief Sets or gets the maximum socket receive buffer in bytes. * \brief Sets or gets the maximum socket receive buffer in
* bytes.
*/ *
int GetReceiveMaximumBuffer(); */
int GetReceiveMaximumBuffer();
/** /**
* \brief When enabled, a close() or shutdown() will not return unt * \brief When enabled, a close() or shutdown() will not ret
il all queued messages urn until all queued messages
* for the socket have been successfully sent or the linger time * for the socket have been successfully sent or the ling
out has been reached. er timeout has been reached.
* Otherwise, the call returns immediately and the closing is done * Otherwise, the call returns immediately and the closing i
in the background. s done in the background.
* When the socket is closed as part of exit(), it always lingers * When the socket is closed as part of exit(), it always
in the background. lingers in the background.
* *
*/ */
void SetLinger(bool on_, int linger_); void SetLinger(bool on_, int linger_);
/** /**
* \brief Set the protocol-defined priority for all packets to be s * \brief Set the protocol-defined priority for all packets
ent on this socket. to be sent on this socket.
* Linux uses this value to order the networking queues: * Linux uses this value to order the networking queues:
* packets with a higher priority may be processed first depending * packets with a higher priority may be processed first dep
on the selected device ending on the selected device
* queueing discipline. * queueing discipline.
* *
*/ */
void SetPriority(int opt_); void SetPriority(int opt_);
/** /**
* \brief Get and clear the pending socket error. * \brief Get and clear the pending socket error.
* *
*/ */
void ClearPendingSocketError(); void ClearPendingSocketError();
/** /**
* \brief /usr/include/linux/ip.h * \brief /usr/include/linux/ip.h
* *
*/ */
void SetTypeOfService(int type_); void SetTypeOfService(int type_);
/** /**
* \brief Throw signal EAGAIN set timeoutexception exception. * \brief Throw signal EAGAIN set timeoutexception exception
* .
*/ *
void SetBlocking(bool opt_); */
void SetBlocking(bool opt_);
/** /**
* \brief Set TTL * \brief Set TTL
* *
*/ */
void SetTimeToLive(int opt_); void SetTimeToLive(int opt_);
/** /**
* \brief Header is included ? * \brief Header is included ?
* *
*/ */
void SetHeaderInclude(bool opt_); void SetHeaderInclude(bool opt_);
/** /**
* \brief Return the receive timestamp of the last packet passed to * \brief Return the receive timestamp of the last packet pa
the user. ssed to the user.
* This is useful for accurate round trip time measurements. * This is useful for accurate round trip time measurements.
* *
*/ */
int64_t GetTimeStamp(); int64_t GetTimeStamp();
/** /**
* \brief Get MTU. * \brief Get MTU.
* *
*/ */
int GetMaximunTransferUnit(); int GetMaximunTransferUnit();
/** /**
* \brief Change the O_ASYNC flag to enable or disable asynchronous * \brief Change the O_ASYNC flag to enable or disable async
IO mode of the socket. hronous IO mode of the socket.
* Asynchronous IO mode means that the SIGIO signal or the signal s * Asynchronous IO mode means that the SIGIO signal or the s
et with F_SETSIG is raised ignal set with F_SETSIG is raised
* when a new I/O event occurs. * when a new I/O event occurs.
* *
*/ */
void SetIOAsync(bool opt_); void SetIOAsync(bool opt_);
/** /**
* \brief * \brief
* *
*/ */
void SetMulticastLoop(bool opt_); void SetMulticastLoop(bool opt_);
/** /**
* \brief -1 enabled nomal multicast forwarding * \brief -1 enabled nomal multicast forwarding
* *
*/ */
void SetRSVP(int opt_); void SetRSVP(int opt_);
/** /**
* \brief * \brief
* *
*/ */
void SetShutdown(socket_shutdown_t opt_); void SetShutdown(socket_shutdown_t opt_);
/**
* \brief
*
*/
void SetIPv6UnicastHops(int opt_);
/**
* \brief
*
*/
int GetIPv6UnicastHops();
/**
* \brief
*
*/
void SetIPv6Only(bool opt_);
}; };
} }
#endif #endif
 End of changes. 41 change blocks. 
236 lines changed or deleted 263 lines changed or added


 jsocketoptionexception.h   jsocketoptionexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_OPTION_EXCEPTION_H #ifndef J_SOCKETOPTIONEXCEPTION_H
#define J_SOCKET_OPTION_EXCEPTION_H #define J_SOCKETOPTIONEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketOptionException. * \brief SocketOptionException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jsocketoutputstream.h   jsocketoutputstream.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_OUTPUT_STREAM_H #ifndef J_SOCKETOUTPUTSTREAM_H
#define J_SOCKET_OUTPUT_STREAM_H #define J_SOCKETOUTPUTSTREAM_H
#include "joutputstream.h" #include "joutputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <cstring> #include <cstring>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
skipping to change at line 47 skipping to change at line 47
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketOutputStream. * \brief SocketOutputStream.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SocketOutputStream : public jio::OutputStream{ class SocketOutputStream : public jio::OutputStream{
private: private:
#ifdef _WIN32 /** \brief */
SOCKET _fd; jsocket_t _fd;
#else /** \brief */
int _fd; struct sockaddr *_address;
#endif /** \brief */
/** \brief */ char *_buffer;
char *_buffer; /** \brief */
/** \brief */ int64_t _buffer_length;
int64_t _buffer_length; /** \brief */
/** \brief */ int64_t _current_index;
int64_t _current_index; /** \brief */
/** \brief */ int64_t _sent_bytes;
int64_t _sent_bytes; /** \brief */
/** \brief */ bool _stream;
bool _stream; /** \brief */
/** \brief */ bool *_is_closed;
sockaddr_in _server_sock; /** \brief */
/** \brief */ Connection *_connection;
bool *_is_closed;
/** \brief */
Connection *_connection;
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketOutputStream(Connection *conn_, bool *is_close SocketOutputStream(Connection *conn_, bool *is_closed, int64
d, int64_t size_ = 4096LL); _t size_ = 4096LL);
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketOutputStream(Connection *conn_, bool *is_close SocketOutputStream(Connection *conn_, bool *is_closed, struc
d, sockaddr_in server_sock_, int64_t size_ = 65535LL); t sockaddr *address_, int64_t size_ = 65535LL);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~SocketOutputStream(); virtual ~SocketOutputStream();
/** /**
* \brief * \brief
* *
*/ */
virtual bool IsEmpty(); virtual bool IsEmpty();
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t Available(); virtual int64_t Available();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual int64_t GetSize(); virtual int64_t GetSize();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Seek(int64_t index); virtual void Seek(int64_t index);
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t Write(int64_t c_); virtual int64_t Write(int64_t c_);
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t Write(const char *data_, int64_t dat virtual int64_t Write(const char *data_, int64_t data_length
a_length_); _);
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t GetAvailable(); virtual int64_t GetAvailable();
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual int64_t Flush(); virtual int64_t Flush();
}; };
} }
#endif #endif
 End of changes. 15 change blocks. 
93 lines changed or deleted 90 lines changed or added


 jsocketstreamexception.h   jsocketstreamexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKETSTREAM_EXCEPTION_H #ifndef J_SOCKETSTREAMEXCEPTION_H
#define J_SOCKETSTREAM_EXCEPTION_H #define J_SOCKETSTREAMEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketStreamException. * \brief SocketStreamException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jsockettimeoutexception.h   jsockettimeoutexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SOCKET_TIMEOUT_EXCEPTION_H #ifndef J_SOCKETTIMEOUTEXCEPTION_H
#define J_SOCKET_TIMEOUT_EXCEPTION_H #define J_SOCKETTIMEOUTEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jsocket { namespace jsocket {
/** /**
* \brief SocketTimeoutException. * \brief SocketTimeoutException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jsslserversocket.h   jsslserversocket.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SSL_SERVER_SOCKET_H #ifndef J_SSLSERVERSOCKET_H
#define J_SSL_SERVER_SOCKET_H #define J_SSLSERVERSOCKET_H
#include "jsslsocket.h" #include "jsslsocket.h"
#include "jinetaddress.h" #include "jinetaddress.h"
#include "jobject.h" #include "jobject.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#include <winsock.h> #include <winsock.h>
#else #else
#include <sys/socket.h> #include <sys/socket.h>
skipping to change at line 47 skipping to change at line 47
class SSLSocket; class SSLSocket;
/** /**
* \brief ServerSocket. * \brief ServerSocket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SSLServerSocket : public virtual jcommon::Object{ class SSLServerSocket : public virtual jcommon::Object{
private: private:
#ifdef _WIN32 /** \brief Socket handler. */
/** \brief Socket handler. */ jsocket_t _fd;
SOCKET _fd; /** \brief Local socket. */
#else sockaddr_in _lsock;
/** \brief Socket handler. */ /** \brief Remote socket. */
int _fd; sockaddr_in _rsock;
#endif /** \brief */
/** \brief Local socket. */ InetAddress *_local;
sockaddr_in _lsock; /** \brief */
/** \brief Remote socket. */
sockaddr_in _rsock;
/** \brief */
InetAddress *_local;
/** \brief */
bool _is_closed; bool _is_closed;
/** /**
* \brief * \brief
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
* \brief * \brief
* *
*/ */
void BindSocket(InetAddress *, int); void BindSocket(InetAddress *, int);
/** /**
* \brief * \brief
* *
*/ */
void ListenSocket(int); void ListenSocket(int);
/** /**
* Create new CTX if none is available * Create new CTX if none is available
* *
*/ */
virtual bool CheckContext(); virtual bool CheckContext();
/** /**
* Create temp cert if no other is loaded * Create temp cert if no other is loaded
* *
skipping to change at line 129 skipping to change at line 124
SSL_CTX *ctx; SSL_CTX *ctx;
/** \brief SSL data */ /** \brief SSL data */
SSL *ssl; SSL *ssl;
/** \brief Indicate CERT loaded or created */ /** \brief Indicate CERT loaded or created */
bool have_cert; bool have_cert;
/** \brief keysize argument from constructor */ /** \brief keysize argument from constructor */
int rsa_keysize; int rsa_keysize;
/** \brief userdata */ /** \brief userdata */
char *ud; char *ud;
public: public:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
SSLServerSocket(int port, int backlog = 5, int keysize = RSA_KEYSIZ SSLServerSocket(int port, int backlog = 5, int keysize = RSA
E, InetAddress * = NULL); _KEYSIZE, InetAddress * = NULL);
/** /**
* \brief Destructor virtual. * \brief Destructor virtual.
* *
*/ */
virtual ~SSLServerSocket(); virtual ~SSLServerSocket();
/** /**
* \brief Accept a new socket. * \brief Accept a new socket.
* *
*/ */
SSLSocket * Accept(); SSLSocket * Accept();
/** /**
* \brief * \brief
* *
*/ */
InetAddress * GetInetAddress(); InetAddress * GetInetAddress();
/** /**
* \brief Get the local port. * \brief Get the local port.
* *
*/ */
int GetLocalPort(); int GetLocalPort();
/** /**
* \brief Close the server socket. * \brief Close the server socket.
* *
*/ */
void Close(); void Close();
/** /**
* Create temp cert if no other is loaded * Create temp cert if no other is loaded
* *
*/ */
bool UseCertPassword(const char *cert_file, const char *priv ate_key_file, std::string password); bool UseCertPassword(const char *cert_file, const char *priv ate_key_file, std::string password);
/** /**
* Create temp cert if no other is loaded * Create temp cert if no other is loaded
* *
 End of changes. 11 change blocks. 
64 lines changed or deleted 59 lines changed or added


 jsslsocket.h   jsslsocket.h 
skipping to change at line 74 skipping to change at line 74
class ServerSocket; class ServerSocket;
/** /**
* \brief Socket. * \brief Socket.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SSLSocket : public jsocket::Connection{ class SSLSocket : public jsocket::Connection{
friend class SSLServerSocket; //Socket * ServerSocket::Accept(); friend class SSLServerSocket; //Socket * ServerSocket::Accept();
private: private:
#ifdef _WIN32 /** \brief Socket handler. */
/** \brief Socket handler. */ jsocket_t _fd;
SOCKET _fd; /** \brief */
#else SSLSocketInputStream *_is;
/** \brief Socket handler. */ /** \brief */
int _fd; SSLSocketOutputStream *_os;
#endif /** \brief */
/** \brief */ sockaddr_in _lsock;
SSLSocketInputStream *_is; /** \brief */
/** \brief */ sockaddr_in _server_sock;
SSLSocketOutputStream *_os; /** \brief */
/** \brief */ InetAddress *_address;
sockaddr_in _lsock; /** \brief Bytes sent. */
/** \brief */ int64_t _sent_bytes;
sockaddr_in _server_sock; /** \brief Bytes received. */
/** \brief */ int64_t _receive_bytes;
InetAddress *_address; /** \brief */
/** \brief Bytes sent. */
int64_t _sent_bytes;
/** \brief Bytes received. */
int64_t _receive_bytes;
/** \brief */
int _timeout; int _timeout;
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
* \brief * \brief
* *
*/ */
void BindSocket(InetAddress *, int); void BindSocket(InetAddress *, int);
/** /**
* \brief Connect the socket. * \brief Connect the socket.
* *
*/ */
void ConnectSocket(InetAddress *, int); void ConnectSocket(InetAddress *, int);
/** /**
* \brief * \brief
* *
*/ */
void InitStreams(int rbuf, int wbuf); void InitStreams(int rbuf, int wbuf);
/** /**
* Create new CTX if none is available * Create new CTX if none is available
* *
*/ */
virtual bool CheckContext(); virtual bool CheckContext();
/** /**
* Create temp cert if no other is loaded * Create temp cert if no other is loaded
* *
skipping to change at line 161 skipping to change at line 156
/** \brief SSL data */ /** \brief SSL data */
SSL *ssl; SSL *ssl;
/** \brief Indicate CERT loaded or created */ /** \brief Indicate CERT loaded or created */
bool have_cert; bool have_cert;
/** \brief keysize argument from constructor */ /** \brief keysize argument from constructor */
int rsa_keysize; int rsa_keysize;
/** \brief userdata */ /** \brief userdata */
char *ud; char *ud;
public: private:
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
SSLSocket(int handler_, sockaddr_in server_, int keysize = RSA_KEYS IZE, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); SSLSocket(int handler_, struct sockaddr_in server_, int keys ize = RSA_KEYSIZE, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
/** public:
* \brief Constructor. /**
* * \brief Constructor.
*/ *
SSLSocket(InetAddress *addr_, int port_, int keysize = RSA_KEYSIZE, */
int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); SSLSocket(InetAddress *addr_, int port_, int keysize = RSA_K
EYSIZE, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
SSLSocket(InetAddress *addr_, int port_, InetAddress *local_addr_, SSLSocket(InetAddress *addr_, int port_, InetAddress *local_
int local_port_, int keysize = RSA_KEYSIZE, int timeout_ = 0, int rbuf_ = 6 addr_, int local_port_, int keysize = RSA_KEYSIZE, int timeout_ = 0, int rb
5535, int wbuf_ = 4096); uf_ = 65535, int wbuf_ = 4096);
/** /**
* \brief * \brief
* *
*/ */
SSLSocket(std::string host_, int port_, int keysize = RSA_KEYSIZE, SSLSocket(std::string host_, int port_, int keysize = RSA_KE
int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096); YSIZE, int timeout_ = 0, int rbuf_ = 65535, int wbuf_ = 4096);
/** /**
* \brief Constructor. * \brief Constructor.
* *
*/ */
SSLSocket(std::string host_, int port_, InetAddress *local_addr_, i SSLSocket(std::string host_, int port_, InetAddress *local_a
nt local_port_, int keysize = RSA_KEYSIZE, int timeout_ = 0, int rbuf_ = 40 ddr_, int local_port_, int keysize = RSA_KEYSIZE, int timeout_ = 0, int rbu
96, int wbuf_ = 4096); f_ = 4096, int wbuf_ = 4096);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~SSLSocket(); virtual ~SSLSocket();
#ifdef _WIN32 /**
virtual SOCKET GetHandler(); * \brief
#else *
virtual int GetHandler(); */
#endif virtual jsocket_t GetHandler();
/** /**
* \brief Send bytes to a destination. * \brief Send bytes to a destination.
* *
*/ */
virtual int Send(const char *b_, int size_, bool block_ = true); virtual int Send(const char *b_, int size_, bool block_ = tr
ue);
/** /**
* \brief Send bytes to a destination waiting a timeout. * \brief Send bytes to a destination waiting a timeout.
* *
*/ */
virtual int Send(const char *b_, int size_, int time_); virtual int Send(const char *b_, int size_, int time_);
/** /**
* \brief Receive bytes from a source. * \brief Receive bytes from a source.
* *
* \return the number of bytes received, or 0 if the peer has * \return the number of bytes received, or 0 if the peer ha
shutdown (now throws). s shutdown (now throws).
* *
* \exception SocketException an error occurred. * \exception SocketException an error occurred.
* *
*/ */
virtual int Receive(char *data_, int data_length_, bool block_ = tr virtual int Receive(char *data_, int data_length_, bool bloc
ue); k_ = true);
/** /**
* \brief Receive bytes from a source waiting a timeout. * \brief Receive bytes from a source waiting a timeout.
* *
*/ */
virtual int Receive(char *data_, int data_length_, int time_); virtual int Receive(char *data_, int data_length_, int time_
);
/** /**
* \brief Close the socket. * \brief Close the socket.
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief * \brief
* *
*/ */
virtual jio::InputStream * GetInputStream(); virtual jio::InputStream * GetInputStream();
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream(); virtual jio::OutputStream * GetOutputStream();
/** /**
* \brief * \brief
* *
*/ */
InetAddress * GetInetAddress(); InetAddress * GetInetAddress();
/** /**
* \brief Get the local port. * \brief Get the local port.
* *
*/ */
int GetLocalPort(); int GetLocalPort();
/** /**
* \brief Get the port. * \brief Get the port.
* *
*/ */
int GetPort(); int GetPort();
/** /**
* \brief Get the bytes sent to a destination. * \brief Get the bytes sent to a destination.
* *
*/ */
virtual int64_t GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief Get de bytes received from a source. * \brief Get de bytes received from a source.
* *
*/ */
virtual int64_t GetReadedBytes(); virtual int64_t GetReadedBytes();
/** /**
* \brief Get the socket options. * \brief Get the socket options.
* *
*/ */
SocketOption * GetSocketOption(); SocketOption * GetSocketOption();
/** /**
* Cert files (if not set, a temporary RSA session cert will be created if needed) * Cert files (if not set, a temporary RSA session cert will be created if needed)
* *
* PEM format * PEM format
*/ */
bool UseCert(const char *cert_file, const char *private_key_ file); bool UseCert(const char *cert_file, const char *private_key_ file);
/** /**
* As use_cert() but also give pasord for private_key_file ( or get OpenSSL's standard prompt each time) * As use_cert() but also give pasord for private_key_file ( or get OpenSSL's standard prompt each time)
 End of changes. 27 change blocks. 
153 lines changed or deleted 151 lines changed or added


 jsslsocketinputstream.h   jsslsocketinputstream.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SSLSOCKET_INPUT_STREAM_H #ifndef J_SSLSOCKETINPUTSTREAM_H
#define J_SSLSOCKET_INPUT_STREAM_H #define J_SSLSOCKETINPUTSTREAM_H
#include "jobject.h" #include "jobject.h"
#include "jinputstream.h" #include "jinputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
skipping to change at line 54 skipping to change at line 54
/** /**
* \brief SSLSocketInputStream. * \brief SSLSocketInputStream.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SSLSocketInputStream : public jio::InputStream{ class SSLSocketInputStream : public jio::InputStream{
private: private:
#ifdef _WIN32 #ifdef _WIN32
/** \brief */
SOCKET _fd;
#else #else
/** \brief */ /** \brief */
SSL *_ssl; SSL *_ssl;
/** \brief */
int _fd;
#endif #endif
/** \brief */ /** \brief */
jsocket_t _fd;
/** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int64_t _buffer_length; int64_t _buffer_length;
/** \brief */ /** \brief */
int64_t _current_index; int64_t _current_index;
/** \brief */ /** \brief */
int64_t _end_index; int64_t _end_index;
/** \brief */ /** \brief */
 End of changes. 4 change blocks. 
6 lines changed or deleted 4 lines changed or added


 jsslsocketoutputstream.h   jsslsocketoutputstream.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SSLSOCKET_OUTPUT_STREAM_H #ifndef J_SSLSOCKETOUTPUTSTREAM_H
#define J_SSLSOCKET_OUTPUT_STREAM_H #define J_SSLSOCKETOUTPUTSTREAM_H
#include "jobject.h" #include "jobject.h"
#include "joutputstream.h" #include "joutputstream.h"
#include "jconnection.h" #include "jconnection.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
skipping to change at line 53 skipping to change at line 53
namespace jsocket { namespace jsocket {
/** /**
* \brief SSLSocketOutputStream. * \brief SSLSocketOutputStream.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SSLSocketOutputStream : public jio::OutputStream{ class SSLSocketOutputStream : public jio::OutputStream{
private: private:
#ifdef _WIN32 /** \brief */
SOCKET _fd; jsocket_t _fd;
#else
int _fd;
#endif
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int64_t _buffer_length; int64_t _buffer_length;
/** \brief */ /** \brief */
int64_t _current_index; int64_t _current_index;
/** \brief */ /** \brief */
int64_t _sent_bytes; int64_t _sent_bytes;
 End of changes. 2 change blocks. 
7 lines changed or deleted 4 lines changed or added


 jthread.h   jthread.h 
skipping to change at line 56 skipping to change at line 56
NORMAL_PRIORITY, NORMAL_PRIORITY,
HIGH_PRIORITY HIGH_PRIORITY
}; };
enum jthread_policy_t { enum jthread_policy_t {
POLICY_OTHER, // Normal thread POLICY_OTHER, // Normal thread
POLICY_FIFO, // Real-time thread fifo POLICY_FIFO, // Real-time thread fifo
POLICY_ROUND_ROBIN // Round robin thread round robin POLICY_ROUND_ROBIN // Round robin thread round robin
}; };
struct jthread_map_t {
#ifdef _WIN32 #ifdef _WIN32
HANDLE thread; typedef HANDLE jthread_t;
#else #else
pthread_t thread; typedef pthread_t jthread_t;
#endif #endif
struct jthread_map_t {
jthread_t thread;
bool alive; bool alive;
}; };
class ThreadGroup; class ThreadGroup;
/** /**
* \brief Thread. * \brief Thread.
* *
* @author Jeff Ferr * @author Jeff Ferr
*/ */
class Thread : public virtual jcommon::Object{ class Thread : public virtual jcommon::Object{
private: private:
#ifdef _WIN32 #ifdef _WIN32
/** \brief */ /** \brief */
HANDLE _thread;
/** \brief */
DWORD _thread_id; DWORD _thread_id;
/** \brief */ /** \brief */
DWORD _stackSize; DWORD _stackSize;
/** \brief */ /** \brief */
DWORD _executeFlag; DWORD _executeFlag;
/** \brief */ /** \brief */
LPTHREAD_START_ROUTINE _threadFunction; LPTHREAD_START_ROUTINE _threadFunction;
/** \brief */ /** \brief */
LPVOID _threadArgument; LPVOID _threadArgument;
/** \brief */ /** \brief */
LPSECURITY_ATTRIBUTES _sa; LPSECURITY_ATTRIBUTES _sa;
/** \brief */ /** \brief */
DWORD _exitCode; DWORD _exitCode;
#else #else
/** \brief */ /** \brief */
pthread_t _thread;
/** \brief */
Condition _condition; Condition _condition;
#endif #endif
/** \brief */ /** \brief */
jthread_t _thread;
/** \brief */
std::map<int, jthread_map_t *> _threads; std::map<int, jthread_map_t *> _threads;
/** \brief */ /** \brief */
Mutex jthread_mutex; Mutex jthread_mutex;
/** \brief */ /** \brief */
Runnable *_runnable; Runnable *_runnable;
/** \brief */ /** \brief */
ThreadGroup *_group; ThreadGroup *_group;
/** \brief */ /** \brief */
jthread_type_t _type; jthread_type_t _type;
/** \brief */ /** \brief */
int _key; int _id;
/** \brief */ /** \brief */
bool _is_running; bool _is_running;
/** /**
* \brief * \brief
* *
*/ */
#ifdef _WIN32 #ifdef _WIN32
static DWORD WINAPI ThreadMain(void *owner_); static DWORD WINAPI ThreadMain(void *owner_);
#else #else
static void * ThreadMain(void *owner_); static void * ThreadMain(void *owner_);
#endif #endif
/** /**
* \brief Notify the end of thread. * \brief Notify the end of thread.
* *
*/ */
jthread_map_t * GetMap(int key); jthread_map_t * GetMap(int id);
protected: protected:
/** /**
* \brief * \brief
* *
*/ */
virtual int SetUp(); virtual int SetUp();
/** /**
* \brief Dont use try-catch(...) * \brief Dont use try-catch(...)
skipping to change at line 195 skipping to change at line 195
/** /**
* \brief * \brief
* *
*/ */
static void USleep(uint64_t time_); static void USleep(uint64_t time_);
/** /**
* \brief Get thread identifier * \brief Get thread identifier
* *
*/ */
int GetKey(); jthread_t GetHandler();
/**
* \brief Get thread identifier
*
*/
int GetID();
/** /**
* \brief * \brief
* *
*/ */
void KillAllThreads(); void KillAllThreads();
/** /**
* \brief Init the thread. * \brief Init the thread.
* *
*/ */
void Start(int key = 0); void Start(int id = 0);
/** /**
* \brief Interrupt the thread. * \brief Interrupt the thread.
* *
*/ */
bool Interrupt(int key = 0); bool Interrupt(int id = 0);
/** /**
* \brief Suspend the thread. * \brief Suspend the thread.
* *
*/ */
void Suspend(int key = 0); void Suspend(int id = 0);
/** /**
* \brief Resume the thread. * \brief Resume the thread.
* *
*/ */
void Resume(int key = 0); void Resume(int id = 0);
/** /**
* \brief Return true if thread is started, false if not. * \brief Return true if thread is started, false if not.
* *
*/ */
bool IsRunning(int key = 0); bool IsRunning(int id = 0);
/** /**
* \bried * \bried
* *
*/ */
void Yield(); void Yield();
/** /**
* \bried * \bried
* *
skipping to change at line 255 skipping to change at line 261
/** /**
* \bried * \bried
* *
*/ */
void GetPolicy(jthread_policy_t *policy, jthread_priority_t *priority); void GetPolicy(jthread_policy_t *policy, jthread_priority_t *priority);
/** /**
* \brief Wait for end of thread. * \brief Wait for end of thread.
* *
*/ */
void WaitThread(int key = 0); void WaitThread(int id = 0);
/** /**
* \brief Wait for end of thread. * \brief Wait for end of thread.
* *
*/ */
void Release(); void Release();
}; };
} }
 End of changes. 16 change blocks. 
16 lines changed or deleted 22 lines changed or added


 jthreadexception.h   jthreadexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_THREAD_EXCEPTION_H #ifndef J_THREADEXCEPTION_H
#define J_THREAD_EXCEPTION_H #define J_THREADEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jthread{ namespace jthread{
/** /**
* \brief ThreadException. * \brief ThreadException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jtree.h   jtree.h 
skipping to change at line 68 skipping to change at line 68
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseReleased(MouseEvent *event); virtual void MouseReleased(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseClicked(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseMoved(MouseEvent *event); virtual void MouseMoved(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void MouseWheel(MouseEvent *event); virtual void MouseWheel(MouseEvent *event);
public: public:
/** /**
 End of changes. 1 change blocks. 
6 lines changed or deleted 0 lines changed or added


 junknownhostexception.h   junknownhostexception.h 
skipping to change at line 20 skipping to change at line 20
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_UNKNOWN_HOST_EXCEPTION_H #ifndef J_UNKNOWNHOSTEXCEPTION_H
#define J_UNKNOWN_HOST_EXCEPTION_H #define J_UNKNOWNHOSTEXCEPTION_H
#include "jruntimeexception.h" #include "jruntimeexception.h"
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
namespace jsocket { namespace jsocket {
/** /**
* \brief UnknowHostException. * \brief UnknowHostException.
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jwindow.h   jwindow.h 
skipping to change at line 52 skipping to change at line 52
class Window : public jgui::Container, public jgui::ThemeListener{ class Window : public jgui::Container, public jgui::ThemeListener{
friend class InputManager; friend class InputManager;
friend class WindowManager; friend class WindowManager;
protected: protected:
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
IDirectFBWindow *_window; IDirectFBWindow *_window;
IDirectFBSurface *_surface; IDirectFBSurface *_surface;
#endif #endif
std::vector<WindowListener *> _window_listeners; std::vector<WindowListener *> _window_listeners;
jthread::Mutex _inner_mutex; jthread::Mutex _inner_mutex;
Graphics *_graphics; Graphics *_graphics;
jcursor_style_t _cursor;
int _opacity; int _opacity;
bool _undecorated; bool _undecorated;
jcursor_style_t _cursor;
protected:
void InnerCreateWindow(void *params = NULL); void InnerCreateWindow(void *params = NULL);
public: public:
/** /**
* \brief * \brief
* *
*/ */
Window(int x, int y, int width, int height, int scale_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_SCALE_HEIGHT); Window(int x, int y, int width, int height, int scale_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAULT_SCALE_HEIGHT);
/** /**
skipping to change at line 199 skipping to change at line 199
/** /**
* \brief * \brief
* *
*/ */
virtual void Repaint(int x, int y, int width, int height); virtual void Repaint(int x, int y, int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual void Repaint(Component *c, int x, int y, int width, int height); virtual void Repaint(Component *c);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
 End of changes. 5 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/