mirror of
https://github.com/amigan/aim-oscar-server.git
synced 2025-01-31 04:52:37 -05:00
move fix service manager
This commit is contained in:
parent
22b53dad27
commit
e64fb2d9a0
1 changed files with 6 additions and 4 deletions
|
@ -1,20 +1,22 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
import "aim-oscar/services"
|
||||||
|
|
||||||
type ServiceManager struct {
|
type ServiceManager struct {
|
||||||
services map[uint16]Service
|
services map[uint16]services.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServiceManager() *ServiceManager {
|
func NewServiceManager() *ServiceManager {
|
||||||
return &ServiceManager{
|
return &ServiceManager{
|
||||||
services: make(map[uint16]Service),
|
services: make(map[uint16]services.Service),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sm *ServiceManager) RegisterService(family uint16, service Service) {
|
func (sm *ServiceManager) RegisterService(family uint16, service services.Service) {
|
||||||
sm.services[family] = service
|
sm.services[family] = service
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sm *ServiceManager) GetService(family uint16) (Service, bool) {
|
func (sm *ServiceManager) GetService(family uint16) (services.Service, bool) {
|
||||||
s, ok := sm.services[family]
|
s, ok := sm.services[family]
|
||||||
return s, ok
|
return s, ok
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue