summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge branch '31-Net-Protocol-Handling'Gravatar Gediminas Jakutis 2019-05-223-17/+25
| |\ \ | | | | | | | | | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| | * | Protocol: attempted to fix stupids.Gravatar Ramūnas Mažeikis 2019-05-223-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| | * | Protocol: fixed type errors.Gravatar Ramūnas Mažeikis 2019-05-223-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added const where appropriate to satisfy stricter type checking of C++. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| | * | Merge branch '31-Net-Protocol-Handling'.Gravatar Ramūnas Mažeikis 2019-05-223-0/+0
| | |\ \ | | | | | | | | | | | | | | | Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| | * | | Protocol: switched files to C++ and did minor fixes.Gravatar Ramūnas Mažeikis 2019-05-223-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | The code has a chance to compile now. No changes to actual build files yet.
| * | | | device: actually make it all build and such.Gravatar Gediminas Jakutis 2019-05-229-71/+192
| | |/ / | |/| | | | | | | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | | device: fix shoddy file permissions.Gravatar Gediminas Jakutis 2019-05-213-0/+0
| | | | | | | | | | | | | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | | device: strip CRs.Gravatar Gediminas Jakutis 2019-05-211-25/+25
| |/ / | | | | | | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | Protocol: moved udp code out of main.Gravatar Ramūnas Mažeikis 2019-05-214-32/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An effor was made to increase modularity of device code. It was a partial success. IP adress, communications port, and wifi login details had to be made static and visible in main. Time is scarce and I am not about to push this further. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: common no longer has device-specific implementations.Gravatar Ramūnas Mažeikis 2019-05-213-55/+5
| | | | | | | | | | | | | | | | | | Forgot to remove device-specific code from common protocol code. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: implementation of device-side protocol.Gravatar Ramūnas Mažeikis 2019-05-213-40/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parts of protocol specific for device are implementepd to reflect the fact that the device is a client. This effectively means that device gets a single connection only and severe memory restrictions about which the daemon might get informed about in the future. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: changes to interface and some re-implementation.Gravatar Ramūnas Mažeikis 2019-05-215-77/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most functions exposed in protocol.h take a connection descriptor (cd_t) as first argument. This allows for multiple connections. Device gets only one connection which means that cd_t is effectively 0 all the time. Additionaly, any function that actually does anything with a connection descriptor instead of just passing it to another function must be implemented separately in device and daemon. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: implemented request and reply pushing to packet.Gravatar Ramūnas Mažeikis 2019-05-202-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First implementation of complete protocol interface. While the first implementation does compile, the interface might change due to demands from other parts of the project. For now reqest is a tlv that is an unsigned int which represents what message to repeat from daemon. A reply is also a tlv made of two parts --- message sequence number of type msg_ixd_t and the actual null terminated string. All of the above is subject to change. More docs. Doxygen is on the way. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: Implemented protocol error reporting.Gravatar Ramūnas Mažeikis 2019-05-193-62/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now public functions of the protocol can return an error code. More work is done on actual logic. Protocol code has bare-bones doxygen documentation. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Protocol: more work on protocol implementation.Gravatar Ramūnas Mažeikis 2019-05-193-26/+104
| | | | | | | | | | | | | | | | | | | | | | | | Additional functions implemented for protocol and basic functions to work with uuid. Source is buildable but actual build files are not edited to accomodate the changes. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
| * | Whole-project: partial implementation of protocol.Gravatar Ramūnas Mažeikis 2019-05-183-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | This commit is part of ticket #31. Branch is not in a compiling state. Work is being done on utility functions and protocol implementation. To be completed later. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
* | | daemon: net: getlastdata now allocates a buffer.Gravatar Gediminas Jakutis 2019-05-211-5/+14
| |/ |/| | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* | daemon: improve cleanup code.Gravatar Gediminas Jakutis 2019-05-204-13/+71
| | | | | | | | | | | | | | Resolves all memory leaks that can be possibly resolved, glib nonwithstanding. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* | daemon: Added missing null terminator.Gravatar Paulius Ratkevičius 2019-05-191-2/+2
| | | | | | | | Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
* | daemon: Handle new settings vars.Gravatar Paulius Ratkevičius 2019-05-192-5/+51
| | | | | | | | | | | | Part of ticket #33 Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
* | Merge branch '32-settingsv2'Gravatar Gediminas Jakutis 2019-05-192-0/+109
|\ \ | | | | | | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | daemon: read the system-wide config file now.Gravatar Gediminas Jakutis 2019-05-191-2/+6
| | | | | | | | | | | | | | | | | | This usually, but now always means "/etc/usurpation.conf" Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | daemon: Settings actually parse.Gravatar Paulius Ratkevičius 2019-05-191-6/+7
| | | | | | | | | | | | Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
| * | daemon: handle the daemonize flag now.Gravatar Gediminas Jakutis 2019-05-192-3/+42
| | | | | | | | | | | | | | | | | | | | | The flag is now successfully read from the config file and is honored. Logic does not handle leading or trailing whitespace yet. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | daemon: semi-stub for config file handling.Gravatar Paulius Ratkevičius 2019-05-172-0/+68
| | | | | | | | | | | | | | | | | | | | | The daemon now load and somewhat parses the config files. It does not do anything else with the data yet, that's a TODO. Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
* | | daemon: make some functions static.Gravatar Gediminas Jakutis 2019-05-172-6/+6
| | | | | | | | | | | | | | | | | | | | | The functions in question should only be used within the compilation unit and should not be exported. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* | | Merge branch '18-purple'Gravatar Gediminas Jakutis 2019-05-176-0/+305
|\ \ \ | |/ / |/| | | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
| * | daemon: add a skeleton libpurple interface.Gravatar Gediminas Jakutis 2019-05-176-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | This loads and initialized libpurple, but does not actually do anything. This should be enough to warrant closing Ticket #18. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* | | Merge updated branch '29-verbosity-levels'Gravatar Gediminas Jakutis 2019-05-172-4/+4
|\ \ \ | |_|/ |/| |
| * | Fixed some small issues with enumerator.Gravatar Paulius Ratkevičius 2019-05-141-1/+1
| | | | | | | | | | | | | | | | | | Solves ticket #30 Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
| * | Implemented enumerator for verbosity levels.Gravatar Paulius Ratkevičius 2019-05-142-3/+3
| | | | | | | | | | | | | | | | | | Solves ticket #30 Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
* | | Merge branch '29-verbosity-levels'.Gravatar Gediminas Jakutis 2019-05-132-3/+7
|\| |
| * | daemon: Implemented verbosity levels.Gravatar Paulius Ratkevičius 2019-05-132-3/+7
| | | | | | | | | | | | | | | | | | Closes ticket #29. Signed-off-by: Paulius Ratkevičius <paulius.ratkevicius@ktu.edu>
* | | device: fix info cycling.Gravatar Gediminas Jakutis 2019-05-131-3/+3
| | | | | | | | | | | | | | | | | | Now actually shows daemon AND device ip. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* | | device: Bug-fix to make text and dots not overlap.Gravatar Ramūnas Mažeikis 2019-05-121-3/+4
| | | | | | | | | | | | | | | | | | | | | Dots and text to not overlap. Also, text now utilizes all available space (2 lines). Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
* | | device: Device prints first meaningful data.Gravatar Ramūnas Mažeikis 2019-05-123-11/+481
| |/ |/| | | | | | | | | | | | | Device prints its own IP address and that of server daemon. This commit is part of ticket #28. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
* | device: fix screen code.Gravatar Gediminas Jakutis 2019-05-112-8/+24
|/ | | | | | Make the screen code actually work... AND build, to begin with. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* device: Toy screen logic.Gravatar Ramūnas Mažeikis 2019-04-111-1/+27
| | | | Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
* daemon: honour the verbose flag for diagnostics.Gravatar Gediminas Jakutis 2019-04-111-3/+4
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* device: make sure to flush the udp buffer on time.Gravatar Gediminas Jakutis 2019-04-111-8/+8
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* daemon: Initialisation logic patch.Gravatar Ramūnas Mažeikis 2019-04-111-0/+1
| | | | Verbose flag was not initialised in init. It is on by default now.
* device: make ssid and password easy to modifyGravatar Gediminas Jakutis 2019-04-102-6/+39
| | | | | | | | | | | | | The SSID and PSK the device is going to attempt connecting can now be changed with a recompiliation by adjusting the "ssid" and "password" build options for meson with e.g. meson configure -Dssid=realssid -Dpassword=actualpsk Default SSID and PSK are included to otherwise allow test builds. this closes ticket 26. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* daemon: added verbose flag.Gravatar Ramūnas Mažeikis 2019-04-092-0/+8
| | | | | | | | Stub implementation. This commit closes ticket 23. Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
* daemon: employ a flags settings variable.Gravatar Gediminas Jakutis 2019-04-013-9/+62
| | | | | | | | | | | | | | We now have a settings variable for holding various flags. Turn the daemonize setting to a flag. NOTE: the project should not have compiled since commit de18684a25cdc1e310636c5f74d4e901881b5710 but due to some unexplained circumstances, no pre-commit build testing failed. This have been fixed. This commit closes Ticket 25. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* daemon: style adjustmentGravatar Gediminas Jakutis 2019-03-293-18/+31
| | | | | | | | Fix style inconsistencies and move port settings to settings.c. Part of Ticket 3. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* daemon: improve debug output.Gravatar Gediminas Jakutis 2019-03-291-3/+7
| | | | | | | | It now outputs the ip address of the client once it connects. This commit is part of Ticket 3. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* device: add rudimentary network code.Gravatar Gediminas Jakutis 2019-03-291-15/+103
| | | | | | | | | This allows demonstrating basic autodiscovery and simulate data transactions between the server daemon and the device. This commit is part of Ticket 3. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* daemon: Make debug output more informative.Gravatar Paulius Ratkevičius 2019-03-291-11/+13
| | | | | | | | Reduced the spam output and made it show state changes This commit is part of ticket 3. Signed-off-by: Paulius Ratkevičius <pauliuz95@gmail.com>
* daemon: implemented verbose output on timeout.Gravatar Paulius Ratkevičius 2019-03-291-0/+1
| | | | | | | | | Server daemon outputs error message when the client times out into stderr. This commit is part of ticket 3. Signed-off-by: Paulius Ratkevičius <pauliuz95@gmail.com>
* daemon: add networking code.Gravatar Paulius Ratkevičius 2019-03-293-0/+234
| | | | | | | | Port networking code from previous project. This commit is part of ticket 3. Signed-off-by: Paulius Ratkevičius <pauliuz95@gmail.com>