Public Member Functions | |
| UniVote () | |
| void | startApp () throws MIDletStateChangeException |
| void | pauseApp () |
| void | destroyApp (boolean unconditional) |
| void | traceError (String message) |
| void | traceWait (String message) |
| void | traceGoodbye (String message) |
| void | connectServer (final UUID uuid) |
| void | showQuestions (boolean firstRun) |
| void | showAnswers (int question) |
| void | voteAgain () |
| void | deleteQuestionLastVoted () |
| void | votingDone () |
| void | sendVote (String q_id, int a_id, String c_id) |
Private Member Functions | |
| String[] | split (String original, String separator) |
Private Attributes | |
| final UUID | SERVER_UUID |
| final String | RECORD_SEPARATOR = ";" |
| final String | FIELD_SEPARATOR = ":" |
| LocalDevice | localDevice = null |
| RemoteDevice | server = null |
| DiscoveryAgent | discoveryAgent = null |
| StreamConnection | conn |
| DataInputStream | in = null |
| DataOutputStream | out = null |
| String | questions |
| String[] | questionRecords = null |
| String[] | questionFields = null |
| ChoiceGroup | questionsGroup = null |
| ChoiceGroup | answersGroup = null |
| ChoiceGroup | againGroup = null |
| String | questionLastVoted |
| String | q_id = null |
| String | q_content = null |
| String | a_1 = null |
| String | a_2 = null |
| String | a_3 = null |
| Display | display = Display.getDisplay(this) |
| Command | exitCommand = new Command("Exit", Command.EXIT, 1) |
UniVote class makes up the entire client application.
Definition at line 14 of file UniVote.java.
|
|
Definition at line 63 of file UniVote.java. |
|
|
Attempts to connect to the UniVote server and open data streams for data transmission via the RFCOMM protocol.
Definition at line 188 of file UniVote.java. Referenced by startApp(). |
|
|
Deletes the local question and answer records which have been voted on. Definition at line 349 of file UniVote.java. |
|
|
Destroys the application. If the application is closed then the Definition at line 118 of file UniVote.java. |
|
|
Pauses the applicaton. No function. Definition at line 110 of file UniVote.java. |
|
||||||||||||||||
|
Sends a vote back to the server.
Definition at line 390 of file UniVote.java. |
|
|
Shows the list of answers for a given question.
Definition at line 281 of file UniVote.java. |
|
|
Downloads the list of questions which haven't been voted on by this Bluetooth address, and builds a GUI allowing the user to select which question they want to vote on.
Definition at line 231 of file UniVote.java. |
|
||||||||||||
|
Splits a string transmitted from the server into its components. Definition at line 409 of file UniVote.java. |
|
|
Starts the application. Displays a spalsh screen and begins searching for the nearest Univote server. Once found, the questions are downloaded awaiting user response.
Definition at line 74 of file UniVote.java. References connectServer(), discoveryAgent, display, localDevice, SERVER_UUID, traceError(), and traceWait(). Here is the call graph for this function: ![]() |
|
|
Outputs an error message to the phone, with an "Exit" command.
Definition at line 126 of file UniVote.java. References exitCommand. Referenced by startApp(). |
|
|
Outputs a goodbye message to the phone, with an "Exit" command.
Definition at line 166 of file UniVote.java. |
|
|
Outputs a please wait message to the phone, with a continuous gauge.
Definition at line 147 of file UniVote.java. Referenced by startApp(). |
|
|
Asks the user whether they want to vote again. Definition at line 319 of file UniVote.java. |
|
|
Confirmation that the application is closing. Definition at line 369 of file UniVote.java. |
|
|
Definition at line 50 of file UniVote.java. |
|
|
Definition at line 51 of file UniVote.java. |
|
|
Definition at line 52 of file UniVote.java. |
|
|
Definition at line 42 of file UniVote.java. |
|
|
Definition at line 41 of file UniVote.java. |
|
|
Definition at line 30 of file UniVote.java. |
|
|
Definition at line 29 of file UniVote.java. Referenced by startApp(). |
|
|
Definition at line 57 of file UniVote.java. Referenced by startApp(). |
|
|
Definition at line 58 of file UniVote.java. Referenced by traceError(). |
|
|
Definition at line 22 of file UniVote.java. |
|
|
Definition at line 31 of file UniVote.java. |
|
|
Definition at line 27 of file UniVote.java. Referenced by startApp(). |
|
|
Definition at line 32 of file UniVote.java. |
|
|
Definition at line 49 of file UniVote.java. |
|
|
Definition at line 48 of file UniVote.java. |
|
|
Definition at line 39 of file UniVote.java. |
|
|
Definition at line 43 of file UniVote.java. |
|
|
Definition at line 38 of file UniVote.java. |
|
|
Definition at line 37 of file UniVote.java. |
|
|
Definition at line 40 of file UniVote.java. |
|
|
Definition at line 21 of file UniVote.java. |
|
|
Definition at line 28 of file UniVote.java. |
|
|
Initial value:
new UUID("00112233445566778899AABBCCDDEEFF", false)
Definition at line 19 of file UniVote.java. Referenced by startApp(). |
1.4.6