No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.py 1013B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # -*- coding: utf-8 -*-
  2. from lodel.plugin import LodelHook
  3. from .filesystem_session_store import FileSystemSession
  4. ## @brief starts a new session and returns its sid
  5. # @param caller *
  6. # @param payload dict
  7. # @return str
  8. def start_session():
  9. new_session = FileSystemSession()
  10. return new_session.sid
  11. ## @brief destroys a session
  12. # @param caller *
  13. # @param sid str : session id
  14. def destroy_session(sid):
  15. FileSystemSession.destroy(sid)
  16. ## @brief reads a session content
  17. # @param caller *
  18. # @param sid str: session id
  19. # @return FileSystemSession
  20. def restore_session(sid):
  21. return FileSystemSession.load(sid)
  22. ##@brief Set a session value
  23. #@param name str : session variable name
  24. #@param value mixed : session variable value
  25. def set_value(name, value):
  26. pass
  27. ##@brief Get a session value
  28. #@param name str : the session variable name
  29. #@return the value
  30. def get_value(name):
  31. pass
  32. ##@brief Delete a session value
  33. #@param name str : the session variable name
  34. def del_value(name):
  35. pass