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
4cbf0882
Commit
4cbf0882
authored
Sep 02, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Add a stub implementation of INetworkConnectionCost.
parent
91835d94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
list.c
dlls/netprofm/list.c
+77
-0
No files found.
dlls/netprofm/list.c
View file @
4cbf0882
...
@@ -64,6 +64,7 @@ struct network
...
@@ -64,6 +64,7 @@ struct network
struct
connection
struct
connection
{
{
INetworkConnection
INetworkConnection_iface
;
INetworkConnection
INetworkConnection_iface
;
INetworkConnectionCost
INetworkConnectionCost_iface
;
LONG
refs
;
LONG
refs
;
struct
list
entry
;
struct
list
entry
;
GUID
id
;
GUID
id
;
...
@@ -906,6 +907,10 @@ static HRESULT WINAPI connection_QueryInterface(
...
@@ -906,6 +907,10 @@ static HRESULT WINAPI connection_QueryInterface(
{
{
*
obj
=
iface
;
*
obj
=
iface
;
}
}
else
if
(
IsEqualIID
(
riid
,
&
IID_INetworkConnectionCost
))
{
*
obj
=
&
connection
->
INetworkConnectionCost_iface
;
}
else
else
{
{
WARN
(
"interface not supported %s
\n
"
,
debugstr_guid
(
riid
)
);
WARN
(
"interface not supported %s
\n
"
,
debugstr_guid
(
riid
)
);
...
@@ -1086,6 +1091,77 @@ static const struct INetworkConnectionVtbl connection_vtbl =
...
@@ -1086,6 +1091,77 @@ static const struct INetworkConnectionVtbl connection_vtbl =
connection_GetDomainType
connection_GetDomainType
};
};
static
inline
struct
connection
*
impl_from_INetworkConnectionCost
(
INetworkConnectionCost
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
connection
,
INetworkConnectionCost_iface
);
}
static
HRESULT
WINAPI
connection_cost_QueryInterface
(
INetworkConnectionCost
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
connection
*
conn
=
impl_from_INetworkConnectionCost
(
iface
);
return
INetworkConnection_QueryInterface
(
&
conn
->
INetworkConnection_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
connection_cost_AddRef
(
INetworkConnectionCost
*
iface
)
{
struct
connection
*
conn
=
impl_from_INetworkConnectionCost
(
iface
);
return
INetworkConnection_AddRef
(
&
conn
->
INetworkConnection_iface
);
}
static
ULONG
WINAPI
connection_cost_Release
(
INetworkConnectionCost
*
iface
)
{
struct
connection
*
conn
=
impl_from_INetworkConnectionCost
(
iface
);
return
INetworkConnection_Release
(
&
conn
->
INetworkConnection_iface
);
}
static
HRESULT
WINAPI
connection_cost_GetCost
(
INetworkConnectionCost
*
iface
,
DWORD
*
pCost
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
pCost
);
if
(
!
pCost
)
return
E_POINTER
;
*
pCost
=
NLM_CONNECTION_COST_UNRESTRICTED
;
return
S_OK
;
}
static
HRESULT
WINAPI
connection_cost_GetDataPlanStatus
(
INetworkConnectionCost
*
iface
,
NLM_DATAPLAN_STATUS
*
pDataPlanStatus
)
{
struct
connection
*
conn
=
impl_from_INetworkConnectionCost
(
iface
);
FIXME
(
"%p, %p
\n
"
,
iface
,
pDataPlanStatus
);
if
(
!
pDataPlanStatus
)
return
E_POINTER
;
memcpy
(
&
pDataPlanStatus
->
InterfaceGuid
,
&
conn
->
id
,
sizeof
(
conn
->
id
)
);
pDataPlanStatus
->
UsageData
.
UsageInMegabytes
=
NLM_UNKNOWN_DATAPLAN_STATUS
;
memset
(
&
pDataPlanStatus
->
UsageData
.
LastSyncTime
,
0
,
sizeof
(
pDataPlanStatus
->
UsageData
.
LastSyncTime
)
);
pDataPlanStatus
->
DataLimitInMegabytes
=
NLM_UNKNOWN_DATAPLAN_STATUS
;
pDataPlanStatus
->
InboundBandwidthInKbps
=
NLM_UNKNOWN_DATAPLAN_STATUS
;
pDataPlanStatus
->
OutboundBandwidthInKbps
=
NLM_UNKNOWN_DATAPLAN_STATUS
;
memset
(
&
pDataPlanStatus
->
NextBillingCycle
,
0
,
sizeof
(
pDataPlanStatus
->
NextBillingCycle
)
);
pDataPlanStatus
->
MaxTransferSizeInMegabytes
=
NLM_UNKNOWN_DATAPLAN_STATUS
;
pDataPlanStatus
->
Reserved
=
0
;
return
S_OK
;
}
static
const
INetworkConnectionCostVtbl
connection_cost_vtbl
=
{
connection_cost_QueryInterface
,
connection_cost_AddRef
,
connection_cost_Release
,
connection_cost_GetCost
,
connection_cost_GetDataPlanStatus
};
static
struct
connection
*
create_connection
(
const
GUID
*
id
)
static
struct
connection
*
create_connection
(
const
GUID
*
id
)
{
{
struct
connection
*
ret
;
struct
connection
*
ret
;
...
@@ -1093,6 +1169,7 @@ static struct connection *create_connection( const GUID *id )
...
@@ -1093,6 +1169,7 @@ static struct connection *create_connection( const GUID *id )
if
(
!
(
ret
=
heap_alloc
(
sizeof
(
*
ret
)
)))
return
NULL
;
if
(
!
(
ret
=
heap_alloc
(
sizeof
(
*
ret
)
)))
return
NULL
;
ret
->
INetworkConnection_iface
.
lpVtbl
=
&
connection_vtbl
;
ret
->
INetworkConnection_iface
.
lpVtbl
=
&
connection_vtbl
;
ret
->
INetworkConnectionCost_iface
.
lpVtbl
=
&
connection_cost_vtbl
;
ret
->
refs
=
1
;
ret
->
refs
=
1
;
ret
->
id
=
*
id
;
ret
->
id
=
*
id
;
ret
->
network
=
NULL
;
ret
->
network
=
NULL
;
...
...
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