Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / adapter / fwl_adapterthreadmgr.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FWL_ADAPTER_THREAD_H\r
8 #define _FWL_ADAPTER_THREAD_H\r
9 class IFWL_Thread;\r
10 class IFWL_AdapterThreadMgr;\r
11 class IFWL_AdapterMutex;\r
12 class IFWL_AdapterSemaphore;\r
13 class IFWL_AdapterThreadMgr\r
14 {\r
15 public:\r
16     virtual FWL_ERR             Start(IFWL_Thread *pThread, FWL_HTHREAD &hThread, FX_BOOL bSuspended = FALSE) = 0;\r
17     virtual FWL_ERR             Resume(FWL_HTHREAD hThread) = 0;\r
18     virtual FWL_ERR             Suspend(FWL_HTHREAD hThread) = 0;\r
19     virtual FWL_ERR             Kill(FWL_HTHREAD hThread, FX_INT32 iExitCode) = 0;\r
20     virtual FWL_ERR             Stop(FWL_HTHREAD hThread, FX_INT32 iExitCode) = 0;\r
21     virtual IFWL_Thread* GetCurrentThread() = 0;\r
22 };\r
23 class IFWL_AdapterSemaphore\r
24 {\r
25 public:\r
26     static IFWL_AdapterSemaphore * Create();\r
27     virtual FWL_ERR Destroy() = 0;\r
28     virtual FWL_ERR Wait() const = 0;\r
29     virtual FWL_ERR Post() = 0;\r
30     virtual FWL_ERR Value(FX_DWORD &val) const = 0;\r
31     virtual FWL_ERR Reset(FX_INT32 init) = 0;\r
32 };\r
33 #endif\r