Package-level declarations

Types

Link copied to clipboard
interface DataSource

Interface for a data source handling messages.

Link copied to clipboard
@Serializable
data class Failure(val failure: String = "UnSuccessful", val result: String)

Represents a failure response.

Link copied to clipboard
data class LocationMember(    val latitude: Long,     val longitude: Long,     val socket: WebSocketSession)

Represents a member with location information.

Link copied to clipboard
@Serializable
data class LocationMessage(    val from: String?,     val to: String?,     val latitude: String?,     val longitude: String?,     @BsonId val id: String = ObjectId().toString())

Represents a location-based message.

Link copied to clipboard
data class Member(    val username: String,     val sessionId: String,     val socket: WebSocketSession)

Represents a member in a chat application.

Link copied to clipboard
@Serializable
data class Message(    val userName: String,     val text: String,     val timeStamp: Long,     @BsonId val id: String = ObjectId().toString())

Represents a message in a chat application.

Link copied to clipboard
class MessageDataSourceImpl(db: CoroutineDatabase) : DataSource

Implementation of the DataSource interface for handling messages.

Link copied to clipboard
interface P2PDataSource
Link copied to clipboard
class P2PImpl(db: CoroutineDatabase) : P2PDataSource

Implementation of the P2PDataSource interface for handling peer-to-peer messages and location information.

Link copied to clipboard
data class P2PMember(    val from: String?,     val to: String?,     val sessionId: String,     val socket: WebSocketSession)

Represents a member in a peer-to-peer messaging system.

Link copied to clipboard
@Serializable
data class P2PMessage(    val from: String?,     val to: String?,     val text: String?,     val timeStamp: Long?,     @BsonId val id: String = ObjectId().toString())

Represents a peer-to-peer message.

Link copied to clipboard
@Serializable
data class Stories(    val userName: String?,     val storyUpdated: Long?,     val storyOver: Long?,     val caption: String?,     val image: String?)

Represents a collection of stories.

Link copied to clipboard
@Serializable
data class Success(val result: String, val data: UserInfo)

Represents a success response.

Link copied to clipboard
@Serializable
data class Upload(val result: String, val uniqueId: String?)

Represents an upload response.

Link copied to clipboard
@Serializable
data class UserInfo(    @BsonId val userName: String,     val name: String,     val email: String,     val profile: String? = null)

Represents user information.