ReplicaEnums.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. /// \file
  11. /// \brief Contains enumerations used by the ReplicaManager system. This file is a lightweight header, so you can include it without worrying about linking in lots of other crap
  12. ///
  13. #ifndef __REPLICA_ENUMS_H
  14. #define __REPLICA_ENUMS_H
  15. /// Replica interface flags, used to enable and disable function calls on the Replica object
  16. /// Passed to ReplicaManager::EnableReplicaInterfaces and ReplicaManager::DisableReplicaInterfaces
  17. enum
  18. {
  19. REPLICA_RECEIVE_DESTRUCTION=1<<0,
  20. REPLICA_RECEIVE_SERIALIZE=1<<1,
  21. REPLICA_RECEIVE_SCOPE_CHANGE=1<<2,
  22. REPLICA_SEND_CONSTRUCTION=1<<3,
  23. REPLICA_SEND_DESTRUCTION=1<<4,
  24. REPLICA_SEND_SCOPE_CHANGE=1<<5,
  25. REPLICA_SEND_SERIALIZE=1<<6,
  26. REPLICA_SET_ALL = 0xFF // Allow all of the above
  27. };
  28. enum ReplicaReturnResult
  29. {
  30. /// This means call the function again later, with the same parameters
  31. REPLICA_PROCESS_LATER,
  32. /// This means we are done processing (the normal result to return)
  33. REPLICA_PROCESSING_DONE,
  34. /// This means cancel the processing - don't send any network messages and don't change the current state.
  35. REPLICA_CANCEL_PROCESS,
  36. /// Same as REPLICA_PROCESSING_DONE, where a message is sent, but does not clear the send bit.
  37. /// Useful for multi-part sends with different reliability levels.
  38. /// Only currently used by Replica::Serialize
  39. REPLICA_PROCESS_AGAIN,
  40. /// Only returned from the Replica::SendConstruction interface, means act as if the other system had this object but don't actually
  41. /// Send a construction packet. This way you will still send scope and serialize packets to that system
  42. REPLICA_PROCESS_IMPLICIT
  43. };
  44. #endif
粤ICP备19079148号