2023-06-30 09:54:08 +00:00
|
|
|
package events
|
|
|
|
|
|
|
|
import (
|
2023-07-03 21:03:36 +00:00
|
|
|
"net/http"
|
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
"go.mau.fi/mautrix-gmessages/libgm/binary"
|
2023-06-30 09:54:08 +00:00
|
|
|
)
|
|
|
|
|
2023-06-30 13:09:29 +00:00
|
|
|
type ClientReady struct {
|
2023-07-09 11:16:52 +00:00
|
|
|
SessionId string
|
|
|
|
Conversations []*binary.Conversation
|
2023-06-30 09:54:08 +00:00
|
|
|
}
|
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
func NewClientReady(sessionId string, conversationList *binary.Conversations) *ClientReady {
|
2023-06-30 13:09:29 +00:00
|
|
|
return &ClientReady{
|
2023-07-09 11:16:52 +00:00
|
|
|
SessionId: sessionId,
|
|
|
|
Conversations: conversationList.Conversations,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthTokenRefreshed struct {
|
|
|
|
Token []byte
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewAuthTokenRefreshed(token []byte) *AuthTokenRefreshed {
|
|
|
|
return &AuthTokenRefreshed{
|
|
|
|
Token: token,
|
2023-06-30 09:54:08 +00:00
|
|
|
}
|
|
|
|
}
|
2023-07-03 21:03:36 +00:00
|
|
|
|
|
|
|
type ListenFatalError struct {
|
|
|
|
Resp *http.Response
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListenTemporaryError struct {
|
|
|
|
Error error
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListenRecovered struct{}
|