1
This commit is contained in:
parent
b1cd86be36
commit
8471c502a4
@ -2,6 +2,7 @@ package player
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
"main/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ReadMail struct {
|
type ReadMail struct {
|
||||||
@ -17,10 +18,12 @@ type DeletedMail struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type player struct {
|
type player struct {
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
accountId string
|
accountId string
|
||||||
sessionId string
|
sessionId string
|
||||||
registerTime int32
|
registerTime int32
|
||||||
|
readMailHash map[int64]*ReadMail
|
||||||
|
deletedMailHash map[int64]*DeletedMail
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) Lock() {
|
func (this *player) Lock() {
|
||||||
@ -34,3 +37,21 @@ func (this *player) UnLock() {
|
|||||||
func (this *player) GetAccountId() string {
|
func (this *player) GetAccountId() string {
|
||||||
return this.accountId
|
return this.accountId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *player) MarkMails(mails []common.Mail) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *player) GetAttachment(mails []common.Mail) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *player) DeleteMails(mails []common.Mail) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *player) checkLock() {
|
||||||
|
if !this.lock.TryLock() {
|
||||||
|
panic("player checkLock error")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user