SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AuthorizationError.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
10 
12 {
13  uint32_t m_error_type;
14 public:
16  {}
17  AuthorizationError(uint32_t err) : AuthLinkEvent(evAuthorizationError),m_error_type(err)
18  {}
19  void init(EventProcessor *ev_src,uint32_t error_type) {m_error_type=error_type; m_event_source=ev_src;}
20  void serializeto(GrowingBuffer &buf) const
21  {
22  buf.uPut((uint8_t)1);
23  buf.uPut(m_error_type);
24  }
26  {
27  uint8_t op;
28  buf.uGet(op);
29  assert(op==1);
30  buf.uGet(m_error_type);
31  }
32 };
void init(EventProcessor *ev_src, uint32_t error_type)
Definition: AuthorizationError.h:19
AuthorizationError(uint32_t err)
Definition: AuthorizationError.h:17
void uGet(T &val)
Definition: Buffer.h:76
Definition: Buffer.h:17
Definition: AuthEvents.h:30
void uPut(const T &val)
Definition: Buffer.h:69
void serializefrom(GrowingBuffer &buf)
Definition: AuthorizationError.h:25
AuthorizationError()
Definition: AuthorizationError.h:15
Definition: EventProcessor.h:13
EventProcessor * m_event_source
Definition: SEGSEvent.h:36
Definition: AuthorizationError.h:11
void serializeto(GrowingBuffer &buf) const
Definition: AuthorizationError.h:20
Definition: AuthEvents.h:15