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
adad0705
Commit
adad0705
authored
Dec 01, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Implement IDailyTrigger_put_StartBoundary.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77a7094b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
task.c
dlls/taskschd/task.c
+14
-1
scheduler.c
dlls/taskschd/tests/scheduler.c
+39
-0
No files found.
dlls/taskschd/task.c
View file @
adad0705
...
...
@@ -39,6 +39,7 @@ typedef struct {
IDailyTrigger
IDailyTrigger_iface
;
LONG
ref
;
short
interval
;
WCHAR
*
start_boundary
;
}
DailyTrigger
;
static
inline
DailyTrigger
*
impl_from_IDailyTrigger
(
IDailyTrigger
*
iface
)
...
...
@@ -88,7 +89,11 @@ static ULONG WINAPI DailyTrigger_Release(IDailyTrigger *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
TRACE
(
"destroying %p
\n
"
,
iface
);
heap_free
(
This
->
start_boundary
);
heap_free
(
This
);
}
return
ref
;
}
...
...
@@ -183,7 +188,14 @@ static HRESULT WINAPI DailyTrigger_get_StartBoundary(IDailyTrigger *iface, BSTR
static
HRESULT
WINAPI
DailyTrigger_put_StartBoundary
(
IDailyTrigger
*
iface
,
BSTR
start
)
{
DailyTrigger
*
This
=
impl_from_IDailyTrigger
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
start
));
WCHAR
*
str
=
NULL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
start
));
if
(
start
&&
!
(
str
=
heap_strdupW
(
start
)))
return
E_OUTOFMEMORY
;
heap_free
(
This
->
start_boundary
);
This
->
start_boundary
=
str
;
return
S_OK
;
}
...
...
@@ -290,6 +302,7 @@ static HRESULT DailyTrigger_create(ITrigger **trigger)
daily_trigger
->
IDailyTrigger_iface
.
lpVtbl
=
&
DailyTrigger_vtbl
;
daily_trigger
->
ref
=
1
;
daily_trigger
->
interval
=
1
;
daily_trigger
->
start_boundary
=
NULL
;
*
trigger
=
(
ITrigger
*
)
&
daily_trigger
->
IDailyTrigger_iface
;
return
S_OK
;
...
...
dlls/taskschd/tests/scheduler.c
View file @
adad0705
...
...
@@ -1195,9 +1195,37 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
static
void
test_daily_trigger
(
ITrigger
*
trigger
)
{
static
const
WCHAR
startW
[]
=
{
'2'
,
'0'
,
'0'
,
'4'
,
'-'
,
'0'
,
'1'
,
'-'
,
'0'
,
'1'
,
'T'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
start2W
[]
=
{
'2'
,
'0'
,
'0'
,
'4'
,
'-'
,
'0'
,
'1'
,
'-'
,
'0'
,
'1'
,
'T'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
'Z'
,
0
};
static
const
WCHAR
start3W
[]
=
{
'2'
,
'0'
,
'0'
,
'4'
,
'-'
,
'0'
,
'1'
,
'-'
,
'0'
,
'1'
,
'T'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
':'
,
'0'
,
'0'
,
'+'
,
'0'
,
'1'
,
':'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
start4W
[]
=
{
'2'
,
'0'
,
'0'
,
'4'
,
'.'
,
'0'
,
'1'
,
'.'
,
'0'
,
'1'
,
'T'
,
'0'
,
'0'
,
'.'
,
'0'
,
'0'
,
'.'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
start5W
[]
=
{
'9'
,
'9'
,
'9'
,
'9'
,
'-'
,
'9'
,
'9'
,
'-'
,
'9'
,
'9'
,
'T'
,
'9'
,
'9'
,
':'
,
'9'
,
'9'
,
':'
,
'9'
,
'9'
,
0
};
static
const
WCHAR
start6W
[]
=
{
'i'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
0
};
static
const
struct
{
const
WCHAR
*
str
;
HRESULT
hr
;
}
start_test
[]
=
{
{
startW
,
S_OK
},
{
start2W
,
S_OK
},
{
start3W
,
S_OK
},
{
start4W
,
S_OK
},
{
start5W
,
S_OK
},
{
start6W
,
S_OK
},
};
IDailyTrigger
*
daily_trigger
;
BSTR
start_boundary
;
short
interval
;
HRESULT
hr
;
ULONG
i
;
hr
=
ITrigger_QueryInterface
(
trigger
,
&
IID_IDailyTrigger
,
(
void
**
)
&
daily_trigger
);
ok
(
hr
==
S_OK
,
"Could not get IDailyTrigger iface: %08x
\n
"
,
hr
);
...
...
@@ -1225,6 +1253,17 @@ static void test_daily_trigger(ITrigger *trigger)
ok
(
hr
==
S_OK
,
"get_DaysInterval failed: %08x
\n
"
,
hr
);
ok
(
interval
==
2
,
"interval = %d
\n
"
,
interval
);
for
(
i
=
0
;
i
<
sizeof
(
start_test
)
/
sizeof
(
start_test
[
0
]);
i
++
)
{
start_boundary
=
SysAllocString
(
start_test
[
i
].
str
);
hr
=
IDailyTrigger_put_StartBoundary
(
daily_trigger
,
start_boundary
);
ok
(
hr
==
start_test
[
i
].
hr
,
"%u: got %08x expected %08x
\n
"
,
i
,
hr
,
start_test
[
i
].
hr
);
SysFreeString
(
start_boundary
);
}
hr
=
IDailyTrigger_put_StartBoundary
(
daily_trigger
,
NULL
);
ok
(
hr
==
S_OK
,
"put_StartBoundary failed: %08x
\n
"
,
hr
);
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