Public Member Functions | |
| PhotoGrotto (QString confName, QObject *parent=0) | |
Protected Slots | |
| void | haveCloseSocket (QTcpSocket *) |
| void | sendData (QTcpSocket *, QByteArray) |
Protected Member Functions | |
| void | getTcpParms () |
| virtual void | incomingConnection (int sock) |
This class functions as an http server which accepts connections from external clients. The definition of the server is specified in an XML file.
Definition at line 33 of file photogrotto.h.
| PhotoGrotto::PhotoGrotto | ( | QString | confName, | |
| QObject * | parent = 0 | |||
| ) |
This functioncreates a PhotoGrotto object. The definition of the server is specified in an XML file. the file named by the parameter confName. The Parameter parent points to the parent object of this one is any.
Definition at line 51 of file photogrotto.cpp.
References getTcpParms().
| void PhotoGrotto::getTcpParms | ( | ) | [protected] |
This function retrieves the name of the log file and opens it for logging. It also retrieves the address and port for the server to listen on and populates the class variables address and port with the defined information.
Definition at line 133 of file photogrotto.cpp.
Referenced by PhotoGrotto().
| void PhotoGrotto::haveCloseSocket | ( | QTcpSocket * | sock | ) | [protected, slot] |
This function is called then the socket sock is closed. It cleans up the socket object.
Definition at line 213 of file photogrotto.cpp.
Referenced by incomingConnection().
| void PhotoGrotto::incomingConnection | ( | int | sock | ) | [protected, virtual] |
This function overloads the like named function in the QTcpServer class and is called whenever a new tcp connection is made. It creates a new DbPhoto Object to handle the requests for the object and starts the thread for that object to run on. It also connects the appropriate signals and slots for controlling the thread.
Definition at line 101 of file photogrotto.cpp.
References haveCloseSocket(), sendData(), and DbPhotoService::setMaxCache().
| void PhotoGrotto::sendData | ( | QTcpSocket * | sock, | |
| QByteArray | buf | |||
| ) | [protected, slot] |
This function writes the buffer buf of data to the socket sock. This is called by the thread handling the requests for the socket.
Definition at line 198 of file photogrotto.cpp.
Referenced by incomingConnection().
1.5.0