Commit Graph

142 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire 24aaf05dd5 README
- Added coverage badge
2023-11-26 14:17:56 +02:00
Tristan B. Velloza Kildaire 313ff9b557 Connection
- Removed now-completed TODO
- Use a boolean to supress unreachable errors
- Added a TODO to implement the above
- On exiting loop call the `Server`'s `onConnectionDisconnect(Connection)` method
2023-11-26 14:15:59 +02:00
Tristan B. Velloza Kildaire 416d583658 Connection
- Added TODO (backported)
2023-11-26 14:13:12 +02:00
Tristan B. Velloza Kildaire d44cc03437 Server
- Added initial implementation of `onConnectionDisconnect(Connection connection)`
2023-11-26 14:12:04 +02:00
Tristan B. Velloza Kildaire bbcf9b1413 LinkType
- Added first member (so `LinkType.init`) `UNSET`

Connection

- Added `linkType` and getter
2023-11-26 14:09:25 +02:00
Tristan B. Velloza Kildaire 8df9c09f43 LinkType
- Added new enum
- With members `USER` and `SERVER`
2023-11-26 14:08:05 +02:00
Tristan B. Velloza Kildaire 8dbd906b7d MessageDeliveryTransport
- Documented methods
2023-11-23 09:45:59 +02:00
Tristan B. Velloza Kildaire 8a572978af MessageDeliveryTransport
- Documented the interface
2023-11-23 09:44:52 +02:00
Tristan B. Velloza Kildaire f11c81d599 Message
- Documented
2023-11-23 09:40:39 +02:00
Tristan B. Velloza Kildaire 9e137e4301 Server
- Print out the found `User*` (tostring it) when found in `onOutgoing(Message latest, Queue from)`
2023-11-23 09:26:50 +02:00
Tristan B. Velloza Kildaire 1d8c0044a8 USer
- Implemented `toString()`
2023-11-23 09:26:20 +02:00
Tristan B. Velloza Kildaire d9b95dac5f AuthManager
- Fixed null pointer dereference error in `getUser(string)` which would occur when a user entry was not found in the hashmap
2023-11-22 21:54:38 +02:00
Tristan B. Velloza Kildaire e54f7f2d8a Server
_ Print warnings when either `fromUser` or/and `toUser` lookups fail
2023-11-22 21:50:29 +02:00
Tristan B. Velloza Kildaire dd90aa7a5e Server
- Added stubs for null checking for the `User*`'s
2023-11-22 21:49:03 +02:00
Tristan B. Velloza Kildaire 9205c5cd06 AuthManager
- `getUser(string username)` will now return `null` if the user could not be found, else the `User*` is returned
2023-11-22 21:48:40 +02:00
Tristan B. Velloza Kildaire cef970944a Server
- When `onOutgoing(Message, QUeue)` is called lookup the `User*`s for the source and destination from the provided `Message`
2023-11-22 21:30:38 +02:00
Tristan B. Velloza Kildaire dff66decae Message
- Added `getFrom()`, `getDestination()` and `getMessage()`
2023-11-22 21:29:39 +02:00
Tristan B. Velloza Kildaire fe5f05d532
Update d.yml 2023-11-22 16:20:23 +02:00
Tristan B. Velloza Kildaire 4a3aa28357
Update d.yml 2023-11-22 16:19:50 +02:00
Tristan B. Velloza Kildaire 6f2f542580 Dub
- Require at minimum `gogga` version `2.2.1`

Logging

- Switched logger mode to a clearer one
2023-11-22 12:01:07 +02:00
Tristan B. Velloza Kildaire f5721bfc3c Queue
- Added some notes
2023-11-22 11:04:28 +02:00
Tristan B. Velloza Kildaire 0e479307a2 PolicyDecision
- Added new enum type

Queue

- Switched to using `DList` which maintains a head AND (most importantly) a TAIL which we can therefore reach in O(1) time obviously
- This above is useful for the `PolicyDecision` of `DROP_TAIL`
- The `enqueue(Message)` method now respects the result of `policyCheck()`
- Implemented `policyCheck()`
2023-11-22 11:01:52 +02:00
Tristan B. Velloza Kildaire 62c35787e3 MessageManager
- Enqueue messages for send-q and receive-q respectively
2023-11-22 10:54:07 +02:00
Tristan B. Velloza Kildaire b698576bce
Merge pull request #1 from renaissanceorg/user_record
User record
2023-11-22 10:47:05 +02:00
Tristan B. Velloza Kildaire 05345b8ce6 Connection
- Re-enabled validation checking
2023-11-22 10:42:23 +02:00
Tristan B. Velloza Kildaire 56d48d2645 User
- Now contains a  `Option*` map mapped to by a `string`
- Implemented `addOption(Option*)`

Option

- Added new type

AuthManager

