Leaked source code of windows server 2003
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.

48 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name :
  4. sessmgr.h
  5. Abstract:
  6. Manages the set of sessions
  7. Revision History:
  8. --*/
  9. #pragma once
  10. class DrSessionManager : public TopObj
  11. {
  12. private:
  13. DoubleList _SessionList;
  14. public:
  15. DrSessionManager();
  16. virtual ~DrSessionManager();
  17. VOID LockExclusive()
  18. {
  19. _SessionList.LockExclusive();
  20. }
  21. VOID Unlock()
  22. {
  23. _SessionList.Unlock();
  24. }
  25. BOOL AddSession(SmartPtr<DrSession> &Session);
  26. BOOL FindSessionById(ULONG SessionId, SmartPtr<DrSession> &SessionFound);
  27. BOOL FindSessionByIdAndClient(ULONG SessionId, ULONG ClientId,
  28. SmartPtr<DrSession> &SessionFound);
  29. BOOL FindSessionByClientName(PWCHAR ClientName, SmartPtr<DrSession> &SessionFound);
  30. BOOL OnConnect(PCHANNEL_CONNECT_IN ConnectIn,
  31. PCHANNEL_CONNECT_OUT ConnectOut);
  32. VOID OnDisconnect(PCHANNEL_DISCONNECT_IN DisconnectIn,
  33. PCHANNEL_DISCONNECT_OUT DisconnectOut);
  34. VOID Remove(DrSession *Session);
  35. };
  36. extern DrSessionManager *Sessions;