#include "quit.h" #include #include QuitCmd::QuitCmd ( const char* label, ButtonState* b, View* v ) : (label, b, 1) { input = new Sensor(updownEvents); bs = b; view = v; } void QuitCmd::Press() { printf("Quitcmd: Quiting!\n"); struct QuitRecord qr; qr.msgType = QUIT; if (sendto(view->socketToUA, (char *) &qr, 1, 0, &(view->toSocket), sizeof(struct sockaddr_un)) < 0) perror("sending datagram message"); exit(0); }