- Added TODO
2023-11-22 10:33:20 +02:00
Tristan B. Velloza Kildaire 24534b7ae9 Connection
- Added comment
2023-11-22 10:32:21 +02:00
Tristan B. Velloza Kildaire d9f7ef7c2a Connection
- Disabled validation for now
2023-11-22 10:30:21 +02:00
Tristan B. Velloza Kildaire c36223ac08 Connection
- Cleaned up imports
- Switched to using a switch statement for handling the different `CommandType`s
2023-11-22 10:30:04 +02:00
Tristan B. Velloza Kildaire b120ba19e4 Connection
- Handle message sending
- Set the status to delivered
2023-11-21 14:11:17 +02:00
Tristan B. Velloza Kildaire 0096b7d4ac Server
- Added a `MessageManager`
- Implemented `getMessageManager()`
- Implemented the `MessageDeliveryTransport` interface by implementing `onIncoming(...)` and `onOugoing(...)`
2023-11-21 13:46:14 +02:00
Tristan B. Velloza Kildaire 0b252c07ba MessageManager
- Log calls to `sendq(Message)`
2023-11-21 13:45:28 +02:00
Tristan B. Velloza Kildaire 334a013104 Connection
- Set the `Message`'s from field to the current user
- Log message send
2023-11-21 13:45:00 +02:00
Tristan B. Velloza Kildaire b6c003d808 Connection
- Implemented `isAuthd()`
- Added `responseStatus` (not sure if I am going to be using it though)
- Added TODOs regarding `AUTH_COMMAND`
- Initial support for `CHANNEL_SEND_MESSAGE`; it now will discover all recipients, construct the respective `Message` and place it on the `MessageManager`'s send-queue
2023-11-20 16:16:24 +02:00
Tristan B. Velloza Kildaire e075e1f7e0 Message
- Implemented `setBody(string)`, `setFrom(string)` and `setDestination(string)`

MessageManager

- Migrated to using the `MessageDeliveryTransport` interface
2023-11-20 16:16:15 +02:00
Tristan B. Velloza Kildaire 386b86950f Queue
- Added the `enqueue(Message)` method
- Initialize a lock for the queue itself

MessageDeliveryTransport

- Added new interface

MessageManager

- Added stub `sendq(Message)`
- Added stub `recvq(Message)`
2023-11-20 15:37:42 +02:00
Tristan B. Velloza Kildaire cd6c07d209 Message
- Added message structure
2023-11-19 21:13:05 +02:00
Tristan B. Velloza Kildaire 6a493eb29c Message manager
- Added `QUEUE_DEFAULT_SIZE` with a value of `100`

Queue

- Added new type

MEssageManager

- Added basic message manager sub-system
- This is still a work-in-progress
2023-11-19 20:20:13 +02:00
Tristan B. Velloza Kildaire 6343121ba5 AuthManager
- Made `getUser(string)` public
- Added note to it
2023-11-19 16:12:05 +02:00
Tristan B. Velloza Kildaire e2d378f5a5 AuthManager
- Implemented `removeUser(string username)`
- Implemented `addUser(String)`
2023-11-19 16:07:27 +02:00
Tristan B. Velloza Kildaire 8781354616 DummyProvider
- Fixed
2023-11-19 15:09:30 +02:00
Tristan B. Velloza Kildaire 3d6e1da659 AuthManager
- FIxed API usage
2023-11-19 15:09:01 +02:00
Tristan B. Velloza Kildaire 04b7a87f78 AuthProvider
- No longer provide a `User`

DummyProvider

- API update
2023-11-19 15:08:32 +02:00
Tristan B. Velloza Kildaire 8a7e70e2a9 AuthManager
- Changed the `User[string]` to `User*[string]`
- Updated `getUser(string)` to use the new `User*[string]`
2023-11-19 14:50:07 +02:00
Tristan B. Velloza Kildaire ebd2df7af7 Server
- Added an instance of the `AuthManager`
- `attemptAuth(string, string)` now uses the authentication manager

Server (unittests)

- Disabled a unit test for now
2023-11-19 14:38:18 +02:00
Tristan B. Velloza Kildaire bfc5467f28 AuthProvider
- Added provider interface

DummyProvider

- Added a dummy authentication provider

AuthManager

- Implemented an initial authentication manager
2023-11-19 14:37:00 +02:00
Tristan B. Velloza Kildaire 8415fd7c9f User (unittests)
- Added more testing

User

- Updated names
- Implemented `getUsername()`
2023-11-18 13:58:52 +02:00
Tristan B. Velloza Kildaire 6e2e680b44 User
- Constructor now sets username
2023-11-18 13:54:07 +02:00
Tristan B. Velloza Kildaire dac50c74c6 User
- Implemented `setUsername(string username)`
- Implemented `getStatus()`
- Added status field

Status

- Added new enum
2023-11-18 13:53:48 +02:00
Tristan B. Velloza Kildaire b14f338695 User
- Added new type
- No default constructor as I need to actually initialize somethings

Users (unittests)

- Added a rudimentary unittest
2023-11-18 13:20:46 +02:00