Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
82a59040
Commit
82a59040
authored
Oct 19, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Added IDailyTrigger::DaysInterval property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18427a0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
task.c
dlls/taskschd/task.c
+15
-4
scheduler.c
dlls/taskschd/tests/scheduler.c
+24
-0
No files found.
dlls/taskschd/task.c
View file @
82a59040
...
...
@@ -38,6 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
typedef
struct
{
IDailyTrigger
IDailyTrigger_iface
;
LONG
ref
;
short
interval
;
}
DailyTrigger
;
static
inline
DailyTrigger
*
impl_from_IDailyTrigger
(
IDailyTrigger
*
iface
)
...
...
@@ -217,15 +218,24 @@ static HRESULT WINAPI DailyTrigger_put_Enabled(IDailyTrigger *iface, VARIANT_BOO
static
HRESULT
WINAPI
DailyTrigger_get_DaysInterval
(
IDailyTrigger
*
iface
,
short
*
days
)
{
DailyTrigger
*
This
=
impl_from_IDailyTrigger
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
days
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
days
);
*
days
=
This
->
interval
;
return
S_OK
;
}
static
HRESULT
WINAPI
DailyTrigger_put_DaysInterval
(
IDailyTrigger
*
iface
,
short
days
)
{
DailyTrigger
*
This
=
impl_from_IDailyTrigger
(
iface
);
FIXME
(
"(%p)->(%d)
\n
"
,
This
,
days
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
days
);
if
(
days
<=
0
)
return
E_INVALIDARG
;
This
->
interval
=
days
;
return
S_OK
;
}
static
HRESULT
WINAPI
DailyTrigger_get_RandomDelay
(
IDailyTrigger
*
iface
,
BSTR
*
pRandomDelay
)
...
...
@@ -279,6 +289,7 @@ static HRESULT DailyTrigger_create(ITrigger **trigger)
daily_trigger
->
IDailyTrigger_iface
.
lpVtbl
=
&
DailyTrigger_vtbl
;
daily_trigger
->
ref
=
1
;
daily_trigger
->
interval
=
1
;
*
trigger
=
(
ITrigger
*
)
&
daily_trigger
->
IDailyTrigger_iface
;
return
S_OK
;
...
...
dlls/taskschd/tests/scheduler.c
View file @
82a59040
...
...
@@ -1174,11 +1174,35 @@ todo_wine
static
void
test_daily_trigger
(
ITrigger
*
trigger
)
{
IDailyTrigger
*
daily_trigger
;
short
interval
;
HRESULT
hr
;
hr
=
ITrigger_QueryInterface
(
trigger
,
&
IID_IDailyTrigger
,
(
void
**
)
&
daily_trigger
);
ok
(
hr
==
S_OK
,
"Could not get IDailyTrigger iface: %08x
\n
"
,
hr
);
interval
=
-
1
;
hr
=
IDailyTrigger_get_DaysInterval
(
daily_trigger
,
&
interval
);
ok
(
hr
==
S_OK
,
"get_DaysInterval failed: %08x
\n
"
,
hr
);
ok
(
interval
==
1
,
"interval = %d
\n
"
,
interval
);
hr
=
IDailyTrigger_put_DaysInterval
(
daily_trigger
,
-
2
);
ok
(
hr
==
E_INVALIDARG
,
"put_DaysInterval failed: %08x
\n
"
,
hr
);
hr
=
IDailyTrigger_put_DaysInterval
(
daily_trigger
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"put_DaysInterval failed: %08x
\n
"
,
hr
);
interval
=
-
1
;
hr
=
IDailyTrigger_get_DaysInterval
(
daily_trigger
,
&
interval
);
ok
(
hr
==
S_OK
,
"get_DaysInterval failed: %08x
\n
"
,
hr
);
ok
(
interval
==
1
,
"interval = %d
\n
"
,
interval
);
hr
=
IDailyTrigger_put_DaysInterval
(
daily_trigger
,
2
);
ok
(
hr
==
S_OK
,
"put_DaysInterval failed: %08x
\n
"
,
hr
);
interval
=
-
1
;
hr
=
IDailyTrigger_get_DaysInterval
(
daily_trigger
,
&
interval
);
ok
(
hr
==
S_OK
,
"get_DaysInterval failed: %08x
\n
"
,
hr
);
ok
(
interval
==
2
,
"interval = %d
\n
"
,
interval
);
IDailyTrigger_Release
(
daily_trigger
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment