This program is created for implementing the Exam Evaluator project client. More...
#include <gtk/gtk.h>
#include <glib.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <time.h>
#include <signal.h>
#include <sqlite3.h>
Go to the source code of this file.
Defines | |
#define | BUFFER 4096 |
Functions | |
void | onExit (GtkWidget *window, gpointer data) |
This function is called when someone tries to close top level window. | |
void | close_properly (int signal) |
This function is called when user types ctrl+c which will shut down the client completely. | |
void | send_message (GtkWidget *button, gpointer data) |
This function is called when user clicks the next button on the window . | |
void | send_message1 (GtkWidget *button, gpointer data) |
This function is called when user clicks the previous button on the window . | |
int | main (int argc, char *argv[]) |
Used to connect to tcp server and print the results on the window. | |
Variables | |
GtkWidget * | text_view |
GtkTextBuffer * | buffer |
char ** | result |
char | temp [BUFFER] |
char | msg [10 *BUFFER] |
int | nrow |
int | ncol |
int | rc |
int | re |
sqlite3 * | database1 |
int | roll = 0 |
int | num = 0 |
char * | port |
char * | addr |
int | sfd |
This program is created for implementing the Exam Evaluator project client.
It will ask u for the cut off marks and create a window which will have three options next,previous and exit.
Definition in file client.c.
#define BUFFER 4096 |
Definition at line 21 of file client.c.
Referenced by main(), send_message(), and send_message1().
void close_properly | ( | int | signal | ) |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Used to connect to tcp server and print the results on the window.
The use must provide the i.p. address of tcp day tine server and port number through command line argument and then time is printed in human readable format. Note that it will work only for ipv4 servers.
argc | number of command line arguments passed to the program including program name itself. | |
argv | array of command line arguments. |
Definition at line 172 of file client.c.
References addr, buffer, BUFFER, database1, msg, ncol, nrow, num, onExit(), port, rc, re, result, send_message(), send_message1(), sfd, temp, and text_view.
void onExit | ( | GtkWidget * | window, | |
gpointer | data | |||
) |
void send_message | ( | GtkWidget * | button, | |
gpointer | data | |||
) |
This function is called when user clicks the next button on the window .
All arguments are passed to gtk for processing, which removes any arguments relevant to it. All other arguments are ignored.
Definition at line 91 of file client.c.
References buffer, BUFFER, msg, num, re, result, roll, sfd, and text_view.
Referenced by main().
void send_message1 | ( | GtkWidget * | button, | |
gpointer | data | |||
) |
This function is called when user clicks the previous button on the window .
All arguments are passed to gtk for processing, which removes any arguments relevant to it. All other arguments are ignored.
Definition at line 127 of file client.c.
References buffer, BUFFER, msg, re, result, roll, sfd, and text_view.
Referenced by main().
GtkTextBuffer* buffer |
Definition at line 26 of file client.c.
Referenced by main(), send_message(), and send_message1().
char msg[10 *BUFFER] |
Definition at line 33 of file client.c.
Referenced by main(), send_message(), and send_message1().
int num = 0 |
Definition at line 42 of file client.c.
Referenced by main(), and send_message().
int re |
Definition at line 36 of file client.c.
Referenced by main(), send_message(), and send_message1().
char** result |
Definition at line 27 of file client.c.
Referenced by main(), send_message(), and send_message1().
int roll = 0 |
Definition at line 42 of file client.c.
Referenced by send_message(), and send_message1().
int sfd |
Definition at line 60 of file client.c.
Referenced by close_properly(), main(), send_message(), and send_message1().
GtkWidget* text_view |
Definition at line 25 of file client.c.
Referenced by main(), send_message(), and send_message1().