text stringlengths 8 4.13M |
|---|
use num_traits::Float;
use crate::algorithm::intersects::Intersects;
use crate::{
Coordinate, CoordinateType, Line, LineString, MultiPolygon, Point, Polygon, Rect, Triangle,
};
/// Checks if the geometry A is completely inside the B geometry
pub trait Contains<Rhs = Self> {
/// Checks if `rhs` is completely contained within `self`.
///
/// # Examples
///
/// ```
/// use geo::algorithm::contains::Contains;
/// use geo::{Coordinate, LineString, Point, Polygon};
///
/// let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
/// let poly = Polygon::new(linestring.clone(), vec![]);
///
/// //Point in Point
/// assert!(Point::new(2., 0.).contains(&Point::new(2., 0.)));
///
/// //Point in Linestring
/// assert!(linestring.contains(&Point::new(2., 0.)));
///
/// //Point in Polygon
/// assert!(poly.contains(&Point::new(1., 1.)));
/// ```
fn contains(&self, rhs: &Rhs) -> bool;
}
impl<T> Contains<Point<T>> for Point<T>
where
T: Float,
{
fn contains(&self, p: &Point<T>) -> bool {
::geo_types::private_utils::point_contains_point(*self, *p)
}
}
impl<T> Contains<Point<T>> for LineString<T>
where
T: Float,
{
fn contains(&self, p: &Point<T>) -> bool {
::geo_types::private_utils::line_string_contains_point(self, *p)
}
}
impl<T> Contains<Point<T>> for Line<T>
where
T: Float,
{
fn contains(&self, p: &Point<T>) -> bool {
self.intersects(p)
}
}
impl<T> Contains<Line<T>> for Line<T>
where
T: Float,
{
fn contains(&self, line: &Line<T>) -> bool {
self.contains(&line.start_point()) && self.contains(&line.end_point())
}
}
impl<T> Contains<LineString<T>> for Line<T>
where
T: Float,
{
fn contains(&self, linestring: &LineString<T>) -> bool {
linestring.points_iter().all(|pt| self.contains(&pt))
}
}
impl<T> Contains<Line<T>> for LineString<T>
where
T: Float,
{
fn contains(&self, line: &Line<T>) -> bool {
let (p0, p1) = line.points();
let mut look_for: Option<Point<T>> = None;
for segment in self.lines() {
if look_for.is_none() {
// If segment contains an endpoint of line, we mark the other endpoint as the
// one we are looking for.
if segment.contains(&p0) {
look_for = Some(p1);
} else if segment.contains(&p1) {
look_for = Some(p0);
}
}
if let Some(p) = look_for {
// If we are looking for an endpoint, we need to either find it, or show that we
// should continue to look for it
if segment.contains(&p) {
// If the segment contains the endpoint we are looking for we are done
return true;
} else if !line.contains(&segment.end_point()) {
// If not, and the end of the segment is not on the line, we should stop
// looking
look_for = None
}
}
}
false
}
}
/// The position of a `Point` with respect to a `LineString`
#[derive(PartialEq, Clone, Debug)]
pub(crate) enum PositionPoint {
OnBoundary,
Inside,
Outside,
}
/// Calculate the position of `Point` p relative to a linestring
pub(crate) fn get_position<T>(p: Point<T>, linestring: &LineString<T>) -> PositionPoint
where
T: Float,
{
// See: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
// http://geospatialpython.com/search
// ?updated-min=2011-01-01T00:00:00-06:00&updated-max=2012-01-01T00:00:00-06:00&max-results=19
// LineString without points
if linestring.0.is_empty() {
return PositionPoint::Outside;
}
// Point is on linestring
if linestring.contains(&p) {
return PositionPoint::OnBoundary;
}
let mut xints = T::zero();
let mut crossings = 0;
for line in linestring.lines() {
if p.y() > line.start.y.min(line.end.y)
&& p.y() <= line.start.y.max(line.end.y)
&& p.x() <= line.start.x.max(line.end.x)
{
if line.start.y != line.end.y {
xints = (p.y() - line.start.y) * (line.end.x - line.start.x)
/ (line.end.y - line.start.y)
+ line.start.x;
}
if (line.start.x == line.end.x) || (p.x() <= xints) {
crossings += 1;
}
}
}
if crossings % 2 == 1 {
PositionPoint::Inside
} else {
PositionPoint::Outside
}
}
impl<T> Contains<Point<T>> for Polygon<T>
where
T: Float,
{
fn contains(&self, p: &Point<T>) -> bool {
match get_position(*p, &self.exterior()) {
PositionPoint::OnBoundary | PositionPoint::Outside => false,
_ => self
.interiors()
.iter()
.all(|ls| get_position(*p, ls) == PositionPoint::Outside),
}
}
}
impl<T> Contains<Point<T>> for MultiPolygon<T>
where
T: Float,
{
fn contains(&self, p: &Point<T>) -> bool {
self.0.iter().any(|poly| poly.contains(p))
}
}
impl<T> Contains<Line<T>> for Polygon<T>
where
T: Float,
{
fn contains(&self, line: &Line<T>) -> bool {
// both endpoints are contained in the polygon and the line
// does NOT intersect the exterior or any of the interior boundaries
self.contains(&line.start_point())
&& self.contains(&line.end_point())
&& !self.exterior().intersects(line)
&& !self.interiors().iter().any(|inner| inner.intersects(line))
}
}
impl<T> Contains<Polygon<T>> for Polygon<T>
where
T: Float,
{
fn contains(&self, poly: &Polygon<T>) -> bool {
// decompose poly's exterior ring into Lines, and check each for containment
poly.exterior().lines().all(|line| self.contains(&line))
}
}
impl<T> Contains<LineString<T>> for Polygon<T>
where
T: Float,
{
fn contains(&self, linestring: &LineString<T>) -> bool {
// All LineString points must be inside the Polygon
if linestring.points_iter().all(|point| self.contains(&point)) {
// The Polygon interior is allowed to intersect with the LineString
// but the Polygon's rings are not
!self
.interiors()
.iter()
.any(|ring| ring.intersects(linestring))
} else {
false
}
}
}
impl<T> Contains<Point<T>> for Rect<T>
where
T: CoordinateType,
{
fn contains(&self, p: &Point<T>) -> bool {
p.x() >= self.min().x
&& p.x() <= self.max().x
&& p.y() >= self.min().y
&& p.y() <= self.max().y
}
}
impl<T> Contains<Rect<T>> for Rect<T>
where
T: CoordinateType,
{
fn contains(&self, bounding_rect: &Rect<T>) -> bool {
// All points of LineString must be in the polygon ?
self.min().x <= bounding_rect.min().x
&& self.max().x >= bounding_rect.max().x
&& self.min().y <= bounding_rect.min().y
&& self.max().y >= bounding_rect.max().y
}
}
impl<T> Contains<Point<T>> for Triangle<T>
where
T: CoordinateType,
{
fn contains(&self, point: &Point<T>) -> bool {
let sign_1 = sign(&point.0, &self.0, &self.1);
let sign_2 = sign(&point.0, &self.1, &self.2);
let sign_3 = sign(&point.0, &self.2, &self.0);
((sign_1 == sign_2) && (sign_2 == sign_3))
}
}
fn sign<T>(point_1: &Coordinate<T>, point_2: &Coordinate<T>, point_3: &Coordinate<T>) -> bool
where
T: CoordinateType,
{
(point_1.x - point_3.x) * (point_2.y - point_3.y)
- (point_2.x - point_3.x) * (point_1.y - point_3.y)
< T::zero()
}
#[cfg(test)]
mod test {
use crate::algorithm::contains::Contains;
use crate::line_string;
use crate::{Coordinate, Line, LineString, MultiPolygon, Point, Polygon, Rect, Triangle};
#[test]
// V doesn't contain rect because two of its edges intersect with V's exterior boundary
fn polygon_does_not_contain_polygon() {
let v = Polygon::new(
vec![
(150., 350.),
(100., 350.),
(210., 160.),
(290., 350.),
(250., 350.),
(200., 250.),
(150., 350.),
]
.into(),
vec![],
);
let rect = Polygon::new(
vec![
(250., 310.),
(150., 310.),
(150., 280.),
(250., 280.),
(250., 310.),
]
.into(),
vec![],
);
assert_eq!(!v.contains(&rect), true);
}
#[test]
// V contains rect because all its vertices are contained, and none of its edges intersect with V's boundaries
fn polygon_contains_polygon() {
let v = Polygon::new(
vec![
(150., 350.),
(100., 350.),
(210., 160.),
(290., 350.),
(250., 350.),
(200., 250.),
(150., 350.),
]
.into(),
vec![],
);
let rect = Polygon::new(
vec![
(185., 237.),
(220., 237.),
(220., 220.),
(185., 220.),
(185., 237.),
]
.into(),
vec![],
);
assert_eq!(v.contains(&rect), true);
}
#[test]
// LineString is fully contained
fn linestring_fully_contained_in_polygon() {
let poly = Polygon::new(
LineString::from(vec![(0., 0.), (5., 0.), (5., 6.), (0., 6.), (0., 0.)]),
vec![],
);
let ls = LineString::from(vec![(3.0, 0.5), (3.0, 3.5)]);
assert_eq!(poly.contains(&ls), true);
}
/// Tests: Point in LineString
#[test]
fn empty_linestring_test() {
let linestring = LineString(Vec::new());
assert!(!linestring.contains(&Point::new(2., 1.)));
}
#[test]
fn linestring_point_is_vertex_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.)]);
assert!(linestring.contains(&Point::new(2., 2.)));
}
#[test]
fn linestring_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.)]);
assert!(linestring.contains(&Point::new(1., 0.)));
}
/// Tests: Point in Polygon
#[test]
fn empty_polygon_test() {
let linestring = LineString(Vec::new());
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&Point::new(2., 1.)));
}
#[test]
fn polygon_with_one_point_test() {
let linestring = LineString::from(vec![(2., 1.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&Point::new(3., 1.)));
}
#[test]
fn polygon_with_one_point_is_vertex_test() {
let linestring = LineString::from(vec![(2., 1.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&Point::new(2., 1.)));
}
#[test]
fn polygon_with_point_on_boundary_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&Point::new(1., 0.)));
assert!(!poly.contains(&Point::new(2., 1.)));
assert!(!poly.contains(&Point::new(1., 2.)));
assert!(!poly.contains(&Point::new(0., 1.)));
}
#[test]
fn point_in_polygon_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(poly.contains(&Point::new(1., 1.)));
}
#[test]
fn point_out_polygon_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&Point::new(2.1, 1.)));
assert!(!poly.contains(&Point::new(1., 2.1)));
assert!(!poly.contains(&Point::new(2.1, 2.1)));
}
#[test]
fn point_polygon_with_inner_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let inner_linestring = LineString::from(vec![
[0.5, 0.5],
[1.5, 0.5],
[1.5, 1.5],
[0.0, 1.5],
[0.0, 0.0],
]);
let poly = Polygon::new(linestring, vec![inner_linestring]);
assert!(!poly.contains(&Point::new(0.25, 0.25)));
assert!(!poly.contains(&Point::new(1., 1.)));
assert!(!poly.contains(&Point::new(1.5, 1.5)));
assert!(!poly.contains(&Point::new(1.5, 1.)));
}
/// Tests: Point in MultiPolygon
#[test]
fn empty_multipolygon_test() {
let multipoly = MultiPolygon(Vec::new());
assert!(!multipoly.contains(&Point::new(2., 1.)));
}
#[test]
fn empty_multipolygon_two_polygons_test() {
let poly1 = Polygon::new(
LineString::from(vec![(0., 0.), (1., 0.), (1., 1.), (0., 1.), (0., 0.)]),
Vec::new(),
);
let poly2 = Polygon::new(
LineString::from(vec![(2., 0.), (3., 0.), (3., 1.), (2., 1.), (2., 0.)]),
Vec::new(),
);
let multipoly = MultiPolygon(vec![poly1, poly2]);
assert!(multipoly.contains(&Point::new(0.5, 0.5)));
assert!(multipoly.contains(&Point::new(2.5, 0.5)));
assert!(!multipoly.contains(&Point::new(1.5, 0.5)));
}
#[test]
fn empty_multipolygon_two_polygons_and_inner_test() {
let poly1 = Polygon::new(
LineString::from(vec![(0., 0.), (5., 0.), (5., 6.), (0., 6.), (0., 0.)]),
vec![LineString::from(vec![
(1., 1.),
(4., 1.),
(4., 4.),
(1., 1.),
])],
);
let poly2 = Polygon::new(
LineString::from(vec![(9., 0.), (14., 0.), (14., 4.), (9., 4.), (9., 0.)]),
Vec::new(),
);
let multipoly = MultiPolygon(vec![poly1, poly2]);
assert!(multipoly.contains(&Point::new(3., 5.)));
assert!(multipoly.contains(&Point::new(12., 2.)));
assert!(!multipoly.contains(&Point::new(3., 2.)));
assert!(!multipoly.contains(&Point::new(7., 2.)));
}
/// Tests: LineString in Polygon
#[test]
fn linestring_in_polygon_with_linestring_is_boundary_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let poly = Polygon::new(linestring.clone(), Vec::new());
assert!(!poly.contains(&linestring.clone()));
assert!(!poly.contains(&LineString::from(vec![(0., 0.), (2., 0.)])));
assert!(!poly.contains(&LineString::from(vec![(2., 0.), (2., 2.)])));
assert!(!poly.contains(&LineString::from(vec![(0., 2.), (0., 0.)])));
}
#[test]
fn linestring_outside_polygon_test() {
let linestring = LineString::from(vec![(0., 0.), (2., 0.), (2., 2.), (0., 2.), (0., 0.)]);
let poly = Polygon::new(linestring, Vec::new());
assert!(!poly.contains(&LineString::from(vec![(1., 1.), (3., 0.)])));
assert!(!poly.contains(&LineString::from(vec![(3., 0.), (5., 2.)])));
}
#[test]
fn linestring_in_inner_polygon_test() {
let poly = Polygon::new(
LineString::from(vec![(0., 0.), (5., 0.), (5., 6.), (0., 6.), (0., 0.)]),
vec![LineString::from(vec![
(1., 1.),
(4., 1.),
(4., 4.),
(1., 4.),
(1., 1.),
])],
);
assert!(!poly.contains(&LineString::from(vec![(2., 2.), (3., 3.)])));
assert!(!poly.contains(&LineString::from(vec![(2., 2.), (2., 5.)])));
assert!(!poly.contains(&LineString::from(vec![(3., 0.5), (3., 5.)])));
}
#[test]
fn bounding_rect_in_inner_bounding_rect_test() {
let bounding_rect_xl = Rect::new(
Coordinate { x: -100., y: -200. },
Coordinate { x: 100., y: 200. },
);
let bounding_rect_sm = Rect::new(
Coordinate { x: -10., y: -20. },
Coordinate { x: 10., y: 20. },
);
assert_eq!(true, bounding_rect_xl.contains(&bounding_rect_sm));
assert_eq!(false, bounding_rect_sm.contains(&bounding_rect_xl));
}
#[test]
fn point_in_line_test() {
let c = |x, y| Coordinate { x, y };
let p0 = c(2., 4.);
// vertical line
let line1 = Line::new(c(2., 0.), c(2., 5.));
// point on line, but outside line segment
let line2 = Line::new(c(0., 6.), c(1.5, 4.5));
// point on line
let line3 = Line::new(c(0., 6.), c(3., 3.));
assert!(line1.contains(&Point(p0)));
assert!(!line2.contains(&Point(p0)));
assert!(line3.contains(&Point(p0)));
}
#[test]
fn line_in_line_test() {
let c = |x, y| Coordinate { x, y };
let line0 = Line::new(c(0., 1.), c(3., 4.));
// first point on line0, second not
let line1 = Line::new(c(1., 2.), c(2., 2.));
// co-linear, but extends past the end of line0
let line2 = Line::new(c(1., 2.), c(4., 5.));
// contained in line0
let line3 = Line::new(c(1., 2.), c(3., 4.));
assert!(!line0.contains(&line1));
assert!(!line0.contains(&line2));
assert!(line0.contains(&line3));
}
#[test]
fn linestring_in_line_test() {
let line = Line::from([(0., 1.), (3., 4.)]);
// linestring0 in line
let linestring0 = LineString::from(vec![(0.1, 1.1), (1., 2.), (1.5, 2.5)]);
// linestring1 starts and ends in line, but wanders in the middle
let linestring1 = LineString::from(vec![(0.1, 1.1), (2., 2.), (1.5, 2.5)]);
// linestring2 is co-linear, but extends beyond line
let linestring2 = LineString::from(vec![(0.1, 1.1), (1., 2.), (4., 5.)]);
// no part of linestring3 is contained in line
let linestring3 = LineString::from(vec![(1.1, 1.1), (2., 2.), (2.5, 2.5)]);
assert!(line.contains(&linestring0));
assert!(!line.contains(&linestring1));
assert!(!line.contains(&linestring2));
assert!(!line.contains(&linestring3));
}
#[test]
fn line_in_polygon_test() {
let c = |x, y| Coordinate { x, y };
let line = Line::new(c(0., 1.), c(3., 4.));
let linestring0 = line_string![c(-1., 0.), c(5., 0.), c(5., 5.), c(0., 5.), c(-1., 0.)];
let poly0 = Polygon::new(linestring0, Vec::new());
let linestring1 = line_string![c(0., 0.), c(0., 2.), c(2., 2.), c(2., 0.), c(0., 0.)];
let poly1 = Polygon::new(linestring1, Vec::new());
assert!(poly0.contains(&line));
assert!(!poly1.contains(&line));
}
#[test]
fn line_in_linestring_test() {
let line0 = Line::from([(1., 1.), (2., 2.)]);
// line0 is completely contained in the second segment
let linestring0 = LineString::from(vec![(0., 0.5), (0.5, 0.5), (3., 3.)]);
// line0 is contained in the last three segments
let linestring1 = LineString::from(vec![
(0., 0.5),
(0.5, 0.5),
(1.2, 1.2),
(1.5, 1.5),
(3., 3.),
]);
// line0 endpoints are contained in the linestring, but the fourth point is off the line
let linestring2 = LineString::from(vec![
(0., 0.5),
(0.5, 0.5),
(1.2, 1.2),
(1.5, 0.),
(2., 2.),
(3., 3.),
]);
assert!(linestring0.contains(&line0));
assert!(linestring1.contains(&line0));
assert!(!linestring2.contains(&line0));
}
#[test]
fn integer_bounding_rects() {
let p: Point<i32> = Point::new(10, 20);
let bounding_rect: Rect<i32> =
Rect::new(Coordinate { x: 0, y: 0 }, Coordinate { x: 100, y: 100 });
assert!(bounding_rect.contains(&p));
assert!(!bounding_rect.contains(&Point::new(-10, -10)));
let smaller_bounding_rect: Rect<i32> =
Rect::new(Coordinate { x: 10, y: 10 }, Coordinate { x: 20, y: 20 });
assert!(bounding_rect.contains(&smaller_bounding_rect));
}
#[test]
fn triangle_contains_point_on_edge() {
let t = Triangle::from([(0.0, 0.0), (2.0, 0.0), (2.0, 2.0)]);
let p = Point::new(1.0, 0.0);
assert!(t.contains(&p));
}
#[test]
fn triangle_contains_point_on_vertex() {
let t = Triangle::from([(0.0, 0.0), (2.0, 0.0), (2.0, 2.0)]);
let p = Point::new(2.0, 0.0);
assert!(t.contains(&p));
}
#[test]
fn triangle_contains_point_inside() {
let t = Triangle::from([(0.0, 0.0), (2.0, 0.0), (2.0, 2.0)]);
let p = Point::new(1.0, 0.5);
assert!(t.contains(&p));
}
#[test]
fn triangle_not_contains_point_above() {
let t = Triangle::from([(0.0, 0.0), (2.0, 0.0), (2.0, 2.0)]);
let p = Point::new(1.0, 1.5);
assert!(!t.contains(&p));
}
#[test]
fn triangle_not_contains_point_below() {
let t = Triangle::from([(0.0, 0.0), (2.0, 0.0), (2.0, 2.0)]);
let p = Point::new(-1.0, 0.5);
assert!(!t.contains(&p));
}
#[test]
fn triangle_contains_neg_point() {
let t = Triangle::from([(0.0, 0.0), (-2.0, 0.0), (-2.0, -2.0)]);
let p = Point::new(-1.0, -0.5);
assert!(t.contains(&p));
}
}
|
use std::fmt;
use std::marker::PhantomData;
use std::str::FromStr;
use serde::de::{self, MapAccess, Visitor};
use serde::{Deserialize, Deserializer};
#[derive(Debug, Clone, Deserialize, PartialOrd, PartialEq)]
pub struct RawPath {
pattern: String,
is_regex: bool,
}
impl RawPath {
pub fn new<S: Into<String>>(pattern: S, is_regex: bool) -> Self {
Self {
pattern: pattern.into(),
is_regex,
}
}
pub fn with_regex<S: Into<String>>(pattern: S) -> Self {
Self {
pattern: pattern.into(),
is_regex: true,
}
}
pub fn with_path<S: Into<String>>(pattern: S) -> Self {
Self {
pattern: pattern.into(),
is_regex: false,
}
}
pub fn as_str(&self) -> &str {
self.pattern.as_str()
}
pub fn is_regex(&self) -> bool {
self.is_regex
}
}
// impl std::convert::From<&str> for RawPath {
// fn from(pattern: &str) -> Self {
// RawPath {
// pattern: pattern.to_owned(),
// is_regex: false,
// }
// }
// }
// The `string_or_struct` function uses this impl to instantiate a `RawPath` if
// the input file contains a string and not a struct.
//
// > `path` can be specified either as a string containing the path, or an object with the
// > path and `is_regex` boolean
impl FromStr for RawPath {
type Err = ();
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(RawPath {
pattern: s.to_string(),
is_regex: false,
})
}
}
pub fn string_or_struct<'de, T, D>(deserializer: D) -> Result<T, D::Error>
where
T: Deserialize<'de> + FromStr<Err = ()>,
D: Deserializer<'de>,
{
// This is a Visitor that forwards string types to T's `FromStr` impl and
// forwards map types to T's `Deserialize` impl. The `PhantomData` is to
// keep the compiler from complaining about T being an unused generic type
// parameter. We need T in order to know the Value type for the Visitor
// impl.
struct StringOrStruct<T>(PhantomData<fn() -> T>);
impl<'de, T> Visitor<'de> for StringOrStruct<T>
where
T: Deserialize<'de> + FromStr<Err = ()>,
{
type Value = T;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str("string or map")
}
fn visit_str<E>(self, value: &str) -> Result<T, E>
where
E: de::Error,
{
Ok(FromStr::from_str(value).unwrap())
}
fn visit_map<M>(self, map: M) -> Result<T, M::Error>
where
M: MapAccess<'de>,
{
// `MapAccessDeserializer` is a wrapper that turns a `MapAccess`
// into a `Deserializer`, allowing it to be used as the input to T's
// `Deserialize` implementation. T then deserializes itself using
// the entries from the map visitor.
Deserialize::deserialize(de::value::MapAccessDeserializer::new(map))
}
}
deserializer.deserialize_any(StringOrStruct(PhantomData))
}
|
use std::{io, i32};
use std::fmt::{Debug, Formatter, Result as FmtResult};
use std::sync::atomic::Ordering;
use integer_atomics::AtomicI32;
use lock_wrappers::raw::Mutex;
use sys::{futex_wait, futex_wake};
/// A simple mutual exclusion lock (mutex).
///
/// This is not designed for direct use but as a building block for locks.
///
/// Thus, it is not reentrant and it may misbehave if used incorrectly
/// (i.e. you can release even if someone else is holding it).
/// It's also not fair.
pub struct Futex {
futex: AtomicI32
}
impl Mutex for Futex {
type LockState = ();
// TOOD: review memory orderings
/// Acquires the lock.
///
/// This blocks until the lock is ours.
fn lock(&self) {
loop {
match self.futex.fetch_sub(1, Ordering::Acquire) {
1 => return, // jobs done - we got the lock
_ => {
// lock is contended :(
self.futex.store(-1, Ordering::Relaxed);
// FIXME: deadlock if release stores the 1, we overwrite with -1 here
// but they wake us up before we wait
match futex_wait(&self.futex, -1) {
Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => (),
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => (),
Ok(_) => (),
_ => unreachable!(),
}
}
}
}
}
/// Attempts to acquire the lock without blocking.
///
/// Returns `true` if the lock was acquired, `false` otherwise.
fn try_lock(&self) -> Option<()> {
if self.futex.compare_and_swap(1, 0, Ordering::Acquire) == 1 {
Some(())
} else {
None
}
}
/// Releases the lock.
fn unlock(&self, _: ()) {
match self.futex.fetch_add(1, Ordering::Release) {
0 => return, // jobs done - no waiters
_ => {
// wake them up
self.futex.store(1, Ordering::Release);
futex_wake(&self.futex, i32::MAX).unwrap();
}
}
}
}
impl Default for Futex {
/// Creates a new instance.
fn default() -> Futex {
Futex { futex: AtomicI32::new(1) }
}
}
impl Debug for Futex {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
write!(f, "Futex@{:p} (={})", &self.futex as *const _, self.futex.load(Ordering::SeqCst))
}
}
|
#[cfg(all(feature = "glutin", not(target_arch = "wasm32")))]
pub mod glutin;
#[cfg(target_arch = "wasm32")]
pub mod web;
#[cfg(all(feature = "wgl", not(target_arch = "wasm32")))]
pub mod wgl;
#[cfg(not(any(target_arch = "wasm32", feature = "glutin", feature = "wgl")))]
pub mod dummy;
|
mod create;
mod get_players;
mod join;
mod status;
pub use self::create::*;
pub use self::get_players::*;
pub use self::join::*;
pub use self::status::*;
|
use std::{env, error::Error};
use futures::stream::StreamExt;
use twilight_cache_inmemory::{InMemoryCache, ResourceType};
use twilight_gateway::{cluster::{Cluster, ShardScheme}, Event};
use twilight_http::Client as HttpClient;
use twilight_model::gateway::Intents;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let token = env::var("DISCORD_TOKEN")?;
// This is the default scheme. It will automatically create as many
// shards as is suggested by Discord.
let scheme = ShardScheme::Auto;
// Use intents to only receive guild message events.
let cluster = Cluster::builder(&token, Intents::GUILD_MESSAGES)
.shard_scheme(scheme)
.build()
.await?;
// Start up the cluster.
let cluster_spawn = cluster.clone();
// Start all shards in the cluster in the background.
tokio::spawn(async move {
cluster_spawn.up().await;
});
// HTTP is separate from the gateway, so create a new client.
let http = HttpClient::new(&token);
// Since we only care about new messages, make the cache only
// cache new messages.
let cache = InMemoryCache::builder()
.resource_types(ResourceType::MESSAGE)
.build();
let mut events = cluster.events();
// Process each event as they come in.
while let Some((shard_id, event)) = events.next().await {
// Update the cache with the event.
cache.update(&event);
tokio::spawn(handle_event(shard_id, event, http.clone()));
}
Ok(())
}
async fn handle_event(
shard_id: u64,
event: Event,
http: HttpClient,
) -> Result<(), Box<dyn Error + Send + Sync>> {
match event {
Event::MessageCreate(msg) if msg.content == "!ping" => {
http.create_message(msg.channel_id).content("Pong!")?.await?;
}
Event::ShardConnected(_) => {
println!("Connected on shard {}", shard_id);
}
// Other events here...
_ => {}
}
Ok(())
}
|
use tui::widgets::{Row, Table, Borders, Block};
use tui::text::Text;
use tui::style::{Style, Color};
use tui::layout::Constraint;
use chrono::{DateTime, Local};
pub fn render(logs: &Vec<(DateTime<Local>, String, u8)>) -> Table<'static> {
let mut parsed_logs = vec![];
let mut unprocessed = logs.clone();
unprocessed.reverse();
for (time, message, level) in unprocessed {
let (lvl, style) = match level {
0 => ("INFO".to_string(), Style::default().fg(Color::Gray)),
1 => ("ERROR".to_string(), Style::default().fg(Color::Red)),
2 => ("WARN".to_string(), Style::default().fg(Color::Yellow)),
10 => ("NOTE".to_string(), Style::default().fg(Color::Magenta)),
_ => ("INFO".to_string(), Style::default().fg(Color::Gray))
};
parsed_logs.push(
Row::new(
vec![
Text::styled(time.format(" %Y/%b/%d %H:%M").to_string(), style),
Text::styled(lvl, style),
Text::styled(message.clone(), style),
]
)
)
}
Table::new(parsed_logs)
.widths(&[
Constraint::Min(19),
Constraint::Min(6),
Constraint::Min(30)
])
.block(Block::default().title(" Logs ")
.borders(Borders::ALL))
} |
//! A "bare wasm" target representing a WebAssembly output that makes zero
//! assumptions about its environment.
//!
//! The `wasm32-unknown-unknown` target is intended to encapsulate use cases
//! that do not rely on any imported functionality. The binaries generated are
//! entirely self-contained by default when using the standard library. Although
//! the standard library is available, most of it returns an error immediately
//! (e.g. trying to create a TCP stream or something like that).
//!
//! This target is more or less managed by the Rust and WebAssembly Working
//! Group nowadays at <https://github.com/rustwasm>.
use super::wasm_base;
use super::{LinkerFlavor, LldFlavor, Target};
use crate::spec::abi::Abi;
pub fn target() -> Target {
let mut options = wasm_base::options();
options.os = "unknown".into();
options.linker_flavor = LinkerFlavor::Lld(LldFlavor::Wasm);
// This is a default for backwards-compatibility with the original
// definition of this target oh-so-long-ago. Once the "wasm" ABI is
// stable and the wasm-bindgen project has switched to using it then there's
// no need for this and it can be removed.
//
// Currently this is the reason that this target's ABI is mismatched with
// clang's ABI. This means that, in the limit, you can't merge C and Rust
// code on this target due to this ABI mismatch.
options.default_adjusted_cabi = Some(Abi::Wasm);
let clang_args = options.pre_link_args.entry(LinkerFlavor::Gcc).or_default();
// Make sure clang uses LLD as its linker and is configured appropriately
// otherwise
clang_args.push("--target=wasm32-unknown-unknown".into());
// For now this target just never has an entry symbol no matter the output
// type, so unconditionally pass this.
clang_args.push("-Wl,--no-entry".into());
// Rust really needs a way for users to specify exports and imports in
// the source code. --export-dynamic isn't the right tool for this job,
// however it does have the side effect of automatically exporting a lot
// of symbols, which approximates what people want when compiling for
// wasm32-unknown-unknown expect, so use it for now.
clang_args.push("-Wl,--export-dynamic".into());
// Add the flags to wasm-ld's args too.
let lld_args = options
.pre_link_args
.entry(LinkerFlavor::Lld(LldFlavor::Wasm))
.or_default();
lld_args.push("--no-entry".into());
lld_args.push("--export-dynamic".into());
Target {
llvm_target: "wasm32-unknown-unknown".into(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(),
arch: "wasm32".into(),
options,
}
}
|
use game::*;
impl Spellbook{
pub fn new(game: &mut Game1, x: f64, y: f64, spell_id: usize)->SpellbookID{
let mover_id=Mover::new(&mut game.movers, x, y);
let basic_drawn_id=BasicDrawn::new_holistic(game, mover_id, 0);
SpellbookID{id: game.spellbooks.add(Spellbook{mover_id: mover_id, basic_drawn_id: basic_drawn_id, spell_id: spell_id})}
}
pub fn step(game: &mut Game1){
let mut dead_spellbooks=Vec::new();
for id in 0..game.spellbooks.len(){
if game.spellbooks[id].is_none() {continue};
let spellbook=game.spellbooks[id].take().unwrap();
let mover=game.movers[spellbook.mover_id.id].take().expect("Spellbook had null mover");
for player_id in 0..game.players.len(){
let mut br=false;
if game.players[player_id].is_none() {continue};
let mut player=game.players[player_id].take().unwrap();
let other_mover=game.movers[player.mover_id.id].take().expect("Player had null mover");
if mover.collide(&other_mover) {
let caster_id=player.caster_id;
if player.add_spell(caster_id, game, spellbook.spell_id){
dead_spellbooks.push(id);
br=true;
}
}
game.movers[player.mover_id.id]=Some(other_mover);
game.players[player_id]=Some(player);
if br {break};
}
game.movers[spellbook.mover_id.id]=Some(mover);
game.spellbooks[id]=Some(spellbook);
}
for id in dead_spellbooks{
Self::remove_fully(game, id);
}
}
pub fn remove_fully(game: &mut Game1, id: usize){
let spellbook=game.spellbooks.remove(id);
BasicDrawn::remove_with_drawn(game, spellbook.basic_drawn_id);
Mover::remove(game, spellbook.mover_id);
}
}
|
//! Extended display identification data
//!
//! 1.3
//!
//! https://glenwing.github.io/docs/VESA-EEDID-A1.pdf
use nom::{
number::complete::{be_u16, le_u16, le_u32, le_u64, le_u8},
IResult,
};
// TODO
// - Error type https://github.com/Geal/nom/blob/master/examples/custom_error.rs
// - checksum check
// - split up the sub-byte fields using bits mod stuff bits::complete as bits
// - do the unit conversions
// https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
// http://www.drhdmi.eu/dictionary/edid.html
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct Edid {
pub header: EdidHeader,
pub info: BasicDisplayParams,
pub color_characteristics: ColorCharacteristics,
pub established_timings: EstablishedTimings,
pub standard_timings: StandardTimings,
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct EdidHeader {
pub manufacturer_name: u16,
pub product_code: u16,
pub serial_number: u32,
pub week: u8,
pub year: u8,
pub version: u8,
pub revision: u8,
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct BasicDisplayParams {
pub video_input_definition: u8,
pub max_size_horizontal: u8,
pub max_size_vertical: u8,
pub gamma: u8,
pub feature_support: u8,
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct ColorCharacteristics {
pub red_green: u8,
pub blue_white: u8,
pub red_x: u8,
pub red_y: u8,
pub green_x: u8,
pub green_y: u8,
pub blue_x: u8,
pub blue_y: u8,
pub white_point_x: u8,
pub white_point_y: u8,
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct EstablishedTimings {
pub timing_modes: [u8; 3],
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct StandardTimings {
pub display_modes: [StandardTimingInfo; 8],
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub struct StandardTimingInfo {
pub xresolution: u8,
pub aspect_vfreq: u8,
}
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
pub enum DescriptorType {
SerialNumber = 0xFF,
Text = 0xFE,
MonitorRange = 0xFD,
MonitorName = 0xFC,
}
pub const EDID_SIZE: usize = 128;
pub const EDID_EXT_SIZE: usize = 256;
const HEADER_PREAMBLE: u64 = 0x00_FF_FF_FF_FF_FF_FF_00;
pub fn parse_edid(input: &[u8]) -> IResult<&[u8], Edid> {
let (input, header) = parse_edid_header(input)?;
let (input, info) = parse_basic_display_params(input)?;
let (input, color_characteristics) = parse_color_characteristics(input)?;
let (input, established_timings) = parse_established_timings(input)?;
let (input, standard_timings) = parse_standard_timings(input)?;
Ok((
input,
Edid {
header,
info,
color_characteristics,
established_timings,
standard_timings,
},
))
}
pub fn parse_edid_header(input: &[u8]) -> IResult<&[u8], EdidHeader> {
let (input, header) = le_u64(input)?;
assert_eq!(
header, HEADER_PREAMBLE,
"Bad header preabmle: 0x{:X}",
header
);
let (input, manufacturer_name) = be_u16(input)?;
let (input, product_code) = le_u16(input)?;
let (input, serial_number) = le_u32(input)?;
let (input, week) = le_u8(input)?;
let (input, year) = le_u8(input)?;
let (input, version) = le_u8(input)?;
let (input, revision) = le_u8(input)?;
Ok((
input,
EdidHeader {
manufacturer_name,
product_code,
serial_number,
week,
year,
version,
revision,
},
))
}
fn parse_basic_display_params(input: &[u8]) -> IResult<&[u8], BasicDisplayParams> {
let (input, video_input_definition) = le_u8(input)?;
let (input, max_size_horizontal) = le_u8(input)?;
let (input, max_size_vertical) = le_u8(input)?;
let (input, gamma) = le_u8(input)?;
let (input, feature_support) = le_u8(input)?;
Ok((
input,
BasicDisplayParams {
video_input_definition,
max_size_horizontal,
max_size_vertical,
gamma,
feature_support,
},
))
}
fn parse_color_characteristics(input: &[u8]) -> IResult<&[u8], ColorCharacteristics> {
let (input, red_green) = le_u8(input)?;
let (input, blue_white) = le_u8(input)?;
let (input, red_x) = le_u8(input)?;
let (input, red_y) = le_u8(input)?;
let (input, green_x) = le_u8(input)?;
let (input, green_y) = le_u8(input)?;
let (input, blue_x) = le_u8(input)?;
let (input, blue_y) = le_u8(input)?;
let (input, white_point_x) = le_u8(input)?;
let (input, white_point_y) = le_u8(input)?;
Ok((
input,
ColorCharacteristics {
red_green,
blue_white,
red_x,
red_y,
green_x,
green_y,
blue_x,
blue_y,
white_point_x,
white_point_y,
},
))
}
fn parse_established_timings(input: &[u8]) -> IResult<&[u8], EstablishedTimings> {
let (input, timing_modes_0) = le_u8(input)?;
let (input, timing_modes_1) = le_u8(input)?;
let (input, timing_modes_2) = le_u8(input)?;
let timing_modes = [timing_modes_0, timing_modes_1, timing_modes_2];
Ok((input, EstablishedTimings { timing_modes }))
}
fn parse_standard_timings(input: &[u8]) -> IResult<&[u8], StandardTimings> {
let (input, ti_0) = parse_standard_timing_info(input)?;
let (input, ti_1) = parse_standard_timing_info(input)?;
let (input, ti_2) = parse_standard_timing_info(input)?;
let (input, ti_3) = parse_standard_timing_info(input)?;
let (input, ti_4) = parse_standard_timing_info(input)?;
let (input, ti_5) = parse_standard_timing_info(input)?;
let (input, ti_6) = parse_standard_timing_info(input)?;
let (input, ti_7) = parse_standard_timing_info(input)?;
let display_modes = [ti_0, ti_1, ti_2, ti_3, ti_4, ti_5, ti_6, ti_7];
Ok((input, StandardTimings { display_modes }))
}
fn parse_standard_timing_info(input: &[u8]) -> IResult<&[u8], StandardTimingInfo> {
let (input, xresolution) = le_u8(input)?;
let (input, aspect_vfreq) = le_u8(input)?;
Ok((
input,
StandardTimingInfo {
xresolution,
aspect_vfreq,
},
))
}
|
use std::env;
use std::path::Path;
use std::process::Command;
fn main() {
let out_dir = env::var("OUT_DIR").unwrap();
println!("Here: {} ", out_dir);
// note that there are a number of downsides to this approach, the comments
// below detail how to improve the portability of these commands.
Command::new("cargo")
.args(&[
"--manifest-path ../../plugin-runtime-containerd",
"--out-dir plugins/",
])
.status()
.unwrap();
}
|
//! RomFS example.
//!
//! This example showcases the RomFS service and how to mount it to include a read-only filesystem within the application bundle.
use ctru::prelude::*;
fn main() {
ctru::use_panic_handler();
let gfx = Gfx::new().expect("Couldn't obtain GFX controller");
let mut hid = Hid::new().expect("Couldn't obtain HID controller");
let apt = Apt::new().expect("Couldn't obtain APT controller");
let _console = Console::new(gfx.top_screen.borrow_mut());
cfg_if::cfg_if! {
// Run this code if RomFS are wanted and available.
// This never fails as `ctru-rs` examples inherit all of the `ctru-rs` features,
// but it might if a normal user application wasn't setup correctly.
if #[cfg(all(feature = "romfs", romfs_exists))] {
// Mount the romfs volume.
let _romfs = ctru::services::romfs::RomFS::new().unwrap();
// Open a simple text file present in the RomFS volume.
// Remember to use the `romfs:/` prefix when working with `RomFS`.
let f = std::fs::read_to_string("romfs:/test-file.txt").unwrap();
println!("Contents of test-file.txt: \n{f}\n");
let f = std::fs::read_to_string("romfs:/ファイル.txt").unwrap();
// While `RomFS` supports UTF-16 file paths, `Console` does not, so we'll use a placeholder for the text.
println!("Contents of [UTF-16 File]: \n{f}\n");
} else {
println!("No RomFS was found, are you sure you included it?")
}
}
println!("\x1b[29;16HPress Start to exit");
while apt.main_loop() {
hid.scan_input();
if hid.keys_down().contains(KeyPad::START) {
break;
}
gfx.wait_for_vblank();
}
}
|
//! Miscellaneous utility macros and functions.
use std::iter::FromIterator;
#[macro_export]
macro_rules! werr {
($($arg:tt)*) => (
if let Err(err) = stderr().write_str(&*format!($($arg)*)) {
panic!("{}", err);
}
)
}
/// Creates a vector of string-slices from a slice of strings.
///
/// The slice vector lives as long as the original slice.
///
/// # Examples
/// ```rust
/// #![allow(unstable)]
/// use baps3_protocol::util::slicify;
///
/// let v = ["a".to_string(), "b".to_string(), "c".to_string()];
/// assert_eq!(slicify(&v), vec!["a", "b", "c"]);
/// ```
pub fn slicify<'a>(strings: &'a[String]) -> Vec<&'a str> {
map_collect(strings.iter(), |a| &**a)
}
/// Creates a vector of strings from a slice of string-slices.
///
/// # Examples
/// ```rust
/// #![allow(unstable)]
/// use baps3_protocol::util::unslicify;
///
/// let v = ["a", "b", "c"];
/// assert_eq!(unslicify(&v),
/// vec!["a".to_string(), "b".to_string(), "c".to_string()]);
/// ```
pub fn unslicify<'a>(slices: &'a[&str]) -> Vec<String> {
map_collect(slices.iter(), |a: &&str| a.to_string())
}
/// Performs a map and collects the results.
pub fn map_collect<B, I, F, C>(iter: I, f: C) -> F
where I: Iterator,
F: FromIterator<B>,
C: FnMut(<I as Iterator>::Item) -> B {
iter.map(f).collect::<F>()
} |
use winapi::um::winuser::{WS_VISIBLE, WS_DISABLED};
use winapi::um::wingdi::DeleteObject;
use winapi::shared::windef::HBRUSH;
use crate::win32::{
base_helper::check_hwnd,
window_helper as wh,
resources_helper as rh
};
use super::{ControlBase, ControlHandle};
use crate::{Bitmap, Icon, NwgError, RawEventHandler, unbind_raw_event_handler};
use std::cell::RefCell;
const NOT_BOUND: &'static str = "ImageFrame is not yet bound to a winapi object";
const BAD_HANDLE: &'static str = "INTERNAL ERROR: ImageFrame handle is not HWND!";
bitflags! {
pub struct ImageFrameFlags: u32 {
const VISIBLE = WS_VISIBLE;
const DISABLED = WS_DISABLED;
}
}
/**
An image frame is a control that displays a `Bitmap` or a `Icon` image resource.
ImageFrame is not behind any features.
**Builder parameters:**
* `parent`: **Required.** The image frame parent container.
* `size`: The image frame size.
* `position`: The image frame position.
* `flags`: A combination of the ImageFrameFlags values.
* `ex_flags`: A combination of win32 window extended flags. Unlike `flags`, ex_flags must be used straight from winapi
* `background_color`: The background color of the image frame. Used if the image is smaller than the control
* `bitmap`: A bitmap to display. If this value is set, icon is ignored.
* `icon`: An icon to display
**Control events:**
* `OnImageFrameClick`: When the image frame is clicked once by the user
* `OnImageFrameDoubleClick`: When the image frame is clicked twice rapidly by the user
* `MousePress(_)`: Generic mouse press events on the button
* `OnMouseMove`: Generic mouse mouse event
* `OnMouseWheel`: Generic mouse wheel event
```rust
use native_windows_gui as nwg;
fn build_frame(button: &mut nwg::ImageFrame, window: &nwg::Window, ico: &nwg::Icon) {
nwg::ImageFrame::builder()
.parent(window)
.build(button);
}
```
*/
#[derive(Default)]
pub struct ImageFrame {
pub handle: ControlHandle,
background_brush: Option<HBRUSH>,
handler0: RefCell<Option<RawEventHandler>>,
}
impl ImageFrame {
pub fn builder<'a>() -> ImageFrameBuilder<'a> {
ImageFrameBuilder {
size: (100, 100),
position: (0, 0),
flags: None,
ex_flags: 0,
bitmap: None,
icon: None,
parent: None,
background_color: None
}
}
/// Sets the bitmap image of the image frame. Replace the current bitmap or icon.
/// Set `image` to `None` to remove the image
pub fn set_bitmap<'a>(&self, image: Option<&'a Bitmap>) {
use winapi::um::winuser::{STM_SETIMAGE, IMAGE_BITMAP};
use winapi::shared::minwindef::{WPARAM, LPARAM};
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
let image_handle = image.map(|i| i.handle as LPARAM).unwrap_or(0);
let prev_img = wh::send_message(handle, STM_SETIMAGE, IMAGE_BITMAP as WPARAM, image_handle);
if prev_img != 0 {
unsafe { DeleteObject(prev_img as _); }
}
}
/// Sets the bitmap image of the image frame. Replace the current bitmap or icon.
/// Set `image` to `None` to remove the image
pub fn set_icon<'a>(&self, image: Option<&'a Icon>) {
use winapi::um::winuser::{STM_SETIMAGE, IMAGE_ICON};
use winapi::shared::minwindef::{WPARAM, LPARAM};
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
let image_handle = image.map(|i| i.handle as LPARAM).unwrap_or(0);
let prev_img = wh::send_message(handle, STM_SETIMAGE, IMAGE_ICON as WPARAM, image_handle);
if prev_img != 0 {
unsafe { DeleteObject(prev_img as _); }
}
}
/// Returns the current image in the image frame.
/// If the image frame has a bitmap, the value will be returned in `bitmap`
/// If the image frame has a icon, the value will be returned in `icon`
pub fn image<'a>(&self, bitmap: &mut Option<Bitmap>, icon: &mut Option<Icon>) {
use winapi::um::winuser::{STM_GETIMAGE, IMAGE_BITMAP, IMAGE_ICON};
use winapi::shared::minwindef::WPARAM;
use winapi::shared::windef::HBITMAP;
use winapi::um::winnt::HANDLE;
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
let bitmap_handle = wh::send_message(handle, STM_GETIMAGE, IMAGE_BITMAP as WPARAM, 0);
let icon_handle = wh::send_message(handle, STM_GETIMAGE, IMAGE_ICON as WPARAM, 0);
*bitmap = None;
*icon = None;
if bitmap_handle != 0 && rh::is_bitmap(bitmap_handle as HBITMAP) {
*bitmap = Some(Bitmap { handle: bitmap_handle as HANDLE, owned: false });
} else if icon_handle != 0 {
*icon = Some(Icon { handle: icon_handle as HANDLE, owned: false });
}
}
/// Return true if the control user can interact with the control, return false otherwise
pub fn enabled(&self) -> bool {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::get_window_enabled(handle) }
}
/// Enable or disable the control
pub fn set_enabled(&self, v: bool) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::set_window_enabled(handle, v) }
}
/// Return true if the control is visible to the user. Will return true even if the
/// control is outside of the parent client view (ex: at the position (10000, 10000))
pub fn visible(&self) -> bool {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::get_window_visibility(handle) }
}
/// Show or hide the control to the user
pub fn set_visible(&self, v: bool) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::set_window_visibility(handle, v) }
}
/// Return the size of the image frame in the parent window
pub fn size(&self) -> (u32, u32) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::get_window_size(handle) }
}
/// Set the size of the image frame in the parent window
pub fn set_size(&self, x: u32, y: u32) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::set_window_size(handle, x, y, false) }
}
/// Return the position of the image frame in the parent window
pub fn position(&self) -> (i32, i32) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::get_window_position(handle) }
}
/// Set the position of the image frame in the parent window
pub fn set_position(&self, x: i32, y: i32) {
let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
unsafe { wh::set_window_position(handle, x, y) }
}
/// Winapi class name used during control creation
pub fn class_name(&self) -> &'static str {
"STATIC"
}
/// Winapi base flags used during window creation
pub fn flags(&self) -> u32 {
WS_VISIBLE
}
/// Winapi flags required by the control
pub fn forced_flags(&self) -> u32 {
use winapi::um::winuser::{SS_NOTIFY, WS_CHILD, SS_CENTERIMAGE};
WS_CHILD | SS_NOTIFY | SS_CENTERIMAGE
}
/// Change the label background color to transparent.
/// Change the checkbox background color.
fn hook_background_color(&mut self, c: [u8; 3]) {
use crate::bind_raw_event_handler_inner;
use winapi::um::winuser::{WM_CTLCOLORSTATIC};
use winapi::shared::{basetsd::UINT_PTR, windef::{HWND}, minwindef::LRESULT};
use winapi::um::wingdi::{CreateSolidBrush, RGB};
if self.handle.blank() { panic!("{}", NOT_BOUND); }
let handle = self.handle.hwnd().expect(BAD_HANDLE);
let parent_handle = ControlHandle::Hwnd(wh::get_window_parent(handle));
let brush = unsafe { CreateSolidBrush(RGB(c[0], c[1], c[2])) };
self.background_brush = Some(brush);
let handler = bind_raw_event_handler_inner(&parent_handle, handle as UINT_PTR, move |_hwnd, msg, _w, l| {
match msg {
WM_CTLCOLORSTATIC => {
let child = l as HWND;
if child == handle {
return Some(brush as LRESULT);
}
},
_ => {}
}
None
});
*self.handler0.borrow_mut() = Some(handler.unwrap());
}
}
impl Drop for ImageFrame {
fn drop(&mut self) {
let handler = self.handler0.borrow();
if let Some(h) = handler.as_ref() {
drop(unbind_raw_event_handler(h));
}
if let Some(bg) = self.background_brush {
unsafe { DeleteObject(bg as _); }
}
self.handle.destroy();
}
}
pub struct ImageFrameBuilder<'a> {
size: (i32, i32),
position: (i32, i32),
flags: Option<ImageFrameFlags>,
ex_flags: u32,
bitmap: Option<&'a Bitmap>,
icon: Option<&'a Icon>,
parent: Option<ControlHandle>,
background_color: Option<[u8; 3]>,
}
impl<'a> ImageFrameBuilder<'a> {
pub fn flags(mut self, flags: ImageFrameFlags) -> ImageFrameBuilder<'a> {
self.flags = Some(flags);
self
}
pub fn ex_flags(mut self, flags: u32) -> ImageFrameBuilder<'a> {
self.ex_flags = flags;
self
}
pub fn size(mut self, size: (i32, i32)) -> ImageFrameBuilder<'a> {
self.size = size;
self
}
pub fn position(mut self, pos: (i32, i32)) -> ImageFrameBuilder<'a> {
self.position = pos;
self
}
pub fn bitmap(mut self, bit: Option<&'a Bitmap>) -> ImageFrameBuilder<'a> {
self.bitmap = bit;
self
}
pub fn icon(mut self, ico: Option<&'a Icon>) -> ImageFrameBuilder<'a> {
self.icon = ico;
self
}
pub fn parent<C: Into<ControlHandle>>(mut self, p: C) -> ImageFrameBuilder<'a> {
self.parent = Some(p.into());
self
}
pub fn background_color(mut self, color: Option<[u8;3]>) -> ImageFrameBuilder<'a> {
self.background_color = color;
self
}
pub fn build(self, out: &mut ImageFrame) -> Result<(), NwgError> {
use winapi::um::winuser::{SS_BITMAP, SS_ICON};
let mut flags = self.flags.map(|f| f.bits()).unwrap_or(out.flags());
if self.icon.is_some() {
flags |= SS_ICON;
} else {
flags |= SS_BITMAP;
}
let parent = match self.parent {
Some(p) => Ok(p),
None => Err(NwgError::no_parent("ImageFrame"))
}?;
*out = Default::default();
out.handle = ControlBase::build_hwnd()
.class_name(out.class_name())
.forced_flags(out.forced_flags())
.flags(flags)
.ex_flags(self.ex_flags)
.size(self.size)
.position(self.position)
.parent(Some(parent))
.build()?;
if self.bitmap.is_some() {
out.set_bitmap(self.bitmap);
} else if self.icon.is_some() {
out.set_icon(self.icon);
}
if self.background_color.is_some() {
out.hook_background_color(self.background_color.unwrap());
}
Ok(())
}
}
impl PartialEq for ImageFrame {
fn eq(&self, other: &Self) -> bool {
self.handle == other.handle
}
}
|
#[doc = r"Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::MCS {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_RUNW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_RUNW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 0);
self.w.bits |= ((value as u32) & 1) << 0;
self.w
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_STARTW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_STARTW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 1);
self.w.bits |= ((value as u32) & 1) << 1;
self.w
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_ADRACKR {
bits: bool,
}
impl I2C_MCS_ADRACKR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_ACKW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_ACKW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 3);
self.w.bits |= ((value as u32) & 1) << 3;
self.w
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_ARBLSTR {
bits: bool,
}
impl I2C_MCS_ARBLSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_IDLER {
bits: bool,
}
impl I2C_MCS_IDLER {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_BURSTW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_BURSTW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 6);
self.w.bits |= ((value as u32) & 1) << 6;
self.w
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_CLKTOR {
bits: bool,
}
impl I2C_MCS_CLKTOR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_ACTDMATXR {
bits: bool,
}
impl I2C_MCS_ACTDMATXR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_ACTDMARXR {
bits: bool,
}
impl I2C_MCS_ACTDMARXR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_BUSYR {
bits: bool,
}
impl I2C_MCS_BUSYR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_ERRORR {
bits: bool,
}
impl I2C_MCS_ERRORR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_STOPW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_STOPW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 2);
self.w.bits |= ((value as u32) & 1) << 2;
self.w
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_DATACKR {
bits: bool,
}
impl I2C_MCS_DATACKR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_HSW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_HSW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 4);
self.w.bits |= ((value as u32) & 1) << 4;
self.w
}
}
#[doc = r"Proxy"]
pub struct _I2C_MCS_QCMDW<'a> {
w: &'a mut W,
}
impl<'a> _I2C_MCS_QCMDW<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(1 << 5);
self.w.bits |= ((value as u32) & 1) << 5;
self.w
}
}
#[doc = r"Value of the field"]
pub struct I2C_MCS_BUSBSYR {
bits: bool,
}
impl I2C_MCS_BUSBSYR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 2 - Acknowledge Address"]
#[inline(always)]
pub fn i2c_mcs_adrack(&self) -> I2C_MCS_ADRACKR {
let bits = ((self.bits >> 2) & 1) != 0;
I2C_MCS_ADRACKR { bits }
}
#[doc = "Bit 4 - Arbitration Lost"]
#[inline(always)]
pub fn i2c_mcs_arblst(&self) -> I2C_MCS_ARBLSTR {
let bits = ((self.bits >> 4) & 1) != 0;
I2C_MCS_ARBLSTR { bits }
}
#[doc = "Bit 5 - I2C Idle"]
#[inline(always)]
pub fn i2c_mcs_idle(&self) -> I2C_MCS_IDLER {
let bits = ((self.bits >> 5) & 1) != 0;
I2C_MCS_IDLER { bits }
}
#[doc = "Bit 7 - Clock Timeout Error"]
#[inline(always)]
pub fn i2c_mcs_clkto(&self) -> I2C_MCS_CLKTOR {
let bits = ((self.bits >> 7) & 1) != 0;
I2C_MCS_CLKTOR { bits }
}
#[doc = "Bit 30 - DMA TX Active Status"]
#[inline(always)]
pub fn i2c_mcs_actdmatx(&self) -> I2C_MCS_ACTDMATXR {
let bits = ((self.bits >> 30) & 1) != 0;
I2C_MCS_ACTDMATXR { bits }
}
#[doc = "Bit 31 - DMA RX Active Status"]
#[inline(always)]
pub fn i2c_mcs_actdmarx(&self) -> I2C_MCS_ACTDMARXR {
let bits = ((self.bits >> 31) & 1) != 0;
I2C_MCS_ACTDMARXR { bits }
}
#[doc = "Bit 0 - I2C Busy"]
#[inline(always)]
pub fn i2c_mcs_busy(&self) -> I2C_MCS_BUSYR {
let bits = ((self.bits >> 0) & 1) != 0;
I2C_MCS_BUSYR { bits }
}
#[doc = "Bit 1 - Error"]
#[inline(always)]
pub fn i2c_mcs_error(&self) -> I2C_MCS_ERRORR {
let bits = ((self.bits >> 1) & 1) != 0;
I2C_MCS_ERRORR { bits }
}
#[doc = "Bit 3 - Acknowledge Data"]
#[inline(always)]
pub fn i2c_mcs_datack(&self) -> I2C_MCS_DATACKR {
let bits = ((self.bits >> 3) & 1) != 0;
I2C_MCS_DATACKR { bits }
}
#[doc = "Bit 6 - Bus Busy"]
#[inline(always)]
pub fn i2c_mcs_busbsy(&self) -> I2C_MCS_BUSBSYR {
let bits = ((self.bits >> 6) & 1) != 0;
I2C_MCS_BUSBSYR { bits }
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 0 - I2C Master Enable"]
#[inline(always)]
pub fn i2c_mcs_run(&mut self) -> _I2C_MCS_RUNW {
_I2C_MCS_RUNW { w: self }
}
#[doc = "Bit 1 - Generate START"]
#[inline(always)]
pub fn i2c_mcs_start(&mut self) -> _I2C_MCS_STARTW {
_I2C_MCS_STARTW { w: self }
}
#[doc = "Bit 3 - Data Acknowledge Enable"]
#[inline(always)]
pub fn i2c_mcs_ack(&mut self) -> _I2C_MCS_ACKW {
_I2C_MCS_ACKW { w: self }
}
#[doc = "Bit 6 - Burst Enable"]
#[inline(always)]
pub fn i2c_mcs_burst(&mut self) -> _I2C_MCS_BURSTW {
_I2C_MCS_BURSTW { w: self }
}
#[doc = "Bit 2 - Generate STOP"]
#[inline(always)]
pub fn i2c_mcs_stop(&mut self) -> _I2C_MCS_STOPW {
_I2C_MCS_STOPW { w: self }
}
#[doc = "Bit 4 - High-Speed Enable"]
#[inline(always)]
pub fn i2c_mcs_hs(&mut self) -> _I2C_MCS_HSW {
_I2C_MCS_HSW { w: self }
}
#[doc = "Bit 5 - Quick Command"]
#[inline(always)]
pub fn i2c_mcs_qcmd(&mut self) -> _I2C_MCS_QCMDW {
_I2C_MCS_QCMDW { w: self }
}
}
|
use std::time::Duration;
use naia_shared::{LinkConditionerConfig, SharedConfig};
pub fn get_shared_config() -> SharedConfig {
let tick_interval = Duration::from_millis(1000);
// Simulate network conditions with this configuration property
let link_condition = Some(LinkConditionerConfig::average_condition());
return SharedConfig::new(tick_interval, link_condition);
}
|
use crate::core;
use crate::value::Value;
/// Returns a named value registered by OCaml
pub fn named_value<S: AsRef<str>>(name: S) -> Option<Value> {
unsafe {
let p = format!("{}\0", name.as_ref());
let named = core::callback::caml_named_value(p.as_str().as_ptr());
if named.is_null() {
return None;
}
Some(Value::new(*named))
}
}
|
use runestick::{CompileMeta, SourceId, Span};
/// A visitor that will be called for every language item compiled.
pub trait CompileVisitor {
/// Called when a meta item is registered.
fn register_meta(&self, _meta: &CompileMeta) {}
/// Mark that we've encountered a specific compile meta at the given span.
fn visit_meta(&self, _source_id: SourceId, _meta: &CompileMeta, _span: Span) {}
/// Visit a variable use.
fn visit_variable_use(&self, _source_id: SourceId, _var_span: Span, _span: Span) {}
/// Visit something that is a module.
fn visit_mod(&self, _source_id: SourceId, _span: Span) {}
}
/// A compile visitor that does nothing.
pub struct NoopCompileVisitor(());
impl NoopCompileVisitor {
/// Construct a new noop compile visitor.
pub const fn new() -> Self {
Self(())
}
}
impl CompileVisitor for NoopCompileVisitor {}
|
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
fn main() {
run();
}
fn run() {
let start = std::time::Instant::now();
// code goes here
let limit: u64 = 999;
let mut res = 0;
let mut soft_limit;
soft_limit = limit / 3;
res += 3 * (soft_limit * (soft_limit + 1)) / 2;
soft_limit = limit / 5;
res += 5 * (soft_limit * (soft_limit + 1)) / 2;
soft_limit = limit / 15;
res -= 15 * (soft_limit * (soft_limit + 1)) / 2;
let span = start.elapsed().as_nanos();
println!("{} {}", res, span);
}
|
extern crate nalgebra;
#[macro_use] extern crate glium;
extern crate time;
use glium::{DisplayBuild, Surface};
use nalgebra::{PerspectiveMatrix3, Vector3, Matrix4, Point3, Isometry3, ToHomogeneous, Translation};
#[derive(Clone, Copy, Debug)]
struct Vert {
position: [f32;3],
}
implement_vertex!(Vert, position);
fn main() {
let mut window = glium::glutin::WindowBuilder::new()
.with_dimensions(1280, 720)
.with_depth_buffer(24)
.with_title(format!("Hello world"))
.build_glium()
.expect("Failed to open window");
let tr = [1f32, 1.0, 0.0];
let tl = [-1f32, 1.0, 0.0];
let bl = [-1f32, -1.0, 0.0];
let br = [1f32, -1.0, 0.0];
let data = &[
Vert { position: tr },
Vert { position: tl },
Vert { position: bl },
Vert { position: tr },
Vert { position: bl },
Vert { position: br },
];
let box_vb = glium::vertex::VertexBuffer::new(&window, data).unwrap();
let v_shader = "
#version 150
uniform mat4 perspective;
uniform mat4 modelview;
in vec3 position;
void main() {
gl_Position = perspective * modelview * vec4(position, 1.0);
}
";
let f_shader = "
#version 150
void main() {
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
}
";
let box_shader = glium::program::Program::from_source(&window, v_shader, f_shader, None).unwrap();
let params = glium::DrawParameters {
backface_culling: glium::draw_parameters::BackfaceCullingMode::CullClockwise,
depth: glium::Depth {
test: glium::draw_parameters::DepthTest::IfLess,
write: true,
.. Default::default()
},
.. Default::default()
};
use std::f32::consts::FRAC_PI_4;
const PI_4: f32 = FRAC_PI_4;
const UP: Vector3<f32> = Vector3 {x: 0.0, y: 1.0, z: 0.0};
let position = Point3::new(0.0, 0.0, 10.0);
let target = Point3::new(0.0, 0.0, 0.0);
let view = Isometry3::look_at_rh(&position, &target, &UP).to_homogeneous();
let perspective = PerspectiveMatrix3::new(1.78, PI_4, 1.0, 100.0).to_matrix();
let mut model = Isometry3::new(Vector3::new(5.0, 0.0, 0.0), Vector3::new(0.0, 0.0, 0.0));
let mut curr_t = time::PreciseTime::now();
let mut prev_t: time::PreciseTime;
let mut dt = time::Duration::milliseconds(2);
let mut progress = 0.0;
loop {
if do_exit(&mut window) {
break;
}
progress = progress + 0.001*(dt.num_milliseconds() as f32);
model.set_translation(((1.0-progress)*Point3::new(5.0, 0.0, 0.0) + progress*Vector3::new(-5.0, 0.0, 0.0)).to_vector());
let mut frame = window.draw();
frame.clear_color_and_depth((0.0, 1.0, 0.0, 1.0), 1.0);
let indices = glium::index::NoIndices(glium::index::PrimitiveType::TrianglesList);
let uniforms = uniform! {
perspective: perspective.as_ref().clone(),
modelview: (model.to_homogeneous()*view).as_ref().clone(),
};
frame.draw(&box_vb, &indices, &box_shader, &uniforms, ¶ms).unwrap();
frame.finish().unwrap();
prev_t = curr_t;
curr_t = time::PreciseTime::now();
dt = prev_t.to(curr_t);
}
}
fn do_exit(window: &mut glium::Display) -> bool {
for event in window.poll_events() {
use glium::glutin::Event;
use glium::glutin::VirtualKeyCode as KC;
match event {
Event::Closed => {
return true;
},
Event::KeyboardInput(state, _, key) => {
if state == glium::glutin::ElementState::Pressed {
match key.unwrap() {
KC::Escape => {
return true;
},
_ => ()
}
}
}
_ => ()
}
}
return false;
}
|
use bevy::prelude::*;
const NUM_SLIDES: isize = 6;
const WINDOW_WIDTH: f32 = 1280.0;
/// The current viewed slide.
pub struct Page(pub isize);
/// Tags the main camera.
struct WorldCamera;
/// Component for smooth camera movement.
#[derive(Debug, Default)]
struct CameraTarget(f32);
pub struct DemoCameraPlugin;
impl Plugin for DemoCameraPlugin {
fn build(&self, app: &mut AppBuilder) {
app.add_resource(Page(0))
.add_startup_system(camera_setup.system())
.add_system(camera_controls.system())
.add_system(move_camera.system());
}
}
fn camera_setup(commands: &mut Commands) {
commands
.spawn(Camera2dBundle::default())
.with(WorldCamera)
.with(CameraTarget::default());
}
fn camera_controls(
input: Res<Input<KeyCode>>,
mut query: Query<&mut CameraTarget, With<WorldCamera>>,
mut slide: ResMut<Page>,
) {
let mut movement = 0;
if input.just_pressed(KeyCode::D) {
movement += 1;
}
if input.just_pressed(KeyCode::A) {
movement -= 1;
}
if movement != 0 {
slide.0 += movement;
slide.0 = slide.0.max(0).min(NUM_SLIDES - 1);
for mut target in query.iter_mut() {
target.0 = slide.0 as f32 * WINDOW_WIDTH;
}
}
}
fn move_camera(
mut query: Query<(&mut Transform, &CameraTarget), With<WorldCamera>>,
time: Res<Time>,
) {
for (mut camera_transform, target) in query.iter_mut() {
let camera_x = &mut camera_transform.translation.x;
let remaining_distance = target.0 - *camera_x;
let displacement = 5.0 * time.delta_seconds() * remaining_distance;
*camera_x = if remaining_distance.abs() < 0.1 {
target.0
} else {
*camera_x + displacement
};
}
}
|
const CRTC_COL: u16 = 25;
const CRTC_ROW: u16 = 80;
const CRTC_ADDR: u16 = 0x3d4;
const CRTC_DATA: u16 = 0x3d5;
const CRTC_CURSOR_H: u8 = 0x0E;
const CRTC_CURSOR_L: u8 = 0x0F;
use arch::x86_32::device::io;
// カーソル位置指定
pub unsafe fn set_cursor(pos: u16) {
io::outb(CRTC_ADDR, CRTC_CURSOR_H);
io::outb(CRTC_DATA, (pos >> 8) as u8);
io::outb(CRTC_ADDR, CRTC_CURSOR_L);
io::outb(CRTC_DATA, pos as u8);
}
// カーソル位置取得
pub unsafe fn get_cursor() -> u16 {
io::outb(CRTC_ADDR, CRTC_CURSOR_H);
let ph = io::inb(CRTC_DATA);
io::outb(CRTC_ADDR, CRTC_CURSOR_L);
let pl = io::inb(CRTC_DATA);
(ph as u16) << 8 | (pl as u16)
}
// 文字表示
pub unsafe fn putc(c: u8) {
let pos = get_cursor();
match c {
// BS:一文字戻って表示クリア(Nullを書く)
0x08 => {
set_cursor(pos-1);
let mut vram = 0xb8000 + (get_cursor() * 2) as i32;
*(vram as *mut u16) = 0x0f00;
},
// LF:改行(タスク:スクロール処理の実装)
0x0A => set_cursor(pos + CRTC_ROW),
// CR:行頭へ
0x0D => set_cursor(pos - (pos % CRTC_ROW)),
// 通常文字なら通常表示する
_ => {
let mut vram = 0xb8000 + (pos * 2) as i32;
*(vram as *mut u16) = 0x0f00 | (c as u16);
set_cursor(pos+1); // 次の位置へカーソルを移動
}
}
}
// 文字列表示
pub fn puts(s: &str) {
for c in s.as_bytes() {
unsafe {
putc(*c);
}
}
}
|
//! Describes the struct that holds the options needed by the formatting functions.
//! The three most common formats are provided as constants to be used easily
mod defaults;
pub use self::defaults::*;
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
/// Holds the standard to use when displaying the size.
pub enum Kilo {
/// The decimal scale and units. SI standard.
Decimal,
/// The binary scale and units.
Binary,
}
impl Default for Kilo {
fn default() -> Self {
Self::Decimal
}
}
impl Kilo {
pub(crate) fn value(&self) -> f64 {
match self {
Kilo::Decimal => 1000.0,
Kilo::Binary => 1024.0,
}
}
}
#[derive(Debug, Copy, Clone)]
/// Forces a certain representation of the resulting file size.
pub enum FixedAt {
Base,
Kilo,
Mega,
Giga,
Tera,
Peta,
Exa,
Zetta,
Yotta,
}
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum BaseUnit {
Bit,
Byte,
}
impl Default for BaseUnit {
fn default() -> Self {
Self::Byte
}
}
/// Holds the options for the `file_size` method.
#[derive(Debug, Clone, Copy, Default)]
#[non_exhaustive]
pub struct FormatSizeOptionsBuilder {
/// Whether the value being formatted represents an amount of bits or bytes.
pub base_unit: BaseUnit,
/// The scale (binary/decimal) to divide against.
pub kilo: Kilo,
/// The unit set to display.
pub units: Kilo,
/// The amount of decimal places to display if the decimal part is non-zero.
pub decimal_places: usize,
/// The amount of zeroes to display if the decimal part is zero.
pub decimal_zeroes: usize,
/// Whether to force a certain representation and if so, which one.
pub fixed_at: Option<FixedAt>,
/// Whether to use the full unit (e.g. `Kilobyte`) or its abbreviation (`kB`).
pub long_units: bool,
/// Whether to place a space between value and units.
pub space_after_value: bool,
/// An optional suffix which will be appended after the unit. Useful to represent speeds (e.g. `1 kB/s)
pub suffix: &'static str,
}
/// Holds the options for the `file_size` method.
#[derive(Debug, Clone, Copy, Default)]
#[non_exhaustive]
pub struct FormatSizeOptions {
/// Whether the value being formatted represents an amount of bits or bytes.
pub base_unit: BaseUnit,
/// The scale (binary/decimal) to divide against.
pub kilo: Kilo,
/// The unit set to display.
pub units: Kilo,
/// The amount of decimal places to display if the decimal part is non-zero.
pub decimal_places: usize,
/// The amount of zeroes to display if the decimal part is zero.
pub decimal_zeroes: usize,
/// Whether to force a certain representation and if so, which one.
pub fixed_at: Option<FixedAt>,
/// Whether to use the full unit (e.g. `Kilobyte`) or its abbreviation (`kB`).
pub long_units: bool,
/// Whether to place a space between value and units.
pub space_after_value: bool,
/// An optional suffix which will be appended after the unit. Useful to represent speeds (e.g. `1 kB/s)
pub suffix: &'static str,
}
impl FormatSizeOptions {
pub fn from(from: FormatSizeOptions) -> FormatSizeOptions {
FormatSizeOptions { ..from }
}
pub fn base_unit(mut self, base_unit: BaseUnit) -> FormatSizeOptions {
self.base_unit = base_unit;
self
}
pub fn kilo(mut self, kilo: Kilo) -> FormatSizeOptions {
self.kilo = kilo;
self
}
pub fn units(mut self, units: Kilo) -> FormatSizeOptions {
self.units = units;
self
}
pub fn decimal_places(mut self, decimal_places: usize) -> FormatSizeOptions {
self.decimal_places = decimal_places;
self
}
pub fn decimal_zeroes(mut self, decimal_zeroes: usize) -> FormatSizeOptions {
self.decimal_zeroes = decimal_zeroes;
self
}
pub fn fixed_at(mut self, fixed_at: Option<FixedAt>) -> FormatSizeOptions {
self.fixed_at = fixed_at;
self
}
pub fn long_units(mut self, long_units: bool) -> FormatSizeOptions {
self.long_units = long_units;
self
}
pub fn space_after_value(mut self, insert_space: bool) -> FormatSizeOptions {
self.space_after_value = insert_space;
self
}
pub fn suffix(mut self, suffix: &'static str) -> FormatSizeOptions {
self.suffix = suffix;
self
}
}
impl AsRef<FormatSizeOptions> for FormatSizeOptions {
fn as_ref(&self) -> &FormatSizeOptions {
self
}
}
|
use anyhow::{anyhow, Context, Result};
use chrono::{DateTime, Utc};
use dialoguer;
use dialoguer::Input;
use std::collections::HashMap;
use std::{thread, time::Duration};
use crate::providers::okta::client::Client;
use crate::providers::okta::factors::{Factor, FactorResult, FactorVerificationRequest};
use crate::providers::okta::structure::Links;
use crate::providers::okta::users::User;
const BACKOFF_TIMEOUT: Duration = Duration::from_secs(2);
pub const PUSH_WAIT_TIMEOUT: i64 = 60;
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct LoginRequest {
#[serde(skip_serializing_if = "Option::is_none")]
username: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
password: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
relay_state: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
options: Option<Options>,
#[serde(skip_serializing_if = "Option::is_none")]
state_token: Option<String>,
}
impl LoginRequest {
pub fn from_credentials(username: String, password: String) -> Self {
Self {
username: Some(username),
password: Some(password),
relay_state: None,
options: None,
state_token: None,
}
}
pub fn from_state_token(token: String) -> Self {
Self {
username: None,
password: None,
relay_state: None,
options: None,
state_token: Some(token),
}
}
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
struct Options {
multi_optional_factor_enroll: bool,
warn_before_password_expired: bool,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct LoginResponse {
state_token: Option<String>,
pub session_token: Option<String>,
expires_at: String,
status: LoginState,
pub factor_result: Option<FactorResult>,
relay_state: Option<String>,
#[serde(rename = "_embedded")]
embedded: Option<LoginEmbedded>,
#[serde(rename = "_links", default)]
pub links: HashMap<String, Links>,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct LoginEmbedded {
#[serde(default)]
factors: Vec<Factor>,
user: User,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum LoginState {
Unauthenticated,
PasswordWarn,
PasswordExpired,
Recovery,
RecoveryChallenge,
PasswordReset,
LockedOut,
MfaEnroll,
MfaEnrollActivate,
MfaRequired,
MfaChallenge,
Success,
}
impl Client {
pub fn login(&self, req: &LoginRequest) -> Result<LoginResponse> {
let login_type = if req.state_token.is_some() {
"State Token"
} else {
"Credentials"
};
debug!("Attempting to login with {}", login_type);
self.post("api/v1/authn", req)
}
pub fn get_session_token(&self, req: &LoginRequest) -> Result<String> {
let response = self.login(req)?;
trace!("Login response: {:?}", response);
match response.status {
LoginState::Success => Ok(response.session_token.unwrap()),
LoginState::MfaRequired => {
let factors = response.embedded.unwrap().factors;
let factor = match factors.len() {
0 => return Err(anyhow!("MFA required, and no available factors")),
1 => {
info!("Only one factor available, using it");
&factors[0]
}
_ => {
eprintln!("Please select the factor to use:");
let mut menu = dialoguer::Select::new();
for factor in &factors {
menu.item(&factor.to_string());
}
&factors[menu.interact()?]
}
};
debug!("Factor: {:?}", factor);
let mut state_token = response
.state_token
.clone()
.with_context(|| "No state token found in response")?;
let factor_challenge_response =
match self.send_verification_challenge(state_token.clone(), factor)? {
Some(res) => {
state_token = res
.state_token
.clone()
.with_context(|| "No state token found in response")?;
Some(res)
}
None => None,
};
let factor_verification_request = match factor {
Factor::Sms { .. } => {
let mfa_code = prompt_mfa()?;
Some(FactorVerificationRequest::Sms {
state_token,
pass_code: Some(mfa_code),
})
}
Factor::Totp { .. } => {
let mfa_code = prompt_mfa()?;
Some(FactorVerificationRequest::Totp {
state_token,
pass_code: mfa_code,
})
}
Factor::Push { .. } => Some(FactorVerificationRequest::Push { state_token }),
_ => None,
};
trace!(
"Factor Verification Request: {:?}",
factor_verification_request
);
let factor_verification_response = match factor {
Factor::Push { .. } => self.poll_for_push_result(
&factor_challenge_response.unwrap(),
&factor_verification_request.unwrap(),
)?,
_ => self.verify(&factor, &factor_verification_request.unwrap())?,
};
trace!(
"Factor Verification Response: {:?}",
factor_verification_response
);
match factor_verification_response.factor_result {
Some(fr) => match fr {
FactorResult::Success { .. } => {
Ok(factor_verification_response.session_token.unwrap())
}
_ => Err(anyhow!(fr)),
},
None => Ok(factor_verification_response.session_token.unwrap()),
}
}
_ => {
println!("Resp: {:?}", response);
Err(anyhow!("Failed determining MFA status"))
}
}
}
fn send_verification_challenge(
&self,
state_token: String,
factor: &Factor,
) -> Result<Option<LoginResponse>> {
let factor_verification_challenge = match factor {
Factor::Sms { .. } => Some(FactorVerificationRequest::Sms {
state_token,
pass_code: None,
}),
Factor::Push { .. } => Some(FactorVerificationRequest::Push { state_token }),
_ => None,
};
match factor_verification_challenge {
Some(challenge) => {
trace!("Factor Challenge Request: {:?}", challenge);
Ok(Some(self.verify(&factor, &challenge)?))
}
None => Ok(None),
}
}
fn poll_for_push_result(
&self,
res: &LoginResponse,
req: &FactorVerificationRequest,
) -> Result<LoginResponse> {
let mut response = self.poll(&res, &req)?;
let time_at_execution = Utc::now();
eprint!("Waiting for confirmation");
while timeout_not_reached(time_at_execution) {
let login_response = self.poll(&res, &req)?;
eprint!(".");
match login_response.factor_result {
Some(r) if r == FactorResult::Waiting => {
thread::sleep(BACKOFF_TIMEOUT);
continue;
}
_ => {
response = login_response;
break;
}
}
}
eprintln!();
Ok(response)
}
}
fn timeout_not_reached(time: DateTime<Utc>) -> bool {
time.signed_duration_since(Utc::now()).num_seconds() < PUSH_WAIT_TIMEOUT
}
fn prompt_mfa() -> Result<String> {
let mut input = Input::new();
let input = input.with_prompt("MFA response");
match input.interact() {
Ok(mfa) => Ok(mfa),
Err(e) => Err(anyhow!("Failed to get MFA input: {}", e)),
}
}
#[cfg(test)]
mod test {
use super::*;
use chrono::NaiveDateTime;
#[test]
fn should_reach_timeout() -> Result<()> {
let dt = DateTime::<Utc>::from_utc(
NaiveDateTime::parse_from_str("2038-01-01T10:10:10", "%Y-%m-%dT%H:%M:%S")?,
Utc,
);
assert_eq!(false, timeout_not_reached(dt));
Ok(())
}
#[test]
fn should_not_reach_timeout() -> Result<()> {
let dt = Utc::now();
thread::sleep(Duration::from_secs(3));
assert_eq!(true, timeout_not_reached(dt));
Ok(())
}
}
|
use crate::utils::{file_name_as_str, LogCommandExt};
use crate::Result;
use crate::Runnable;
use std::fs;
use std::process::Command;
use anyhow::{bail, Context};
use log::debug;
pub mod regular_platform;
pub fn strip_runnable(runnable: &Runnable, mut command: Command) -> Result<Runnable> {
let exe_stripped_name = file_name_as_str(&runnable.exe)?;
let mut stripped_runnable = runnable.clone();
stripped_runnable.exe = runnable
.exe
.parent()
.map(|it| it.join(format!("{}-stripped", exe_stripped_name)))
.with_context(|| format!("{} is not a valid executable name", &runnable.exe.display()))?;
// Backup old runnable
fs::copy(&runnable.exe, &stripped_runnable.exe)?;
let command = command.arg(&stripped_runnable.exe);
debug!("Running command {:?}", command);
let output = command.log_invocation(2).output()?;
if !output.status.success() {
bail!(
"Error while stripping {}\nError: {}",
&stripped_runnable.exe.display(),
String::from_utf8(output.stdout)?
)
}
debug!(
"{} unstripped size = {} and stripped size = {}",
runnable.exe.display(),
fs::metadata(&runnable.exe)?.len(),
fs::metadata(&stripped_runnable.exe)?.len()
);
Ok(stripped_runnable)
}
|
use crate::smb2::requests::create::Create;
/// Serializes the create request body.
pub fn serialize_create_request_body(request: &Create) -> Vec<u8> {
let mut serialized_request: Vec<u8> = Vec::new();
serialized_request.append(&mut request.structure_size.clone());
serialized_request.append(&mut request.security_flag.clone());
serialized_request.append(&mut request.requested_oplock_level.clone());
serialized_request.append(&mut request.impersonation_level.clone());
serialized_request.append(&mut request.smb_create_flags.clone());
serialized_request.append(&mut request.reserved.clone());
serialized_request.append(&mut request.desired_access.clone());
serialized_request.append(&mut request.file_attributes.clone());
serialized_request.append(&mut request.share_access.clone());
serialized_request.append(&mut request.create_disposition.clone());
serialized_request.append(&mut request.create_options.clone());
serialized_request.append(&mut request.name_offset.clone());
serialized_request.append(&mut request.name_length.clone());
serialized_request.append(&mut request.create_contexts_offset.clone());
serialized_request.append(&mut request.create_contexts_length.clone());
serialized_request.append(&mut request.buffer.clone());
serialized_request
}
|
use super::bus::BusDevice;
pub struct PostCodeHandler {}
impl PostCodeHandler {
pub fn new() -> Self {
PostCodeHandler {}
}
}
impl BusDevice for PostCodeHandler {
fn write(&mut self, _offset: u64, data: &[u8]) {
println!("POST: 0x{:x}", data[0]);
}
}
|
//! Routines for dumping read_* responses
use generated_types::{
read_response::{frame::Data, *},
Tag,
};
/// Convert a slice of frames to a format suitable for
/// comparing in tests.
pub(crate) fn dump_data_frames(frames: &[Data]) -> Vec<String> {
frames.iter().map(dump_data).collect()
}
fn dump_data(data: &Data) -> String {
match Some(data) {
Some(Data::Series(SeriesFrame { tags, data_type })) => format!(
"SeriesFrame, tags: {}, type: {:?}",
dump_tags(tags),
data_type
),
Some(Data::FloatPoints(FloatPointsFrame { timestamps, values })) => format!(
"FloatPointsFrame, timestamps: {:?}, values: {:?}",
timestamps,
dump_values(values)
),
Some(Data::IntegerPoints(IntegerPointsFrame { timestamps, values })) => format!(
"IntegerPointsFrame, timestamps: {:?}, values: {:?}",
timestamps,
dump_values(values)
),
Some(Data::BooleanPoints(BooleanPointsFrame { timestamps, values })) => format!(
"BooleanPointsFrame, timestamps: {:?}, values: {}",
timestamps,
dump_values(values)
),
Some(Data::StringPoints(StringPointsFrame { timestamps, values })) => format!(
"StringPointsFrame, timestamps: {:?}, values: {}",
timestamps,
dump_values(values)
),
Some(Data::UnsignedPoints(UnsignedPointsFrame { timestamps, values })) => format!(
"UnsignedPointsFrame, timestamps: {:?}, values: {}",
timestamps,
dump_values(values)
),
Some(Data::Group(GroupFrame {
tag_keys,
partition_key_vals,
})) => format!(
"GroupFrame, tag_keys: {}, partition_key_vals: {}",
dump_u8_vec(tag_keys),
dump_u8_vec(partition_key_vals),
),
None => "<NO data field>".into(),
}
}
fn dump_values<T>(v: &[T]) -> String
where
T: std::fmt::Display,
{
v.iter()
.map(|item| format!("{item}"))
.collect::<Vec<_>>()
.join(",")
}
fn dump_u8_vec(encoded_strings: &[Vec<u8>]) -> String {
encoded_strings
.iter()
.map(|b| String::from_utf8_lossy(b))
.collect::<Vec<_>>()
.join(",")
}
fn dump_tags(tags: &[Tag]) -> String {
tags.iter()
.map(|tag| {
format!(
"{}={}",
String::from_utf8_lossy(&tag.key),
String::from_utf8_lossy(&tag.value),
)
})
.collect::<Vec<_>>()
.join(",")
}
|
// auto generated, do not modify.
// created: Mon Feb 22 23:57:02 2016
// src-file: /QtCore/qrect.h
// dst-file: /src/core/qrect.rs
//
// header block begin =>
#![feature(libc)]
#![feature(core)]
#![feature(collections)]
extern crate libc;
use self::libc::*;
// <= header block end
// main block begin =>
// <= main block end
// use block begin =>
use std::ops::Deref;
use super::qpoint::*; // 773
use super::qsize::*; // 773
use super::qmargins::*; // 773
// use super::qrect::QRect; // 773
// <= use block end
// ext block begin =>
// #[link(name = "Qt5Core")]
// #[link(name = "Qt5Gui")]
// #[link(name = "Qt5Widgets")]
// #[link(name = "QtInline")]
extern {
fn QRect_Class_Size() -> c_int;
// proto: int QRect::right();
fn C_ZNK5QRect5rightEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: void QRect::moveTo(const QPoint & p);
fn C_ZN5QRect6moveToERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::moveTopLeft(const QPoint & p);
fn C_ZN5QRect11moveTopLeftERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::moveRight(int pos);
fn C_ZN5QRect9moveRightEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::QRect(const QPoint & topleft, const QPoint & bottomright);
fn C_ZN5QRectC2ERK6QPointS2_(arg0: *mut c_void, arg1: *mut c_void) -> u64;
// proto: QRect QRect::translated(int dx, int dy);
fn C_ZNK5QRect10translatedEii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int) -> *mut c_void;
// proto: QPoint QRect::center();
fn C_ZNK5QRect6centerEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRect::moveTopRight(const QPoint & p);
fn C_ZN5QRect12moveTopRightERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::setLeft(int pos);
fn C_ZN5QRect7setLeftEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: int QRect::left();
fn C_ZNK5QRect4leftEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: QRect QRect::intersected(const QRect & other);
fn C_ZNK5QRect11intersectedERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: bool QRect::contains(int x, int y, bool proper);
fn C_ZNK5QRect8containsEiib(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int, arg2: c_char) -> c_char;
// proto: QPoint QRect::bottomRight();
fn C_ZNK5QRect11bottomRightEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: bool QRect::isValid();
fn C_ZNK5QRect7isValidEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: QSize QRect::size();
fn C_ZNK5QRect4sizeEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: QRect QRect::united(const QRect & other);
fn C_ZNK5QRect6unitedERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: void QRect::adjust(int x1, int y1, int x2, int y2);
fn C_ZN5QRect6adjustEiiii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int, arg2: c_int, arg3: c_int);
// proto: bool QRect::isNull();
fn C_ZNK5QRect6isNullEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: void QRect::setBottom(int pos);
fn C_ZN5QRect9setBottomEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setSize(const QSize & s);
fn C_ZN5QRect7setSizeERK5QSize(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: int QRect::y();
fn C_ZNK5QRect1yEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: int QRect::x();
fn C_ZNK5QRect1xEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: QRect QRect::adjusted(int x1, int y1, int x2, int y2);
fn C_ZNK5QRect8adjustedEiiii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int, arg2: c_int, arg3: c_int) -> *mut c_void;
// proto: void QRect::QRect(const QPoint & topleft, const QSize & size);
fn C_ZN5QRectC2ERK6QPointRK5QSize(arg0: *mut c_void, arg1: *mut c_void) -> u64;
// proto: int QRect::height();
fn C_ZNK5QRect6heightEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: void QRect::QRect(int left, int top, int width, int height);
fn C_ZN5QRectC2Eiiii(arg0: c_int, arg1: c_int, arg2: c_int, arg3: c_int) -> u64;
// proto: void QRect::moveBottomLeft(const QPoint & p);
fn C_ZN5QRect14moveBottomLeftERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: int QRect::top();
fn C_ZNK5QRect3topEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: void QRect::moveTo(int x, int t);
fn C_ZN5QRect6moveToEii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int);
// proto: void QRect::getRect(int * x, int * y, int * w, int * h);
fn C_ZNK5QRect7getRectEPiS0_S0_S0_(qthis: u64 /* *mut c_void*/, arg0: *mut c_int, arg1: *mut c_int, arg2: *mut c_int, arg3: *mut c_int);
// proto: bool QRect::contains(const QRect & r, bool proper);
fn C_ZNK5QRect8containsERKS_b(qthis: u64 /* *mut c_void*/, arg0: *mut c_void, arg1: c_char) -> c_char;
// proto: QRect QRect::marginsRemoved(const QMargins & margins);
fn C_ZNK5QRect14marginsRemovedERK8QMargins(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: void QRect::translate(int dx, int dy);
fn C_ZN5QRect9translateEii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int);
// proto: QPoint QRect::topLeft();
fn C_ZNK5QRect7topLeftEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: bool QRect::contains(const QPoint & p, bool proper);
fn C_ZNK5QRect8containsERK6QPointb(qthis: u64 /* *mut c_void*/, arg0: *mut c_void, arg1: c_char) -> c_char;
// proto: int QRect::width();
fn C_ZNK5QRect5widthEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: void QRect::setRect(int x, int y, int w, int h);
fn C_ZN5QRect7setRectEiiii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int, arg2: c_int, arg3: c_int);
// proto: void QRect::moveCenter(const QPoint & p);
fn C_ZN5QRect10moveCenterERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: bool QRect::intersects(const QRect & r);
fn C_ZNK5QRect10intersectsERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> c_char;
// proto: void QRect::setTopRight(const QPoint & p);
fn C_ZN5QRect11setTopRightERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::setCoords(int x1, int y1, int x2, int y2);
fn C_ZN5QRect9setCoordsEiiii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int, arg2: c_int, arg3: c_int);
// proto: void QRect::translate(const QPoint & p);
fn C_ZN5QRect9translateERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::moveBottom(int pos);
fn C_ZN5QRect10moveBottomEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setBottomLeft(const QPoint & p);
fn C_ZN5QRect13setBottomLeftERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::getCoords(int * x1, int * y1, int * x2, int * y2);
fn C_ZNK5QRect9getCoordsEPiS0_S0_S0_(qthis: u64 /* *mut c_void*/, arg0: *mut c_int, arg1: *mut c_int, arg2: *mut c_int, arg3: *mut c_int);
// proto: QPoint QRect::topRight();
fn C_ZNK5QRect8topRightEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRect::setBottomRight(const QPoint & p);
fn C_ZN5QRect14setBottomRightERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::setHeight(int h);
fn C_ZN5QRect9setHeightEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: bool QRect::isEmpty();
fn C_ZNK5QRect7isEmptyEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: bool QRect::contains(int x, int y);
fn C_ZNK5QRect8containsEii(qthis: u64 /* *mut c_void*/, arg0: c_int, arg1: c_int) -> c_char;
// proto: void QRect::moveBottomRight(const QPoint & p);
fn C_ZN5QRect15moveBottomRightERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: QPoint QRect::bottomLeft();
fn C_ZNK5QRect10bottomLeftEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRect::setTop(int pos);
fn C_ZN5QRect6setTopEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: int QRect::bottom();
fn C_ZNK5QRect6bottomEv(qthis: u64 /* *mut c_void*/) -> c_int;
// proto: void QRect::QRect();
fn C_ZN5QRectC2Ev() -> u64;
// proto: QRect QRect::marginsAdded(const QMargins & margins);
fn C_ZNK5QRect12marginsAddedERK8QMargins(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: QRect QRect::normalized();
fn C_ZNK5QRect10normalizedEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRect::setWidth(int w);
fn C_ZN5QRect8setWidthEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setY(int y);
fn C_ZN5QRect4setYEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::moveTop(int pos);
fn C_ZN5QRect7moveTopEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setX(int x);
fn C_ZN5QRect4setXEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setRight(int pos);
fn C_ZN5QRect8setRightEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: void QRect::setTopLeft(const QPoint & p);
fn C_ZN5QRect10setTopLeftERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRect::moveLeft(int pos);
fn C_ZN5QRect8moveLeftEi(qthis: u64 /* *mut c_void*/, arg0: c_int);
// proto: QRect QRect::translated(const QPoint & p);
fn C_ZNK5QRect10translatedERK6QPoint(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
fn QRectF_Class_Size() -> c_int;
// proto: void QRectF::QRectF();
fn C_ZN6QRectFC2Ev() -> u64;
// proto: void QRectF::moveBottomRight(const QPointF & p);
fn C_ZN6QRectF15moveBottomRightERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRectF::moveTo(qreal x, qreal y);
fn C_ZN6QRectF6moveToEdd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double);
// proto: qreal QRectF::top();
fn C_ZNK6QRectF3topEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: QPointF QRectF::bottomLeft();
fn C_ZNK6QRectF10bottomLeftEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::setHeight(qreal h);
fn C_ZN6QRectF9setHeightEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::setSize(const QSizeF & s);
fn C_ZN6QRectF7setSizeERK6QSizeF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRectF::QRectF(const QPointF & topleft, const QPointF & bottomRight);
fn C_ZN6QRectFC2ERK7QPointFS2_(arg0: *mut c_void, arg1: *mut c_void) -> u64;
// proto: void QRectF::moveTo(const QPointF & p);
fn C_ZN6QRectF6moveToERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: QRect QRectF::toAlignedRect();
fn C_ZNK6QRectF13toAlignedRectEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::setRight(qreal pos);
fn C_ZN6QRectF8setRightEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::setBottomLeft(const QPointF & p);
fn C_ZN6QRectF13setBottomLeftERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: QPointF QRectF::topRight();
fn C_ZNK6QRectF8topRightEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: QSizeF QRectF::size();
fn C_ZNK6QRectF4sizeEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::adjust(qreal x1, qreal y1, qreal x2, qreal y2);
fn C_ZN6QRectF6adjustEdddd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double, arg2: c_double, arg3: c_double);
// proto: void QRectF::moveRight(qreal pos);
fn C_ZN6QRectF9moveRightEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: qreal QRectF::y();
fn C_ZNK6QRectF1yEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: QPointF QRectF::bottomRight();
fn C_ZNK6QRectF11bottomRightEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::setBottom(qreal pos);
fn C_ZN6QRectF9setBottomEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::moveBottomLeft(const QPointF & p);
fn C_ZN6QRectF14moveBottomLeftERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRectF::moveBottom(qreal pos);
fn C_ZN6QRectF10moveBottomEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::getRect(qreal * x, qreal * y, qreal * w, qreal * h);
fn C_ZNK6QRectF7getRectEPdS0_S0_S0_(qthis: u64 /* *mut c_void*/, arg0: *mut c_double, arg1: *mut c_double, arg2: *mut c_double, arg3: *mut c_double);
// proto: qreal QRectF::x();
fn C_ZNK6QRectF1xEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: qreal QRectF::bottom();
fn C_ZNK6QRectF6bottomEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: bool QRectF::isNull();
fn C_ZNK6QRectF6isNullEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: void QRectF::QRectF(const QPointF & topleft, const QSizeF & size);
fn C_ZN6QRectFC2ERK7QPointFRK6QSizeF(arg0: *mut c_void, arg1: *mut c_void) -> u64;
// proto: void QRectF::setWidth(qreal w);
fn C_ZN6QRectF8setWidthEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: qreal QRectF::height();
fn C_ZNK6QRectF6heightEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: void QRectF::translate(const QPointF & p);
fn C_ZN6QRectF9translateERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRectF::moveCenter(const QPointF & p);
fn C_ZN6QRectF10moveCenterERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: bool QRectF::contains(const QRectF & r);
fn C_ZNK6QRectF8containsERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> c_char;
// proto: QRectF QRectF::marginsRemoved(const QMarginsF & margins);
fn C_ZNK6QRectF14marginsRemovedERK9QMarginsF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: bool QRectF::contains(qreal x, qreal y);
fn C_ZNK6QRectF8containsEdd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double) -> c_char;
// proto: void QRectF::setX(qreal pos);
fn C_ZN6QRectF4setXEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::setRect(qreal x, qreal y, qreal w, qreal h);
fn C_ZN6QRectF7setRectEdddd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double, arg2: c_double, arg3: c_double);
// proto: QPointF QRectF::center();
fn C_ZNK6QRectF6centerEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::setLeft(qreal pos);
fn C_ZN6QRectF7setLeftEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: QRectF QRectF::intersected(const QRectF & other);
fn C_ZNK6QRectF11intersectedERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: QPointF QRectF::topLeft();
fn C_ZNK6QRectF7topLeftEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: qreal QRectF::left();
fn C_ZNK6QRectF4leftEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: void QRectF::setY(qreal pos);
fn C_ZN6QRectF4setYEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::moveTopLeft(const QPointF & p);
fn C_ZN6QRectF11moveTopLeftERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: qreal QRectF::width();
fn C_ZNK6QRectF5widthEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: void QRectF::setTop(qreal pos);
fn C_ZN6QRectF6setTopEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: bool QRectF::isValid();
fn C_ZNK6QRectF7isValidEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: void QRectF::translate(qreal dx, qreal dy);
fn C_ZN6QRectF9translateEdd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double);
// proto: void QRectF::QRectF(qreal left, qreal top, qreal width, qreal height);
fn C_ZN6QRectFC2Edddd(arg0: c_double, arg1: c_double, arg2: c_double, arg3: c_double) -> u64;
// proto: QRect QRectF::toRect();
fn C_ZNK6QRectF6toRectEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::moveLeft(qreal pos);
fn C_ZN6QRectF8moveLeftEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::setTopLeft(const QPointF & p);
fn C_ZN6QRectF10setTopLeftERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: void QRectF::setBottomRight(const QPointF & p);
fn C_ZN6QRectF14setBottomRightERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: QRectF QRectF::marginsAdded(const QMarginsF & margins);
fn C_ZNK6QRectF12marginsAddedERK9QMarginsF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: QRectF QRectF::translated(const QPointF & p);
fn C_ZNK6QRectF10translatedERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: QRectF QRectF::normalized();
fn C_ZNK6QRectF10normalizedEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QRectF::getCoords(qreal * x1, qreal * y1, qreal * x2, qreal * y2);
fn C_ZNK6QRectF9getCoordsEPdS0_S0_S0_(qthis: u64 /* *mut c_void*/, arg0: *mut c_double, arg1: *mut c_double, arg2: *mut c_double, arg3: *mut c_double);
// proto: void QRectF::setTopRight(const QPointF & p);
fn C_ZN6QRectF11setTopRightERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: bool QRectF::contains(const QPointF & p);
fn C_ZNK6QRectF8containsERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> c_char;
// proto: bool QRectF::intersects(const QRectF & r);
fn C_ZNK6QRectF10intersectsERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> c_char;
// proto: void QRectF::moveTop(qreal pos);
fn C_ZN6QRectF7moveTopEd(qthis: u64 /* *mut c_void*/, arg0: c_double);
// proto: void QRectF::setCoords(qreal x1, qreal y1, qreal x2, qreal y2);
fn C_ZN6QRectF9setCoordsEdddd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double, arg2: c_double, arg3: c_double);
// proto: QRectF QRectF::translated(qreal dx, qreal dy);
fn C_ZNK6QRectF10translatedEdd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double) -> *mut c_void;
// proto: bool QRectF::isEmpty();
fn C_ZNK6QRectF7isEmptyEv(qthis: u64 /* *mut c_void*/) -> c_char;
// proto: void QRectF::moveTopRight(const QPointF & p);
fn C_ZN6QRectF12moveTopRightERK7QPointF(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
// proto: QRectF QRectF::united(const QRectF & other);
fn C_ZNK6QRectF6unitedERKS_(qthis: u64 /* *mut c_void*/, arg0: *mut c_void) -> *mut c_void;
// proto: qreal QRectF::right();
fn C_ZNK6QRectF5rightEv(qthis: u64 /* *mut c_void*/) -> c_double;
// proto: void QRectF::QRectF(const QRect & rect);
fn C_ZN6QRectFC2ERK5QRect(arg0: *mut c_void) -> u64;
// proto: QRectF QRectF::adjusted(qreal x1, qreal y1, qreal x2, qreal y2);
fn C_ZNK6QRectF8adjustedEdddd(qthis: u64 /* *mut c_void*/, arg0: c_double, arg1: c_double, arg2: c_double, arg3: c_double) -> *mut c_void;
} // <= ext block end
// body block begin =>
// class sizeof(QRect)=16
#[derive(Default)]
pub struct QRect {
// qbase: None,
pub qclsinst: u64 /* *mut c_void*/,
}
// class sizeof(QRectF)=32
#[derive(Default)]
pub struct QRectF {
// qbase: None,
pub qclsinst: u64 /* *mut c_void*/,
}
impl /*struct*/ QRect {
pub fn inheritFrom(qthis: u64 /* *mut c_void*/) -> QRect {
return QRect{qclsinst: qthis, ..Default::default()};
}
}
// proto: int QRect::right();
impl /*struct*/ QRect {
pub fn right<RetType, T: QRect_right<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.right(self);
// return 1;
}
}
pub trait QRect_right<RetType> {
fn right(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::right();
impl<'a> /*trait*/ QRect_right<i32> for () {
fn right(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect5rightEv()};
let mut ret = unsafe {C_ZNK5QRect5rightEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: void QRect::moveTo(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveTo<RetType, T: QRect_moveTo<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTo(self);
// return 1;
}
}
pub trait QRect_moveTo<RetType> {
fn moveTo(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveTo(const QPoint & p);
impl<'a> /*trait*/ QRect_moveTo<()> for (&'a QPoint) {
fn moveTo(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect6moveToERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect6moveToERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::moveTopLeft(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveTopLeft<RetType, T: QRect_moveTopLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTopLeft(self);
// return 1;
}
}
pub trait QRect_moveTopLeft<RetType> {
fn moveTopLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveTopLeft(const QPoint & p);
impl<'a> /*trait*/ QRect_moveTopLeft<()> for (&'a QPoint) {
fn moveTopLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect11moveTopLeftERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect11moveTopLeftERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::moveRight(int pos);
impl /*struct*/ QRect {
pub fn moveRight<RetType, T: QRect_moveRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveRight(self);
// return 1;
}
}
pub trait QRect_moveRight<RetType> {
fn moveRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveRight(int pos);
impl<'a> /*trait*/ QRect_moveRight<()> for (i32) {
fn moveRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9moveRightEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect9moveRightEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::QRect(const QPoint & topleft, const QPoint & bottomright);
impl /*struct*/ QRect {
pub fn new<T: QRect_new>(value: T) -> QRect {
let rsthis = value.new();
return rsthis;
// return 1;
}
}
pub trait QRect_new {
fn new(self) -> QRect;
}
// proto: void QRect::QRect(const QPoint & topleft, const QPoint & bottomright);
impl<'a> /*trait*/ QRect_new for (&'a QPoint, &'a QPoint) {
fn new(self) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRectC2ERK6QPointS2_()};
let ctysz: c_int = unsafe{QRect_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = self.1.qclsinst as *mut c_void;
let qthis: u64 = unsafe {C_ZN5QRectC2ERK6QPointS2_(arg0, arg1)};
let rsthis = QRect{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: QRect QRect::translated(int dx, int dy);
impl /*struct*/ QRect {
pub fn translated<RetType, T: QRect_translated<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.translated(self);
// return 1;
}
}
pub trait QRect_translated<RetType> {
fn translated(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::translated(int dx, int dy);
impl<'a> /*trait*/ QRect_translated<QRect> for (i32, i32) {
fn translated(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect10translatedEii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let mut ret = unsafe {C_ZNK5QRect10translatedEii(rsthis.qclsinst, arg0, arg1)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QPoint QRect::center();
impl /*struct*/ QRect {
pub fn center<RetType, T: QRect_center<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.center(self);
// return 1;
}
}
pub trait QRect_center<RetType> {
fn center(self , rsthis: & QRect) -> RetType;
}
// proto: QPoint QRect::center();
impl<'a> /*trait*/ QRect_center<QPoint> for () {
fn center(self , rsthis: & QRect) -> QPoint {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect6centerEv()};
let mut ret = unsafe {C_ZNK5QRect6centerEv(rsthis.qclsinst)};
let mut ret1 = QPoint::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::moveTopRight(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveTopRight<RetType, T: QRect_moveTopRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTopRight(self);
// return 1;
}
}
pub trait QRect_moveTopRight<RetType> {
fn moveTopRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveTopRight(const QPoint & p);
impl<'a> /*trait*/ QRect_moveTopRight<()> for (&'a QPoint) {
fn moveTopRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect12moveTopRightERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect12moveTopRightERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setLeft(int pos);
impl /*struct*/ QRect {
pub fn setLeft<RetType, T: QRect_setLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setLeft(self);
// return 1;
}
}
pub trait QRect_setLeft<RetType> {
fn setLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setLeft(int pos);
impl<'a> /*trait*/ QRect_setLeft<()> for (i32) {
fn setLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect7setLeftEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect7setLeftEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: int QRect::left();
impl /*struct*/ QRect {
pub fn left<RetType, T: QRect_left<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.left(self);
// return 1;
}
}
pub trait QRect_left<RetType> {
fn left(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::left();
impl<'a> /*trait*/ QRect_left<i32> for () {
fn left(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect4leftEv()};
let mut ret = unsafe {C_ZNK5QRect4leftEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: QRect QRect::intersected(const QRect & other);
impl /*struct*/ QRect {
pub fn intersected<RetType, T: QRect_intersected<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.intersected(self);
// return 1;
}
}
pub trait QRect_intersected<RetType> {
fn intersected(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::intersected(const QRect & other);
impl<'a> /*trait*/ QRect_intersected<QRect> for (&'a QRect) {
fn intersected(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect11intersectedERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect11intersectedERKS_(rsthis.qclsinst, arg0)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: bool QRect::contains(int x, int y, bool proper);
impl /*struct*/ QRect {
pub fn contains<RetType, T: QRect_contains<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.contains(self);
// return 1;
}
}
pub trait QRect_contains<RetType> {
fn contains(self , rsthis: & QRect) -> RetType;
}
// proto: bool QRect::contains(int x, int y, bool proper);
impl<'a> /*trait*/ QRect_contains<i8> for (i32, i32, i8) {
fn contains(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8containsEiib()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_char;
let mut ret = unsafe {C_ZNK5QRect8containsEiib(rsthis.qclsinst, arg0, arg1, arg2)};
return ret as i8; // 1
// return 1;
}
}
// proto: QPoint QRect::bottomRight();
impl /*struct*/ QRect {
pub fn bottomRight<RetType, T: QRect_bottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottomRight(self);
// return 1;
}
}
pub trait QRect_bottomRight<RetType> {
fn bottomRight(self , rsthis: & QRect) -> RetType;
}
// proto: QPoint QRect::bottomRight();
impl<'a> /*trait*/ QRect_bottomRight<QPoint> for () {
fn bottomRight(self , rsthis: & QRect) -> QPoint {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect11bottomRightEv()};
let mut ret = unsafe {C_ZNK5QRect11bottomRightEv(rsthis.qclsinst)};
let mut ret1 = QPoint::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: bool QRect::isValid();
impl /*struct*/ QRect {
pub fn isValid<RetType, T: QRect_isValid<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isValid(self);
// return 1;
}
}
pub trait QRect_isValid<RetType> {
fn isValid(self , rsthis: & QRect) -> RetType;
}
// proto: bool QRect::isValid();
impl<'a> /*trait*/ QRect_isValid<i8> for () {
fn isValid(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect7isValidEv()};
let mut ret = unsafe {C_ZNK5QRect7isValidEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: QSize QRect::size();
impl /*struct*/ QRect {
pub fn size<RetType, T: QRect_size<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.size(self);
// return 1;
}
}
pub trait QRect_size<RetType> {
fn size(self , rsthis: & QRect) -> RetType;
}
// proto: QSize QRect::size();
impl<'a> /*trait*/ QRect_size<QSize> for () {
fn size(self , rsthis: & QRect) -> QSize {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect4sizeEv()};
let mut ret = unsafe {C_ZNK5QRect4sizeEv(rsthis.qclsinst)};
let mut ret1 = QSize::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QRect QRect::united(const QRect & other);
impl /*struct*/ QRect {
pub fn united<RetType, T: QRect_united<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.united(self);
// return 1;
}
}
pub trait QRect_united<RetType> {
fn united(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::united(const QRect & other);
impl<'a> /*trait*/ QRect_united<QRect> for (&'a QRect) {
fn united(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect6unitedERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect6unitedERKS_(rsthis.qclsinst, arg0)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::adjust(int x1, int y1, int x2, int y2);
impl /*struct*/ QRect {
pub fn adjust<RetType, T: QRect_adjust<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.adjust(self);
// return 1;
}
}
pub trait QRect_adjust<RetType> {
fn adjust(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::adjust(int x1, int y1, int x2, int y2);
impl<'a> /*trait*/ QRect_adjust<()> for (i32, i32, i32, i32) {
fn adjust(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect6adjustEiiii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_int;
let arg3 = self.3 as c_int;
unsafe {C_ZN5QRect6adjustEiiii(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: bool QRect::isNull();
impl /*struct*/ QRect {
pub fn isNull<RetType, T: QRect_isNull<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isNull(self);
// return 1;
}
}
pub trait QRect_isNull<RetType> {
fn isNull(self , rsthis: & QRect) -> RetType;
}
// proto: bool QRect::isNull();
impl<'a> /*trait*/ QRect_isNull<i8> for () {
fn isNull(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect6isNullEv()};
let mut ret = unsafe {C_ZNK5QRect6isNullEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRect::setBottom(int pos);
impl /*struct*/ QRect {
pub fn setBottom<RetType, T: QRect_setBottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottom(self);
// return 1;
}
}
pub trait QRect_setBottom<RetType> {
fn setBottom(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setBottom(int pos);
impl<'a> /*trait*/ QRect_setBottom<()> for (i32) {
fn setBottom(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9setBottomEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect9setBottomEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setSize(const QSize & s);
impl /*struct*/ QRect {
pub fn setSize<RetType, T: QRect_setSize<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setSize(self);
// return 1;
}
}
pub trait QRect_setSize<RetType> {
fn setSize(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setSize(const QSize & s);
impl<'a> /*trait*/ QRect_setSize<()> for (&'a QSize) {
fn setSize(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect7setSizeERK5QSize()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect7setSizeERK5QSize(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: int QRect::y();
impl /*struct*/ QRect {
pub fn y<RetType, T: QRect_y<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.y(self);
// return 1;
}
}
pub trait QRect_y<RetType> {
fn y(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::y();
impl<'a> /*trait*/ QRect_y<i32> for () {
fn y(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect1yEv()};
let mut ret = unsafe {C_ZNK5QRect1yEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: int QRect::x();
impl /*struct*/ QRect {
pub fn x<RetType, T: QRect_x<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.x(self);
// return 1;
}
}
pub trait QRect_x<RetType> {
fn x(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::x();
impl<'a> /*trait*/ QRect_x<i32> for () {
fn x(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect1xEv()};
let mut ret = unsafe {C_ZNK5QRect1xEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: QRect QRect::adjusted(int x1, int y1, int x2, int y2);
impl /*struct*/ QRect {
pub fn adjusted<RetType, T: QRect_adjusted<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.adjusted(self);
// return 1;
}
}
pub trait QRect_adjusted<RetType> {
fn adjusted(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::adjusted(int x1, int y1, int x2, int y2);
impl<'a> /*trait*/ QRect_adjusted<QRect> for (i32, i32, i32, i32) {
fn adjusted(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8adjustedEiiii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_int;
let arg3 = self.3 as c_int;
let mut ret = unsafe {C_ZNK5QRect8adjustedEiiii(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::QRect(const QPoint & topleft, const QSize & size);
impl<'a> /*trait*/ QRect_new for (&'a QPoint, &'a QSize) {
fn new(self) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRectC2ERK6QPointRK5QSize()};
let ctysz: c_int = unsafe{QRect_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = self.1.qclsinst as *mut c_void;
let qthis: u64 = unsafe {C_ZN5QRectC2ERK6QPointRK5QSize(arg0, arg1)};
let rsthis = QRect{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: int QRect::height();
impl /*struct*/ QRect {
pub fn height<RetType, T: QRect_height<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.height(self);
// return 1;
}
}
pub trait QRect_height<RetType> {
fn height(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::height();
impl<'a> /*trait*/ QRect_height<i32> for () {
fn height(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect6heightEv()};
let mut ret = unsafe {C_ZNK5QRect6heightEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: void QRect::QRect(int left, int top, int width, int height);
impl<'a> /*trait*/ QRect_new for (i32, i32, i32, i32) {
fn new(self) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRectC2Eiiii()};
let ctysz: c_int = unsafe{QRect_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_int;
let arg3 = self.3 as c_int;
let qthis: u64 = unsafe {C_ZN5QRectC2Eiiii(arg0, arg1, arg2, arg3)};
let rsthis = QRect{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: void QRect::moveBottomLeft(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveBottomLeft<RetType, T: QRect_moveBottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottomLeft(self);
// return 1;
}
}
pub trait QRect_moveBottomLeft<RetType> {
fn moveBottomLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveBottomLeft(const QPoint & p);
impl<'a> /*trait*/ QRect_moveBottomLeft<()> for (&'a QPoint) {
fn moveBottomLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect14moveBottomLeftERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect14moveBottomLeftERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: int QRect::top();
impl /*struct*/ QRect {
pub fn top<RetType, T: QRect_top<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.top(self);
// return 1;
}
}
pub trait QRect_top<RetType> {
fn top(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::top();
impl<'a> /*trait*/ QRect_top<i32> for () {
fn top(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect3topEv()};
let mut ret = unsafe {C_ZNK5QRect3topEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: void QRect::moveTo(int x, int t);
impl<'a> /*trait*/ QRect_moveTo<()> for (i32, i32) {
fn moveTo(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect6moveToEii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
unsafe {C_ZN5QRect6moveToEii(rsthis.qclsinst, arg0, arg1)};
// return 1;
}
}
// proto: void QRect::getRect(int * x, int * y, int * w, int * h);
impl /*struct*/ QRect {
pub fn getRect<RetType, T: QRect_getRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.getRect(self);
// return 1;
}
}
pub trait QRect_getRect<RetType> {
fn getRect(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::getRect(int * x, int * y, int * w, int * h);
impl<'a> /*trait*/ QRect_getRect<()> for (&'a mut Vec<i32>, &'a mut Vec<i32>, &'a mut Vec<i32>, &'a mut Vec<i32>) {
fn getRect(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect7getRectEPiS0_S0_S0_()};
let arg0 = self.0.as_ptr() as *mut c_int;
let arg1 = self.1.as_ptr() as *mut c_int;
let arg2 = self.2.as_ptr() as *mut c_int;
let arg3 = self.3.as_ptr() as *mut c_int;
unsafe {C_ZNK5QRect7getRectEPiS0_S0_S0_(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: bool QRect::contains(const QRect & r, bool proper);
impl<'a> /*trait*/ QRect_contains<i8> for (&'a QRect, Option<i8>) {
fn contains(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8containsERKS_b()};
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = (if self.1.is_none() {false as i8} else {self.1.unwrap()}) as c_char;
let mut ret = unsafe {C_ZNK5QRect8containsERKS_b(rsthis.qclsinst, arg0, arg1)};
return ret as i8; // 1
// return 1;
}
}
// proto: QRect QRect::marginsRemoved(const QMargins & margins);
impl /*struct*/ QRect {
pub fn marginsRemoved<RetType, T: QRect_marginsRemoved<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.marginsRemoved(self);
// return 1;
}
}
pub trait QRect_marginsRemoved<RetType> {
fn marginsRemoved(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::marginsRemoved(const QMargins & margins);
impl<'a> /*trait*/ QRect_marginsRemoved<QRect> for (&'a QMargins) {
fn marginsRemoved(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect14marginsRemovedERK8QMargins()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect14marginsRemovedERK8QMargins(rsthis.qclsinst, arg0)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::translate(int dx, int dy);
impl /*struct*/ QRect {
pub fn translate<RetType, T: QRect_translate<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.translate(self);
// return 1;
}
}
pub trait QRect_translate<RetType> {
fn translate(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::translate(int dx, int dy);
impl<'a> /*trait*/ QRect_translate<()> for (i32, i32) {
fn translate(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9translateEii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
unsafe {C_ZN5QRect9translateEii(rsthis.qclsinst, arg0, arg1)};
// return 1;
}
}
// proto: QPoint QRect::topLeft();
impl /*struct*/ QRect {
pub fn topLeft<RetType, T: QRect_topLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.topLeft(self);
// return 1;
}
}
pub trait QRect_topLeft<RetType> {
fn topLeft(self , rsthis: & QRect) -> RetType;
}
// proto: QPoint QRect::topLeft();
impl<'a> /*trait*/ QRect_topLeft<QPoint> for () {
fn topLeft(self , rsthis: & QRect) -> QPoint {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect7topLeftEv()};
let mut ret = unsafe {C_ZNK5QRect7topLeftEv(rsthis.qclsinst)};
let mut ret1 = QPoint::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: bool QRect::contains(const QPoint & p, bool proper);
impl<'a> /*trait*/ QRect_contains<i8> for (&'a QPoint, Option<i8>) {
fn contains(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8containsERK6QPointb()};
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = (if self.1.is_none() {false as i8} else {self.1.unwrap()}) as c_char;
let mut ret = unsafe {C_ZNK5QRect8containsERK6QPointb(rsthis.qclsinst, arg0, arg1)};
return ret as i8; // 1
// return 1;
}
}
// proto: int QRect::width();
impl /*struct*/ QRect {
pub fn width<RetType, T: QRect_width<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.width(self);
// return 1;
}
}
pub trait QRect_width<RetType> {
fn width(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::width();
impl<'a> /*trait*/ QRect_width<i32> for () {
fn width(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect5widthEv()};
let mut ret = unsafe {C_ZNK5QRect5widthEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: void QRect::setRect(int x, int y, int w, int h);
impl /*struct*/ QRect {
pub fn setRect<RetType, T: QRect_setRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setRect(self);
// return 1;
}
}
pub trait QRect_setRect<RetType> {
fn setRect(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setRect(int x, int y, int w, int h);
impl<'a> /*trait*/ QRect_setRect<()> for (i32, i32, i32, i32) {
fn setRect(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect7setRectEiiii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_int;
let arg3 = self.3 as c_int;
unsafe {C_ZN5QRect7setRectEiiii(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: void QRect::moveCenter(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveCenter<RetType, T: QRect_moveCenter<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveCenter(self);
// return 1;
}
}
pub trait QRect_moveCenter<RetType> {
fn moveCenter(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveCenter(const QPoint & p);
impl<'a> /*trait*/ QRect_moveCenter<()> for (&'a QPoint) {
fn moveCenter(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect10moveCenterERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect10moveCenterERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: bool QRect::intersects(const QRect & r);
impl /*struct*/ QRect {
pub fn intersects<RetType, T: QRect_intersects<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.intersects(self);
// return 1;
}
}
pub trait QRect_intersects<RetType> {
fn intersects(self , rsthis: & QRect) -> RetType;
}
// proto: bool QRect::intersects(const QRect & r);
impl<'a> /*trait*/ QRect_intersects<i8> for (&'a QRect) {
fn intersects(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect10intersectsERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect10intersectsERKS_(rsthis.qclsinst, arg0)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRect::setTopRight(const QPoint & p);
impl /*struct*/ QRect {
pub fn setTopRight<RetType, T: QRect_setTopRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTopRight(self);
// return 1;
}
}
pub trait QRect_setTopRight<RetType> {
fn setTopRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setTopRight(const QPoint & p);
impl<'a> /*trait*/ QRect_setTopRight<()> for (&'a QPoint) {
fn setTopRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect11setTopRightERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect11setTopRightERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setCoords(int x1, int y1, int x2, int y2);
impl /*struct*/ QRect {
pub fn setCoords<RetType, T: QRect_setCoords<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setCoords(self);
// return 1;
}
}
pub trait QRect_setCoords<RetType> {
fn setCoords(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setCoords(int x1, int y1, int x2, int y2);
impl<'a> /*trait*/ QRect_setCoords<()> for (i32, i32, i32, i32) {
fn setCoords(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9setCoordsEiiii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let arg2 = self.2 as c_int;
let arg3 = self.3 as c_int;
unsafe {C_ZN5QRect9setCoordsEiiii(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: void QRect::translate(const QPoint & p);
impl<'a> /*trait*/ QRect_translate<()> for (&'a QPoint) {
fn translate(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9translateERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect9translateERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::moveBottom(int pos);
impl /*struct*/ QRect {
pub fn moveBottom<RetType, T: QRect_moveBottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottom(self);
// return 1;
}
}
pub trait QRect_moveBottom<RetType> {
fn moveBottom(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveBottom(int pos);
impl<'a> /*trait*/ QRect_moveBottom<()> for (i32) {
fn moveBottom(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect10moveBottomEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect10moveBottomEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setBottomLeft(const QPoint & p);
impl /*struct*/ QRect {
pub fn setBottomLeft<RetType, T: QRect_setBottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottomLeft(self);
// return 1;
}
}
pub trait QRect_setBottomLeft<RetType> {
fn setBottomLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setBottomLeft(const QPoint & p);
impl<'a> /*trait*/ QRect_setBottomLeft<()> for (&'a QPoint) {
fn setBottomLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect13setBottomLeftERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect13setBottomLeftERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::getCoords(int * x1, int * y1, int * x2, int * y2);
impl /*struct*/ QRect {
pub fn getCoords<RetType, T: QRect_getCoords<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.getCoords(self);
// return 1;
}
}
pub trait QRect_getCoords<RetType> {
fn getCoords(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::getCoords(int * x1, int * y1, int * x2, int * y2);
impl<'a> /*trait*/ QRect_getCoords<()> for (&'a mut Vec<i32>, &'a mut Vec<i32>, &'a mut Vec<i32>, &'a mut Vec<i32>) {
fn getCoords(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect9getCoordsEPiS0_S0_S0_()};
let arg0 = self.0.as_ptr() as *mut c_int;
let arg1 = self.1.as_ptr() as *mut c_int;
let arg2 = self.2.as_ptr() as *mut c_int;
let arg3 = self.3.as_ptr() as *mut c_int;
unsafe {C_ZNK5QRect9getCoordsEPiS0_S0_S0_(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: QPoint QRect::topRight();
impl /*struct*/ QRect {
pub fn topRight<RetType, T: QRect_topRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.topRight(self);
// return 1;
}
}
pub trait QRect_topRight<RetType> {
fn topRight(self , rsthis: & QRect) -> RetType;
}
// proto: QPoint QRect::topRight();
impl<'a> /*trait*/ QRect_topRight<QPoint> for () {
fn topRight(self , rsthis: & QRect) -> QPoint {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8topRightEv()};
let mut ret = unsafe {C_ZNK5QRect8topRightEv(rsthis.qclsinst)};
let mut ret1 = QPoint::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::setBottomRight(const QPoint & p);
impl /*struct*/ QRect {
pub fn setBottomRight<RetType, T: QRect_setBottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottomRight(self);
// return 1;
}
}
pub trait QRect_setBottomRight<RetType> {
fn setBottomRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setBottomRight(const QPoint & p);
impl<'a> /*trait*/ QRect_setBottomRight<()> for (&'a QPoint) {
fn setBottomRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect14setBottomRightERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect14setBottomRightERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setHeight(int h);
impl /*struct*/ QRect {
pub fn setHeight<RetType, T: QRect_setHeight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setHeight(self);
// return 1;
}
}
pub trait QRect_setHeight<RetType> {
fn setHeight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setHeight(int h);
impl<'a> /*trait*/ QRect_setHeight<()> for (i32) {
fn setHeight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect9setHeightEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect9setHeightEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: bool QRect::isEmpty();
impl /*struct*/ QRect {
pub fn isEmpty<RetType, T: QRect_isEmpty<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isEmpty(self);
// return 1;
}
}
pub trait QRect_isEmpty<RetType> {
fn isEmpty(self , rsthis: & QRect) -> RetType;
}
// proto: bool QRect::isEmpty();
impl<'a> /*trait*/ QRect_isEmpty<i8> for () {
fn isEmpty(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect7isEmptyEv()};
let mut ret = unsafe {C_ZNK5QRect7isEmptyEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: bool QRect::contains(int x, int y);
impl<'a> /*trait*/ QRect_contains<i8> for (i32, i32) {
fn contains(self , rsthis: & QRect) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect8containsEii()};
let arg0 = self.0 as c_int;
let arg1 = self.1 as c_int;
let mut ret = unsafe {C_ZNK5QRect8containsEii(rsthis.qclsinst, arg0, arg1)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRect::moveBottomRight(const QPoint & p);
impl /*struct*/ QRect {
pub fn moveBottomRight<RetType, T: QRect_moveBottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottomRight(self);
// return 1;
}
}
pub trait QRect_moveBottomRight<RetType> {
fn moveBottomRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveBottomRight(const QPoint & p);
impl<'a> /*trait*/ QRect_moveBottomRight<()> for (&'a QPoint) {
fn moveBottomRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect15moveBottomRightERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect15moveBottomRightERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QPoint QRect::bottomLeft();
impl /*struct*/ QRect {
pub fn bottomLeft<RetType, T: QRect_bottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottomLeft(self);
// return 1;
}
}
pub trait QRect_bottomLeft<RetType> {
fn bottomLeft(self , rsthis: & QRect) -> RetType;
}
// proto: QPoint QRect::bottomLeft();
impl<'a> /*trait*/ QRect_bottomLeft<QPoint> for () {
fn bottomLeft(self , rsthis: & QRect) -> QPoint {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect10bottomLeftEv()};
let mut ret = unsafe {C_ZNK5QRect10bottomLeftEv(rsthis.qclsinst)};
let mut ret1 = QPoint::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::setTop(int pos);
impl /*struct*/ QRect {
pub fn setTop<RetType, T: QRect_setTop<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTop(self);
// return 1;
}
}
pub trait QRect_setTop<RetType> {
fn setTop(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setTop(int pos);
impl<'a> /*trait*/ QRect_setTop<()> for (i32) {
fn setTop(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect6setTopEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect6setTopEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: int QRect::bottom();
impl /*struct*/ QRect {
pub fn bottom<RetType, T: QRect_bottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottom(self);
// return 1;
}
}
pub trait QRect_bottom<RetType> {
fn bottom(self , rsthis: & QRect) -> RetType;
}
// proto: int QRect::bottom();
impl<'a> /*trait*/ QRect_bottom<i32> for () {
fn bottom(self , rsthis: & QRect) -> i32 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect6bottomEv()};
let mut ret = unsafe {C_ZNK5QRect6bottomEv(rsthis.qclsinst)};
return ret as i32; // 1
// return 1;
}
}
// proto: void QRect::QRect();
impl<'a> /*trait*/ QRect_new for () {
fn new(self) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRectC2Ev()};
let ctysz: c_int = unsafe{QRect_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let qthis: u64 = unsafe {C_ZN5QRectC2Ev()};
let rsthis = QRect{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: QRect QRect::marginsAdded(const QMargins & margins);
impl /*struct*/ QRect {
pub fn marginsAdded<RetType, T: QRect_marginsAdded<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.marginsAdded(self);
// return 1;
}
}
pub trait QRect_marginsAdded<RetType> {
fn marginsAdded(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::marginsAdded(const QMargins & margins);
impl<'a> /*trait*/ QRect_marginsAdded<QRect> for (&'a QMargins) {
fn marginsAdded(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect12marginsAddedERK8QMargins()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect12marginsAddedERK8QMargins(rsthis.qclsinst, arg0)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QRect QRect::normalized();
impl /*struct*/ QRect {
pub fn normalized<RetType, T: QRect_normalized<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.normalized(self);
// return 1;
}
}
pub trait QRect_normalized<RetType> {
fn normalized(self , rsthis: & QRect) -> RetType;
}
// proto: QRect QRect::normalized();
impl<'a> /*trait*/ QRect_normalized<QRect> for () {
fn normalized(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect10normalizedEv()};
let mut ret = unsafe {C_ZNK5QRect10normalizedEv(rsthis.qclsinst)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRect::setWidth(int w);
impl /*struct*/ QRect {
pub fn setWidth<RetType, T: QRect_setWidth<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setWidth(self);
// return 1;
}
}
pub trait QRect_setWidth<RetType> {
fn setWidth(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setWidth(int w);
impl<'a> /*trait*/ QRect_setWidth<()> for (i32) {
fn setWidth(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect8setWidthEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect8setWidthEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setY(int y);
impl /*struct*/ QRect {
pub fn setY<RetType, T: QRect_setY<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setY(self);
// return 1;
}
}
pub trait QRect_setY<RetType> {
fn setY(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setY(int y);
impl<'a> /*trait*/ QRect_setY<()> for (i32) {
fn setY(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect4setYEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect4setYEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::moveTop(int pos);
impl /*struct*/ QRect {
pub fn moveTop<RetType, T: QRect_moveTop<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTop(self);
// return 1;
}
}
pub trait QRect_moveTop<RetType> {
fn moveTop(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveTop(int pos);
impl<'a> /*trait*/ QRect_moveTop<()> for (i32) {
fn moveTop(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect7moveTopEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect7moveTopEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setX(int x);
impl /*struct*/ QRect {
pub fn setX<RetType, T: QRect_setX<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setX(self);
// return 1;
}
}
pub trait QRect_setX<RetType> {
fn setX(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setX(int x);
impl<'a> /*trait*/ QRect_setX<()> for (i32) {
fn setX(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect4setXEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect4setXEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setRight(int pos);
impl /*struct*/ QRect {
pub fn setRight<RetType, T: QRect_setRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setRight(self);
// return 1;
}
}
pub trait QRect_setRight<RetType> {
fn setRight(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setRight(int pos);
impl<'a> /*trait*/ QRect_setRight<()> for (i32) {
fn setRight(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect8setRightEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect8setRightEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::setTopLeft(const QPoint & p);
impl /*struct*/ QRect {
pub fn setTopLeft<RetType, T: QRect_setTopLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTopLeft(self);
// return 1;
}
}
pub trait QRect_setTopLeft<RetType> {
fn setTopLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::setTopLeft(const QPoint & p);
impl<'a> /*trait*/ QRect_setTopLeft<()> for (&'a QPoint) {
fn setTopLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect10setTopLeftERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN5QRect10setTopLeftERK6QPoint(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRect::moveLeft(int pos);
impl /*struct*/ QRect {
pub fn moveLeft<RetType, T: QRect_moveLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveLeft(self);
// return 1;
}
}
pub trait QRect_moveLeft<RetType> {
fn moveLeft(self , rsthis: & QRect) -> RetType;
}
// proto: void QRect::moveLeft(int pos);
impl<'a> /*trait*/ QRect_moveLeft<()> for (i32) {
fn moveLeft(self , rsthis: & QRect) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN5QRect8moveLeftEi()};
let arg0 = self as c_int;
unsafe {C_ZN5QRect8moveLeftEi(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QRect QRect::translated(const QPoint & p);
impl<'a> /*trait*/ QRect_translated<QRect> for (&'a QPoint) {
fn translated(self , rsthis: & QRect) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK5QRect10translatedERK6QPoint()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK5QRect10translatedERK6QPoint(rsthis.qclsinst, arg0)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
impl /*struct*/ QRectF {
pub fn inheritFrom(qthis: u64 /* *mut c_void*/) -> QRectF {
return QRectF{qclsinst: qthis, ..Default::default()};
}
}
// proto: void QRectF::QRectF();
impl /*struct*/ QRectF {
pub fn new<T: QRectF_new>(value: T) -> QRectF {
let rsthis = value.new();
return rsthis;
// return 1;
}
}
pub trait QRectF_new {
fn new(self) -> QRectF;
}
// proto: void QRectF::QRectF();
impl<'a> /*trait*/ QRectF_new for () {
fn new(self) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectFC2Ev()};
let ctysz: c_int = unsafe{QRectF_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let qthis: u64 = unsafe {C_ZN6QRectFC2Ev()};
let rsthis = QRectF{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: void QRectF::moveBottomRight(const QPointF & p);
impl /*struct*/ QRectF {
pub fn moveBottomRight<RetType, T: QRectF_moveBottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottomRight(self);
// return 1;
}
}
pub trait QRectF_moveBottomRight<RetType> {
fn moveBottomRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveBottomRight(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveBottomRight<()> for (&'a QPointF) {
fn moveBottomRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF15moveBottomRightERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF15moveBottomRightERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::moveTo(qreal x, qreal y);
impl /*struct*/ QRectF {
pub fn moveTo<RetType, T: QRectF_moveTo<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTo(self);
// return 1;
}
}
pub trait QRectF_moveTo<RetType> {
fn moveTo(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveTo(qreal x, qreal y);
impl<'a> /*trait*/ QRectF_moveTo<()> for (f64, f64) {
fn moveTo(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF6moveToEdd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
unsafe {C_ZN6QRectF6moveToEdd(rsthis.qclsinst, arg0, arg1)};
// return 1;
}
}
// proto: qreal QRectF::top();
impl /*struct*/ QRectF {
pub fn top<RetType, T: QRectF_top<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.top(self);
// return 1;
}
}
pub trait QRectF_top<RetType> {
fn top(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::top();
impl<'a> /*trait*/ QRectF_top<f64> for () {
fn top(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF3topEv()};
let mut ret = unsafe {C_ZNK6QRectF3topEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: QPointF QRectF::bottomLeft();
impl /*struct*/ QRectF {
pub fn bottomLeft<RetType, T: QRectF_bottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottomLeft(self);
// return 1;
}
}
pub trait QRectF_bottomLeft<RetType> {
fn bottomLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: QPointF QRectF::bottomLeft();
impl<'a> /*trait*/ QRectF_bottomLeft<QPointF> for () {
fn bottomLeft(self , rsthis: & QRectF) -> QPointF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF10bottomLeftEv()};
let mut ret = unsafe {C_ZNK6QRectF10bottomLeftEv(rsthis.qclsinst)};
let mut ret1 = QPointF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::setHeight(qreal h);
impl /*struct*/ QRectF {
pub fn setHeight<RetType, T: QRectF_setHeight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setHeight(self);
// return 1;
}
}
pub trait QRectF_setHeight<RetType> {
fn setHeight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setHeight(qreal h);
impl<'a> /*trait*/ QRectF_setHeight<()> for (f64) {
fn setHeight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9setHeightEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF9setHeightEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setSize(const QSizeF & s);
impl /*struct*/ QRectF {
pub fn setSize<RetType, T: QRectF_setSize<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setSize(self);
// return 1;
}
}
pub trait QRectF_setSize<RetType> {
fn setSize(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setSize(const QSizeF & s);
impl<'a> /*trait*/ QRectF_setSize<()> for (&'a QSizeF) {
fn setSize(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF7setSizeERK6QSizeF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF7setSizeERK6QSizeF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::QRectF(const QPointF & topleft, const QPointF & bottomRight);
impl<'a> /*trait*/ QRectF_new for (&'a QPointF, &'a QPointF) {
fn new(self) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectFC2ERK7QPointFS2_()};
let ctysz: c_int = unsafe{QRectF_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = self.1.qclsinst as *mut c_void;
let qthis: u64 = unsafe {C_ZN6QRectFC2ERK7QPointFS2_(arg0, arg1)};
let rsthis = QRectF{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: void QRectF::moveTo(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveTo<()> for (&'a QPointF) {
fn moveTo(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF6moveToERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF6moveToERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QRect QRectF::toAlignedRect();
impl /*struct*/ QRectF {
pub fn toAlignedRect<RetType, T: QRectF_toAlignedRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.toAlignedRect(self);
// return 1;
}
}
pub trait QRectF_toAlignedRect<RetType> {
fn toAlignedRect(self , rsthis: & QRectF) -> RetType;
}
// proto: QRect QRectF::toAlignedRect();
impl<'a> /*trait*/ QRectF_toAlignedRect<QRect> for () {
fn toAlignedRect(self , rsthis: & QRectF) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF13toAlignedRectEv()};
let mut ret = unsafe {C_ZNK6QRectF13toAlignedRectEv(rsthis.qclsinst)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::setRight(qreal pos);
impl /*struct*/ QRectF {
pub fn setRight<RetType, T: QRectF_setRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setRight(self);
// return 1;
}
}
pub trait QRectF_setRight<RetType> {
fn setRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setRight(qreal pos);
impl<'a> /*trait*/ QRectF_setRight<()> for (f64) {
fn setRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF8setRightEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF8setRightEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setBottomLeft(const QPointF & p);
impl /*struct*/ QRectF {
pub fn setBottomLeft<RetType, T: QRectF_setBottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottomLeft(self);
// return 1;
}
}
pub trait QRectF_setBottomLeft<RetType> {
fn setBottomLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setBottomLeft(const QPointF & p);
impl<'a> /*trait*/ QRectF_setBottomLeft<()> for (&'a QPointF) {
fn setBottomLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF13setBottomLeftERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF13setBottomLeftERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QPointF QRectF::topRight();
impl /*struct*/ QRectF {
pub fn topRight<RetType, T: QRectF_topRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.topRight(self);
// return 1;
}
}
pub trait QRectF_topRight<RetType> {
fn topRight(self , rsthis: & QRectF) -> RetType;
}
// proto: QPointF QRectF::topRight();
impl<'a> /*trait*/ QRectF_topRight<QPointF> for () {
fn topRight(self , rsthis: & QRectF) -> QPointF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF8topRightEv()};
let mut ret = unsafe {C_ZNK6QRectF8topRightEv(rsthis.qclsinst)};
let mut ret1 = QPointF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QSizeF QRectF::size();
impl /*struct*/ QRectF {
pub fn size<RetType, T: QRectF_size<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.size(self);
// return 1;
}
}
pub trait QRectF_size<RetType> {
fn size(self , rsthis: & QRectF) -> RetType;
}
// proto: QSizeF QRectF::size();
impl<'a> /*trait*/ QRectF_size<QSizeF> for () {
fn size(self , rsthis: & QRectF) -> QSizeF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF4sizeEv()};
let mut ret = unsafe {C_ZNK6QRectF4sizeEv(rsthis.qclsinst)};
let mut ret1 = QSizeF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::adjust(qreal x1, qreal y1, qreal x2, qreal y2);
impl /*struct*/ QRectF {
pub fn adjust<RetType, T: QRectF_adjust<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.adjust(self);
// return 1;
}
}
pub trait QRectF_adjust<RetType> {
fn adjust(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::adjust(qreal x1, qreal y1, qreal x2, qreal y2);
impl<'a> /*trait*/ QRectF_adjust<()> for (f64, f64, f64, f64) {
fn adjust(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF6adjustEdddd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let arg2 = self.2 as c_double;
let arg3 = self.3 as c_double;
unsafe {C_ZN6QRectF6adjustEdddd(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: void QRectF::moveRight(qreal pos);
impl /*struct*/ QRectF {
pub fn moveRight<RetType, T: QRectF_moveRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveRight(self);
// return 1;
}
}
pub trait QRectF_moveRight<RetType> {
fn moveRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveRight(qreal pos);
impl<'a> /*trait*/ QRectF_moveRight<()> for (f64) {
fn moveRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9moveRightEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF9moveRightEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: qreal QRectF::y();
impl /*struct*/ QRectF {
pub fn y<RetType, T: QRectF_y<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.y(self);
// return 1;
}
}
pub trait QRectF_y<RetType> {
fn y(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::y();
impl<'a> /*trait*/ QRectF_y<f64> for () {
fn y(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF1yEv()};
let mut ret = unsafe {C_ZNK6QRectF1yEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: QPointF QRectF::bottomRight();
impl /*struct*/ QRectF {
pub fn bottomRight<RetType, T: QRectF_bottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottomRight(self);
// return 1;
}
}
pub trait QRectF_bottomRight<RetType> {
fn bottomRight(self , rsthis: & QRectF) -> RetType;
}
// proto: QPointF QRectF::bottomRight();
impl<'a> /*trait*/ QRectF_bottomRight<QPointF> for () {
fn bottomRight(self , rsthis: & QRectF) -> QPointF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF11bottomRightEv()};
let mut ret = unsafe {C_ZNK6QRectF11bottomRightEv(rsthis.qclsinst)};
let mut ret1 = QPointF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::setBottom(qreal pos);
impl /*struct*/ QRectF {
pub fn setBottom<RetType, T: QRectF_setBottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottom(self);
// return 1;
}
}
pub trait QRectF_setBottom<RetType> {
fn setBottom(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setBottom(qreal pos);
impl<'a> /*trait*/ QRectF_setBottom<()> for (f64) {
fn setBottom(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9setBottomEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF9setBottomEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::moveBottomLeft(const QPointF & p);
impl /*struct*/ QRectF {
pub fn moveBottomLeft<RetType, T: QRectF_moveBottomLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottomLeft(self);
// return 1;
}
}
pub trait QRectF_moveBottomLeft<RetType> {
fn moveBottomLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveBottomLeft(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveBottomLeft<()> for (&'a QPointF) {
fn moveBottomLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF14moveBottomLeftERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF14moveBottomLeftERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::moveBottom(qreal pos);
impl /*struct*/ QRectF {
pub fn moveBottom<RetType, T: QRectF_moveBottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveBottom(self);
// return 1;
}
}
pub trait QRectF_moveBottom<RetType> {
fn moveBottom(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveBottom(qreal pos);
impl<'a> /*trait*/ QRectF_moveBottom<()> for (f64) {
fn moveBottom(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF10moveBottomEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF10moveBottomEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::getRect(qreal * x, qreal * y, qreal * w, qreal * h);
impl /*struct*/ QRectF {
pub fn getRect<RetType, T: QRectF_getRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.getRect(self);
// return 1;
}
}
pub trait QRectF_getRect<RetType> {
fn getRect(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::getRect(qreal * x, qreal * y, qreal * w, qreal * h);
impl<'a> /*trait*/ QRectF_getRect<()> for (&'a mut Vec<f64>, &'a mut Vec<f64>, &'a mut Vec<f64>, &'a mut Vec<f64>) {
fn getRect(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF7getRectEPdS0_S0_S0_()};
let arg0 = self.0.as_ptr() as *mut c_double;
let arg1 = self.1.as_ptr() as *mut c_double;
let arg2 = self.2.as_ptr() as *mut c_double;
let arg3 = self.3.as_ptr() as *mut c_double;
unsafe {C_ZNK6QRectF7getRectEPdS0_S0_S0_(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: qreal QRectF::x();
impl /*struct*/ QRectF {
pub fn x<RetType, T: QRectF_x<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.x(self);
// return 1;
}
}
pub trait QRectF_x<RetType> {
fn x(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::x();
impl<'a> /*trait*/ QRectF_x<f64> for () {
fn x(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF1xEv()};
let mut ret = unsafe {C_ZNK6QRectF1xEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: qreal QRectF::bottom();
impl /*struct*/ QRectF {
pub fn bottom<RetType, T: QRectF_bottom<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.bottom(self);
// return 1;
}
}
pub trait QRectF_bottom<RetType> {
fn bottom(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::bottom();
impl<'a> /*trait*/ QRectF_bottom<f64> for () {
fn bottom(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6bottomEv()};
let mut ret = unsafe {C_ZNK6QRectF6bottomEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: bool QRectF::isNull();
impl /*struct*/ QRectF {
pub fn isNull<RetType, T: QRectF_isNull<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isNull(self);
// return 1;
}
}
pub trait QRectF_isNull<RetType> {
fn isNull(self , rsthis: & QRectF) -> RetType;
}
// proto: bool QRectF::isNull();
impl<'a> /*trait*/ QRectF_isNull<i8> for () {
fn isNull(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6isNullEv()};
let mut ret = unsafe {C_ZNK6QRectF6isNullEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRectF::QRectF(const QPointF & topleft, const QSizeF & size);
impl<'a> /*trait*/ QRectF_new for (&'a QPointF, &'a QSizeF) {
fn new(self) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectFC2ERK7QPointFRK6QSizeF()};
let ctysz: c_int = unsafe{QRectF_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0.qclsinst as *mut c_void;
let arg1 = self.1.qclsinst as *mut c_void;
let qthis: u64 = unsafe {C_ZN6QRectFC2ERK7QPointFRK6QSizeF(arg0, arg1)};
let rsthis = QRectF{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: void QRectF::setWidth(qreal w);
impl /*struct*/ QRectF {
pub fn setWidth<RetType, T: QRectF_setWidth<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setWidth(self);
// return 1;
}
}
pub trait QRectF_setWidth<RetType> {
fn setWidth(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setWidth(qreal w);
impl<'a> /*trait*/ QRectF_setWidth<()> for (f64) {
fn setWidth(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF8setWidthEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF8setWidthEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: qreal QRectF::height();
impl /*struct*/ QRectF {
pub fn height<RetType, T: QRectF_height<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.height(self);
// return 1;
}
}
pub trait QRectF_height<RetType> {
fn height(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::height();
impl<'a> /*trait*/ QRectF_height<f64> for () {
fn height(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6heightEv()};
let mut ret = unsafe {C_ZNK6QRectF6heightEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: void QRectF::translate(const QPointF & p);
impl /*struct*/ QRectF {
pub fn translate<RetType, T: QRectF_translate<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.translate(self);
// return 1;
}
}
pub trait QRectF_translate<RetType> {
fn translate(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::translate(const QPointF & p);
impl<'a> /*trait*/ QRectF_translate<()> for (&'a QPointF) {
fn translate(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9translateERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF9translateERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::moveCenter(const QPointF & p);
impl /*struct*/ QRectF {
pub fn moveCenter<RetType, T: QRectF_moveCenter<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveCenter(self);
// return 1;
}
}
pub trait QRectF_moveCenter<RetType> {
fn moveCenter(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveCenter(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveCenter<()> for (&'a QPointF) {
fn moveCenter(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF10moveCenterERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF10moveCenterERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: bool QRectF::contains(const QRectF & r);
impl /*struct*/ QRectF {
pub fn contains<RetType, T: QRectF_contains<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.contains(self);
// return 1;
}
}
pub trait QRectF_contains<RetType> {
fn contains(self , rsthis: & QRectF) -> RetType;
}
// proto: bool QRectF::contains(const QRectF & r);
impl<'a> /*trait*/ QRectF_contains<i8> for (&'a QRectF) {
fn contains(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF8containsERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF8containsERKS_(rsthis.qclsinst, arg0)};
return ret as i8; // 1
// return 1;
}
}
// proto: QRectF QRectF::marginsRemoved(const QMarginsF & margins);
impl /*struct*/ QRectF {
pub fn marginsRemoved<RetType, T: QRectF_marginsRemoved<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.marginsRemoved(self);
// return 1;
}
}
pub trait QRectF_marginsRemoved<RetType> {
fn marginsRemoved(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::marginsRemoved(const QMarginsF & margins);
impl<'a> /*trait*/ QRectF_marginsRemoved<QRectF> for (&'a QMarginsF) {
fn marginsRemoved(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF14marginsRemovedERK9QMarginsF()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF14marginsRemovedERK9QMarginsF(rsthis.qclsinst, arg0)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: bool QRectF::contains(qreal x, qreal y);
impl<'a> /*trait*/ QRectF_contains<i8> for (f64, f64) {
fn contains(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF8containsEdd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let mut ret = unsafe {C_ZNK6QRectF8containsEdd(rsthis.qclsinst, arg0, arg1)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRectF::setX(qreal pos);
impl /*struct*/ QRectF {
pub fn setX<RetType, T: QRectF_setX<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setX(self);
// return 1;
}
}
pub trait QRectF_setX<RetType> {
fn setX(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setX(qreal pos);
impl<'a> /*trait*/ QRectF_setX<()> for (f64) {
fn setX(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF4setXEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF4setXEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setRect(qreal x, qreal y, qreal w, qreal h);
impl /*struct*/ QRectF {
pub fn setRect<RetType, T: QRectF_setRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setRect(self);
// return 1;
}
}
pub trait QRectF_setRect<RetType> {
fn setRect(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setRect(qreal x, qreal y, qreal w, qreal h);
impl<'a> /*trait*/ QRectF_setRect<()> for (f64, f64, f64, f64) {
fn setRect(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF7setRectEdddd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let arg2 = self.2 as c_double;
let arg3 = self.3 as c_double;
unsafe {C_ZN6QRectF7setRectEdddd(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: QPointF QRectF::center();
impl /*struct*/ QRectF {
pub fn center<RetType, T: QRectF_center<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.center(self);
// return 1;
}
}
pub trait QRectF_center<RetType> {
fn center(self , rsthis: & QRectF) -> RetType;
}
// proto: QPointF QRectF::center();
impl<'a> /*trait*/ QRectF_center<QPointF> for () {
fn center(self , rsthis: & QRectF) -> QPointF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6centerEv()};
let mut ret = unsafe {C_ZNK6QRectF6centerEv(rsthis.qclsinst)};
let mut ret1 = QPointF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::setLeft(qreal pos);
impl /*struct*/ QRectF {
pub fn setLeft<RetType, T: QRectF_setLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setLeft(self);
// return 1;
}
}
pub trait QRectF_setLeft<RetType> {
fn setLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setLeft(qreal pos);
impl<'a> /*trait*/ QRectF_setLeft<()> for (f64) {
fn setLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF7setLeftEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF7setLeftEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QRectF QRectF::intersected(const QRectF & other);
impl /*struct*/ QRectF {
pub fn intersected<RetType, T: QRectF_intersected<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.intersected(self);
// return 1;
}
}
pub trait QRectF_intersected<RetType> {
fn intersected(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::intersected(const QRectF & other);
impl<'a> /*trait*/ QRectF_intersected<QRectF> for (&'a QRectF) {
fn intersected(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF11intersectedERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF11intersectedERKS_(rsthis.qclsinst, arg0)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QPointF QRectF::topLeft();
impl /*struct*/ QRectF {
pub fn topLeft<RetType, T: QRectF_topLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.topLeft(self);
// return 1;
}
}
pub trait QRectF_topLeft<RetType> {
fn topLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: QPointF QRectF::topLeft();
impl<'a> /*trait*/ QRectF_topLeft<QPointF> for () {
fn topLeft(self , rsthis: & QRectF) -> QPointF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF7topLeftEv()};
let mut ret = unsafe {C_ZNK6QRectF7topLeftEv(rsthis.qclsinst)};
let mut ret1 = QPointF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: qreal QRectF::left();
impl /*struct*/ QRectF {
pub fn left<RetType, T: QRectF_left<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.left(self);
// return 1;
}
}
pub trait QRectF_left<RetType> {
fn left(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::left();
impl<'a> /*trait*/ QRectF_left<f64> for () {
fn left(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF4leftEv()};
let mut ret = unsafe {C_ZNK6QRectF4leftEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: void QRectF::setY(qreal pos);
impl /*struct*/ QRectF {
pub fn setY<RetType, T: QRectF_setY<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setY(self);
// return 1;
}
}
pub trait QRectF_setY<RetType> {
fn setY(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setY(qreal pos);
impl<'a> /*trait*/ QRectF_setY<()> for (f64) {
fn setY(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF4setYEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF4setYEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::moveTopLeft(const QPointF & p);
impl /*struct*/ QRectF {
pub fn moveTopLeft<RetType, T: QRectF_moveTopLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTopLeft(self);
// return 1;
}
}
pub trait QRectF_moveTopLeft<RetType> {
fn moveTopLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveTopLeft(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveTopLeft<()> for (&'a QPointF) {
fn moveTopLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF11moveTopLeftERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF11moveTopLeftERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: qreal QRectF::width();
impl /*struct*/ QRectF {
pub fn width<RetType, T: QRectF_width<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.width(self);
// return 1;
}
}
pub trait QRectF_width<RetType> {
fn width(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::width();
impl<'a> /*trait*/ QRectF_width<f64> for () {
fn width(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF5widthEv()};
let mut ret = unsafe {C_ZNK6QRectF5widthEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: void QRectF::setTop(qreal pos);
impl /*struct*/ QRectF {
pub fn setTop<RetType, T: QRectF_setTop<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTop(self);
// return 1;
}
}
pub trait QRectF_setTop<RetType> {
fn setTop(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setTop(qreal pos);
impl<'a> /*trait*/ QRectF_setTop<()> for (f64) {
fn setTop(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF6setTopEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF6setTopEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: bool QRectF::isValid();
impl /*struct*/ QRectF {
pub fn isValid<RetType, T: QRectF_isValid<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isValid(self);
// return 1;
}
}
pub trait QRectF_isValid<RetType> {
fn isValid(self , rsthis: & QRectF) -> RetType;
}
// proto: bool QRectF::isValid();
impl<'a> /*trait*/ QRectF_isValid<i8> for () {
fn isValid(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF7isValidEv()};
let mut ret = unsafe {C_ZNK6QRectF7isValidEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRectF::translate(qreal dx, qreal dy);
impl<'a> /*trait*/ QRectF_translate<()> for (f64, f64) {
fn translate(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9translateEdd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
unsafe {C_ZN6QRectF9translateEdd(rsthis.qclsinst, arg0, arg1)};
// return 1;
}
}
// proto: void QRectF::QRectF(qreal left, qreal top, qreal width, qreal height);
impl<'a> /*trait*/ QRectF_new for (f64, f64, f64, f64) {
fn new(self) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectFC2Edddd()};
let ctysz: c_int = unsafe{QRectF_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let arg2 = self.2 as c_double;
let arg3 = self.3 as c_double;
let qthis: u64 = unsafe {C_ZN6QRectFC2Edddd(arg0, arg1, arg2, arg3)};
let rsthis = QRectF{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: QRect QRectF::toRect();
impl /*struct*/ QRectF {
pub fn toRect<RetType, T: QRectF_toRect<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.toRect(self);
// return 1;
}
}
pub trait QRectF_toRect<RetType> {
fn toRect(self , rsthis: & QRectF) -> RetType;
}
// proto: QRect QRectF::toRect();
impl<'a> /*trait*/ QRectF_toRect<QRect> for () {
fn toRect(self , rsthis: & QRectF) -> QRect {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6toRectEv()};
let mut ret = unsafe {C_ZNK6QRectF6toRectEv(rsthis.qclsinst)};
let mut ret1 = QRect::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::moveLeft(qreal pos);
impl /*struct*/ QRectF {
pub fn moveLeft<RetType, T: QRectF_moveLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveLeft(self);
// return 1;
}
}
pub trait QRectF_moveLeft<RetType> {
fn moveLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveLeft(qreal pos);
impl<'a> /*trait*/ QRectF_moveLeft<()> for (f64) {
fn moveLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF8moveLeftEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF8moveLeftEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setTopLeft(const QPointF & p);
impl /*struct*/ QRectF {
pub fn setTopLeft<RetType, T: QRectF_setTopLeft<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTopLeft(self);
// return 1;
}
}
pub trait QRectF_setTopLeft<RetType> {
fn setTopLeft(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setTopLeft(const QPointF & p);
impl<'a> /*trait*/ QRectF_setTopLeft<()> for (&'a QPointF) {
fn setTopLeft(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF10setTopLeftERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF10setTopLeftERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setBottomRight(const QPointF & p);
impl /*struct*/ QRectF {
pub fn setBottomRight<RetType, T: QRectF_setBottomRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setBottomRight(self);
// return 1;
}
}
pub trait QRectF_setBottomRight<RetType> {
fn setBottomRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setBottomRight(const QPointF & p);
impl<'a> /*trait*/ QRectF_setBottomRight<()> for (&'a QPointF) {
fn setBottomRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF14setBottomRightERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF14setBottomRightERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QRectF QRectF::marginsAdded(const QMarginsF & margins);
impl /*struct*/ QRectF {
pub fn marginsAdded<RetType, T: QRectF_marginsAdded<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.marginsAdded(self);
// return 1;
}
}
pub trait QRectF_marginsAdded<RetType> {
fn marginsAdded(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::marginsAdded(const QMarginsF & margins);
impl<'a> /*trait*/ QRectF_marginsAdded<QRectF> for (&'a QMarginsF) {
fn marginsAdded(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF12marginsAddedERK9QMarginsF()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF12marginsAddedERK9QMarginsF(rsthis.qclsinst, arg0)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QRectF QRectF::translated(const QPointF & p);
impl /*struct*/ QRectF {
pub fn translated<RetType, T: QRectF_translated<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.translated(self);
// return 1;
}
}
pub trait QRectF_translated<RetType> {
fn translated(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::translated(const QPointF & p);
impl<'a> /*trait*/ QRectF_translated<QRectF> for (&'a QPointF) {
fn translated(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF10translatedERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF10translatedERK7QPointF(rsthis.qclsinst, arg0)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QRectF QRectF::normalized();
impl /*struct*/ QRectF {
pub fn normalized<RetType, T: QRectF_normalized<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.normalized(self);
// return 1;
}
}
pub trait QRectF_normalized<RetType> {
fn normalized(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::normalized();
impl<'a> /*trait*/ QRectF_normalized<QRectF> for () {
fn normalized(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF10normalizedEv()};
let mut ret = unsafe {C_ZNK6QRectF10normalizedEv(rsthis.qclsinst)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QRectF::getCoords(qreal * x1, qreal * y1, qreal * x2, qreal * y2);
impl /*struct*/ QRectF {
pub fn getCoords<RetType, T: QRectF_getCoords<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.getCoords(self);
// return 1;
}
}
pub trait QRectF_getCoords<RetType> {
fn getCoords(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::getCoords(qreal * x1, qreal * y1, qreal * x2, qreal * y2);
impl<'a> /*trait*/ QRectF_getCoords<()> for (&'a mut Vec<f64>, &'a mut Vec<f64>, &'a mut Vec<f64>, &'a mut Vec<f64>) {
fn getCoords(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF9getCoordsEPdS0_S0_S0_()};
let arg0 = self.0.as_ptr() as *mut c_double;
let arg1 = self.1.as_ptr() as *mut c_double;
let arg2 = self.2.as_ptr() as *mut c_double;
let arg3 = self.3.as_ptr() as *mut c_double;
unsafe {C_ZNK6QRectF9getCoordsEPdS0_S0_S0_(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: void QRectF::setTopRight(const QPointF & p);
impl /*struct*/ QRectF {
pub fn setTopRight<RetType, T: QRectF_setTopRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setTopRight(self);
// return 1;
}
}
pub trait QRectF_setTopRight<RetType> {
fn setTopRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setTopRight(const QPointF & p);
impl<'a> /*trait*/ QRectF_setTopRight<()> for (&'a QPointF) {
fn setTopRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF11setTopRightERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF11setTopRightERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: bool QRectF::contains(const QPointF & p);
impl<'a> /*trait*/ QRectF_contains<i8> for (&'a QPointF) {
fn contains(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF8containsERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF8containsERK7QPointF(rsthis.qclsinst, arg0)};
return ret as i8; // 1
// return 1;
}
}
// proto: bool QRectF::intersects(const QRectF & r);
impl /*struct*/ QRectF {
pub fn intersects<RetType, T: QRectF_intersects<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.intersects(self);
// return 1;
}
}
pub trait QRectF_intersects<RetType> {
fn intersects(self , rsthis: & QRectF) -> RetType;
}
// proto: bool QRectF::intersects(const QRectF & r);
impl<'a> /*trait*/ QRectF_intersects<i8> for (&'a QRectF) {
fn intersects(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF10intersectsERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF10intersectsERKS_(rsthis.qclsinst, arg0)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRectF::moveTop(qreal pos);
impl /*struct*/ QRectF {
pub fn moveTop<RetType, T: QRectF_moveTop<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTop(self);
// return 1;
}
}
pub trait QRectF_moveTop<RetType> {
fn moveTop(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveTop(qreal pos);
impl<'a> /*trait*/ QRectF_moveTop<()> for (f64) {
fn moveTop(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF7moveTopEd()};
let arg0 = self as c_double;
unsafe {C_ZN6QRectF7moveTopEd(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: void QRectF::setCoords(qreal x1, qreal y1, qreal x2, qreal y2);
impl /*struct*/ QRectF {
pub fn setCoords<RetType, T: QRectF_setCoords<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setCoords(self);
// return 1;
}
}
pub trait QRectF_setCoords<RetType> {
fn setCoords(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::setCoords(qreal x1, qreal y1, qreal x2, qreal y2);
impl<'a> /*trait*/ QRectF_setCoords<()> for (f64, f64, f64, f64) {
fn setCoords(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF9setCoordsEdddd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let arg2 = self.2 as c_double;
let arg3 = self.3 as c_double;
unsafe {C_ZN6QRectF9setCoordsEdddd(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
// return 1;
}
}
// proto: QRectF QRectF::translated(qreal dx, qreal dy);
impl<'a> /*trait*/ QRectF_translated<QRectF> for (f64, f64) {
fn translated(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF10translatedEdd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let mut ret = unsafe {C_ZNK6QRectF10translatedEdd(rsthis.qclsinst, arg0, arg1)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: bool QRectF::isEmpty();
impl /*struct*/ QRectF {
pub fn isEmpty<RetType, T: QRectF_isEmpty<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.isEmpty(self);
// return 1;
}
}
pub trait QRectF_isEmpty<RetType> {
fn isEmpty(self , rsthis: & QRectF) -> RetType;
}
// proto: bool QRectF::isEmpty();
impl<'a> /*trait*/ QRectF_isEmpty<i8> for () {
fn isEmpty(self , rsthis: & QRectF) -> i8 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF7isEmptyEv()};
let mut ret = unsafe {C_ZNK6QRectF7isEmptyEv(rsthis.qclsinst)};
return ret as i8; // 1
// return 1;
}
}
// proto: void QRectF::moveTopRight(const QPointF & p);
impl /*struct*/ QRectF {
pub fn moveTopRight<RetType, T: QRectF_moveTopRight<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.moveTopRight(self);
// return 1;
}
}
pub trait QRectF_moveTopRight<RetType> {
fn moveTopRight(self , rsthis: & QRectF) -> RetType;
}
// proto: void QRectF::moveTopRight(const QPointF & p);
impl<'a> /*trait*/ QRectF_moveTopRight<()> for (&'a QPointF) {
fn moveTopRight(self , rsthis: & QRectF) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectF12moveTopRightERK7QPointF()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN6QRectF12moveTopRightERK7QPointF(rsthis.qclsinst, arg0)};
// return 1;
}
}
// proto: QRectF QRectF::united(const QRectF & other);
impl /*struct*/ QRectF {
pub fn united<RetType, T: QRectF_united<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.united(self);
// return 1;
}
}
pub trait QRectF_united<RetType> {
fn united(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::united(const QRectF & other);
impl<'a> /*trait*/ QRectF_united<QRectF> for (&'a QRectF) {
fn united(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF6unitedERKS_()};
let arg0 = self.qclsinst as *mut c_void;
let mut ret = unsafe {C_ZNK6QRectF6unitedERKS_(rsthis.qclsinst, arg0)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: qreal QRectF::right();
impl /*struct*/ QRectF {
pub fn right<RetType, T: QRectF_right<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.right(self);
// return 1;
}
}
pub trait QRectF_right<RetType> {
fn right(self , rsthis: & QRectF) -> RetType;
}
// proto: qreal QRectF::right();
impl<'a> /*trait*/ QRectF_right<f64> for () {
fn right(self , rsthis: & QRectF) -> f64 {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF5rightEv()};
let mut ret = unsafe {C_ZNK6QRectF5rightEv(rsthis.qclsinst)};
return ret as f64; // 1
// return 1;
}
}
// proto: void QRectF::QRectF(const QRect & rect);
impl<'a> /*trait*/ QRectF_new for (&'a QRect) {
fn new(self) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN6QRectFC2ERK5QRect()};
let ctysz: c_int = unsafe{QRectF_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = self.qclsinst as *mut c_void;
let qthis: u64 = unsafe {C_ZN6QRectFC2ERK5QRect(arg0)};
let rsthis = QRectF{qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: QRectF QRectF::adjusted(qreal x1, qreal y1, qreal x2, qreal y2);
impl /*struct*/ QRectF {
pub fn adjusted<RetType, T: QRectF_adjusted<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.adjusted(self);
// return 1;
}
}
pub trait QRectF_adjusted<RetType> {
fn adjusted(self , rsthis: & QRectF) -> RetType;
}
// proto: QRectF QRectF::adjusted(qreal x1, qreal y1, qreal x2, qreal y2);
impl<'a> /*trait*/ QRectF_adjusted<QRectF> for (f64, f64, f64, f64) {
fn adjusted(self , rsthis: & QRectF) -> QRectF {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK6QRectF8adjustedEdddd()};
let arg0 = self.0 as c_double;
let arg1 = self.1 as c_double;
let arg2 = self.2 as c_double;
let arg3 = self.3 as c_double;
let mut ret = unsafe {C_ZNK6QRectF8adjustedEdddd(rsthis.qclsinst, arg0, arg1, arg2, arg3)};
let mut ret1 = QRectF::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// <= body block end
|
mod plugins;
mod structs;
pub use libloading::Library;
pub use plugins::*;
pub use structs::*;
#[macro_export]
macro_rules! make_plugin {
($plugin_type:ty) => {
impl From<$crate::Library> for $plugin_type {
fn from(library: $crate::Library) -> Self {
let mut plugin = Self::new();
plugin.library = Some(library);
plugin
}
}
#[no_mangle]
pub extern "C" fn _plugin_create(lib: Library) -> *mut $crate::Plugin {
let constructor: fn(Library) -> $plugin_type = <$plugin_type>::from;
let object = constructor(lib);
let boxed: Box<$crate::Plugin> = Box::new(object);
Box::into_raw(boxed)
}
};
}
|
use account::NewRegistration;
extern crate bcrypt;
use bcrypt::{hash, verify, BcryptError, DEFAULT_COST};
use diesel;
use diesel::mysql::MysqlConnection;
use diesel::prelude::*;
use diesel::result;
use schema::users;
pub enum UserCreateError {
DbError(diesel::result::Error),
HashError(bcrypt::BcryptError),
}
impl From<diesel::result::Error> for UserCreateError {
fn from(e: diesel::result::Error) -> UserCreateError {
UserCreateError::DbError(e)
}
}
impl From<bcrypt::BcryptError> for UserCreateError {
fn from(e: bcrypt::BcryptError) -> UserCreateError {
UserCreateError::HashError(e)
}
}
#[table_name = "users"]
#[derive(Serialize, Deserialize, Queryable, Insertable, AsChangeset)]
pub struct User {
pub id: i32,
pub name: String,
pub email: String,
pub password_hash: String,
}
#[table_name = "users"]
#[derive(FromForm, Deserialize, Insertable, AsChangeset)]
pub struct NewUser {
pub name: String,
pub email: String,
pub password_hash: String,
}
impl User {
pub fn register(
user: &NewRegistration,
connection: &MysqlConnection,
) -> Result<User, UserCreateError> {
let insert = NewUser {
name: user.name.clone(),
password_hash: hash(&user.password, DEFAULT_COST)?,
email: user.email.clone(),
};
diesel::insert_into(users::table)
.values(&insert)
.execute(connection)?;
Ok(users::table
.order(users::id.desc())
.first(connection)
.unwrap())
}
pub fn create(user: NewUser, connection: &MysqlConnection) -> Result<User, result::Error> {
diesel::insert_into(users::table)
.values(&user)
.execute(connection)?;
Ok(users::table
.order(users::id.desc())
.first(connection)
.unwrap())
}
pub fn read(connection: &MysqlConnection) -> Vec<User> {
users::table
.order(users::id.asc())
.load::<User>(connection)
.unwrap()
}
pub fn update(id: i32, user: User, connection: &MysqlConnection) -> bool {
diesel::update(users::table.find(id))
.set(&user)
.execute(connection)
.is_ok()
}
pub fn delete(id: i32, connection: &MysqlConnection) -> bool {
diesel::delete(users::table.find(id))
.execute(connection)
.is_ok()
}
}
|
use anyhow::{Context, Result as AnyhowResult};
use ethers::prelude::*;
use gumdrop::Options;
use hifi_liquidator::{escalator, liquidations::Liquidator, sentinel::Sentinel};
use hifi_liquidator_structs::{Config, Opts};
use std::{convert::TryFrom, env, fs::OpenOptions, sync::Arc, time::Duration};
use tracing::info;
use tracing_subscriber::{filter::EnvFilter, fmt::Subscriber};
#[tokio::main]
async fn main() -> AnyhowResult<()> {
Subscriber::builder()
.with_env_filter(EnvFilter::from_default_env())
.init();
let opts = Opts::parse_args_default_or_exit();
if opts.url.starts_with("http") {
let provider = Provider::<Http>::try_from(opts.url.clone())?;
run(opts, provider).await?;
} else {
let ws = Ws::connect(opts.url.clone()).await?;
let provider = Provider::new(ws);
run(opts, provider).await?;
}
Ok(())
}
async fn run<P: JsonRpcClient + 'static>(opts: Opts, provider: Provider<P>) -> AnyhowResult<()> {
info!("Starting Hifi liquidator");
let provider = provider.interval(Duration::from_millis(opts.interval));
let wallet: LocalWallet = env::var("PRIVATE_KEY")
.with_context(|| "Could not interpret PRIVATE_KEY env variable")?
.parse()
.with_context(|| "Could not parse private key")?;
let liquidator_address = wallet.address();
let signer_middleware = SignerMiddleware::new(provider, wallet);
let nonce_manager_middleware = NonceManagerMiddleware::new(signer_middleware, liquidator_address);
let client = Arc::new(nonce_manager_middleware);
info!("Profits will be sent to {:?}", liquidator_address);
info!("Node: {}", opts.url);
info!("Persistent data will be stored in: {:?}", opts.db_file);
let config: Config = serde_json::from_reader(std::fs::File::open(opts.config)?)?;
info!("BalanceSheet: {:?}", config.balance_sheet);
info!("FyTokens: {:?}", config.fy_tokens);
info!("HifiFlashSwap {:?}", config.hifi_flash_swap);
info!("Multicall: {:?}", config.multicall);
info!("UniswapV2Pair: {:?}", config.uniswap_v2_pair);
let db_file = OpenOptions::new()
.read(true)
.write(true)
.create(true)
.open(&opts.db_file)
.unwrap();
let state = serde_json::from_reader(&db_file).unwrap_or_default();
let gas_escalator = escalator::init_gas_escalator();
let liquidator = Liquidator::new(
client.clone(),
gas_escalator,
config.hifi_flash_swap,
liquidator_address,
opts.min_profit,
config.uniswap_v2_pair,
);
let mut sentinel = Sentinel::new(
config.balance_sheet,
client,
config.fy_tokens,
liquidator,
config.multicall,
state,
)
.await?;
sentinel.run(opts.db_file, opts.start_block).await?;
Ok(())
}
|
#![allow(dead_code)]
use std::sync::atomic::{AtomicI8, AtomicU64, Ordering};
use crate::config::{Config, ConfigStatus};
use crate::debug::is_debug_mode;
use crate::model::{
concede_update, reset_lock, spin_update, Backoff, Message, WorkerUpdate, EXPIRE_PERIOD,
};
use crate::pool::PoolStatus;
use crate::worker::Worker;
use crossbeam_channel::Receiver;
use std::sync::Arc;
/// The first id that can be taken by workers. All previous ones are reserved for future use in the
/// graveyard. Note that the `INIT_ID` is still the one reserved, and manager's first valid
/// `last_worker_id` shall be greater than this id number.
const INIT_ID: usize = 15;
#[doc(hidden)]
pub(crate) struct Manager {
config: Config,
workers: Vec<Worker>,
mutating: AtomicI8,
last_worker_id: usize,
idle_threshold: IdleThreshold,
chan: (Receiver<Message>, Receiver<Message>),
}
impl Manager {
pub(crate) fn build(
config: Config,
range: usize,
status: PoolStatus,
pri_rx: Receiver<Message>,
rx: Receiver<Message>,
lazy_built: bool,
) -> Manager {
let idle_threshold = IdleThreshold {
inner: Arc::new((
AtomicU64::new(EXPIRE_PERIOD),
AtomicU64::new(4 * EXPIRE_PERIOD),
)),
};
let mut m = Manager {
config,
workers: Vec::new(),
mutating: AtomicI8::new(0),
last_worker_id: INIT_ID,
idle_threshold,
chan: (pri_rx, rx),
};
if !lazy_built {
m.add_workers(range, true, status);
if is_debug_mode() {
println!("Pool has been initialized with {} pools", m.workers.len());
}
}
m
}
pub(crate) fn remove_all(&mut self, sync_remove: bool) {
// nothing to remove now
if self.workers.is_empty() {
return;
}
// wait for the in-progress process to finish
self.spin_update(-1);
// the behaviors
let behavior = self.config.worker_behavior();
// the remove signal should have been sent by now, or this will forever block
for mut worker in self.workers.drain(..) {
let id = worker.get_id();
if is_debug_mode() {
println!("Sync retiring worker {}", id);
}
// call retire so we will block until all workers have been awakened again, meaning
// all their work is now done and threads joined. Only do this if the shutdown message
// is delivered such that workers may be able to quit the infinite-loop and join the
// thread later.
if sync_remove {
behavior.before_drop(id);
worker.retire();
behavior.after_drop(id);
}
}
// release worker lock
self.reset_lock();
// also clear the graveyard
self.last_worker_id = INIT_ID;
}
pub(crate) fn add_workers(&mut self, count: usize, privileged: bool, status: PoolStatus) {
if count == 0 {
return;
}
if self.last_worker_id > INIT_ID {
// before adding new workers, remove killed ones.
self.worker_cleanup();
}
// if someone is actively adding workers, we skip this op
if !self.concede_update(1) {
return;
}
// reserve rooms for workers
self.workers.reserve(count);
// the start id is the next integer from the last worker's id
let base_name = self.config.pool_name().cloned();
let stack_size = self.config.thread_size();
(1..=count).for_each(|offset| {
// Worker is created to subscribe, but would register self later when pulled from the
// workers queue
let id = self.last_worker_id + offset;
let (rx, pri_rx) = (self.chan.0.clone(), self.chan.1.clone());
let worker_name = match base_name.as_ref() {
Some(name) => Some(format!("{}-{}", name, id)),
None => None,
};
self.workers.push(Worker::new(
worker_name,
id,
stack_size,
privileged,
(pri_rx, rx),
(status.clone(), self.idle_threshold.clone()),
self.config.worker_behavior(),
));
});
self.reset_lock();
self.last_worker_id += count;
}
pub(crate) fn wake_up(&self) {
// call everyone to wake up and work
self.workers.iter().for_each(|worker| worker.wake_up());
}
pub(crate) fn worker_cleanup(&mut self) {
let (mut pos, mut end) = (0usize, self.workers.len());
while pos < end {
let worker: &mut Worker = &mut self.workers[pos];
if worker.is_terminated() {
worker.retire();
self.workers.swap_remove(pos);
end -= 1;
} else {
pos += 1;
}
}
}
}
#[doc(hidden)]
pub(crate) trait WorkerManagement {
fn workers_count(&self) -> usize;
fn worker_auto_sleep(&mut self, life_in_ms: usize);
fn worker_auto_expire(&mut self, life_in_ms: usize);
fn extend_by(&mut self, more: usize, status: PoolStatus);
fn shrink_by(&mut self, less: usize) -> Vec<usize>;
fn dismiss_worker(&mut self, id: usize) -> Option<usize>;
fn first_worker_id(&self) -> usize;
fn last_worker_id(&self) -> usize;
fn next_worker_id(&self, curr_id: usize) -> usize;
}
impl WorkerManagement for Manager {
fn workers_count(&self) -> usize {
self.workers.len()
}
fn worker_auto_sleep(&mut self, life_in_ms: usize) {
self.idle_threshold
.inner
.0
.store(life_in_ms as u64, Ordering::SeqCst);
}
fn worker_auto_expire(&mut self, life_in_ms: usize) {
self.idle_threshold
.inner
.1
.store(life_in_ms as u64, Ordering::SeqCst);
}
fn extend_by(&mut self, more: usize, status: PoolStatus) {
self.add_workers(more, true, status);
}
fn shrink_by(&mut self, less: usize) -> Vec<usize> {
if less == 0 {
return Vec::new();
}
let start = self.workers.len() - less;
// make sure we've exclusive lock before modifying the workers vec
if !self.concede_update(-1) {
return Vec::new();
}
let workers = self
.workers
.drain(start..)
.map(|mut w| {
let id = w.get_id();
w.wake_up();
w.retire();
id
})
.collect();
self.reset_lock();
workers
}
fn dismiss_worker(&mut self, id: usize) -> Option<usize> {
let mut res: Option<usize> = None;
for idx in 0..self.workers.len() {
let worker = &self.workers[idx];
if worker.get_id() == id {
// make sure the worker is awaken and hence can go away
worker.wake_up();
// get the lock, swap out the worker, use swap_remove for better performance.
self.spin_update(-1);
let mut retired = self.workers.swap_remove(idx);
self.reset_lock();
// now update the return value and notify worker to dismiss
res.replace(retired.get_id());
retired.retire();
break;
}
}
res
}
fn first_worker_id(&self) -> usize {
match self.workers.first() {
Some(worker) => worker.get_id(),
None => 0,
}
}
fn last_worker_id(&self) -> usize {
match self.workers.last() {
Some(worker) => worker.get_id(),
None => 0,
}
}
fn next_worker_id(&self, curr_id: usize) -> usize {
let mut found = false;
for worker in self.workers.iter() {
let id = worker.get_id();
if found {
return id;
}
if id == curr_id {
found = true;
}
}
0
}
}
#[doc(hidden)]
pub(crate) trait JobManagement {
fn drop_one(&self, from: u8) -> usize;
fn drop_many(&self, from: u8, target: usize) -> usize;
}
impl JobManagement for Manager {
fn drop_one(&self, from: u8) -> usize {
let chan = if from == 0 {
// pop one task from the priority queue
&self.chan.0
} else {
// pop one task from the normal queue
&self.chan.1
};
if chan.is_empty() {
return 0;
}
if chan.try_recv().is_err() {
return 0;
}
1
}
fn drop_many(&self, from: u8, target: usize) -> usize {
let chan = if from == 0 {
// pop one task from the priority queue
&self.chan.0
} else {
// pop one task from the normal queue
&self.chan.1
};
if chan.is_empty() {
return 0;
}
let mut count = 0;
while count < target {
// empty or disconnected, we're done either way
if chan.try_recv().is_err() {
break;
}
// update the counter
count += 1;
}
count
}
}
impl Backoff for Manager {
fn spin_update(&self, new: i8) {
spin_update(&self.mutating, new);
}
fn concede_update(&self, new: i8) -> bool {
concede_update(&self.mutating, new)
}
#[inline(always)]
fn reset_lock(&self) {
reset_lock(&self.mutating)
}
}
#[derive(Clone)]
pub struct StatusBehaviors {
before_start: Option<WorkerUpdate>,
after_start: Option<WorkerUpdate>,
before_drop: Option<WorkerUpdate>,
after_drop: Option<WorkerUpdate>,
}
impl StatusBehaviors {
fn new() -> Self {
StatusBehaviors {
before_start: None,
after_start: None,
before_drop: None,
after_drop: None,
}
}
}
pub trait StatusBehaviorSetter {
fn set_before_start(&mut self, behavior: WorkerUpdate);
fn set_after_start(&mut self, behavior: WorkerUpdate);
fn set_before_drop(&mut self, behavior: WorkerUpdate);
fn set_after_drop(&mut self, behavior: WorkerUpdate);
}
impl StatusBehaviorSetter for StatusBehaviors {
fn set_before_start(&mut self, behavior: WorkerUpdate) {
self.before_start.replace(behavior);
}
fn set_after_start(&mut self, behavior: WorkerUpdate) {
self.after_start.replace(behavior);
}
fn set_before_drop(&mut self, behavior: WorkerUpdate) {
self.before_drop.replace(behavior);
}
fn set_after_drop(&mut self, behavior: WorkerUpdate) {
self.after_drop.replace(behavior);
}
}
pub(crate) trait StatusBehaviorDefinitions {
fn before_start(&self, id: usize);
fn after_start(&self, id: usize);
fn before_drop(&self, id: usize);
fn after_drop(&self, id: usize);
fn before_drop_clone(&self) -> Option<WorkerUpdate>;
fn after_drop_clone(&self) -> Option<WorkerUpdate>;
}
impl StatusBehaviorDefinitions for StatusBehaviors {
fn before_start(&self, id: usize) {
if let Some(behavior) = self.before_start {
behavior(id);
}
}
fn after_start(&self, id: usize) {
if let Some(behavior) = self.after_start {
behavior(id);
}
}
fn before_drop(&self, id: usize) {
if let Some(behavior) = self.before_drop {
behavior(id);
}
}
fn after_drop(&self, id: usize) {
if let Some(behavior) = self.after_drop {
behavior(id);
}
}
fn before_drop_clone(&self) -> Option<WorkerUpdate> {
self.before_drop
}
fn after_drop_clone(&self) -> Option<WorkerUpdate> {
self.after_drop
}
}
impl Default for StatusBehaviors {
fn default() -> Self {
Self::new()
}
}
// Wrapper
pub(crate) struct IdleThreshold {
inner: Arc<(AtomicU64, AtomicU64)>,
}
impl IdleThreshold {
pub(crate) fn idle_stat(&self, period: u64) -> u8 {
let hibernate: u64 = self.inner.0.load(Ordering::Acquire);
let retire: u64 = self.inner.1.load(Ordering::Acquire);
match (hibernate, retire) {
(h, r) if h > 0 && r > 0 => {
if period < h {
// ok
0
} else if period < r {
// hibernate
1
} else {
// retire
2
}
}
(h, r) if h > 0 && r == 0 => {
if period < h {
0
} else {
1
}
}
(h, r) if h == 0 && r > 0 => {
if period < r {
0
} else {
2
}
}
_ => 0,
}
}
}
impl Clone for IdleThreshold {
fn clone(&self) -> Self {
IdleThreshold {
inner: Arc::clone(&self.inner),
}
}
}
unsafe impl Send for IdleThreshold {}
unsafe impl Sync for IdleThreshold {}
|
use crate::{Line, Plane, Point};
/// Projections
///
/// Projections in Geometric Algebra take on a particularly simple form.
/// For two geometric entities $a$ and $b$, there are two cases to consider.
/// First, if the grade of $a$ is greater than the grade of $b$, the projection
/// of $a$ on $b$ is given by:
///
/// $$ \textit{proj}_b a = (a \cdot b) \wedge b $$
///
/// The inner product can be thought of as the part of $b$ _least like_ $a$.
/// Using the meet operator on this part produces the part of $b$ _most like_
/// $a$. A simple sanity check is to consider the grades of the result. If the
/// grade of $b$ is less than the grade of $a$, we end up with an entity with
/// grade $a - b + b = a$ as expected.
///
/// In the second case (the grade of $a$ is less than the grade of $b$), the
/// projection of $a$ on $b$ is given by:
///
/// $$ \textit{proj}_b a = (a \cdot b) \cdot b $$
///
/// It can be verified that as in the first case, the grade of the result is the
/// same as the grade of $a$. As this projection occurs in the opposite sense
/// from what one may have seen before, additional clarification is provided
/// below.
trait Project<O> {
fn project(self, other: O) -> Self;
}
macro_rules! project_onto_lower_grade {
( $a:ty, $b:ty ) => {
impl Project<$b> for $a {
fn project(self, b: $b) -> $a {
let a = self;
(a | b) ^ b
}
}
};
}
project_onto_lower_grade!(Point, Line);
project_onto_lower_grade!(Point, Plane);
project_onto_lower_grade!(Line, Plane);
/// Project a plane onto a point. Given a plane $p$ and point $P$, produces the
/// plane through $P$ that is parallel to $p$.
///
/// Intuitively, the point is represented dually in terms of a _pencil of
/// planes_ that converge on the point itself. When we compute $p | P$, this
/// selects the line perpendicular to $p$ through $P$. Subsequently, taking the
/// inner product with $P$ again selects the plane from the plane pencil of $P$
/// _least like_ that line.
/// Project a line onto a point. Given a line $\ell$ and point $P$, produces the
/// line through $P$ that is parallel to $\ell$.
/// Project a plane onto a line. Given a plane $p$ and line $\ell$, produces the
/// plane through $\ell$ that is parallel to $p$ if $p \parallel \ell$.
///
/// If $p \nparallel \ell$, the result will be the plane $p'$ containing $\ell$
/// that maximizes $p \cdot p'$ (that is, $p'$ is as parallel to $p$ as
/// possible).
macro_rules! project_onto_higher_grade {
( $a:ty, $b:ty ) => {
impl Project<$b> for $a {
fn project(self, b: $b) -> $a {
let a = self;
(a | b) | b
}
}
};
}
project_onto_higher_grade!(Plane, Point);
project_onto_higher_grade!(Line, Point);
project_onto_higher_grade!(Plane, Line);
|
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use {
fuchsia_criterion::criterion::{Bencher, Criterion},
fuchsia_zircon as zx,
};
pub fn benches(c: &mut Criterion) {
c.bench_function_over_inputs(
"channel_write_read_zeroes",
channel_write_read_zeroes,
[64, 1024, 32 * 1024, 64 * 1024].into_iter(),
);
}
fn channel_write_read_zeroes(b: &mut Bencher, message_size: &&usize) {
let message = vec![0; **message_size];
let mut handles = vec![];
let (one, two) = zx::Channel::create().unwrap();
b.iter(|| {
one.write(&message, &mut handles).unwrap();
let mut output = zx::MessageBuf::new();
two.read(&mut output).unwrap();
});
}
|
use crate::event::Value;
use crate::sinks::influxdb::{
encode_namespace, encode_timestamp, healthcheck, influx_line_protocol, influxdb_settings,
Field, InfluxDB1Settings, InfluxDB2Settings, ProtocolVersion,
};
use crate::sinks::util::encoding::EncodingConfigWithDefault;
use crate::sinks::util::http::{BatchedHttpSink, HttpClient, HttpSink};
use crate::sinks::util::{
service2::TowerRequestConfig, BatchConfig, BatchSettings, Buffer, Compression,
};
use crate::sinks::Healthcheck;
use crate::{
event::{log_schema, Event},
topology::config::{DataType, SinkConfig, SinkContext, SinkDescription},
};
use futures01::Sink;
use http::{Request, Uri};
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use std::collections::{BTreeMap, HashMap, HashSet};
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
#[serde(deny_unknown_fields)]
pub struct InfluxDBLogsConfig {
pub namespace: String,
pub endpoint: String,
#[serde(default)]
pub tags: Vec<String>,
#[serde(flatten)]
pub influxdb1_settings: Option<InfluxDB1Settings>,
#[serde(flatten)]
pub influxdb2_settings: Option<InfluxDB2Settings>,
#[serde(
skip_serializing_if = "crate::serde::skip_serializing_if_default",
default
)]
pub encoding: EncodingConfigWithDefault<Encoding>,
#[serde(default)]
pub batch: BatchConfig,
#[serde(default)]
pub request: TowerRequestConfig,
}
#[derive(Debug)]
struct InfluxDBLogsSink {
uri: Uri,
token: String,
protocol_version: ProtocolVersion,
namespace: String,
tags: HashSet<String>,
}
lazy_static! {
static ref REQUEST_DEFAULTS: TowerRequestConfig = TowerRequestConfig {
retry_attempts: Some(5),
..Default::default()
};
}
#[derive(Deserialize, Serialize, Debug, Eq, PartialEq, Clone, Derivative)]
#[serde(rename_all = "snake_case")]
#[derivative(Default)]
pub enum Encoding {
#[derivative(Default)]
Default,
}
inventory::submit! {
SinkDescription::new_without_default::<InfluxDBLogsConfig>("influxdb_logs")
}
#[typetag::serde(name = "influxdb_logs")]
impl SinkConfig for InfluxDBLogsConfig {
fn build(&self, cx: SinkContext) -> crate::Result<(super::RouterSink, super::Healthcheck)> {
// let mut config = self.clone();
let mut tags: HashSet<String> = self.tags.clone().into_iter().collect();
tags.insert(log_schema().host_key().to_string());
tags.insert(log_schema().source_type_key().to_string());
let client = HttpClient::new(cx.resolver(), None)?;
let healthcheck = self.healthcheck(client.clone())?;
let batch = BatchSettings::default()
.bytes(bytesize::mib(1u64))
.timeout(1)
.parse_config(self.batch)?;
let request = self.request.unwrap_with(&REQUEST_DEFAULTS);
let settings = influxdb_settings(
self.influxdb1_settings.clone(),
self.influxdb2_settings.clone(),
)
.unwrap();
let endpoint = self.endpoint.clone();
let uri = settings.write_uri(endpoint).unwrap();
let token = settings.token();
let protocol_version = settings.protocol_version();
let namespace = self.namespace.clone();
let sink = InfluxDBLogsSink {
uri,
token,
protocol_version,
namespace,
tags,
};
let sink = BatchedHttpSink::new(
sink,
Buffer::new(batch.size, Compression::None),
request,
batch.timeout,
client,
cx.acker(),
)
.sink_map_err(|e| error!("Fatal influxdb_logs sink error: {}", e));
Ok((Box::new(sink), Box::new(healthcheck)))
}
fn input_type(&self) -> DataType {
DataType::Log
}
fn sink_type(&self) -> &'static str {
"influxdb_logs"
}
}
#[async_trait::async_trait]
impl HttpSink for InfluxDBLogsSink {
type Input = Vec<u8>;
type Output = Vec<u8>;
fn encode_event(&self, event: Event) -> Option<Self::Input> {
let mut output = String::new();
let mut event = event.into_log();
// Measurement
let measurement = encode_namespace(&self.namespace, &"vector");
// Timestamp
let timestamp = encode_timestamp(match event.remove(log_schema().timestamp_key()) {
Some(Value::Timestamp(ts)) => Some(ts),
_ => None,
});
// Tags + Fields
let mut tags: BTreeMap<String, String> = BTreeMap::new();
let mut fields: HashMap<String, Field> = HashMap::new();
event.all_fields().for_each(|(key, value)| {
if self.tags.contains(&key) {
tags.insert(key, value.to_string_lossy());
} else {
fields.insert(key, value.to_field());
}
});
influx_line_protocol(
self.protocol_version,
measurement,
"logs",
Some(tags),
Some(fields),
timestamp,
&mut output,
);
Some(output.into_bytes())
}
async fn build_request(&self, events: Self::Output) -> crate::Result<Request<Vec<u8>>> {
Request::post(&self.uri)
.header("Content-Type", "text/plain")
.header("Authorization", format!("Token {}", &self.token))
.body(events)
.map_err(Into::into)
}
}
impl InfluxDBLogsConfig {
fn healthcheck(&self, client: HttpClient) -> crate::Result<Healthcheck> {
let config = self.clone();
let healthcheck = healthcheck(
config.endpoint,
config.influxdb1_settings,
config.influxdb2_settings,
client,
)?;
Ok(Box::new(healthcheck))
}
}
impl Value {
pub fn to_field(&self) -> Field {
match self {
Value::Integer(num) => Field::Int(*num),
Value::Float(num) => Field::Float(*num),
Value::Boolean(b) => Field::Bool(*b),
_ => Field::String(self.to_string_lossy()),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::event::Event;
use crate::sinks::influxdb::test_util::{assert_fields, split_line_protocol, ts};
use crate::sinks::util::http::HttpSink;
use crate::sinks::util::test::build_test_server;
use crate::test_util;
use chrono::offset::TimeZone;
use chrono::Utc;
use futures01::{Sink, Stream};
#[test]
fn test_config_without_tags() {
let config = r#"
namespace = "vector-logs"
endpoint = "http://localhost:9999"
bucket = "my-bucket"
org = "my-org"
token = "my-token"
"#;
toml::from_str::<InfluxDBLogsConfig>(&config).unwrap();
}
#[test]
fn test_encode_event_v1() {
let mut event = Event::from("hello");
event.as_mut_log().insert("host", "aws.cloud.eur");
event.as_mut_log().insert("source_type", "file");
event.as_mut_log().insert("int", 4i32);
event.as_mut_log().insert("float", 5.5);
event.as_mut_log().insert("bool", true);
event.as_mut_log().insert("string", "thisisastring");
event.as_mut_log().insert("timestamp", ts());
let sink = create_sink(
"http://localhost:9999",
"my-token",
ProtocolVersion::V1,
"ns",
["source_type", "host"].to_vec(),
);
let bytes = sink.encode_event(event).unwrap();
let string = std::str::from_utf8(&bytes).unwrap();
let line_protocol = split_line_protocol(&string);
assert_eq!("ns.vector", line_protocol.0);
assert_eq!(
"host=aws.cloud.eur,metric_type=logs,source_type=file",
line_protocol.1
);
assert_fields(
line_protocol.2.to_string(),
[
"int=4i",
"float=5.5",
"bool=true",
"string=\"thisisastring\"",
"message=\"hello\"",
]
.to_vec(),
);
assert_eq!("1542182950000000011\n", line_protocol.3);
}
#[test]
fn test_encode_event() {
let mut event = Event::from("hello");
event.as_mut_log().insert("host", "aws.cloud.eur");
event.as_mut_log().insert("source_type", "file");
event.as_mut_log().insert("int", 4i32);
event.as_mut_log().insert("float", 5.5);
event.as_mut_log().insert("bool", true);
event.as_mut_log().insert("string", "thisisastring");
event.as_mut_log().insert("timestamp", ts());
let sink = create_sink(
"http://localhost:9999",
"my-token",
ProtocolVersion::V2,
"ns",
["source_type", "host"].to_vec(),
);
let bytes = sink.encode_event(event).unwrap();
let string = std::str::from_utf8(&bytes).unwrap();
let line_protocol = split_line_protocol(&string);
assert_eq!("ns.vector", line_protocol.0);
assert_eq!(
"host=aws.cloud.eur,metric_type=logs,source_type=file",
line_protocol.1
);
assert_fields(
line_protocol.2.to_string(),
[
"int=4i",
"float=5.5",
"bool=true",
"string=\"thisisastring\"",
"message=\"hello\"",
]
.to_vec(),
);
assert_eq!("1542182950000000011\n", line_protocol.3);
}
#[test]
fn test_encode_event_without_tags() {
let mut event = Event::from("hello");
event.as_mut_log().insert("value", 100);
event.as_mut_log().insert("timestamp", ts());
let sink = create_sink(
"http://localhost:9999",
"my-token",
ProtocolVersion::V2,
"ns",
[].to_vec(),
);
let bytes = sink.encode_event(event).unwrap();
let string = std::str::from_utf8(&bytes).unwrap();
let line_protocol = split_line_protocol(&string);
assert_eq!("ns.vector", line_protocol.0);
assert_eq!("metric_type=logs", line_protocol.1);
assert_fields(
line_protocol.2.to_string(),
["value=100i", "message=\"hello\""].to_vec(),
);
assert_eq!("1542182950000000011\n", line_protocol.3);
}
#[test]
fn test_encode_nested_fields() {
let mut event = Event::new_empty_log();
event.as_mut_log().insert("a", 1);
event.as_mut_log().insert("nested.field", "2");
event.as_mut_log().insert("nested.bool", true);
event
.as_mut_log()
.insert("nested.array[0]", "example-value");
event
.as_mut_log()
.insert("nested.array[2]", "another-value");
event.as_mut_log().insert("nested.array[3]", 15);
let sink = create_sink(
"http://localhost:9999",
"my-token",
ProtocolVersion::V2,
"ns",
[].to_vec(),
);
let bytes = sink.encode_event(event).unwrap();
let string = std::str::from_utf8(&bytes).unwrap();
let line_protocol = split_line_protocol(&string);
assert_eq!("ns.vector", line_protocol.0);
assert_eq!("metric_type=logs", line_protocol.1);
assert_fields(
line_protocol.2,
[
"a=1i",
"nested.array[0]=\"example-value\"",
"nested.array[1]=\"<null>\"",
"nested.array[2]=\"another-value\"",
"nested.array[3]=15i",
"nested.bool=true",
"nested.field=\"2\"",
]
.to_vec(),
);
}
#[test]
fn test_add_tag() {
let mut event = Event::from("hello");
event.as_mut_log().insert("source_type", "file");
event.as_mut_log().insert("as_a_tag", 10);
event.as_mut_log().insert("timestamp", ts());
let sink = create_sink(
"http://localhost:9999",
"my-token",
ProtocolVersion::V2,
"ns",
["as_a_tag", "not_exists_field", "source_type"].to_vec(),
);
let bytes = sink.encode_event(event).unwrap();
let string = std::str::from_utf8(&bytes).unwrap();
let line_protocol = split_line_protocol(&string);
assert_eq!("ns.vector", line_protocol.0);
assert_eq!(
"as_a_tag=10,metric_type=logs,source_type=file",
line_protocol.1
);
assert_fields(line_protocol.2.to_string(), ["message=\"hello\""].to_vec());
assert_eq!("1542182950000000011\n", line_protocol.3);
}
#[test]
fn smoke_v1() {
let (mut config, cx, mut rt) = crate::sinks::util::test::load_sink::<InfluxDBLogsConfig>(
r#"
namespace = "ns"
endpoint = "http://localhost:9999"
database = "my-database"
"#,
)
.unwrap();
// Make sure we can build the config
let _ = config.build(cx.clone()).unwrap();
let addr = test_util::next_addr();
// Swap out the host so we can force send it
// to our local server
let host = format!("http://{}", addr);
config.endpoint = host;
let (sink, _) = config.build(cx).unwrap();
let (rx, _trigger, server) = build_test_server(addr, &mut rt);
rt.spawn(server);
let lines = std::iter::repeat(())
.map(move |_| "message_value")
.take(5)
.collect::<Vec<_>>();
let mut events = Vec::new();
// Create 5 events with custom field
for (i, line) in lines.iter().enumerate() {
let mut event = Event::from(line.to_string());
event
.as_mut_log()
.insert(format!("key{}", i), format!("value{}", i));
let timestamp = Utc.ymd(1970, 1, 1).and_hms_nano(0, 0, (i as u32) + 1, 0);
event.as_mut_log().insert("timestamp", timestamp);
event.as_mut_log().insert("source_type", "file");
events.push(event);
}
let pump = sink.send_all(futures01::stream::iter_ok(events));
let _ = rt.block_on(pump).unwrap();
let output = rx.take(1).wait().collect::<Result<Vec<_>, _>>().unwrap();
let request = &output[0].0;
let query = request.uri.query().unwrap();
assert!(query.contains("db=my-database"));
assert!(query.contains("precision=ns"));
let body = std::str::from_utf8(&output[0].1[..]).unwrap();
let mut lines = body.lines();
assert_eq!(5, lines.clone().count());
assert_line_protocol(0, lines.next());
}
#[test]
fn smoke_v2() {
let (mut config, cx, mut rt) = crate::sinks::util::test::load_sink::<InfluxDBLogsConfig>(
r#"
namespace = "ns"
endpoint = "http://localhost:9999"
bucket = "my-bucket"
org = "my-org"
token = "my-token"
"#,
)
.unwrap();
// Make sure we can build the config
let _ = config.build(cx.clone()).unwrap();
let addr = test_util::next_addr();
// Swap out the host so we can force send it
// to our local server
let host = format!("http://{}", addr);
config.endpoint = host;
let (sink, _) = config.build(cx).unwrap();
let (rx, _trigger, server) = build_test_server(addr, &mut rt);
rt.spawn(server);
let lines = std::iter::repeat(())
.map(move |_| "message_value")
.take(5)
.collect::<Vec<_>>();
let mut events = Vec::new();
// Create 5 events with custom field
for (i, line) in lines.iter().enumerate() {
let mut event = Event::from(line.to_string());
event
.as_mut_log()
.insert(format!("key{}", i), format!("value{}", i));
let timestamp = Utc.ymd(1970, 1, 1).and_hms_nano(0, 0, (i as u32) + 1, 0);
event.as_mut_log().insert("timestamp", timestamp);
event.as_mut_log().insert("source_type", "file");
events.push(event);
}
let pump = sink.send_all(futures01::stream::iter_ok(events));
let _ = rt.block_on(pump).unwrap();
let output = rx.take(1).wait().collect::<Result<Vec<_>, _>>().unwrap();
let request = &output[0].0;
let query = request.uri.query().unwrap();
assert!(query.contains("org=my-org"));
assert!(query.contains("bucket=my-bucket"));
assert!(query.contains("precision=ns"));
let body = std::str::from_utf8(&output[0].1[..]).unwrap();
let mut lines = body.lines();
assert_eq!(5, lines.clone().count());
assert_line_protocol(0, lines.next());
}
fn assert_line_protocol(i: i64, value: Option<&str>) {
//ns.vector,metric_type=logs key0="value0",message="message_value" 1000000000
let line_protocol = split_line_protocol(value.unwrap());
assert_eq!("ns.vector", line_protocol.0);
assert_eq!("metric_type=logs,source_type=file", line_protocol.1);
assert_fields(
line_protocol.2.to_string(),
[
&*format!("key{}=\"value{}\"", i, i),
"message=\"message_value\"",
]
.to_vec(),
);
assert_eq!(format!("{}", (i + 1) * 1000000000), line_protocol.3);
}
fn create_sink(
uri: &str,
token: &str,
protocol_version: ProtocolVersion,
namespace: &str,
tags: Vec<&str>,
) -> InfluxDBLogsSink {
let uri = uri.parse::<Uri>().unwrap();
let token = token.to_string();
let namespace = namespace.to_string();
let tags: HashSet<String> = tags.into_iter().map(|tag| tag.to_string()).collect();
InfluxDBLogsSink {
uri,
token,
protocol_version,
namespace,
tags,
}
}
}
#[cfg(feature = "influxdb-integration-tests")]
#[cfg(test)]
mod integration_tests {
use super::*;
use crate::sinks::influxdb::logs::InfluxDBLogsConfig;
use crate::sinks::influxdb::test_util::{onboarding_v2, BUCKET, ORG, TOKEN};
use crate::sinks::influxdb::InfluxDB2Settings;
use crate::test_util::runtime;
use crate::topology::SinkContext;
use chrono::Utc;
use futures::compat::Future01CompatExt;
use futures01::Sink;
#[test]
fn influxdb2_logs_put_data() {
let mut rt = runtime();
onboarding_v2();
let ns = format!("ns-{}", Utc::now().timestamp_nanos());
let cx = SinkContext::new_test();
rt.block_on_std(async move {
let config = InfluxDBLogsConfig {
namespace: ns.clone(),
endpoint: "http://localhost:9999".to_string(),
tags: Default::default(),
influxdb1_settings: None,
influxdb2_settings: Some(InfluxDB2Settings {
org: ORG.to_string(),
bucket: BUCKET.to_string(),
token: TOKEN.to_string(),
}),
encoding: Default::default(),
batch: Default::default(),
request: Default::default(),
};
let (sink, _) = config.build(cx).unwrap();
let mut events = Vec::new();
let mut event1 = Event::from("message_1");
event1.as_mut_log().insert("host", "aws.cloud.eur");
event1.as_mut_log().insert("source_type", "file");
let mut event2 = Event::from("message_2");
event2.as_mut_log().insert("host", "aws.cloud.eur");
event2.as_mut_log().insert("source_type", "file");
events.push(event1);
events.push(event2);
let _ = sink.send_all(futures01::stream::iter_ok(events)).compat().await.unwrap();
let mut body = std::collections::HashMap::new();
body.insert("query", format!("from(bucket:\"my-bucket\") |> range(start: 0) |> filter(fn: (r) => r._measurement == \"{}.vector\")", ns.clone()));
body.insert("type", "flux".to_owned());
let client = reqwest::Client::builder()
.danger_accept_invalid_certs(true)
.build()
.unwrap();
let res = client
.post("http://localhost:9999/api/v2/query?org=my-org")
.json(&body)
.header("accept", "application/json")
.header("Authorization", "Token my-token")
.send()
.await
.unwrap();
let string = res.text().await.unwrap();
let lines = string.split("\n").collect::<Vec<&str>>();
let header = lines[0].split(",").collect::<Vec<&str>>();
let record1 = lines[1].split(",").collect::<Vec<&str>>();
let record2 = lines[2].split(",").collect::<Vec<&str>>();
// measurement
assert_eq!(
record1[header
.iter()
.position(|&r| r.trim() == "_measurement")
.unwrap()]
.trim(),
format!("{}.vector", ns.clone())
);
assert_eq!(
record2[header
.iter()
.position(|&r| r.trim() == "_measurement")
.unwrap()]
.trim(),
format!("{}.vector", ns.clone())
);
// tags
assert_eq!(
record1[header
.iter()
.position(|&r| r.trim() == "metric_type")
.unwrap()]
.trim(),
"logs"
);
assert_eq!(
record2[header
.iter()
.position(|&r| r.trim() == "metric_type")
.unwrap()]
.trim(),
"logs"
);
assert_eq!(
record1[header.iter().position(|&r| r.trim() == "host").unwrap()].trim(),
"aws.cloud.eur"
);
assert_eq!(
record2[header.iter().position(|&r| r.trim() == "host").unwrap()].trim(),
"aws.cloud.eur"
);
assert_eq!(
record1[header
.iter()
.position(|&r| r.trim() == "source_type")
.unwrap()]
.trim(),
"file"
);
assert_eq!(
record2[header
.iter()
.position(|&r| r.trim() == "source_type")
.unwrap()]
.trim(),
"file"
);
// field
assert_eq!(
record1[header.iter().position(|&r| r.trim() == "_field").unwrap()].trim(),
"message"
);
assert_eq!(
record2[header.iter().position(|&r| r.trim() == "_field").unwrap()].trim(),
"message"
);
assert_eq!(
record1[header.iter().position(|&r| r.trim() == "_value").unwrap()].trim(),
"message_1"
);
assert_eq!(
record2[header.iter().position(|&r| r.trim() == "_value").unwrap()].trim(),
"message_2"
);
});
}
}
|
pub struct ProconReader<R: std::io::Read> {
reader: R,
}
impl<R: std::io::Read> ProconReader<R> {
pub fn new(reader: R) -> Self {
Self { reader }
}
pub fn get<T: std::str::FromStr>(&mut self) -> T {
use std::io::Read;
let buf = self
.reader
.by_ref()
.bytes()
.map(|b| b.unwrap())
.skip_while(|&byte| byte == b' ' || byte == b'\n' || byte == b'\r')
.take_while(|&byte| byte != b' ' && byte != b'\n' && byte != b'\r')
.collect::<Vec<_>>();
std::str::from_utf8(&buf)
.unwrap()
.parse()
.ok()
.expect("Parse Error.")
}
}
pub struct UnionFind {
par: Vec<usize>,
size: Vec<usize>,
}
impl UnionFind {
pub fn new(n: usize) -> UnionFind {
UnionFind {
par: (0..n).map(|i| i).collect::<Vec<_>>(),
size: vec![1; n],
}
}
pub fn find(&mut self, i: usize) -> usize {
if self.par[i] == i {
self.par[i]
} else {
self.par[i] = self.find(self.par[i]);
self.par[i]
}
}
pub fn unite(&mut self, i: usize, j: usize) {
let i = self.find(i);
let j = self.find(j);
if i == j {
return;
}
let (i, j) = if self.size[i] >= self.size[j] {
(i, j)
} else {
(j, i)
};
self.par[j] = i;
self.size[i] += self.size[j];
}
pub fn get_size(&mut self, i: usize) -> usize {
let p = self.find(i);
self.size[p]
}
}
fn main() {
let stdin = std::io::stdin();
let mut rd = ProconReader::new(stdin.lock());
let n: usize = rd.get();
let m: usize = rd.get();
let ab: Vec<(usize, usize)> = (0..m)
.map(|_| {
let a: usize = rd.get();
let b: usize = rd.get();
(a - 1, b - 1)
})
.collect();
let mut uf = UnionFind::new(n);
for (a, b) in ab {
uf.unite(a, b);
}
let size = (0..n).map(|i| uf.get_size(i)).max().unwrap();
println!("{}", size);
}
|
use white_point::NamedWhitePoint;
use num::{cast, Float};
use channel::{FreeChannelScalar, PosNormalChannelScalar};
use xyz::Xyz;
use xyy::XyY;
/// Incandescent / Tungsten.
#[derive(Clone, Debug, PartialEq)]
pub struct A;
impl<T> NamedWhitePoint<T> for A
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.09850).unwrap(),
cast(1.0).unwrap(),
cast(0.35585).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.44757).unwrap(),
cast(0.40745).unwrap(),
cast(1.0).unwrap())
}
}
/// {obsolete} Direct sunlight at noon.
#[derive(Clone, Debug, PartialEq)]
pub struct B;
impl<T> NamedWhitePoint<T> for B
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.99072).unwrap(),
cast(1.0).unwrap(),
cast(0.85223).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.34842).unwrap(),
cast(0.35161).unwrap(),
cast(1.0).unwrap())
}
}
/// {obsolete} Average / North sky Daylight.
#[derive(Clone, Debug, PartialEq)]
pub struct C;
impl<T> NamedWhitePoint<T> for C
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.98074).unwrap(),
cast(1.0).unwrap(),
cast(1.18232).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.31006).unwrap(),
cast(0.31616).unwrap(),
cast(1.0).unwrap())
}
}
/// Horizon Light. ICC profile PCS.
#[derive(Clone, Debug, PartialEq)]
pub struct D50;
impl<T> NamedWhitePoint<T> for D50
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.96422).unwrap(),
cast(1.0).unwrap(),
cast(0.82521).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.34567).unwrap(),
cast(0.3585).unwrap(),
cast(1.0).unwrap())
}
}
/// Mid-morning / Mid-afternoon Daylight.
#[derive(Clone, Debug, PartialEq)]
pub struct D55;
impl<T> NamedWhitePoint<T> for D55
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.95682).unwrap(),
cast(1.0).unwrap(),
cast(0.92149).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.33242).unwrap(),
cast(0.34743).unwrap(),
cast(1.0).unwrap())
}
}
/// Noon Daylight: Television, sRGB color space.
#[derive(Clone, Debug, PartialEq)]
pub struct D65;
impl<T> NamedWhitePoint<T> for D65
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.95047).unwrap(),
cast(1.0).unwrap(),
cast(1.08883).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.31271).unwrap(),
cast(0.32902).unwrap(),
cast(1.0).unwrap())
}
}
/// North sky Daylight.
#[derive(Clone, Debug, PartialEq)]
pub struct D75;
impl<T> NamedWhitePoint<T> for D75
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.94972).unwrap(),
cast(1.000000).unwrap(),
cast(1.22638).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.29902).unwrap(),
cast(0.31485).unwrap(),
cast(1.0).unwrap())
}
}
/// Equal energy.
#[derive(Clone, Debug, PartialEq)]
pub struct E;
impl<T> NamedWhitePoint<T> for E
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.000000).unwrap(),
cast(1.000000).unwrap(),
cast(1.000030).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(1.0 / 3.0).unwrap(),
cast(1.0 / 3.0).unwrap(),
cast(1.0).unwrap())
}
}
/// Daylight Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F1;
impl<T> NamedWhitePoint<T> for F1
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.928336).unwrap(),
cast(1.000000).unwrap(),
cast(1.036647).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.3131).unwrap(),
cast(0.33727).unwrap(),
cast(1.0).unwrap())
}
}
/// Cool White Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F2;
impl<T> NamedWhitePoint<T> for F2
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.99186).unwrap(),
cast(1.0).unwrap(),
cast(0.67393).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.37208).unwrap(),
cast(0.37529).unwrap(),
cast(1.0).unwrap())
}
}
/// White Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F3;
impl<T> NamedWhitePoint<T> for F3
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.037535).unwrap(),
cast(1.000000).unwrap(),
cast(0.498605).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.4091).unwrap(),
cast(0.3943).unwrap(),
cast(1.0).unwrap())
}
}
/// Warm White Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F4;
impl<T> NamedWhitePoint<T> for F4
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.091473).unwrap(),
cast(1.000000).unwrap(),
cast(0.388133).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.44018).unwrap(),
cast(0.40329).unwrap(),
cast(1.0).unwrap())
}
}
/// Daylight Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F5;
impl<T> NamedWhitePoint<T> for F5
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.908720).unwrap(),
cast(1.000000).unwrap(),
cast(0.987229).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.31379).unwrap(),
cast(0.34531).unwrap(),
cast(1.0).unwrap())
}
}
/// Lite White Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F6;
impl<T> NamedWhitePoint<T> for F6
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.973091).unwrap(),
cast(1.000000).unwrap(),
cast(0.601905).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.3779).unwrap(),
cast(0.38835).unwrap(),
cast(1.0).unwrap())
}
}
/// D65 simulator, Daylight simulator.
#[derive(Clone, Debug, PartialEq)]
pub struct F7;
impl<T> NamedWhitePoint<T> for F7
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.95041).unwrap(),
cast(1.0).unwrap(),
cast(1.08747).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.31292).unwrap(),
cast(0.32933).unwrap(),
cast(1.0).unwrap())
}
}
/// D50 simulator, Sylvania F40 Design 50.
#[derive(Clone, Debug, PartialEq)]
pub struct F8;
impl<T> NamedWhitePoint<T> for F8
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.964125).unwrap(),
cast(1.000000).unwrap(),
cast(0.823331).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.34588).unwrap(),
cast(0.35875).unwrap(),
cast(1.0).unwrap())
}
}
/// Cool White Deluxe Fluorescent.
#[derive(Clone, Debug, PartialEq)]
pub struct F9;
impl<T> NamedWhitePoint<T> for F9
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.003648).unwrap(),
cast(1.000000).unwrap(),
cast(0.678684).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.37417).unwrap(),
cast(0.37281).unwrap(),
cast(1.0).unwrap())
}
}
/// Philips TL85, Ultralume 50.
#[derive(Clone, Debug, PartialEq)]
pub struct F10;
impl<T> NamedWhitePoint<T> for F10
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(0.961735).unwrap(),
cast(1.000000).unwrap(),
cast(0.817123).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.34609).unwrap(),
cast(0.35986).unwrap(),
cast(1.0).unwrap())
}
}
/// Philips TL84, Ultralume 40.
#[derive(Clone, Debug, PartialEq)]
pub struct F11;
impl<T> NamedWhitePoint<T> for F11
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.00962).unwrap(),
cast(1.0).unwrap(),
cast(0.64350).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.38052).unwrap(),
cast(0.37713).unwrap(),
cast(1.0).unwrap())
}
}
/// Philips TL83, Ultralume 30.
#[derive(Clone, Debug, PartialEq)]
pub struct F12;
impl<T> NamedWhitePoint<T> for F12
where T: Float + FreeChannelScalar + PosNormalChannelScalar
{
#[inline]
fn get_xyz() -> Xyz<T> {
Xyz::from_channels(cast(1.080463).unwrap(),
cast(1.000000).unwrap(),
cast(0.392275).unwrap())
}
#[inline]
fn get_xy_chromaticity() -> XyY<T> {
XyY::from_channels(cast(0.43695).unwrap(),
cast(0.40441).unwrap(),
cast(1.0).unwrap())
}
}
|
use core::cmp;
use core::fmt::{self, Debug, Display, Write};
use core::mem;
use core::ptr;
use core::slice;
use core::str::{self, Utf8Error};
use std::ffi::CStr;
use hashbrown::HashMap;
use lazy_static::lazy_static;
use thiserror::Error;
use liblumen_arena::DroplessArena;
use liblumen_core::alloc::prelude::*;
use liblumen_core::locks::RwLock;
use super::prelude::{Term, TypeError, TypedTerm};
/// The maximum number of atoms allowed
pub const MAX_ATOMS: usize = super::arch::MAX_ATOM_ID - 1;
/// The maximum length of an atom (255)
pub const MAX_ATOM_LENGTH: usize = u16::max_value() as usize;
lazy_static! {
/// The atom table used by the runtime system
static ref ATOMS: RwLock<AtomTable> = Default::default();
}
/// Performs one-time initialization of the atom table at program start, using the
/// array of constant atom values present in the compiled program.
///
/// It is expected that this will be called by code generated by the compiler, during the
/// earliest phase of startup, to ensure that nothing has tried to use the atom table yet.
#[no_mangle]
pub unsafe extern "C-unwind" fn InitializeLumenAtomTable(
start: *const std::os::raw::c_char,
end: *const std::os::raw::c_char,
) -> bool {
if start == end {
return true;
}
if start.is_null() || end.is_null() {
return false;
}
let mut default_table = ATOMS.write();
let mut next = start;
loop {
if next >= end {
break;
}
let cs = CStr::from_ptr::<'static>(next);
let name = cs.to_str().unwrap_or_else(|error| {
panic!(
"unable to construct atom from cstr `{}` due to invalid utf-8: {:?}",
cs.to_string_lossy(),
error,
)
});
if let Err(error) = default_table.get_id_or_insert_static(name) {
panic!("unable to insert atom `{}` in table: {:?}", name, error);
}
next = cs.to_bytes_with_nul().as_ptr_range().end as *const std::os::raw::c_char;
}
true
}
#[export_name = "__lumen_builtin_atom_from_cstr"]
pub unsafe extern "C-unwind" fn atom_from_cstr(ptr: *const std::os::raw::c_char) -> Term {
let atom = Atom::from_raw_cstr(ptr);
atom.as_term()
}
pub fn dump_atoms() {
let table = ATOMS.read();
table.dump();
}
/// An interned string, represented in memory as a integer ID.
///
/// This struct is simply a transparent wrapper around the ID.
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[repr(transparent)]
pub struct Atom(usize);
impl Atom {
pub const SIZE_IN_WORDS: usize = 1;
pub const TRUE: Self = Self(1);
pub const FALSE: Self = Self(0);
pub const ERROR: Self = Self(46);
pub const THROW: Self = Self(58);
pub const EXIT: Self = Self(59);
/// Gets the identifier associated with this atom
#[inline(always)]
pub fn id(&self) -> usize {
self.0
}
/// Returns the string representation of this atom
#[inline]
pub fn name(&self) -> &'static str {
ATOMS.read().get_name(self.0).unwrap()
}
/// Returns true if this atom is a boolean value
#[inline]
pub fn is_boolean(&self) -> bool {
// NOTE: This relies on the fact that the atom table is
// initialized such that true/false are at indices 1 and 0
self.0 < 2
}
/// Creates a new atom from a slice of bytes interpreted as Latin-1.
///
/// Returns `Err` if the atom name is invalid or the table overflows
#[inline]
pub fn try_from_latin1_bytes(name: &[u8]) -> Result<Self, AtomError> {
Self::try_from_str(str::from_utf8(name)?)
}
/// Like `try_from_latin1_bytes`, but requires that the atom already exists
///
/// Returns `Err` if the atom does not exist
#[inline]
pub fn try_from_latin1_bytes_existing(name: &[u8]) -> Result<Self, AtomError> {
Self::try_from_str_existing(str::from_utf8(name)?)
}
/// For convenience, this function takes a `str`, creates an atom
/// from it, and immediately encodes the resulting `Atom` as a `Term`
///
/// Panics if the name is invalid, the table overflows, or term encoding fails
#[inline]
pub fn str_to_term<S: AsRef<str>>(s: S) -> Term {
use crate::erts::term::prelude::Encode;
Self::from_str(s).encode().unwrap()
}
/// Convenience function for encoding atoms as terms
#[inline(always)]
pub fn as_term(&self) -> Term {
use crate::erts::term::prelude::Encode;
self.encode().unwrap()
}
/// This function is intended for internal use only.
///
/// # Safety
///
/// You must ensure the following is true of the given pointer:
///
/// * It points to a null-terminated C-string
/// * The content of the string is valid UTF-8 data
/// * The pointer is valid for the entire lifetime of the program
///
/// If any of these constraints are violated, the behavior is undefined.
#[inline]
pub(crate) unsafe fn from_raw_cstr(ptr: *const std::os::raw::c_char) -> Self {
let cs = CStr::from_ptr::<'static>(ptr);
let name = cs.to_str().unwrap_or_else(|error| {
panic!(
"unable to construct atom from cstr `{}` due to invalid utf-8: {:?}",
cs.to_string_lossy(),
error,
)
});
Self(ATOMS.write().get_id_or_insert_static(name).unwrap())
}
/// Creates a new atom from a `str`.
///
/// Panics if the name is invalid or the table overflows
#[inline]
pub fn from_str<S: AsRef<str>>(s: S) -> Self {
Self::try_from_str(s).unwrap()
}
/// Creates a new atom from a `str`.
///
/// Returns `Err` if the atom name is invalid or the table overflows
#[inline]
pub fn try_from_str<S: AsRef<str>>(s: S) -> Result<Self, AtomError> {
let name = s.as_ref();
Self::validate(name)?;
if let Some(id) = ATOMS.read().get_id(name) {
return Ok(Atom(id));
}
let id = ATOMS.write().get_id_or_insert(name)?;
Ok(Self(id))
}
/// Creates a new atom from a `str`, but only if the atom already exists
///
/// Returns `Err` if the atom does not exist
#[inline]
pub fn try_from_str_existing<S: AsRef<str>>(s: S) -> Result<Self, AtomError> {
let name = s.as_ref();
Self::validate(name)?;
if let Some(id) = ATOMS.read().get_id(name) {
return Ok(Self(id));
}
Err(AtomError::NonExistent.into())
}
/// Creates a new atom from its id.
///
/// # Safety
///
/// This function is unsafe because creating an `Atom`
/// with an id that doesn't exist will result in undefined
/// behavior. This should only be used by `Term` when converting
/// to `TypedTerm`
/// ```
#[inline]
pub const unsafe fn from_id(id: usize) -> Self {
Self(id)
}
// See https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L193-L212
fn needs_quotes(&self) -> bool {
let mut chars = self.name().chars();
match chars.next() {
Some(first_char) => {
// https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L198-L199
// -> https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L98
!first_char.is_ascii_lowercase() || {
// https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L201-L200
// -> https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L102
// -> https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L91
// -> https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L91
// -> https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L99
chars.any(|c| (!c.is_ascii_alphanumeric() && c != '_'))
}
}
// https://github.com/erlang/otp/blob/ca83f680aab717fe65634247d16f18a8cbfc6d8d/erts/emulator/beam/erl_printf_term.c#L187-L190
None => true,
}
}
fn validate(name: &str) -> Result<(), AtomError> {
let len = name.len();
if len > MAX_ATOM_LENGTH {
return Err(AtomError::InvalidLength(len));
}
Ok(())
}
}
impl PartialEq<bool> for Atom {
fn eq(&self, b: &bool) -> bool {
// NOTE: This relies on the fact that we initialize the
// atom table with 'false' at index 0, and 'true' at
// index 1; and that Rust will convert bools to integers
// such at false is 0 and true is 1
let id = self.id();
let b = *b;
id == (b as usize)
}
}
impl PartialEq<&str> for Atom {
fn eq(&self, s: &&str) -> bool {
self.name() == *s
}
}
impl From<bool> for Atom {
#[inline]
fn from(b: bool) -> Self {
// NOTE: We can make these assumptions because the AtomTable
// is initialized in a deterministic way - it is critical that
// if the initialization changes that these values get updated
if b {
Atom::TRUE
} else {
Atom::FALSE
}
}
}
impl Display for Atom {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let needs_quotes = self.needs_quotes();
if needs_quotes {
f.write_char('\'')?;
}
for c in self.name().chars() {
// https://github.com/erlang/otp/blob/dbf25321bdfdc3f4aae422b8ba2c0f31429eba61/erts/emulator/beam/erl_printf_term.c#L215-L232
match c {
'\'' => f.write_str("\\'")?,
'\\' => f.write_str("\\\\")?,
'\n' => f.write_str("\\n")?,
'\u{C}' => f.write_str("\\f")?,
'\t' => f.write_str("\\t")?,
'\r' => f.write_str("\\r")?,
'\u{8}' => f.write_str("\\b")?,
'\u{B}' => f.write_str("\\v")?,
_ if c.is_control() => write!(f, "\\{:o}", c as u8)?,
_ => f.write_char(c)?,
}
}
if needs_quotes {
f.write_char('\'')?;
}
Ok(())
}
}
impl Debug for Atom {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(name) = ATOMS.read().get_name(self.0) {
f.write_str(":\"")?;
name.chars()
.flat_map(char::escape_default)
.try_for_each(|c| f.write_char(c))?;
f.write_char('\"')
} else {
f.debug_tuple("Atom").field(&self.0).finish()
}
}
}
impl PartialOrd for Atom {
#[inline]
fn partial_cmp(&self, other: &Atom) -> Option<cmp::Ordering> {
Some(self.cmp(other))
}
}
impl Ord for Atom {
#[inline]
fn cmp(&self, other: &Atom) -> cmp::Ordering {
use cmp::Ordering;
if self.0 == other.0 {
return Ordering::Equal;
}
self.name().cmp(other.name())
}
}
impl TryFrom<TypedTerm> for Atom {
type Error = TypeError;
fn try_from(typed_term: TypedTerm) -> Result<Self, Self::Error> {
match typed_term {
TypedTerm::Atom(atom) => Ok(atom),
_ => Err(TypeError),
}
}
}
/// Produced by operations which create atoms
#[derive(Error, Debug)]
pub enum AtomError {
#[error("exceeded system limit: maximum number of atoms ({})", MAX_ATOMS)]
TooManyAtoms,
#[error("invalid atom, length is {}, maximum length is {}", .0, MAX_ATOM_LENGTH)]
InvalidLength(usize),
#[error("tried to convert to an atom that doesn't exist")]
NonExistent,
#[error("invalid utf-8 bytes: {}", .0)]
InvalidString(#[from] Utf8Error),
}
impl Eq for AtomError {}
impl PartialEq for AtomError {
fn eq(&self, other: &AtomError) -> bool {
mem::discriminant(self) == mem::discriminant(other)
}
}
struct AtomTable {
next_id: usize,
ids: HashMap<&'static str, usize>,
names: HashMap<usize, &'static str>,
arena: DroplessArena,
}
impl AtomTable {
const DEFAULT_ATOMS: &'static [&'static str] = &["false", "true"];
fn new(names: &[&'static str]) -> Self {
let len = names.len();
let mut table = Self {
next_id: 0,
ids: HashMap::with_capacity(len),
names: HashMap::with_capacity(len),
arena: DroplessArena::default(),
};
let interned_names = &mut table.names;
let next_id = &mut table.next_id;
for name in names {
table.ids.entry(name).or_insert_with(|| {
let id = *next_id;
*next_id += 1;
interned_names.insert(id, name);
id
});
}
table
}
fn get_id(&self, name: &str) -> Option<usize> {
self.ids.get(name).cloned()
}
fn get_name(&self, id: usize) -> Option<&'static str> {
self.names.get(&id).cloned()
}
fn get_id_or_insert(&mut self, name: &str) -> Result<usize, AtomError> {
match self.get_id(name) {
Some(existing_id) => Ok(existing_id),
None => unsafe { self.insert(name) },
}
}
// SAFETY: See insert_static for the safety constraints
unsafe fn get_id_or_insert_static(&mut self, name: &'static str) -> Result<usize, AtomError> {
match self.get_id(name) {
Some(existing_id) => Ok(existing_id),
None => self.insert_static(name),
}
}
// SAFETY: You must ensure two things about the string passed to this function:
//
// * The string reference MUST have been derived from a CStr pointer. This is because
// we assume that the pointer the reference is based on can be safely treated as a pointer
// to a null-terminated string. If it can't, bad things will happen.
// * The string you pass to this function MUST be truly valid for static lifetime, or
// the behavior is undefined.
//
// This is intended to avoid wasting space on atoms which are already
// stored in the read-only atom section constructed by the linker. This data is always valid for
// the static lifetime, and so we can construct `&'static str` from them safely.
unsafe fn insert_static(&mut self, name: &'static str) -> Result<usize, AtomError> {
let id = self.next_id;
self.next_id += 1;
if id > MAX_ATOMS {
return Err(AtomError::TooManyAtoms);
}
self.ids.insert(name, id);
self.names.insert(id, name);
Ok(id)
}
// This function is used to insert new atoms in the table during runtime
// SAFETY: `name` must have been checked as not existing while holding the current mutable reference.
unsafe fn insert(&mut self, name: &str) -> Result<usize, AtomError> {
let id = self.next_id;
self.next_id += 1;
if id > MAX_ATOMS {
return Err(AtomError::TooManyAtoms);
}
let size = name.len();
let s = {
// Copy string into arena, add an extra byte to ensure the string is null-terminated
let layout = Layout::from_size_align_unchecked(size + 1, mem::align_of::<u8>());
let ptr = self.arena.alloc_raw(layout);
if size > 0 {
ptr::copy_nonoverlapping(name as *const _ as *const u8, ptr, size);
// Ensure the final byte is null
ptr.add(size).write(0);
} else {
// Ensure the final byte is null
ptr.write(0);
}
let bytes = slice::from_raw_parts(ptr, size);
str::from_utf8_unchecked(bytes)
};
// Push into id map
self.ids.insert(s, id);
self.names.insert(id, s);
Ok(id)
}
fn dump(&self) {
for (id, name) in self.names.iter() {
println!("atom(id = {}, value = '{}')", *id, name);
}
}
}
impl Default for AtomTable {
fn default() -> Self {
AtomTable::new(Self::DEFAULT_ATOMS)
}
}
/// This is safe to implement because the only usage is the ATOMS static, which is wrapped in an
/// `RwLock`, but it is _not_ `Sync` in general, so don't try and use it as such in other situations
unsafe impl Sync for AtomTable {}
#[derive(Debug, Error)]
#[error("atom ({0}) is not supported")]
pub struct TryAtomFromTermError(pub &'static str);
|
#[doc = "Reader of register M3FAR"]
pub type R = crate::R<u32, super::M3FAR>;
#[doc = "Writer for register M3FAR"]
pub type W = crate::W<u32, super::M3FAR>;
#[doc = "Register M3FAR `reset()`'s with value 0"]
impl crate::ResetValue for super::M3FAR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `FADD`"]
pub type FADD_R = crate::R<u32, u32>;
impl R {
#[doc = "Bits 0:31 - ECC failing address"]
#[inline(always)]
pub fn fadd(&self) -> FADD_R {
FADD_R::new((self.bits & 0xffff_ffff) as u32)
}
}
impl W {}
|
// Copyright (c) The Starcoin Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::executor::Executor;
use crate::TransactionExecutor;
use crypto::{hash::CryptoHash, HashValue};
// use logger::prelude::*;
use starcoin_accumulator::{Accumulator, MerkleAccumulator};
use starcoin_state_api::ChainState;
use types::error::BlockExecutorError;
use types::error::ExecutorResult;
use types::transaction::TransactionStatus;
use types::transaction::{Transaction, TransactionInfo};
#[derive(Clone)]
pub struct BlockExecutor {}
impl BlockExecutor {
/// Execute block transaction, update state to state_store, and apend accumulator , verify proof.
pub fn block_execute(
chain_state: &dyn ChainState,
accumulator: &MerkleAccumulator,
txns: Vec<Transaction>,
is_preview: bool,
) -> ExecutorResult<(HashValue, HashValue, Vec<TransactionInfo>)> {
let mut state_root = HashValue::zero();
let mut transaction_hash = vec![];
let mut vec_transaction_info = vec![];
for txn in txns {
let txn_hash = txn.crypto_hash();
let output = Executor::execute_transaction(chain_state, txn.clone())
.map_err(|_err| BlockExecutorError::BlockTransactionExecuteErr(txn_hash))?;
match output.status() {
TransactionStatus::Discard(status) => {
return Err(BlockExecutorError::BlockTransactionDiscard(
status.clone().into(),
txn_hash,
))
}
TransactionStatus::Keep(status) => {
//continue.
transaction_hash.push(txn_hash);
//TODO event root hash
vec_transaction_info.push(TransactionInfo::new(
txn.clone().id(),
state_root.clone(),
HashValue::zero(),
output.gas_used(),
status.major_status,
));
}
}
state_root = chain_state
.commit()
.map_err(|_err| BlockExecutorError::BlockChainStateCommitErr)
.unwrap();
}
let (accumulator_root, first_leaf_idx) = accumulator
.append(&transaction_hash)
.map_err(|_err| BlockExecutorError::BlockAccumulatorAppendErr)
.unwrap();
// transaction verify proof
if !is_preview {
transaction_hash.iter().enumerate().for_each(|(i, hash)| {
let leaf_index = first_leaf_idx + i as u64;
let proof = accumulator
.get_proof(leaf_index)
.map_err(|_err| BlockExecutorError::BlockAccumulatorGetProofErr)
.unwrap()
.unwrap();
proof
.verify(accumulator_root, *hash, leaf_index)
.map_err(|_err| {
BlockExecutorError::BlockAccumulatorVerifyErr(accumulator_root, leaf_index)
})
.unwrap();
});
chain_state
.flush()
.map_err(|_err| BlockExecutorError::BlockChainStateFlushErr)?;
}
Ok((accumulator_root, state_root, vec_transaction_info))
}
}
|
use std::collections::HashMap;
fn main() {
let mut mem : HashMap<u64, u64> = HashMap::new();
let mut mem2 : HashMap<u64, u64> = HashMap::new();
let mut mask : String = String::new();
for line in aoc::file_lines_iter("./day14.txt") {
let v : Vec<_> = line.split(" = ").collect();
if v[0].starts_with("mask") {
mask = v[1].to_string();
} else {
let lb = v[0].find("[").unwrap() + 1;
let rb = v[0].find("]").unwrap();
let addr = v[0].get(lb..rb).unwrap().parse::<u64>().unwrap();
let mut value = v[1].parse::<u64>().unwrap();
let value2 = value.clone();
let mut x_count = 0;
// Part 1
for i in (0..36).rev() {
match mask.as_bytes()[i] {
b'0' => value &= !(1 << (35 - i)),
b'1' => value |= 1 << (35 - i),
b'X' => x_count += 1,
_ => (),
}
}
mem.insert(addr, value);
// Part 2: enumerate all possible addresses
for mut x in 0..2_u64.pow(x_count) {
let mut final_addr = 0;
for i in (0..36).rev() {
match mask.as_bytes()[i] {
b'0' => final_addr |= addr & (1 << (35 - i)),
b'1' => final_addr |= 1 << (35 - i),
b'X' => {
final_addr |= (x & 1) << (35 - i);
x >>= 1;
}
_ => (),
}
}
mem2.insert(final_addr, value2);
}
}
}
let part1 : u64 = mem.values().sum();
println!("Part 1: {}", part1);
let part2 : u64 = mem2.values().sum();
println!("Part 2: {}", part2);
}
|
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;
extern crate approx;
pub use self::vector2::*;
pub use self::vector3::*;
pub use self::vector4::*;
pub use self::math::*;
mod traits;
mod math;
mod vector2;
mod vector3;
mod vector4; |
// auto generated, do not modify.
// created: Mon Feb 22 23:57:02 2016
// src-file: /QtWidgets/qfontcombobox.h
// dst-file: /src/widgets/qfontcombobox.rs
//
// header block begin =>
#![feature(libc)]
#![feature(core)]
#![feature(collections)]
extern crate libc;
use self::libc::*;
// <= header block end
// main block begin =>
// <= main block end
// use block begin =>
use super::qcombobox::*; // 773
use std::ops::Deref;
use super::super::core::qobjectdefs::*; // 771
use super::qwidget::*; // 773
use super::super::core::qsize::*; // 771
use super::super::gui::qfont::*; // 771
// <= use block end
// ext block begin =>
// #[link(name = "Qt5Core")]
// #[link(name = "Qt5Gui")]
// #[link(name = "Qt5Widgets")]
// #[link(name = "QtInline")]
extern {
fn QFontComboBox_Class_Size() -> c_int;
// proto: void QFontComboBox::~QFontComboBox();
fn C_ZN13QFontComboBoxD2Ev(qthis: u64 /* *mut c_void*/);
// proto: const QMetaObject * QFontComboBox::metaObject();
fn C_ZNK13QFontComboBox10metaObjectEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QFontComboBox::QFontComboBox(QWidget * parent);
fn C_ZN13QFontComboBoxC2EP7QWidget(arg0: *mut c_void) -> u64;
// proto: QSize QFontComboBox::sizeHint();
fn C_ZNK13QFontComboBox8sizeHintEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: QFont QFontComboBox::currentFont();
fn C_ZNK13QFontComboBox11currentFontEv(qthis: u64 /* *mut c_void*/) -> *mut c_void;
// proto: void QFontComboBox::setCurrentFont(const QFont & f);
fn C_ZN13QFontComboBox14setCurrentFontERK5QFont(qthis: u64 /* *mut c_void*/, arg0: *mut c_void);
fn QFontComboBox_SlotProxy_connect__ZN13QFontComboBox18currentFontChangedERK5QFont(qthis: *mut c_void, ffifptr: *mut c_void, rsfptr: *mut c_void);
} // <= ext block end
// body block begin =>
// class sizeof(QFontComboBox)=1
#[derive(Default)]
pub struct QFontComboBox {
qbase: QComboBox,
pub qclsinst: u64 /* *mut c_void*/,
pub _currentFontChanged: QFontComboBox_currentFontChanged_signal,
}
impl /*struct*/ QFontComboBox {
pub fn inheritFrom(qthis: u64 /* *mut c_void*/) -> QFontComboBox {
return QFontComboBox{qbase: QComboBox::inheritFrom(qthis), qclsinst: qthis, ..Default::default()};
}
}
impl Deref for QFontComboBox {
type Target = QComboBox;
fn deref(&self) -> &QComboBox {
return & self.qbase;
}
}
impl AsRef<QComboBox> for QFontComboBox {
fn as_ref(& self) -> & QComboBox {
return & self.qbase;
}
}
// proto: void QFontComboBox::~QFontComboBox();
impl /*struct*/ QFontComboBox {
pub fn free<RetType, T: QFontComboBox_free<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.free(self);
// return 1;
}
}
pub trait QFontComboBox_free<RetType> {
fn free(self , rsthis: & QFontComboBox) -> RetType;
}
// proto: void QFontComboBox::~QFontComboBox();
impl<'a> /*trait*/ QFontComboBox_free<()> for () {
fn free(self , rsthis: & QFontComboBox) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN13QFontComboBoxD2Ev()};
unsafe {C_ZN13QFontComboBoxD2Ev(rsthis.qclsinst)};
// return 1;
}
}
// proto: const QMetaObject * QFontComboBox::metaObject();
impl /*struct*/ QFontComboBox {
pub fn metaObject<RetType, T: QFontComboBox_metaObject<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.metaObject(self);
// return 1;
}
}
pub trait QFontComboBox_metaObject<RetType> {
fn metaObject(self , rsthis: & QFontComboBox) -> RetType;
}
// proto: const QMetaObject * QFontComboBox::metaObject();
impl<'a> /*trait*/ QFontComboBox_metaObject<QMetaObject> for () {
fn metaObject(self , rsthis: & QFontComboBox) -> QMetaObject {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK13QFontComboBox10metaObjectEv()};
let mut ret = unsafe {C_ZNK13QFontComboBox10metaObjectEv(rsthis.qclsinst)};
let mut ret1 = QMetaObject::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QFontComboBox::QFontComboBox(QWidget * parent);
impl /*struct*/ QFontComboBox {
pub fn new<T: QFontComboBox_new>(value: T) -> QFontComboBox {
let rsthis = value.new();
return rsthis;
// return 1;
}
}
pub trait QFontComboBox_new {
fn new(self) -> QFontComboBox;
}
// proto: void QFontComboBox::QFontComboBox(QWidget * parent);
impl<'a> /*trait*/ QFontComboBox_new for (Option<&'a QWidget>) {
fn new(self) -> QFontComboBox {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN13QFontComboBoxC2EP7QWidget()};
let ctysz: c_int = unsafe{QFontComboBox_Class_Size()};
let qthis_ph: u64 = unsafe{calloc(1, ctysz as usize)} as u64;
let arg0 = (if self.is_none() {0} else {self.unwrap().qclsinst}) as *mut c_void;
let qthis: u64 = unsafe {C_ZN13QFontComboBoxC2EP7QWidget(arg0)};
let rsthis = QFontComboBox{qbase: QComboBox::inheritFrom(qthis), qclsinst: qthis, ..Default::default()};
return rsthis;
// return 1;
}
}
// proto: QSize QFontComboBox::sizeHint();
impl /*struct*/ QFontComboBox {
pub fn sizeHint<RetType, T: QFontComboBox_sizeHint<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.sizeHint(self);
// return 1;
}
}
pub trait QFontComboBox_sizeHint<RetType> {
fn sizeHint(self , rsthis: & QFontComboBox) -> RetType;
}
// proto: QSize QFontComboBox::sizeHint();
impl<'a> /*trait*/ QFontComboBox_sizeHint<QSize> for () {
fn sizeHint(self , rsthis: & QFontComboBox) -> QSize {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK13QFontComboBox8sizeHintEv()};
let mut ret = unsafe {C_ZNK13QFontComboBox8sizeHintEv(rsthis.qclsinst)};
let mut ret1 = QSize::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: QFont QFontComboBox::currentFont();
impl /*struct*/ QFontComboBox {
pub fn currentFont<RetType, T: QFontComboBox_currentFont<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.currentFont(self);
// return 1;
}
}
pub trait QFontComboBox_currentFont<RetType> {
fn currentFont(self , rsthis: & QFontComboBox) -> RetType;
}
// proto: QFont QFontComboBox::currentFont();
impl<'a> /*trait*/ QFontComboBox_currentFont<QFont> for () {
fn currentFont(self , rsthis: & QFontComboBox) -> QFont {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZNK13QFontComboBox11currentFontEv()};
let mut ret = unsafe {C_ZNK13QFontComboBox11currentFontEv(rsthis.qclsinst)};
let mut ret1 = QFont::inheritFrom(ret as u64);
return ret1;
// return 1;
}
}
// proto: void QFontComboBox::setCurrentFont(const QFont & f);
impl /*struct*/ QFontComboBox {
pub fn setCurrentFont<RetType, T: QFontComboBox_setCurrentFont<RetType>>(& self, overload_args: T) -> RetType {
return overload_args.setCurrentFont(self);
// return 1;
}
}
pub trait QFontComboBox_setCurrentFont<RetType> {
fn setCurrentFont(self , rsthis: & QFontComboBox) -> RetType;
}
// proto: void QFontComboBox::setCurrentFont(const QFont & f);
impl<'a> /*trait*/ QFontComboBox_setCurrentFont<()> for (&'a QFont) {
fn setCurrentFont(self , rsthis: & QFontComboBox) -> () {
// let qthis: *mut c_void = unsafe{calloc(1, 32)};
// unsafe{_ZN13QFontComboBox14setCurrentFontERK5QFont()};
let arg0 = self.qclsinst as *mut c_void;
unsafe {C_ZN13QFontComboBox14setCurrentFontERK5QFont(rsthis.qclsinst, arg0)};
// return 1;
}
}
#[derive(Default)] // for QFontComboBox_currentFontChanged
pub struct QFontComboBox_currentFontChanged_signal{poi:u64}
impl /* struct */ QFontComboBox {
pub fn currentFontChanged(&self) -> QFontComboBox_currentFontChanged_signal {
return QFontComboBox_currentFontChanged_signal{poi:self.qclsinst};
}
}
impl /* struct */ QFontComboBox_currentFontChanged_signal {
pub fn connect<T: QFontComboBox_currentFontChanged_signal_connect>(self, overload_args: T) {
overload_args.connect(self);
}
}
pub trait QFontComboBox_currentFontChanged_signal_connect {
fn connect(self, sigthis: QFontComboBox_currentFontChanged_signal);
}
// currentFontChanged(const class QFont &)
extern fn QFontComboBox_currentFontChanged_signal_connect_cb_0(rsfptr:fn(QFont), arg0: *mut c_void) {
println!("{}:{}", file!(), line!());
let rsarg0 = QFont::inheritFrom(arg0 as u64);
rsfptr(rsarg0);
}
extern fn QFontComboBox_currentFontChanged_signal_connect_cb_box_0(rsfptr_raw:*mut Box<Fn(QFont)>, arg0: *mut c_void) {
println!("{}:{}", file!(), line!());
let rsfptr = unsafe{Box::from_raw(rsfptr_raw)};
let rsarg0 = QFont::inheritFrom(arg0 as u64);
// rsfptr(rsarg0);
unsafe{(*rsfptr_raw)(rsarg0)};
}
impl /* trait */ QFontComboBox_currentFontChanged_signal_connect for fn(QFont) {
fn connect(self, sigthis: QFontComboBox_currentFontChanged_signal) {
// do smth...
// self as u64; // error for Fn, Ok for fn
self as *mut c_void as u64;
self as *mut c_void;
let arg0 = sigthis.poi as *mut c_void;
let arg1 = QFontComboBox_currentFontChanged_signal_connect_cb_0 as *mut c_void;
let arg2 = self as *mut c_void;
unsafe {QFontComboBox_SlotProxy_connect__ZN13QFontComboBox18currentFontChangedERK5QFont(arg0, arg1, arg2)};
}
}
impl /* trait */ QFontComboBox_currentFontChanged_signal_connect for Box<Fn(QFont)> {
fn connect(self, sigthis: QFontComboBox_currentFontChanged_signal) {
// do smth...
// Box::into_raw(self) as u64;
// Box::into_raw(self) as *mut c_void;
let arg0 = sigthis.poi as *mut c_void;
let arg1 = QFontComboBox_currentFontChanged_signal_connect_cb_box_0 as *mut c_void;
let arg2 = Box::into_raw(Box::new(self)) as *mut c_void;
unsafe {QFontComboBox_SlotProxy_connect__ZN13QFontComboBox18currentFontChangedERK5QFont(arg0, arg1, arg2)};
}
}
// <= body block end
|
mod kinds_src;
use crate::utils;
use kinds_src::KindsSrc;
use std::path::Path;
use eyre::Result;
use xshell::{read_file, write_file};
pub fn run() -> Result<()> {
let kinds_src = KindsSrc::get()?;
let syntax_kinds_file =
utils::project_root().join("crates/parser/src/syntax_kind/generated.rs");
let syntax_kinds = kinds_src.gen_syntax_kinds()?;
update(syntax_kinds_file.as_path(), &syntax_kinds)?;
Ok(())
}
/// A helper to update file on disk if it has changed.
/// With verify = false,
fn update(path: &Path, contents: &str) -> Result<()> {
fn normalize(s: &str) -> String {
s.replace("\r\n", "\n")
}
match read_file(path) {
Ok(old_contents) if normalize(&old_contents) == normalize(contents) => {
return Ok(());
}
_ => (),
}
eprintln!("updating {}", path.display());
write_file(path, contents)?;
Ok(())
}
|
use crate::{
data::{api_key::ApiKey, error::ErrorCode},
KafkaRequest, KafkaResponse,
};
use rskafka_wire_format::prelude::*;
#[derive(Debug, Clone, Eq, PartialEq, Hash, WireFormatWrite)]
pub struct CreateTopic {
pub name: String,
pub partitions: i32,
pub replication_factor: i16,
pub assignments: Vec<TopicAssignment>,
pub configs: Vec<TopicConfig>,
}
#[derive(Debug, Clone, Eq, PartialEq, Hash, WireFormatWrite)]
pub struct TopicAssignment {
partition: i32,
broker_ids: Vec<i32>,
}
#[derive(Debug, Clone, Eq, PartialEq, Hash, WireFormatWrite)]
pub struct TopicConfig {
name: String,
value: NullableString<'static>,
}
impl CreateTopic {
pub fn with_name<S: AsRef<str>>(value: S) -> Self {
CreateTopic {
name: value.as_ref().to_string(),
partitions: 1,
replication_factor: 1,
assignments: Vec::new(),
configs: Vec::new(),
}
}
pub fn partitions(mut self, value: i32) -> Self {
self.partitions = value;
self
}
pub fn replication_factor(mut self, value: i16) -> Self {
self.replication_factor = value;
self
}
//TODO: assignments
//TODO: configs
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, WireFormatWrite)]
pub struct CreateTopicsRequestV1 {
pub topics: Vec<CreateTopic>,
pub timeout_ms: i32,
pub validate_only: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, WireFormatParse)]
pub struct CreateTopicsResponseV1 {
pub topics: Vec<CreateTopicResponse>,
}
impl KafkaResponse for CreateTopicsResponseV1 {}
#[derive(Debug, Clone, PartialEq, Eq, Hash, WireFormatParse)]
pub struct CreateTopicResponse {
pub name: String,
pub error_code: ErrorCode,
pub error_message: NullableString<'static>,
}
impl KafkaRequest for CreateTopicsRequestV1 {
const API_KEY: ApiKey = ApiKey::CreateTopics;
const API_VERSION: i16 = 1;
type Response = CreateTopicsResponseV1;
}
|
#[allow(dead_code)]
#[derive(Debug, Clone, Copy)]
pub enum Operation {
///Operation I/O.
Read = 0x0A,
Write = 0x0B,
///Operation load & store of data.
Load = 0x14,
Store = 0x15,
///Operation arithmetic.
Add = 0x1E,
Sub = 0x1F,
Div = 0x20,
Mul = 0x21,
///Operation of control transfer.
Jump = 0x28,
JumpNeg = 0x29,
JumpZero = 0x2A,
Stop = 0x2B
}
|
#[allow(dead_code)]
pub struct StatusEffects {
effects: Vec<StatusEffect>,
}
#[allow(dead_code)]
pub enum StatusEffect {
MoveSpeed(f32),
AttackSpeed(f32),
DamageMod(f32),
Stun(f32),
Suppression(f32),
}
|
use crate::vec3::Point3;
use crate::ray::Ray;
// axis-aligned bounding boxes
#[derive(Clone)]
pub struct AABB {
pub min: Point3,
pub max: Point3,
}
impl AABB {
pub fn new(a: Point3, b: Point3) -> Self {
AABB {
min: a,
max: b,
}
}
pub fn hit(&self, r: &Ray, tmin: f32, tmax: f32) -> bool {
for a in 0..3 {
// TODO check float NaN & Infinit later
let inv_d = 1. / r.direction[a];
let mut t0 = (self.min[a] - r.origin[a]) / inv_d;
let mut t1 = (self.max[a] - r.origin[a]) / inv_d;
if inv_d < 0. {
std::mem::swap(&mut t0, &mut t1);
}
let tmin = if t0 > tmin { t0 } else { tmin };
let tmax = if t1 > tmax { t1 } else { tmax };
if tmax <= tmin {
return false;
}
}
return true;
}
}
pub fn surrounding_box(box0: &AABB, box1: &AABB) -> AABB {
let small = Point3::new(box0.min.x.min(box1.min.x),
box0.min.y.min(box1.min.y),
box0.min.z.min(box1.min.z));
let big = Point3::new(box0.max.x.max(box1.max.x),
box0.max.y.max(box1.max.y),
box0.max.z.max(box1.max.z));
AABB::new(small, big)
}
|
use log::{debug, info};
use serde::de;
use serde_backtrace::serde_backtrace;
use serde_titan_quest::arc;
use std::{fs::File, io::BufReader, path::Path};
use test_case::test_case;
fn read_arc(path: impl AsRef<Path>) {
stderrlog::new().verbosity(3).init().ok();
let _: () = serde_backtrace(
arc::from_read_seek_seed(
&mut BufReader::new(File::open(&path).unwrap()),
serde_backtrace::Seed(Seed(path)),
)
.unwrap(),
);
}
#[test_case("Creatures.arc")]
#[test_case("Effects.arc")]
#[test_case("Fonts.arc")]
#[test_case("InGameUI.arc")]
#[test_case("Items.arc")]
#[test_case("Levels.arc")]
#[test_case("Lights.arc")]
#[test_case("Menu.arc")]
#[test_case("OutGameElements.arc")]
#[test_case("Particles.arc")]
#[test_case("Quests.arc")]
#[test_case("SceneryBabylon.arc")]
#[test_case("SceneryEgypt.arc")]
#[test_case("SceneryGreece.arc")]
#[test_case("SceneryOlympus.arc")]
#[test_case("SceneryOrient.arc")]
#[test_case("Shaders.arc")]
#[test_case("System.arc")]
#[test_case("TerrainTextures.arc")]
#[test_case("UI.arc")]
#[test_case("Underground.arc")]
#[test_case("../Audio/Dialog.arc")]
#[test_case("../Audio/Music.arc")]
#[test_case("../Audio/Sounds.arc")]
#[ignore = "requires Titan Quest to be installed"]
fn legacy(path: impl AsRef<Path>) {
read_arc(
Path::new(r"C:\Program Files (x86)\Steam\steamapps\common\Titan Quest\Resources")
.join(path),
);
}
#[test]
fn dbg() {
read_arc(r"C:\Program Files (x86)\Steam\steamapps\common\Titan Quest\Resources\Creatures.arc")
}
#[test_case("Creatures.arc")]
#[test_case("Effects.arc")]
#[test_case("Fonts.arc")]
#[test_case("InGameUI.arc")]
#[test_case("Items.arc")]
#[test_case("Levels.arc")]
#[test_case("Lights.arc")]
#[test_case("Menu.arc")]
#[test_case("Music.arc")]
// etc
#[ignore = "requires Titan Quest Anniversary Edition to be installed"]
fn anniversary_edition(path: impl AsRef<Path>) {
read_arc(
Path::new(
r"C:\Program Files (x86)\Steam\steamapps\common\Titan Quest Anniversary Edition\Resources\",
)
.join(path),
);
}
struct Seed<P>(P);
impl<'de, P> de::DeserializeSeed<'de> for Seed<P> {
type Value = ();
fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_map(Visitor(self.0))
}
}
struct Visitor<P>(P);
impl<'de, P> de::Visitor<'de> for Visitor<P> {
type Value = ();
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(formatter, "ARC map")
}
fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
where
A: de::MapAccess<'de>,
{
while let Some(k) = map.next_key()? {
let k: String = k;
let data: Vec<u8> = map.next_value()?;
if data.is_empty() {
info!("{:?} ({} bytes)", k, data.len());
} else {
debug!("{:?} ({} bytes)", k, data.len());
}
}
Ok(())
}
}
|
pub mod api_versions;
pub mod create_topics;
pub mod fetch;
pub mod find_coordinator;
pub mod join_group;
pub mod metadata;
pub mod offset_fetch;
pub mod sync_group;
|
use super::{pack, unpack, Action, State};
use vte_generate_state_changes::generate_state_changes;
#[test]
fn table() {
let mut content = vec![];
generate_table(&mut content).unwrap();
let content = String::from_utf8(content).unwrap();
let content = codegenrs::rustfmt(&content, None).unwrap();
snapbox::assert_eq_path("./src/state/table.rs", content);
}
#[allow(clippy::write_literal)]
fn generate_table(file: &mut impl std::io::Write) -> std::io::Result<()> {
writeln!(
file,
"// This file is @generated by {}",
file!().replace('\\', "/")
)?;
writeln!(file)?;
writeln!(
file,
"{}",
r#"#[rustfmt::skip]
pub(crate) const STATE_CHANGES: [[u8; 256]; 16] = ["#
)?;
for (state, entries) in STATE_CHANGES.iter().enumerate() {
writeln!(file, " // {:?}", State::try_from(state as u8).unwrap())?;
write!(file, " [")?;
let mut last_entry = None;
for packed in entries {
let (next_state, action) = unpack(*packed);
if last_entry != Some(packed) {
writeln!(file)?;
writeln!(file, " // {:?} {:?}", next_state, action)?;
write!(file, " ")?;
}
write!(file, "0x{:0>2x}, ", packed)?;
last_entry = Some(packed);
}
writeln!(file)?;
writeln!(file, " ],")?;
}
writeln!(file, "{}", r#"];"#)?;
Ok(())
}
/// This is the state change table. It's indexed first by current state and then by the next
/// character in the pty stream.
pub static STATE_CHANGES: [[u8; 256]; 16] = state_changes();
generate_state_changes!(state_changes, {
Anywhere {
0x18 => (Ground, Execute),
0x1a => (Ground, Execute),
0x1b => (Escape, Nop),
},
Ground {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x20..=0x7f => (Anywhere, Print),
0x80..=0x8f => (Anywhere, Execute),
0x91..=0x9a => (Anywhere, Execute),
0x9c => (Anywhere, Execute),
// Beginning of UTF-8 2 byte sequence
0xc2..=0xdf => (Utf8, BeginUtf8),
// Beginning of UTF-8 3 byte sequence
0xe0..=0xef => (Utf8, BeginUtf8),
// Beginning of UTF-8 4 byte sequence
0xf0..=0xf4 => (Utf8, BeginUtf8),
},
Escape {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x7f => (Anywhere, Ignore),
0x20..=0x2f => (EscapeIntermediate, Collect),
0x30..=0x4f => (Ground, EscDispatch),
0x51..=0x57 => (Ground, EscDispatch),
0x59 => (Ground, EscDispatch),
0x5a => (Ground, EscDispatch),
0x5c => (Ground, EscDispatch),
0x60..=0x7e => (Ground, EscDispatch),
0x5b => (CsiEntry, Nop),
0x5d => (OscString, Nop),
0x50 => (DcsEntry, Nop),
0x58 => (SosPmApcString, Nop),
0x5e => (SosPmApcString, Nop),
0x5f => (SosPmApcString, Nop),
},
EscapeIntermediate {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x20..=0x2f => (Anywhere, Collect),
0x7f => (Anywhere, Ignore),
0x30..=0x7e => (Ground, EscDispatch),
},
CsiEntry {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x7f => (Anywhere, Ignore),
0x20..=0x2f => (CsiIntermediate, Collect),
0x30..=0x39 => (CsiParam, Param),
0x3a..=0x3b => (CsiParam, Param),
0x3c..=0x3f => (CsiParam, Collect),
0x40..=0x7e => (Ground, CsiDispatch),
},
CsiIgnore {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x20..=0x3f => (Anywhere, Ignore),
0x7f => (Anywhere, Ignore),
0x40..=0x7e => (Ground, Nop),
},
CsiParam {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x30..=0x39 => (Anywhere, Param),
0x3a..=0x3b => (Anywhere, Param),
0x7f => (Anywhere, Ignore),
0x3c..=0x3f => (CsiIgnore, Nop),
0x20..=0x2f => (CsiIntermediate, Collect),
0x40..=0x7e => (Ground, CsiDispatch),
},
CsiIntermediate {
0x00..=0x17 => (Anywhere, Execute),
0x19 => (Anywhere, Execute),
0x1c..=0x1f => (Anywhere, Execute),
0x20..=0x2f => (Anywhere, Collect),
0x7f => (Anywhere, Ignore),
0x30..=0x3f => (CsiIgnore, Nop),
0x40..=0x7e => (Ground, CsiDispatch),
},
DcsEntry {
0x00..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x7f => (Anywhere, Ignore),
0x20..=0x2f => (DcsIntermediate, Collect),
0x30..=0x39 => (DcsParam, Param),
0x3a..=0x3b => (DcsParam, Param),
0x3c..=0x3f => (DcsParam, Collect),
0x40..=0x7e => (DcsPassthrough, Nop),
},
DcsIntermediate {
0x00..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x20..=0x2f => (Anywhere, Collect),
0x7f => (Anywhere, Ignore),
0x30..=0x3f => (DcsIgnore, Nop),
0x40..=0x7e => (DcsPassthrough, Nop),
},
DcsIgnore {
0x00..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x20..=0x7f => (Anywhere, Ignore),
0x9c => (Ground, Nop),
},
DcsParam {
0x00..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x30..=0x39 => (Anywhere, Param),
0x3a..=0x3b => (Anywhere, Param),
0x7f => (Anywhere, Ignore),
0x3c..=0x3f => (DcsIgnore, Nop),
0x20..=0x2f => (DcsIntermediate, Collect),
0x40..=0x7e => (DcsPassthrough, Nop),
},
DcsPassthrough {
0x00..=0x17 => (Anywhere, Put),
0x19 => (Anywhere, Put),
0x1c..=0x1f => (Anywhere, Put),
0x20..=0x7e => (Anywhere, Put),
0x7f => (Anywhere, Ignore),
0x9c => (Ground, Nop),
},
SosPmApcString {
0x00..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x20..=0x7f => (Anywhere, Ignore),
0x9c => (Ground, Nop),
},
OscString {
0x00..=0x06 => (Anywhere, Ignore),
0x07 => (Ground, Nop),
0x08..=0x17 => (Anywhere, Ignore),
0x19 => (Anywhere, Ignore),
0x1c..=0x1f => (Anywhere, Ignore),
0x20..=0xff => (Anywhere, OscPut),
}
});
|
extern crate chrono;
extern crate dotenv;
extern crate slack;
extern crate termion;
extern crate tui;
#[macro_use]
extern crate failure;
/// Contains stateful components - parts of the app.
///
/// Should depend on `models` as components usually need to contain state.
mod components;
/// Contains data conversion and loading classes. (Loading data from Slack, for example)
///
/// Should depend on `models` as they should be the results of loading data.
mod data;
/// Contains structs storing data to keep track of state.
///
/// Should not depend on other modules, unless some very special cases.
mod models;
/// Contains rendering code to render things to the terminal.
///
/// Usually depend on `components` and `models`.
mod widgets;
/// Helpful functions, mostly related to errors.
mod util;
use failure::{Error, Fail, ResultExt};
use tui::backend::MouseBackend;
use tui::Terminal;
pub type TerminalBackend = Terminal<MouseBackend>;
fn main() {
dotenv::dotenv().ok();
let mut terminal = match MouseBackend::new().and_then(|backend| Terminal::new(backend)) {
Ok(val) => val,
Err(error) => {
util::print_error_and_exit(error.context("Cannot set up terminal backend").into())
}
};
match main_with_result(&mut terminal) {
Ok(_) => {}
Err(error) => {
let _ = terminal.show_cursor();
let _ = terminal.clear();
drop(terminal);
util::print_error_and_exit(error.into());
}
}
}
fn main_with_result(terminal: &mut TerminalBackend) -> Result<(), Error> {
let slack_api_token = ::std::env::var("SLACK_API_TOKEN")
.context("Could not read SLACK_API_TOKEN environment variable")?;
let rtm = slack::RtmClient::login(&slack_api_token).context("Could not log in to Slack")?;
let app_state = data::build_app_state(rtm.start_response())?;
let loader = data::loader::Loader::create(&slack_api_token)?;
let selected_channel_id = app_state.selected_channel_id.clone();
let mut app = components::App::new(app_state, loader, terminal.size()?);
// Start to pre-load some history to get time-to-initial-render down.
app.async_load_channel_history(&selected_channel_id)?;
// Let app take over terminal and start main event loops.
terminal.clear()?;
terminal.hide_cursor()?;
let result = components::event_loop::run(&mut app, rtm, terminal);
terminal.show_cursor().ok();
terminal.clear().ok();
result
}
|
fn takes_slice(slice: &str)
{
println!("Got: {}", slice);
}
fn indexing() {
let hachiko = "忠犬ハチ公";
for b in hachiko.as_bytes() {
print!("{}, ", b);
}
println!("");
for c in hachiko.chars() {
print!("{}, ", c);
}
println!("");
let dog = hachiko.chars().nth(1);
// print!("dog is {}", dog);
}
fn concatenation() {
let hello = "Hello ".to_string();
let world = "world!";
let hello_world = hello + world;
let world_string = "world!".to_string();
let hello_world_string = hello + &world;
}
fn main() {
let mut s = "Hello".to_string();
println!("{}", s);
takes_slice(&s);
s.push_str(", world.");
println!("{}", s);
indexing();
concatenation();
}
|
#![feature(never_type)]
fn f() -> Result<usize, !> {
Ok(0)
}
fn main() {
println!("{}", f().unwrap());
}
|
use std::rc::Rc;
use ash::vk;
use gpu_allocator::vulkan::Allocation;
use super::{allocator::Allocator, error::GraphicsResult, uploader::Uploader};
/// The filtering mode with which a [`Texture2D`] should be sampled.
pub enum TextureFilterMode {
/// Take the average of the surrounding texels
Linear,
// Take the texel nearest to the UV coords
Nearest,
}
/// Manages a 2D Texture.
///
/// A Texture2D will always be in R8G8B8A8 format.
pub struct Texture2D {
allocator: Rc<Allocator>,
device: Rc<ash::Device>,
image: vk::Image,
alloc: Allocation,
/// The [`vk::ImageView`] that can be used to refer to this [`Texture2D`].
pub(crate) view: vk::ImageView,
pub width: u32,
pub height: u32,
/// The [`vk::Sampler`] that can be used to sample from this [`Texture2D`].
pub(crate) sampler: vk::Sampler,
}
impl Texture2D {
/// Creates a new [`Texture2D`].
///
/// # Parameters
/// - `pixels`: A `width` * `height` * 4 slice of u8. A group of 4 bytes is a single pixel.
/// The slice must be in row major memory order and tightly packed.
/// The row with UV (xx, 0.0) is the first one in the buffer.
pub fn new(
width: u32,
height: u32,
pixels: &[u8],
filter: TextureFilterMode,
allocator: Rc<Allocator>,
uploader: &mut Uploader,
device: Rc<ash::Device>,
) -> GraphicsResult<Rc<Texture2D>> {
let (image, alloc) = allocator.create_image(
width,
height,
vk::Format::R8G8B8A8_SRGB,
vk::ImageUsageFlags::TRANSFER_DST | vk::ImageUsageFlags::SAMPLED,
gpu_allocator::MemoryLocation::GpuOnly,
)?;
uploader.enqueue_image_upload(
image,
vk::ImageLayout::SHADER_READ_ONLY_OPTIMAL,
width,
height,
pixels,
);
let view_info = vk::ImageViewCreateInfo::builder()
.image(image)
.view_type(vk::ImageViewType::TYPE_2D)
.format(vk::Format::R8G8B8A8_SRGB)
.components(vk::ComponentMapping {
r: vk::ComponentSwizzle::IDENTITY,
g: vk::ComponentSwizzle::IDENTITY,
b: vk::ComponentSwizzle::IDENTITY,
a: vk::ComponentSwizzle::IDENTITY,
})
.subresource_range(vk::ImageSubresourceRange {
aspect_mask: vk::ImageAspectFlags::COLOR,
base_mip_level: 0,
level_count: 1,
base_array_layer: 0,
layer_count: 1,
})
.build();
let view = unsafe { device.create_image_view(&view_info, None) }.unwrap();
let vk_filter = match filter {
TextureFilterMode::Linear => vk::Filter::LINEAR,
TextureFilterMode::Nearest => vk::Filter::NEAREST,
};
let sampler_info = vk::SamplerCreateInfo::builder()
.mag_filter(vk_filter)
.min_filter(vk_filter)
.mipmap_mode(vk::SamplerMipmapMode::NEAREST)
.address_mode_u(vk::SamplerAddressMode::REPEAT)
.address_mode_v(vk::SamplerAddressMode::REPEAT)
.address_mode_w(vk::SamplerAddressMode::REPEAT)
.mip_lod_bias(0.0)
.anisotropy_enable(false)
.compare_enable(false)
.min_lod(0.0)
.max_lod(vk::LOD_CLAMP_NONE)
.unnormalized_coordinates(false)
.build();
let sampler = unsafe { device.create_sampler(&sampler_info, None) }.unwrap();
Ok(Rc::new(Texture2D {
allocator,
device,
image,
alloc,
view,
width,
height,
sampler,
}))
}
}
impl Drop for Texture2D {
fn drop(&mut self) {
unsafe {
self.device.destroy_sampler(self.sampler, None);
self.device.destroy_image_view(self.view, None);
}
self.allocator.destroy_image(self.image, self.alloc.clone());
}
}
|
/// Implements a broadcast-listener / callback / observable pattern.
///
/// `Signal` holds a list of subscriptions, each with a callback closure to run
/// on the next broadcast.
///
/// As `rt-graph` uses GTK, the terminology (`Signal` struct and its method names) match
/// GTK's terms.
pub struct Signal<T: Clone> {
subs: Vec<Subscription<T>>,
new_id: usize,
}
struct Subscription<T> {
id: SubscriptionId,
callback: Box<dyn Fn(T)>,
}
/// The identifier for a subscription, used to disconnect it when no longer required.
#[derive(Clone, Copy, Eq, PartialEq)]
pub struct SubscriptionId(usize);
impl<T: Clone> Signal<T> {
/// Construct a new `Signal`.
pub fn new() -> Signal<T> {
Signal {
subs: Vec::with_capacity(0),
new_id: 0,
}
}
/// Connect a new subscriber that will receive callbacks when the
/// signal is raised.
///
/// Returns a SubscriptionId to disconnect the subscription when
/// no longer required.
pub fn connect<F>(&mut self, callback: F) -> SubscriptionId
where F: (Fn(T)) + 'static
{
let id = SubscriptionId(self.new_id);
self.new_id = self.new_id.checked_add(1).expect("No overflow");
self.subs.push(Subscription {
id,
callback: Box::new(callback),
});
self.subs.shrink_to_fit();
id
}
/// Notify existing subscribers.
pub fn raise(&self, value: T) {
for sub in self.subs.iter() {
(sub.callback)(value.clone())
}
}
/// Disconnect an existing subscription.
pub fn disconnect(&mut self, id: SubscriptionId) {
self.subs.retain(|sub| sub.id != id);
self.subs.shrink_to_fit();
}
}
#[cfg(test)]
mod test {
use crate::Signal;
use std::{cell::Cell, rc::Rc};
#[test]
fn signal() {
let mut sig = Signal::new();
let data: Rc<Cell<u32>> = Rc::new(Cell::new(0));
assert_eq!(data.get(), 0);
let dc = data.clone();
let subid = sig.connect(move |v| {
dc.set(dc.get() + v);
});
assert_eq!(data.get(), 0);
sig.raise(1);
assert_eq!(data.get(), 1);
sig.raise(2);
assert_eq!(data.get(), 3);
sig.disconnect(subid);
sig.raise(0);
assert_eq!(data.get(), 3);
}
#[test]
fn signal_multiple_subscriptions() {
let mut sig = Signal::new();
let data: Rc<Cell<u32>> = Rc::new(Cell::new(0));
assert_eq!(data.get(), 0);
let dc = data.clone();
let sub1 = sig.connect(move |_v| {
dc.set(dc.get() + 1);
});
let dc = data.clone();
let sub2 = sig.connect(move |_v| {
dc.set(dc.get() + 10);
});
sig.raise(0);
assert_eq!(data.get(), 11);
sig.disconnect(sub1);
sig.raise(0);
assert_eq!(data.get(), 21);
sig.disconnect(sub2);
sig.raise(0);
sig.raise(0);
assert_eq!(data.get(), 21);
}
}
|
use crate::blocks::Extension;
use eosio_cdt::eos::{
Checksum256, Deserialize, Name, Serialize, Signature, TimePointSec, Varuint32,
};
#[derive(Debug, Serialize, Deserialize)]
pub enum Traces {
TransactionTrace(TransactionTraceV0),
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TransactionTraceV0 {
pub id: Checksum256,
pub status: u8,
pub cpu_usage_us: u32,
pub net_usage_words: Varuint32,
pub elapsed: i64,
pub net_usage: u64,
pub scheduled: bool,
pub action_traces: Vec<ActionTraceV0>,
// pub account_ram_delta: Option<AccountDelta>,
// pub except: Option<String>,
// pub error_code: Option<u64>,
// pub failed_dtrx_trace: Option<Box<TransactionTraceV0>>,
// pub partial: Option<PartialTransactionV0>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PartialTransactionV0 {
pub expiration: TimePointSec,
pub ref_block_num: u16,
pub ref_block_prefix: u32,
pub max_net_usage_words: Varuint32,
pub max_cpu_usage_ms: u8,
pub delay_sec: Varuint32,
pub transaction_extensions: Vec<Extension>,
pub signatures: Vec<Signature>,
pub context_free_data: Vec<u8>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TransactionReceiptHeader {
pub status: u8,
pub cpu_usage_us: u32,
pub net_usage_words: u32,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PackedTransaction {
signatures: Vec<Signature>,
compression: u8,
packed_context_free_data: Vec<u8>,
packed_trx: Vec<u8>,
}
#[derive(Debug, Serialize, Deserialize)]
pub enum TransactionVariant {
TransactionId(Checksum256),
PackedTransaction(PackedTransaction),
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TransactionReceipt {
pub transaction_receipt_header: TransactionReceiptHeader,
pub trx: TransactionVariant,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ActionTraceV0 {
pub action_ordinal: Varuint32,
pub creator_action_ordinal: Varuint32,
pub receipt: Option<ActionReceipt>,
pub receiver: Name,
pub act: Action,
// pub context_free: bool,
// pub elapsed: i64,
// pub console: String,
// pub account_ram_deltas: Vec<AccountDelta>,
// pub except: Option<String>,
// pub error_code: Option<u64>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ActionReceipt {
pub receiver: Name,
pub act_digest: Checksum256,
pub global_sequence: u64,
pub recv_sequence: u64,
pub auth_sequence: Vec<AccountAuthSequence>,
pub code_sequence: Varuint32,
pub abi_sequence: Varuint32,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct AccountAuthSequence {
pub account: Name,
pub sequence: u64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Action {
pub account: Name,
pub name: Name,
// pub authorization: Vec<PermissionLevel>,
// pub data: Vec<u8>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct AccountDelta {
pub account: Name,
pub delta: i64,
}
|
extern crate rand;
use std::fs;
use std::io::Read;
use std::os;
use gpu;
use keyboard;
const FONTSET: [u8; 80] =
[
0xF0, 0x90, 0x90, 0x90, 0xF0, // 0
0x20, 0x60, 0x20, 0x20, 0x70, // 1
0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2
0xF0, 0x10, 0xF0, 0x10, 0xF0, // 3
0x90, 0x90, 0xF0, 0x10, 0x10, // 4
0xF0, 0x80, 0xF0, 0x10, 0xF0, // 5
0xF0, 0x80, 0xF0, 0x90, 0xF0, // 6
0xF0, 0x10, 0x20, 0x40, 0x40, // 7
0xF0, 0x90, 0xF0, 0x90, 0xF0, // 8
0xF0, 0x90, 0xF0, 0x10, 0xF0, // 9
0xF0, 0x90, 0xF0, 0x90, 0x90, // A
0xE0, 0x90, 0xE0, 0x90, 0xE0, // B
0xF0, 0x80, 0x80, 0x80, 0xF0, // C
0xE0, 0x90, 0x90, 0x90, 0xE0, // D
0xF0, 0x80, 0xF0, 0x80, 0xF0, // E
0xF0, 0x80, 0xF0, 0x80, 0x80 // F
];
const RAM_SIZE: usize = 4096;
const ROM_START: usize = 512;
const MAX_ROM_SIZE: usize = RAM_SIZE - ROM_START;
pub struct Cpu<'a> {
memory: [u8; RAM_SIZE],
v: [u8; 16],
delay_timer: u8,
sound_timer: u8,
stack: [u16; 16],
sp: usize,
i: usize,
pc: u16,
opcode: u16,
rom: Vec<u8>,
pub display: gpu::Gpu<'a>,
pub input: keyboard::Input
}
impl<'a> Cpu<'a> {
pub fn new() -> Self {
let mut cpu = Cpu {
memory: [0; RAM_SIZE],
v: [0; 16],
delay_timer: 0,
sound_timer: 0,
stack: [0; 16],
sp: 0,
i: 0x200,
pc: 0x200,
opcode: 0,
rom: Vec::with_capacity(MAX_ROM_SIZE),
display: gpu::Gpu::new("Rust 8: A Chip 8 emulator in Rust 0.0.1"),
input: keyboard::Input::new()
};
let mut i = 0;
for j in 0..FONTSET.len() {
cpu.memory[i] = FONTSET[i];
i += 1;
}
cpu
}
// Load the Chip 8 roms into the emulator
pub fn load_rom(&mut self, rom: Vec<u8>) {
if rom.len() > MAX_ROM_SIZE {
panic!("Rom is too large to fit into memory, {}", rom.len());
}
println!("Loaded ROM of size: {}", &rom.len());
self.rom = rom;
for i in 0..self.rom.len() {
self.memory[ROM_START + i] = self.rom[i];
}
}
// Preform a single fetch, decode and execute opcode cycle
pub fn preform_cycle(&mut self) {
if self.delay_timer > 0 { self.delay_timer -= 1; }
if self.sound_timer > 0 { self.sound_timer -= 1; }
self.fetch_opcode();
self.decode_execute_opcode();
}
fn fetch_opcode(&mut self) {
let high_byte = self.memory[self.pc as usize];
let low_byte = self.memory[self.pc as usize + 1];
self.opcode = (high_byte as u16) << 8 | low_byte as u16;
}
fn decode_execute_opcode(&mut self) {
match self.opcode & 0xf000 {
0x0000 => self.op_0xxx(),
0x1000 => self.op_1xxx(),
0x2000 => self.op_2xxx(),
0x3000 => self.op_3xxx(),
0x4000 => self.op_4xxx(),
0x5000 => self.op_5xxx(),
0x6000 => self.op_6xxx(),
0x7000 => self.op_7xxx(),
0x8000 => self.op_8xxx(),
0x9000 => self.op_9xxx(),
0xA000 => self.op_axxx(),
0xB000 => self.op_bxxx(),
0xC000 => self.op_cxxx(),
0xD000 => self.op_dxxx(),
0xE000 => self.op_exxx(),
0xF000 => self.op_fxxx(),
_ => panic!("Unhandled instruction: {:08x}", self.pc)
}
}
fn op_0nnn(&self) -> u16 { self.opcode & 0x0FFF }
fn op_0nn(&self) -> u8 { (self.opcode & 0x00FF) as u8 }
fn op_0n(&self) -> u8 { (self.opcode & 0x000F) as u8}
fn op_x(&self) -> usize { ((self.opcode & 0x0F00) >> 8) as usize }
fn op_y(&self) -> usize { ((self.opcode & 0x00F0) >> 4) as usize }
fn wait_for_keypress(&mut self) {
for i in 0u8..16 {
if self.input.pressed(i as usize) {
self.v[self.op_x()] = i;
break;
}
}
self.pc += 2;
}
fn op_0xxx(&mut self) {
match self.opcode & 0x000F {
0x0000 => self.display.clear(),
0x00EE => {
self.sp -= 1;
self.pc = self.stack[self.sp];
},
_ => panic!("Unhandled opcode: {:#08x}", self.opcode)
}
self.pc += 2;
}
// Jump to location nnn
fn op_1xxx(&mut self) {
self.pc = self.op_0nnn();
}
// Call subroutine at nnn
fn op_2xxx(&mut self) {
self.stack[self.sp] = self.pc as u16;
self.sp += 1;
self.pc = self.op_0nnn();
}
// Skip next instruction if Vx = kk
fn op_3xxx(&mut self) {
self.pc = if self.v[self.op_x()] == self.op_0nn() { 4 } else { 2 }
}
// Skip next instruction if Vx != kk
fn op_4xxx(&mut self) {
self.pc = if self.v[self.op_x()] != self.op_0nn() { 4 } else { 2 }
}
// Skip next instruction if Vx = Vy
fn op_5xxx(&mut self) {
self.pc += if self.v[self.op_x()] == self.v[self.op_y()] { 4 } else { 2 }
}
// The interpreter puts the value kk into register Vx
fn op_6xxx(&mut self) {
self.v[self.op_x()] = self.op_0nn();
self.pc += 2;
}
// Set Vx = Vx + kk
fn op_7xxx(&mut self) {
self.v[self.op_x()] += self.op_0nn();
self.pc += 2;
}
fn op_8xxx(&mut self) {
match self.opcode & 0x000F {
0 => self.v[self.op_x()] = self.v[self.op_y()],
1 => self.v[self.op_x()] |= self.v[self.op_y()],
2 => self.v[self.op_x()] &= self.v[self.op_y()],
3 => self.v[self.op_x()] ^= self.v[self.op_y()],
4 => {
self.v[self.op_x()] += self.v[self.op_y()];
self.v[15] = if self.v[self.op_x()] < self.v[self.op_y()] { 1 } else { 0 };
},
5 => {
self.v[15] = if self.v[self.op_y()] > self.v[self.op_x()] { 0 } else { 1 };
self.v[self.op_x()] -= self.v[self.op_y()];
},
6 => {
self.v[15] = self.v[self.op_x()] & 0x1;
self.v[self.op_x()] >>= 1;
},
7 => {
self.v[15] = if self.v[self.op_x()] > self.v[self.op_y()] { 0 } else { 1 };
self.v[self.op_x()] = self.v[self.op_y()] - self.v[self.op_x()];
},
0xE => {
self.v[15] = self.v[self.op_x()] >> 7;
self.v[self.op_x()] <<= 1;
} ,
_ => panic!("Unhandled opcode: {:#08x}", self.opcode)
}
self.pc += 2;
}
fn op_9xxx(&mut self) {
self.pc += if self.v[self.op_x()] != self.v[self.op_y()] { 4 } else { 2 }
}
fn op_axxx(&mut self) {
self.i = self.op_0nnn() as usize;
self.pc += 2;
}
fn op_bxxx(&mut self) {
self.pc = self.op_0nnn() + (self.v[0] as u16);
}
fn op_cxxx(&mut self) {
self.v[self.op_x()] = self.op_0nn() & rand::random::<u8>();
self.pc += 2;
}
fn op_dxxx(&mut self) {
let from = self.i;
let to = from + (self.op_0n() as usize);
let x = self.v[self.op_x()];
let y = self.v[self.op_y()];
self.v[15] = self.display.draw(x as usize, y as usize, &self.memory[from..to]);
self.pc += 2;
}
fn op_exxx(&mut self) {
let v = self.v[self.op_x()] as usize;
self.pc += match self.opcode & 0x00FF {
0x9E => if self.input.pressed(v) { 4 } else { 2 },
0xA1 => if !self.input.pressed(v) { 4 } else { 2 },
_ => 2
}
}
fn op_fxxx(&mut self) {
match self.opcode & 0x00FF {
0x07 => self.v[self.op_x()] = self.delay_timer,
0x0A => self.wait_for_keypress(),
0x15 => self.delay_timer = self.v[self.op_x()],
0x18 => self.sound_timer = self.v[self.op_x()],
0x1E => self.i += self.v[self.op_x()] as usize,
0x29 => self.i = (self.v[self.op_x()] as usize) * 5,
0x33 => {
self.memory[self.i] = self.v[self.op_x()] / 100;
self.memory[self.i + 1] = (self.v[self.op_x()] / 10) % 10;
self.memory[self.i + 2] = (self.v[self.op_x()] % 100) % 10;
},
0x55 => {
for i in 0..self.op_x() + 1 {
self.memory[self.i + i] = self.v[i]
}
self.i += self.op_x() + 1;
},
0x65 => {
for i in 0..self.op_x() + 1 {
self.v[i] = self.memory[self.i + i]
}
self.i += self.op_x() + 1;
},
_ => panic!("Unhandled opcode: {:#08x}", self.opcode),
}
self.pc += 2;
}
} |
//! Day 10
use std::{collections::HashMap, hash::Hash, iter::once};
use itertools::Itertools;
use num_traits::{NumOps, Unsigned};
trait Solution {
fn part_1(&self) -> usize;
fn part_2(&self) -> usize;
}
impl Solution for str {
fn part_1(&self) -> usize {
let distribution: HashMap<u32, _> = calculate_distribution(diff(adapter_chain(
&parsers::input(self).expect("Failed to parse the input"),
)));
distribution[&1] * distribution[&3]
}
fn part_2(&self) -> usize {
let chain: Vec<usize> =
adapter_chain(&parsers::input(self).expect("Failed to parse the input")).collect_vec();
count_arrangements(&chain)
}
}
const MAX_OFFSET: u8 = 3;
fn adapter_chain<T>(values: &[T]) -> impl Iterator<Item = T>
where
T: Unsigned + From<u8> + Ord + Clone,
{
let max = values.iter().max().unwrap().clone();
once(T::zero())
.chain(values.iter().cloned().sorted())
.chain(once(max + T::from(MAX_OFFSET)))
}
fn diff<T>(it: impl Iterator<Item = T>) -> impl Iterator<Item = T>
where
T: NumOps + Clone,
{
it.tuple_windows().map(|(fst, snd)| snd - fst)
}
fn calculate_distribution<T>(it: impl Iterator<Item = T>) -> HashMap<T, usize>
where
T: Eq + Hash + Clone,
{
it.fold(HashMap::new(), |mut acc, v| {
*acc.entry(v).or_default() += 1;
acc
})
}
fn count_arrangements<T>(values: &[T]) -> usize
where
T: NumOps + From<u8> + Ord + Clone,
{
let mut path_counts = vec![0usize; values.len()];
*path_counts.last_mut().unwrap() = 1;
for ix in (0..values.len() - 1).rev() {
path_counts[ix] = (1..=MAX_OFFSET as usize)
.map(|offset| ix + offset)
.filter(|&neighbor| {
neighbor < values.len()
&& values[neighbor] <= values[ix].clone() + T::from(MAX_OFFSET)
})
.map(|neighbor| path_counts[neighbor])
.sum();
}
*path_counts.first().unwrap()
}
mod parsers {
pub use crate::parsers::number_list as input;
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn example_input() {
assert_eq!(
parsers::input(
"\
16
10
15
5
1
11
7
19
6
12
4"
),
Ok(vec![16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4])
);
}
#[test]
fn example_1() {
let input = vec![16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4];
assert_eq!(input.iter().max().unwrap() + 3, 22);
assert_eq!(
calculate_distribution(diff(adapter_chain(&input))),
[(1, 7), (3, 5)]
.iter()
.copied()
.collect::<HashMap<usize, usize>>()
);
}
#[test]
fn example_2() {
assert_eq!(
calculate_distribution(diff(adapter_chain(&[
28, 33, 18, 42, 31, 14, 46, 20, 48, 47, 24, 23, 49, 45, 19, 38, 39, 11, 1, 32, 25,
35, 8, 17, 7, 9, 4, 2, 34, 10, 3,
]))),
[(1, 22), (3, 10)]
.iter()
.copied()
.collect::<HashMap<usize, usize>>()
);
}
#[test]
fn part_1() {
assert_eq!(include_str!("inputs/day_10").part_1(), 2516);
}
#[test]
fn example_3() {
let chain: Vec<u32> = adapter_chain(&[16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4]).collect_vec();
assert_eq!(count_arrangements(&chain), 8);
}
#[test]
fn example_4() {
let chain: Vec<u32> = adapter_chain(&[
28, 33, 18, 42, 31, 14, 46, 20, 48, 47, 24, 23, 49, 45, 19, 38, 39, 11, 1, 32, 25, 35,
8, 17, 7, 9, 4, 2, 34, 10, 3,
])
.collect_vec();
assert_eq!(count_arrangements(&chain), 19208);
}
#[test]
fn part_2() {
assert_eq!(include_str!("inputs/day_10").part_2(), 296_196_766_695_424);
}
}
|
//! Custom error types
use std::fmt;
use crate::SchemaVersion;
/// A typedef of the result returned by many methods.
pub type Result<T, E = Error> = std::result::Result<T, E>;
/// Enum listing possible errors.
#[derive(Debug, PartialEq)]
#[allow(clippy::enum_variant_names)]
#[non_exhaustive]
pub enum Error {
/// Rusqlite error, query may indicate the attempted SQL query
RusqliteError {
/// SQL query that caused the error
query: String,
/// Error returned by rusqlite
err: rusqlite::Error,
},
/// Error with the specified schema version
SpecifiedSchemaVersion(SchemaVersionError),
/// Something wrong with migration definitions
MigrationDefinition(MigrationDefinitionError),
}
impl Error {
/// Associtate the SQL request that caused the error
pub fn with_sql(e: rusqlite::Error, sql: &str) -> Error {
Error::RusqliteError {
query: String::from(sql),
err: e,
}
}
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// TODO Format the error with fmt instead of debug
write!(f, "rusqlite_migrate error: {:?}", self)
}
}
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
Error::RusqliteError { query: _, err } => Some(err),
Error::SpecifiedSchemaVersion(e) => Some(e),
Error::MigrationDefinition(e) => Some(e),
}
}
}
impl From<rusqlite::Error> for Error {
fn from(e: rusqlite::Error) -> Error {
Error::RusqliteError {
query: String::new(),
err: e,
}
}
}
/// Errors related to schema versions
#[derive(Debug, PartialEq, Clone, Copy)]
#[allow(clippy::enum_variant_names)]
#[non_exhaustive]
pub enum SchemaVersionError {
/// Attempts to migrate to a version lower than the version currently in
/// the database. This was historically not supported
#[deprecated(since = "0.4.0", note = "This error is not returned anymore")]
#[doc(hidden)]
MigrateToLowerNotSupported,
/// Attempt to migrate to a version out of range for the supplied migrations
TargetVersionOutOfRange {
/// The attempt to migrate to this version caused the error
specified: SchemaVersion,
/// Highest version defined in the migration set
highest: SchemaVersion,
},
}
impl fmt::Display for SchemaVersionError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
#[allow(deprecated)]
SchemaVersionError::MigrateToLowerNotSupported => {
write!(f, "Attempt to migrate to a version lower than the version currently in the database. This was historically not supported.")
}
SchemaVersionError::TargetVersionOutOfRange { specified, highest } => {
write!(f, "Attempt to migrate to version {}, which is higher than the highest version currently supported, {}.", specified, highest)
}
}
}
}
impl std::error::Error for SchemaVersionError {}
/// Errors related to schema versions
#[derive(Debug, PartialEq, Clone, Copy)]
#[allow(clippy::enum_variant_names)]
#[non_exhaustive]
pub enum MigrationDefinitionError {
/// Migration has no down version
DownNotDefined {
/// Index of the migration that caused the error
migration_index: usize,
},
/// Attempt to migrate when no migrations are defined
NoMigrationsDefined,
}
impl fmt::Display for MigrationDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
MigrationDefinitionError::DownNotDefined { migration_index } => {
write!(
f,
"Migration {} (version {} -> {}) cannot be reverted.",
migration_index,
migration_index,
migration_index + 1
)
}
MigrationDefinitionError::NoMigrationsDefined => {
write!(f, "Attempt to migrate with no migrations defined")
}
}
}
}
impl std::error::Error for MigrationDefinitionError {}
|
use std::string::ToString;
use std::collections::BTreeMap;
use std::error::Error;
use std::fmt;
use std::{i32,i64,usize};
use rustc_serialize::json::{Json,ToJson};
use parse::Presence::*;
#[derive(Clone, PartialEq, Debug)]
pub enum ParseError {
InvalidJsonType(String),
InvalidStructure(String),
MissingField(String),
UnknownMethod(String),
}
impl Error for ParseError {
fn description(&self) -> &str {
match *self {
ParseError::InvalidJsonType(_) => "invalid JSON type for conversion",
ParseError::InvalidStructure(_) => "invalid value structure for conversion",
ParseError::MissingField(_) => "missing field",
ParseError::UnknownMethod(_) => "unknown method",
}
}
}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", match *self {
ParseError::InvalidJsonType(ref e) => format!("invalid JSON type for conversion to {}", e),
ParseError::InvalidStructure(ref e) => format!("invalid value structure for conversion to {}", e),
ParseError::MissingField(ref e) => format!("missing field \"{}\"", e),
ParseError::UnknownMethod(ref e) => format!("unknown method \"{}\"", e),
}.to_string())
}
}
#[derive(Clone, PartialEq, Debug)]
pub enum Presence<T> {
Present(T),
Absent,
}
impl<T> Presence<T> {
pub fn as_option<'a>(&'a self) -> Option<&'a T> {
match *self {
Present(ref tt) => Some(&tt),
Absent => None,
}
}
}
impl<T> Default for Presence<T> {
fn default() -> Presence<T> {
Absent
}
}
// trait for things that can be created from a JSON fragment
pub trait FromJson: Sized {
fn from_json(json: &Json) -> Result<Self,ParseError>;
}
// conversions for system types
impl FromJson for String {
fn from_json(json: &Json) -> Result<String,ParseError> {
match *json {
Json::String(ref s) => Ok(s.to_string()),
_ => Err(ParseError::InvalidJsonType("String".to_string())),
}
}
}
impl FromJson for u64 {
fn from_json(json: &Json) -> Result<u64,ParseError> {
match *json {
Json::U64(n) => Ok(n),
Json::I64(n) => Ok(n as u64),
_ => Err(ParseError::InvalidJsonType("u64".to_string())),
}
}
}
impl FromJson for i64 {
fn from_json(json: &Json) -> Result<i64,ParseError> {
match *json {
Json::U64(n) if n <= (i64::MAX as u64)
=> Ok(n as i64),
Json::I64(n) if n >= i64::MIN && n <= i64::MAX
=> Ok(n as i64),
_ => Err(ParseError::InvalidJsonType("i64".to_string())),
}
}
}
impl FromJson for bool {
fn from_json(json: &Json) -> Result<bool,ParseError> {
match *json {
Json::Boolean(b) => Ok(b),
_ => Err(ParseError::InvalidJsonType("bool".to_string())),
}
}
}
impl FromJson for i32 {
fn from_json(json: &Json) -> Result<i32,ParseError> {
match *json {
Json::U64(n) if n <= (i32::MAX as u64)
=> Ok(n as i32),
Json::I64(n) if n >= (i32::MIN as i64) && n <= (i32::MAX as i64)
=> Ok(n as i32),
_ => Err(ParseError::InvalidJsonType("i32".to_string())),
}
}
}
impl FromJson for usize {
fn from_json(json: &Json) -> Result<usize,ParseError> {
match *json {
Json::U64(n) if n <= (usize::MAX as u64)
=> Ok(n as usize),
Json::I64(n) if n >= (usize::MIN as i64) && n <= (usize::MAX as i64)
=> Ok(n as usize),
_ => Err(ParseError::InvalidJsonType("usize".to_string())),
}
}
}
impl<T> FromJson for Vec<T> where T: FromJson {
fn from_json(json: &Json) -> Result<Vec<T>,ParseError> {
match *json {
Json::Array(ref a) => {
let (ok, mut err): (Vec<_>,Vec<_>) = a.iter().map(|ref j| T::from_json(j)).partition(|ref r| match **r { Ok(_) => true, Err(_) => false });
match err.len() {
0 => Ok(ok.into_iter().map(|r| r.ok().unwrap()).collect()),
_ => Err(err.remove(0).err().unwrap()),
}
}
_ => Err(ParseError::InvalidJsonType("Vec".to_string())),
}
}
}
impl<T> FromJson for BTreeMap<String,T> where T: FromJson {
fn from_json(json: &Json) -> Result<Self,ParseError> {
match *json {
Json::Object(ref o) => {
let mut m = BTreeMap::<String,T>::new();
for (k, v) in o.iter() {
let vv = try!(T::from_json(v));
m.insert(k.clone(), vv);
}
Ok(m)
},
_ => Err(ParseError::InvalidJsonType("BTreeMap".to_string()))
}
}
}
pub trait FromJsonField: Sized {
fn from_json_field(json: &BTreeMap<String,Json>, field: &str) -> Result<Self,ParseError>;
}
impl<T> FromJsonField for T where T: FromJson {
fn from_json_field(json: &BTreeMap<String,Json>, field: &str) -> Result<Self,ParseError> {
match json.get(field) {
Some(ref v) => T::from_json(&v),
None => Err(ParseError::MissingField(field.to_string())),
}
}
}
impl<T> FromJsonField for Option<T> where T: FromJson {
fn from_json_field(json: &BTreeMap<String,Json>, field: &str) -> Result<Self,ParseError> {
match json.get(field) {
Some(v) => {
match *v {
Json::Null => Ok(None),
_ => match T::from_json(&v) {
Ok(j) => Ok(Some(j)),
Err(e) => Err(e),
}
}
}
None => Ok(None),
}
}
}
impl<T> FromJsonField for Presence<T> where T: FromJson {
fn from_json_field(json: &BTreeMap<String,Json>, field: &str) -> Result<Self,ParseError> {
match json.get(field) {
Some(ref v) => {
match *v {
&Json::Null => Ok(Absent),
_ => match T::from_json(&v) {
Ok(j) => Ok(Present(j)),
Err(e) => Err(e),
}
}
}
None => Ok(Absent),
}
}
}
impl<T> FromJsonField for Presence<Option<T>> where T: FromJson {
fn from_json_field(json: &BTreeMap<String,Json>, field: &str) -> Result<Self,ParseError> {
match json.get(field) {
Some(v) => {
match *v {
Json::Null => Ok(Present(None)),
_ => match T::from_json(&v) {
Ok(j) => Ok(Present(Some(j))),
Err(e) => Err(e),
}
}
}
None => Ok(Absent),
}
}
}
pub trait ToJsonField {
fn to_json_field(&self, json: &mut BTreeMap<String,Json>, field: &str);
}
impl<T> ToJsonField for T where T: ToJson {
fn to_json_field(&self, json: &mut BTreeMap<String,Json>, field: &str) {
json.insert(field.to_string(), self.to_json());
}
}
impl<T> ToJsonField for Presence<T> where T: ToJson {
fn to_json_field(&self, json: &mut BTreeMap<String,Json>, field: &str) {
if let Present(ref v) = *self {
json.insert(field.to_string(), v.to_json());
}
}
}
|
//!
//! This module contains several [passes](Pass) that can be chained to form a [pipeline](Pipeline).
//!
mod cataract;
mod lens;
mod retina;
mod yuv_420_rgb;
mod yuv_rgb;
pub use self::cataract::Cataract;
pub use self::lens::Lens;
pub use self::retina::Retina;
pub use self::yuv_420_rgb::Yuv420Rgb;
pub use self::yuv_rgb::YuvRgb;
|
use std::io::{
stdout,
Stdout,
Write,
};
pub struct WriterWrapper<W>
where
W: Write,
{
backing_writer: W,
}
impl<W> WriterWrapper<W>
where
W: Write,
{
pub fn new(writer: W) -> Self {
Self {
backing_writer: writer,
}
}
#[allow(dead_code)]
/// Mostly for testing purposes
pub fn release(self) -> W {
self.backing_writer
}
}
/// If Stdout is ever upgraded to Clone we can just derive(Clone)
/// the Vec U8 is strictly for testing
impl Clone for WriterWrapper<Vec<u8>> {
fn clone(&self) -> Self {
Self {
backing_writer: self.backing_writer.clone(),
}
}
}
impl Clone for WriterWrapper<Stdout> {
fn clone(&self) -> Self {
Self {
backing_writer: stdout(),
}
}
}
impl<W> AsRef<W> for WriterWrapper<W>
where
W: Write,
{
fn as_ref(&self) -> &W {
&self.backing_writer
}
}
impl<W> AsMut<W> for WriterWrapper<W>
where
W: Write,
{
fn as_mut(&mut self) -> &mut W {
&mut self.backing_writer
}
}
impl<W> Write for WriterWrapper<W>
where
W: Write,
{
fn write(&mut self, data: &[u8]) -> std::io::Result<usize> {
self.backing_writer.write(data)
}
fn flush(&mut self) -> std::io::Result<()> {
self.backing_writer.flush()
}
}
|
use unicode_segmentation::UnicodeSegmentation;
use crate::grid::Frame;
/// Currently, an action is either printing a string or moving to a location.
/// The first value is the x location, the second is the y location.
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Action<'a> {
Print(&'a str),
MoveTo(usize, usize),
}
/**
A handler is a structure that can convert actions into an output on an output device.
This simple trait is rather self-explanatory.
# Example
``` rust
# use grid_ui::grid;
# use grid_ui::out;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let mut grid = grid::Frame::new(0, 0, 10, 4).next_frame();
let mut process = grid.into_process(grid::DividerStrategy::Halfway);
process.add_to_section("Some stuff".to_string(), &mut Ignore, grid::Alignment::Plus);
let mut some_handler = out::OutToString;
let mut output_device = String::new();
process.print(&mut some_handler, &mut output_device)?;
assert_eq!(output_device, " \n \nSome stuff\n \n".to_string());
# Ok(())
# }
```
*/
pub trait Handler {
type OutputDevice;
type Error;
fn handle(&mut self, out: &mut Self::OutputDevice, input: &Action) -> Result<(), Self::Error>;
}
/**
A handler that is "safe", ie doesn't return an error. All safe handlers are also handlers - you can use them as such.
# Example
``` rust
# use grid_ui::grid;
# use grid_ui::out;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let mut grid = grid::Frame::new(0, 0, 10, 4).next_frame();
let mut process = grid.into_process(grid::DividerStrategy::Halfway);
process.add_to_section("Some stuff".to_string(), &mut Ignore, grid::Alignment::Plus);
let mut some_handler = out::OutToString;
let mut output_device = String::new();
process.print_safe(&mut some_handler, &mut output_device); // no need for the ? operator
assert_eq!(output_device, " \n \nSome stuff\n \n".to_string());
# Ok(())
# }
```
*/
pub trait SafeHandler {
type OutputDevice;
fn safe_handle(&mut self, out: &mut Self::OutputDevice, input: &Action);
}
/**
A handler that outputs the text to a string, as lines. It does not pay attention to the location used.
This means that it won't panic at all, and will generally accept whatever text is thrown at it.
This makes it useful for debug purposes.
However, it doesn't do any formatting, and doesn't change behavior based on locations - only where you call it matters.
# Example
``` rust
# use grid_ui::grid;
# use grid_ui::out;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let mut grid = grid::Frame::new(0, 0, 10, 3).next_frame();
let mut process = grid.into_process(grid::DividerStrategy::Beginning);
process.add_to_section_lines(vec!["Some stuff".to_string(), "More stuff".to_string()].into_iter(), &mut Ignore, grid::Alignment::Plus);
let mut output: String = String::new();
process.print(&mut out::OutToString, &mut output)?;
assert_eq!("Some stuff\nMore stuff\n \n".to_string(), output);
# Ok(())
# }
```
The limitations of this method
``` rust
# use grid_ui::grid;
# use grid_ui::out::*;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let frame = grid::Frame::new(0, 0, 10, 1);
let mut left = frame.next_frame();
let mut right = left.split(&grid::SplitStrategy::new().max_x(5, grid::Alignment::Plus)).ok_or(())?;
let mut left_process = left.into_process(grid::DividerStrategy::Beginning);
let mut right_process = right.into_process(grid::DividerStrategy::Beginning);
right_process.add_to_section("stuff".to_string(), &mut Ignore, grid::Alignment::Plus);
left_process.add_to_section("Some".to_string(), &mut Ignore, grid::Alignment::Plus);
let mut output: String = String::new();
right_process.print(&mut OutToString, &mut output)?;
left_process.print(&mut OutToString, &mut output)?;
assert_eq!("stuff\nSome\n".to_string(), output);
# Ok(())
# }
```
*/
pub struct OutToString;
impl SafeHandler for OutToString {
type OutputDevice = String;
fn safe_handle(&mut self, out: &mut String, input: &Action) {
match input {
Action::Print(s) => {
out.push_str(s);
out.push('\n')
}
Action::MoveTo(_, _) => {}
}
}
}
impl<H: SafeHandler> Handler for H {
type OutputDevice = H::OutputDevice;
type Error = ();
fn handle(&mut self, out: &mut Self::OutputDevice, input: &Action) -> Result<(), Self::Error> {
self.safe_handle(out, input);
Ok(())
}
}
/**
A more complicated version of the structure OutToString. This modifies a string buffer
instead of pushing any text directly to a string. This allows the structure to actually
process multiple grids in any order, at the expense of time cost.
# Panics
This structure will cause a panic if it tries to print text that cannot fit in the assigned buffer.
This will not happen unless you either (A) use a structure that doesn't force text to fit
the frame/grid such as trim::Ignore, or (B) construct this structure with starting or ending
points different from the frame it's used in.
# Examples
Basic usage
``` rust
# use grid_ui::grid;
# use grid_ui::out::*;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let frame = grid::Frame::new(0, 0, 10, 1);
let mut output: StringBuffer = StringBuffer::from_frame(&frame);
let mut left = frame.next_frame();
let mut right = left.split(&grid::SplitStrategy::new().max_x(5, grid::Alignment::Plus)).ok_or(())?;
let mut left_process = left.into_process(grid::DividerStrategy::Beginning);
let mut right_process = right.into_process(grid::DividerStrategy::Beginning);
left_process.add_to_section("Some".to_string(), &mut Ignore, grid::Alignment::Plus);
right_process.add_to_section("stuff".to_string(), &mut Ignore, grid::Alignment::Plus);
left_process.print(&mut output, &mut ())?;
right_process.print(&mut output, &mut ())?;
assert_eq!(vec!["Some stuff".to_string()], output.lines());
# Ok(())
# }
```
Panicking with ignore
``` should_panic
# use grid_ui::grid;
# use grid_ui::out::*;
# use grid_ui::trim::Ignore;
# fn main() -> Result<(), ()>{
let frame = grid::Frame::new(0, 0, 10, 1);
let mut output: StringBuffer = StringBuffer::from_frame(&frame);
let mut grid = frame.next_frame();
let mut process = grid.into_process(grid::DividerStrategy::Beginning);
process.add_to_section("This string is too long.".to_string(), &mut Ignore, grid::Alignment::Plus);
process.print(&mut output, &mut ())?; // panics
# Ok(())
# }
```
Panicking with a grid mismatch
``` should_panic
# use grid_ui::grid;
# use grid_ui::out::*;
# use grid_ui::trim::Truncate;
# fn main() -> Result<(), ()>{
let frame = grid::Frame::new(0, 0, 10, 1);
let mut small_output: StringBuffer = StringBuffer::new(5, 0, 10, 1);
let mut grid = frame.next_frame();
let mut process = grid.into_process(grid::DividerStrategy::Beginning);
process.add_to_section("This string is trimmed to fit here, but not on the string buffer.".to_string(), &mut Truncate, grid::Alignment::Plus);
process.print(&mut small_output, &mut ())?; // panics
# Ok(())
# }
```
*/
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct StringBuffer {
pub contents: Vec<Vec<String>>,
pub offset_x: usize,
pub offset_y: usize,
current_x: usize,
current_y: usize,
}
impl StringBuffer {
/// Creates a new StringBuffer from 4 dimensions.
pub fn new(min_x: usize, min_y: usize, max_x: usize, max_y: usize) -> StringBuffer {
StringBuffer {
contents: vec![vec![" ".to_string(); max_x - min_x]; max_y - min_y],
current_x: 0,
current_y: 0,
offset_x: min_x,
offset_y: min_y,
}
}
/// Creates a new StringBuffer with the same dimensions as the frame inputted.
pub fn from_frame(f: &Frame) -> StringBuffer {
let g = f.next_frame();
StringBuffer::new(g.start_x, g.start_y, g.end_x, g.end_y)
}
/// Prints the StringBuffer.
pub fn finalize(&self) {
for line in &self.contents {
for block in line {
print!("{}", block);
}
println!();
}
}
/// Returns the StringBuffer lines, collected into strings (instead of each grapheme being individually displayed)
pub fn lines(self) -> Vec<String> {
self.contents.into_iter().map(|x| x.into_iter().collect::<String>()).collect::<Vec<_>>()
}
}
impl SafeHandler for StringBuffer {
type OutputDevice = ();
fn safe_handle(&mut self, _: &mut (), input: &Action) {
match input {
Action::Print(v) => {
for (i, line) in v.grapheme_indices(true) {
self.contents[self.current_y][self.current_x + i] = line.to_string();
}
}
Action::MoveTo(x, y) => {
self.current_x = *x - self.offset_x;
self.current_y = *y - self.offset_y;
}
}
}
}
|
use std::collections::HashSet;
use darling::ast::{Data, Style};
use proc_macro::TokenStream;
use quote::quote;
use syn::{visit_mut::VisitMut, Error, Type};
use crate::{
args::{self, RenameTarget},
utils::{get_crate_name, get_rustdoc, visible_fn, GeneratorResult, RemoveLifetime},
};
pub fn generate(union_args: &args::Union) -> GeneratorResult<TokenStream> {
let crate_name = get_crate_name(union_args.internal);
let ident = &union_args.ident;
let (impl_generics, ty_generics, where_clause) = union_args.generics.split_for_impl();
let s = match &union_args.data {
Data::Enum(s) => s,
_ => return Err(Error::new_spanned(ident, "Union can only be applied to an enum.").into()),
};
let mut enum_names = Vec::new();
let mut enum_items = HashSet::new();
let mut type_into_impls = Vec::new();
let gql_typename = if !union_args.name_type {
let name = union_args
.name
.clone()
.unwrap_or_else(|| RenameTarget::Type.rename(ident.to_string()));
quote!(::std::borrow::Cow::Borrowed(#name))
} else {
quote!(<Self as #crate_name::TypeName>::type_name())
};
let inaccessible = union_args.inaccessible;
let tags = union_args
.tags
.iter()
.map(|tag| quote!(::std::string::ToString::to_string(#tag)))
.collect::<Vec<_>>();
let desc = get_rustdoc(&union_args.attrs)?
.map(|s| quote! { ::std::option::Option::Some(::std::string::ToString::to_string(#s)) })
.unwrap_or_else(|| quote! {::std::option::Option::None});
let mut registry_types = Vec::new();
let mut possible_types = Vec::new();
let mut get_introspection_typename = Vec::new();
let mut collect_all_fields = Vec::new();
for variant in s {
let enum_name = &variant.ident;
let ty = match variant.fields.style {
Style::Tuple if variant.fields.fields.len() == 1 => &variant.fields.fields[0],
Style::Tuple => {
return Err(Error::new_spanned(
enum_name,
"Only single value variants are supported",
)
.into())
}
Style::Unit => {
return Err(
Error::new_spanned(enum_name, "Empty variants are not supported").into(),
)
}
Style::Struct => {
return Err(Error::new_spanned(
enum_name,
"Variants with named fields are not supported",
)
.into())
}
};
let mut ty = ty;
while let Type::Group(group) = ty {
ty = &*group.elem;
}
if matches!(ty, Type::Path(_) | Type::Macro(_)) {
// This validates that the field type wasn't already used
if !enum_items.insert(ty) {
return Err(
Error::new_spanned(ty, "This type is already used in another variant").into(),
);
}
enum_names.push(enum_name);
let mut assert_ty = ty.clone();
RemoveLifetime.visit_type_mut(&mut assert_ty);
if !variant.flatten {
type_into_impls.push(quote! {
#crate_name::static_assertions::assert_impl_one!(#assert_ty: #crate_name::ObjectType);
#[allow(clippy::all, clippy::pedantic)]
impl #impl_generics ::std::convert::From<#ty> for #ident #ty_generics #where_clause {
fn from(obj: #ty) -> Self {
#ident::#enum_name(obj)
}
}
});
} else {
type_into_impls.push(quote! {
#crate_name::static_assertions::assert_impl_one!(#assert_ty: #crate_name::UnionType);
#[allow(clippy::all, clippy::pedantic)]
impl #impl_generics ::std::convert::From<#ty> for #ident #ty_generics #where_clause {
fn from(obj: #ty) -> Self {
#ident::#enum_name(obj)
}
}
});
}
if !variant.flatten {
registry_types.push(quote! {
<#ty as #crate_name::OutputType>::create_type_info(registry);
});
possible_types.push(quote! {
possible_types.insert(<#ty as #crate_name::OutputType>::type_name().into_owned());
});
} else {
possible_types.push(quote! {
if let #crate_name::registry::MetaType::Union { possible_types: possible_types2, .. } =
registry.create_fake_output_type::<#ty>() {
possible_types.extend(possible_types2);
}
});
}
if !variant.flatten {
get_introspection_typename.push(quote! {
#ident::#enum_name(obj) => <#ty as #crate_name::OutputType>::type_name()
});
} else {
get_introspection_typename.push(quote! {
#ident::#enum_name(obj) => <#ty as #crate_name::OutputType>::introspection_type_name(obj)
});
}
collect_all_fields.push(quote! {
#ident::#enum_name(obj) => obj.collect_all_fields(ctx, fields)
});
} else {
return Err(Error::new_spanned(ty, "Invalid type").into());
}
}
if possible_types.is_empty() {
return Err(Error::new_spanned(
ident,
"A GraphQL Union type must include one or more unique member types.",
)
.into());
}
let visible = visible_fn(&union_args.visible);
let expanded = quote! {
#(#type_into_impls)*
#[allow(clippy::all, clippy::pedantic)]
#[#crate_name::async_trait::async_trait]
impl #impl_generics #crate_name::resolver_utils::ContainerType for #ident #ty_generics #where_clause {
async fn resolve_field(&self, ctx: &#crate_name::Context<'_>) -> #crate_name::ServerResult<::std::option::Option<#crate_name::Value>> {
::std::result::Result::Ok(::std::option::Option::None)
}
fn collect_all_fields<'__life>(&'__life self, ctx: &#crate_name::ContextSelectionSet<'__life>, fields: &mut #crate_name::resolver_utils::Fields<'__life>) -> #crate_name::ServerResult<()> {
match self {
#(#collect_all_fields),*
}
}
}
#[allow(clippy::all, clippy::pedantic)]
#[#crate_name::async_trait::async_trait]
impl #impl_generics #crate_name::OutputType for #ident #ty_generics #where_clause {
fn type_name() -> ::std::borrow::Cow<'static, ::std::primitive::str> {
#gql_typename
}
fn introspection_type_name(&self) -> ::std::borrow::Cow<'static, ::std::primitive::str> {
match self {
#(#get_introspection_typename),*
}
}
fn create_type_info(registry: &mut #crate_name::registry::Registry) -> ::std::string::String {
registry.create_output_type::<Self, _>(#crate_name::registry::MetaTypeId::Union, |registry| {
#(#registry_types)*
#crate_name::registry::MetaType::Union {
name: ::std::borrow::Cow::into_owned(#gql_typename),
description: #desc,
possible_types: {
let mut possible_types = #crate_name::indexmap::IndexSet::new();
#(#possible_types)*
possible_types
},
visible: #visible,
inaccessible: #inaccessible,
tags: ::std::vec![ #(#tags),* ],
rust_typename: ::std::option::Option::Some(::std::any::type_name::<Self>()),
}
})
}
async fn resolve(&self, ctx: &#crate_name::ContextSelectionSet<'_>, _field: &#crate_name::Positioned<#crate_name::parser::types::Field>) -> #crate_name::ServerResult<#crate_name::Value> {
#crate_name::resolver_utils::resolve_container(ctx, self).await
}
}
impl #impl_generics #crate_name::UnionType for #ident #ty_generics #where_clause {}
};
Ok(expanded.into())
}
|
use num_bigint::BigInt;
use crate::time::{convert_milliseconds, Unit};
use liblumen_alloc::erts::time::Monotonic;
cfg_if::cfg_if! {
if #[cfg(all(target_arch = "wasm32", feature = "time_web_sys"))] {
mod web_sys;
pub use self::web_sys::*;
} else {
mod std;
pub use self::std::*;
}
}
pub fn time_in_unit(unit: Unit) -> BigInt {
let monotonic = time();
let milliseconds = monotonic.into();
convert_milliseconds(milliseconds, unit)
}
|
#![no_std]
#![cfg_attr(test, no_main)]
#![feature(abi_x86_interrupt)]
#![feature(custom_test_frameworks)]
#![test_runner(crate::testing::test_runner)]
#![reexport_test_harness_main = "test_main"]
#![feature(alloc_error_handler)]
#[allow(unused_imports)]
use core::panic::PanicInfo;
#[cfg(test)]
use bootloader::{entry_point, BootInfo};
extern crate alloc;
#[macro_use]
pub mod serial;
#[macro_use]
pub mod vga_writer;
#[macro_use]
pub mod gdt;
#[macro_use]
pub mod interrupts;
#[macro_use]
pub mod memory;
#[macro_use]
pub mod logger;
#[macro_use]
pub mod allocator;
#[macro_use]
pub mod testing;
pub static BOOT_LEVEL: u8 = 1;
#[cfg(test)]
#[no_mangle]
pub fn entry_fct(t: &'static BootInfo) -> ! {
stage1();
test_main();
hlt_loop();
}
#[cfg(test)]
entry_point!(entry_fct);
pub fn hlt_loop() -> ! {
loop {
x86_64::instructions::hlt();
}
}
pub fn stage1() {
debug!("Stage 1...");
gdt::init();
interrupts::init_idt();
debug!("Enabling interrupts");
unsafe { interrupts::PICS.lock().initialize() };
x86_64::instructions::interrupts::enable();
done!("Stage 1");
}
#[cfg(test)]
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
testing::panic_handler(info);
hlt_loop();
}
|
use crate::erlang::monotonic_time_0;
use crate::erlang::subtract_2;
use crate::erlang::system_time_0;
use crate::erlang::time_offset_0;
use crate::test::with_process;
const TIME_OFFSET_DELTA_LIMIT: u64 = 20;
#[test]
fn approximately_system_time_minus_monotonic_time() {
with_process(|process| {
let monotonic_time = monotonic_time_0::result(process);
let system_time = system_time_0::result(process);
let time_offset = time_offset_0::result(process);
let expected_time_offset =
subtract_2::result(process, system_time, monotonic_time).unwrap();
let time_offset_delta =
subtract_2::result(process, expected_time_offset, time_offset).unwrap();
assert!(
time_offset_delta <= process.integer(TIME_OFFSET_DELTA_LIMIT),
"time_offset_delta ({:?}) <= TIME_OFFSET_DELTA_LIMIT ({:?})",
time_offset_delta,
TIME_OFFSET_DELTA_LIMIT
);
});
}
|
use super::core::Clock;
use super::core::Updatable;
use super::numeric;
use ggez::input;
use ggez::input::mouse::MouseButton;
use ggez::*;
use std::collections::HashMap;
use std::hash::Hash;
///
/// # マウスのボタンの状態
/// マウスのボタンの状態を表す
///
/// MousePressed: 押されている
/// MouseReleased: 離されている
///
#[derive(Debug, Eq, PartialEq, Hash)]
pub enum MouseButtonStatus {
MousePressed,
MouseReleased,
}
///
/// # マウスイベント
/// マウスイベント, イベントハンドラはこれらと関連付けて登録する
///
/// Clicked: クリックされた
/// Pressed: 押された
/// Dragged: ドラッグされた
///
#[derive(Debug, Eq, PartialEq, Hash)]
pub enum MouseButtonEvent {
Clicked,
Pressed,
Dragged,
}
///
/// # マウスの状態を監視しイベントハンドラを実行する構造体
/// イベントハンドラを登録し、呼び出すことが出来る
///
/// ## フィールド
/// ### last_clicked
/// 各ボタンが最後にクリックした座標
///
/// ### button_map
/// 最後に記録した各ボタンの状態
///
/// ### event_handlers
/// event_handlers[MouseButton][MouseButtonEvent] ====> クロージャのベクタ
///
pub struct MouseListener {
last_clicked: HashMap<MouseButton, numeric::Point2f>,
button_map: HashMap<MouseButton, MouseButtonStatus>,
event_handlers: HashMap<
MouseButton,
HashMap<MouseButtonEvent, Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>>,
>,
}
impl MouseListener {
/// ScheduledEvent構造体の生成メソッド
pub fn new() -> MouseListener {
let mut button_map = HashMap::new();
button_map.insert(MouseButton::Left, MouseButtonStatus::MouseReleased);
button_map.insert(MouseButton::Middle, MouseButtonStatus::MouseReleased);
button_map.insert(MouseButton::Right, MouseButtonStatus::MouseReleased);
let mut events = HashMap::new();
events.insert(
MouseButton::Left,
hash![
(
MouseButtonEvent::Clicked,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Pressed,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Dragged,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
)
],
);
events.insert(
MouseButton::Middle,
hash![
(
MouseButtonEvent::Clicked,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Pressed,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Dragged,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
)
],
);
events.insert(
MouseButton::Right,
hash![
(
MouseButtonEvent::Clicked,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Pressed,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
),
(
MouseButtonEvent::Dragged,
Vec::<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>::new()
)
],
);
MouseListener {
last_clicked: hash![
(MouseButton::Left, numeric::Point2f::new(0.0, 0.0)),
(MouseButton::Middle, numeric::Point2f::new(0.0, 0.0)),
(MouseButton::Right, numeric::Point2f::new(0.0, 0.0))
],
button_map: button_map,
event_handlers: events,
}
}
///
/// マウスのイベントハンドラを登録するためのメソッド
///
pub fn register_event_handler(
&mut self,
button: MouseButton,
event: MouseButtonEvent,
f: Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>,
) {
self.event_handlers
.get_mut(&button)
.unwrap()
.get_mut(&event)
.unwrap()
.push(f);
}
//
// 現在のマウスの座標を得るメソッド
//
#[inline(always)]
pub fn get_position(ctx: &ggez::Context) -> numeric::Point2f {
input::mouse::position(ctx).into()
}
fn check_button(ctx: &ggez::Context, button: MouseButton) -> MouseButtonStatus {
if input::mouse::button_pressed(ctx, button) {
MouseButtonStatus::MousePressed
} else {
MouseButtonStatus::MouseReleased
}
}
//
// 最後のクリック座標を返すメソッド
//
pub fn get_last_clicked(&self, button: MouseButton) -> numeric::Point2f {
match button {
MouseButton::Left | MouseButton::Middle | MouseButton::Right => {
self.last_clicked[&button]
}
_ => panic!("Other MouseButton is detected!!"),
}
}
fn __flush_button_event(
&mut self,
ctx: &ggez::Context,
t: Clock,
button: MouseButton,
current_state: &MouseButtonStatus,
) {
// 入力内容が以前と異なる
let event = if *current_state != self.button_map[&button] {
// 操作を検知
match *current_state {
MouseButtonStatus::MousePressed => MouseButtonEvent::Pressed,
MouseButtonStatus::MouseReleased => {
// clickされた場合、last_clickにセット
self.last_clicked.insert(button, Self::get_position(ctx));
MouseButtonEvent::Clicked
}
}
} else {
// マウスのドラッグの判定
if current_state == &MouseButtonStatus::MousePressed {
MouseButtonEvent::Dragged
} else {
// どの動作の種類にも反応しない
return ();
}
};
// ボタン・操作の情報を利用してクロージャのリストの要素を全て実行
for f in &self.event_handlers[&button][&event] {
match f(ctx, t) {
Err(x) => panic!(x),
_ => (),
}
}
}
fn flush_button_event(
&mut self,
ctx: &ggez::Context,
t: Clock,
l_state: &MouseButtonStatus,
m_state: &MouseButtonStatus,
r_state: &MouseButtonStatus,
) {
self.__flush_button_event(ctx, t, MouseButton::Left, l_state);
self.__flush_button_event(ctx, t, MouseButton::Middle, m_state);
self.__flush_button_event(ctx, t, MouseButton::Right, r_state);
}
}
impl Updatable for MouseListener {
fn update(&mut self, ctx: &mut ggez::Context, t: Clock) {
let (l_status, m_status, r_status) = (
MouseListener::check_button(ctx, MouseButton::Left),
MouseListener::check_button(ctx, MouseButton::Middle),
MouseListener::check_button(ctx, MouseButton::Right),
);
//
// 入力のイベントハンドラを実行する
//
self.flush_button_event(ctx, t, &l_status, &m_status, &r_status);
self.button_map.insert(MouseButton::Left, l_status);
self.button_map.insert(MouseButton::Middle, m_status);
self.button_map.insert(MouseButton::Right, r_status);
}
}
///
/// # キー入力を仮想化するためのシンボル
///
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
pub enum VirtualKey {
Left = 0,
Right = 1,
Up = 2,
Down = 3,
LeftSub = 4,
RightSub = 5,
UpSub = 6,
DownSub = 7,
LeftSubSub = 8,
RightSubSub = 9,
UpSubSub = 10,
DownSubSub = 11,
Action1 = 12,
Action2 = 13,
Action3 = 14,
Action4 = 15,
Action5 = 16,
Action6 = 17,
Action7 = 18,
Action8 = 19,
Mod1 = 20,
Mod2 = 21,
Mod3 = 22,
Mod4 = 23,
Unknown = 24,
}
impl VirtualKey {
fn from_i32(i: i32) -> VirtualKey {
match i {
0 => VirtualKey::Left,
1 => VirtualKey::Right,
2 => VirtualKey::Up,
3 => VirtualKey::Down,
4 => VirtualKey::LeftSub,
5 => VirtualKey::RightSub,
6 => VirtualKey::UpSub,
7 => VirtualKey::DownSub,
8 => VirtualKey::LeftSubSub,
9 => VirtualKey::RightSubSub,
10 => VirtualKey::UpSubSub,
11 => VirtualKey::DownSubSub,
12 => VirtualKey::Action1,
13 => VirtualKey::Action2,
14 => VirtualKey::Action3,
15 => VirtualKey::Action4,
16 => VirtualKey::Action5,
17 => VirtualKey::Action6,
18 => VirtualKey::Action7,
19 => VirtualKey::Action8,
20 => VirtualKey::Mod1,
21 => VirtualKey::Mod2,
22 => VirtualKey::Mod3,
23 => VirtualKey::Mod4,
_ => VirtualKey::Unknown,
}
}
}
///
/// # キーの状態
// キーの状態を表す
///
/// Pressed: 押されている
/// Released: 離されている
/// Unknown: 不明
///
#[derive(Debug, Eq, PartialEq, Hash, Clone)]
pub enum KeyStatus {
Pressed,
Released,
Unknown,
}
impl KeyStatus {
#[inline(always)]
pub fn positive_logic(b: bool) -> KeyStatus {
if b {
KeyStatus::Pressed
} else {
KeyStatus::Released
}
}
#[inline(always)]
pub fn negative_logic(b: bool) -> KeyStatus {
if b {
KeyStatus::Released
} else {
KeyStatus::Pressed
}
}
}
///
/// # キーイベント
// キーイベント, イベントハンドラはこれらと関連付けて登録する
///
/// Typed: タイプされた(押してから離された)
/// FirstPressed: 初めて押された(離された状態から押された状態になった)
/// KeepPressed: 押され続けている(押された状態から押された状態になった)
/// KeepReleased: 離され続けている(離された状態から離された状態になった)
/// Unknown: 不明
///
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
pub enum KeyboardEvent {
Typed,
FirstPressed,
KeepPressed,
KeepReleased,
Unknown,
}
///
/// # 入力デバイス
// 入力デバイスを表す
///
/// GenericKeyboard: 一般的なキーボード
/// PS3Controller: PS3 コントローラー
///
#[derive(Debug, Eq, PartialEq, Hash)]
pub enum KeyInputDevice {
GenericKeyboard,
PS3Controller,
}
fn vkey_input_check_generic_keyboard(ctx: &Context, vkey: &VirtualKey) -> KeyStatus {
KeyStatus::positive_logic(match vkey {
VirtualKey::Left => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Left),
VirtualKey::Right => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Right),
VirtualKey::Up => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Up),
VirtualKey::Down => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Down),
VirtualKey::LeftSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::A),
VirtualKey::RightSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::D),
VirtualKey::UpSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::W),
VirtualKey::DownSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::S),
VirtualKey::LeftSubSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::J),
VirtualKey::RightSubSub => {
input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::L)
}
VirtualKey::UpSubSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::I),
VirtualKey::DownSubSub => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::K),
VirtualKey::Action1 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Z),
VirtualKey::Action2 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::X),
VirtualKey::Action3 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::C),
VirtualKey::Action4 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::V),
VirtualKey::Action5 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::N),
VirtualKey::Action6 => input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::M),
VirtualKey::Action7 => {
input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Comma)
}
VirtualKey::Action8 => {
input::keyboard::is_key_pressed(ctx, input::keyboard::KeyCode::Period)
}
VirtualKey::Mod1 => input::keyboard::is_mod_active(ctx, input::keyboard::KeyMods::SHIFT),
VirtualKey::Mod2 => input::keyboard::is_mod_active(ctx, input::keyboard::KeyMods::CTRL),
VirtualKey::Mod3 => input::keyboard::is_mod_active(ctx, input::keyboard::KeyMods::ALT),
VirtualKey::Mod4 => input::keyboard::is_mod_active(ctx, input::keyboard::KeyMods::LOGO),
_ => false,
})
}
fn vkey_input_check_not_implemented(_ctx: &Context, _vkey: &VirtualKey) -> KeyStatus {
println!("device handler is not Implemented!!");
KeyStatus::Unknown
}
fn vkey_input_check(ctx: &Context, device: &KeyInputDevice, vkey: &VirtualKey) -> KeyStatus {
match device {
&KeyInputDevice::GenericKeyboard => vkey_input_check_generic_keyboard(ctx, vkey),
&KeyInputDevice::PS3Controller => vkey_input_check_not_implemented(ctx, vkey),
}
}
///
/// # キーボードの状態を監視する構造体
/// イベントハンドラを登録し、呼び出すことが出来る
///
/// ## フィールド
/// ### devices
/// 監視するデバイスのベクタ
///
/// ### listening
/// 監視するVirtualKeyのベクタ
/// newで生成すると全てのVirtualKeyを監視するようになる。 new_maskedで生成すると監視するVirtualKeyを設定でき、
/// コストが低下する。
///
/// ### key_map
/// key_mapはVec<KeyStatus>型である。KeyStatusをusizeにキャストしてアドレッシングするため、HashMap型ではない
///
/// ### event_handlers
/// event_handlers[VirtualKey][KeyStatus] ====> クロージャのベクタ
///
pub struct KeyboardListener {
devices: Vec<KeyInputDevice>,
listening: Vec<VirtualKey>,
key_map: Vec<KeyStatus>,
event_handlers: Vec<Vec<Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>>>,
}
impl KeyboardListener {
/// # ScheduledEvent構造体の生成メソッド
pub fn new(devices: Vec<KeyInputDevice>) -> KeyboardListener {
// key_mapは全てReleasedで初期化
let key_map = vec![KeyStatus::Released; (VirtualKey::Unknown as usize) + 1];
let mut listening = Vec::new();
let mut events: Vec<Vec<Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>>> =
Vec::new();
for vkey_raw in 0..(VirtualKey::Unknown as i32 + 1) {
let mut tmp: Vec<Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>> =
Vec::new();
for _ in 0..(KeyboardEvent::Unknown as i32 + 1) {
tmp.push(Vec::new());
}
events.push(tmp);
// ListeningするVirtualKeyは全て
listening.push(VirtualKey::from_i32(vkey_raw));
}
KeyboardListener {
devices: devices,
listening: listening,
key_map: key_map,
event_handlers: events,
}
}
///
/// # ScheduledEvent構造体の生成メソッド
///
pub fn new_masked(
devices: Vec<KeyInputDevice>,
listening: Vec<VirtualKey>,
) -> KeyboardListener {
// key_mapは全てReleasedで初期化
let key_map = vec![KeyStatus::Released; (VirtualKey::Unknown as usize) + 1];
let mut events: Vec<Vec<Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>>> =
Vec::new();
for _ in 0..(VirtualKey::Unknown as i32 + 1) {
let mut tmp: Vec<Vec<Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>>> =
Vec::new();
for _ in 0..(KeyboardEvent::Unknown as i32 + 1) {
tmp.push(Vec::new());
}
events.push(tmp);
}
KeyboardListener {
devices: devices,
listening: listening,
key_map: key_map,
event_handlers: events,
}
}
///
/// キーボードのイベントハンドラを登録するためのメソッド
///
pub fn register_event_handler(
&mut self,
key: VirtualKey,
event: KeyboardEvent,
f: Box<dyn Fn(&ggez::Context, Clock) -> Result<(), String>>,
) {
self.event_handlers
.get_mut(key as usize)
.unwrap()
.get_mut(event as usize)
.unwrap()
.push(f);
}
///
/// キー入力に応じてイベントハンドラを呼び出すメソッド
///
fn flush_key_event(
&self,
ctx: &ggez::Context,
t: Clock,
vkey: &VirtualKey,
current_state: &KeyStatus,
) {
let event = if *current_state != *self.key_map.get(*vkey as usize).unwrap() {
match current_state {
&KeyStatus::Pressed => KeyboardEvent::FirstPressed,
&KeyStatus::Released => KeyboardEvent::Typed,
_ => KeyboardEvent::Unknown,
}
} else {
match current_state {
&KeyStatus::Pressed => KeyboardEvent::KeepPressed,
&KeyStatus::Released => KeyboardEvent::KeepReleased,
_ => KeyboardEvent::Unknown,
}
};
for f in self
.event_handlers
.get(*vkey as usize)
.unwrap()
.get(event as usize)
.unwrap()
{
match f(ctx, t) {
Err(x) => panic!(x),
_ => (),
}
}
}
///
/// 複数のキー入力デバイスの状態をミックスするメソッドs
///
pub fn current_key_status(&self, ctx: &ggez::Context, vkey: &VirtualKey) -> KeyStatus {
for device in &self.devices {
if vkey_input_check(ctx, device, vkey) == KeyStatus::Pressed {
return KeyStatus::Pressed;
}
}
KeyStatus::Released
}
}
impl Updatable for KeyboardListener {
fn update(&mut self, ctx: &mut ggez::Context, t: Clock) {
for vkey in &self.listening {
let current_state = self.current_key_status(ctx, vkey);
self.flush_key_event(ctx, t, &vkey, ¤t_state);
self.key_map[*vkey as usize] = current_state;
}
}
}
///
/// 設定可能なキーマップを提供するトレイト
///
pub trait ProgramableKey {
fn update_config(&mut self, real: input::keyboard::KeyCode, virt: VirtualKey);
fn virtual_to_real(&self, virt: VirtualKey) -> input::keyboard::KeyCode;
fn real_to_virtual(&self, real: input::keyboard::KeyCode) -> VirtualKey;
}
///
/// 一般的なキーボードのためのキーマップ
///
pub struct ProgramableGenericKey {
key_map: HashMap<input::keyboard::KeyCode, VirtualKey>,
}
impl ProgramableGenericKey {
/// デフォルト設定
pub fn new() -> ProgramableGenericKey {
ProgramableGenericKey {
key_map: hash![
(input::keyboard::KeyCode::Left, VirtualKey::Left),
(input::keyboard::KeyCode::Right, VirtualKey::Right),
(input::keyboard::KeyCode::Up, VirtualKey::Up),
(input::keyboard::KeyCode::Down, VirtualKey::Down),
(input::keyboard::KeyCode::A, VirtualKey::LeftSub),
(input::keyboard::KeyCode::D, VirtualKey::RightSub),
(input::keyboard::KeyCode::W, VirtualKey::UpSub),
(input::keyboard::KeyCode::S, VirtualKey::DownSub),
(input::keyboard::KeyCode::J, VirtualKey::LeftSubSub),
(input::keyboard::KeyCode::L, VirtualKey::RightSubSub),
(input::keyboard::KeyCode::I, VirtualKey::UpSubSub),
(input::keyboard::KeyCode::K, VirtualKey::DownSubSub),
(input::keyboard::KeyCode::Z, VirtualKey::Action1),
(input::keyboard::KeyCode::X, VirtualKey::Action2),
(input::keyboard::KeyCode::C, VirtualKey::Action3),
(input::keyboard::KeyCode::V, VirtualKey::Action4),
(input::keyboard::KeyCode::N, VirtualKey::Action5),
(input::keyboard::KeyCode::M, VirtualKey::Action6),
(input::keyboard::KeyCode::Comma, VirtualKey::Action7),
(input::keyboard::KeyCode::Period, VirtualKey::Action8)
],
}
}
}
impl ProgramableKey for ProgramableGenericKey {
fn update_config(&mut self, real: input::keyboard::KeyCode, virt: VirtualKey) {
self.key_map.insert(real, virt);
}
fn virtual_to_real(&self, virt_key: VirtualKey) -> input::keyboard::KeyCode {
// keyから探す
for (k, v) in &self.key_map {
if *v == virt_key {
return *k;
}
}
panic!("Non implemented virtual Key: {}", virt_key as i32);
}
fn real_to_virtual(&self, real: input::keyboard::KeyCode) -> VirtualKey {
match self.key_map.get(&real) {
Some(virt) => *virt,
None => {
println!("Unknown real key");
VirtualKey::Unknown
}
}
}
}
|
use std::cmp::Ordering;
#[derive(Clone, Copy)]
pub struct Sprite {
/// Sprite x and y positions
pub x: u8,
pub y: u8,
/// The tile number of the sprite
pub tile_num: u8,
/// True if the sprite is above the background
pub above_background: bool,
/// True if the sprite should be flipped
pub flip_x: bool,
pub flip_y: bool,
/// Palette number of the sprite
pub palette_num: u8,
/// The index of sprite in memory. Used to determine sprite priority
pub index: usize,
}
impl Sprite {
pub fn new() -> Sprite {
Sprite {
x: 0,
y: 0,
tile_num: 0,
above_background: true,
flip_x: false,
flip_y: false,
palette_num: 0,
index: 0,
}
}
/// Write sprite byte 3. bits 0-3 are for CGB only
pub fn write_attributes(&mut self, val: u8) {
self.above_background = ((val >> 7) & 1) == 0;
self.flip_y = ((val >> 6) & 1) == 1;
self.flip_x = ((val >> 5) & 1) == 1;
self.palette_num = (val >> 4) & 1;
}
}
impl Eq for Sprite {}
impl Ord for Sprite {
fn cmp(&self, other: &Sprite) -> Ordering {
(self.x, self.index).cmp(&(other.x, other.index))
}
}
impl PartialOrd for Sprite {
fn partial_cmp(&self, other: &Sprite) -> Option<Ordering> {
Some((self.x, self.index).cmp(&(other.x, other.index)))
}
}
impl PartialEq for Sprite {
fn eq(&self, other: &Sprite) -> bool {
(self.x, self.index) == (other.x, other.index)
}
} |
pub trait ExprSyn: Clone {
fn lit(n: i64) -> Self;
fn neg(t: Self) -> Self;
fn add(u: Self, v: Self) -> Self;
}
pub mod parse {
/*
expr := term ('+' term)*
term := lit | '-' term | '(' expr ')'
lit := digits
*/
use nom::{
branch::alt,
bytes::complete::tag,
character::complete::char,
character::complete::{digit1 as digit, space0 as space},
combinator::{map, map_res},
multi::fold_many0,
sequence::{delimited, pair, preceded},
IResult,
};
use super::ExprSyn;
use std::str::FromStr;
type ParseResult<'a, E> = IResult<&'a str, E>;
fn lit<E: ExprSyn>(i: &str) -> ParseResult<E> {
map_res(delimited(space, digit, space), |x| {
FromStr::from_str(x).map(E::lit)
})(i)
}
fn neg<E: ExprSyn>(i: &str) -> ParseResult<E> {
map(delimited(space, preceded(char('-'), term), space), E::neg)(i)
}
fn par<E: ExprSyn>(i: &str) -> ParseResult<E> {
delimited(space, delimited(tag("("), expr, tag(")")), space)(i)
}
fn term<E: ExprSyn>(i: &str) -> ParseResult<E> {
alt((lit, neg, par))(i)
}
pub fn expr<E: ExprSyn>(i: &str) -> ParseResult<E> {
let (i, init) = term(i)?;
fold_many0(pair(char('+'), term), init, |acc, (_, val): (char, E)| {
E::add(acc, val)
})(i)
}
}
#[derive(Debug, Clone)]
pub enum Term {
Lit(i64),
Neg(Box<Term>),
Add(Box<Term>, Box<Term>),
}
impl ExprSyn for Term {
fn lit(i: i64) -> Term {
Term::Lit(i)
}
fn neg(t: Term) -> Term {
Term::Neg(Box::new(t))
}
fn add(t1: Term, t2: Term) -> Term {
Term::Add(Box::new(t1), Box::new(t2))
}
}
pub fn parse(s: &str) -> Result<Term, String> {
match parse::expr::<Term>(s) {
Ok((_s, rep)) => Ok(rep),
Err(e) => Err(format!("{}", e)),
}
}
/*
pub trait Visitor<'a, T: 'a> {
fn visit_expr(&mut self, e: &'a Term) -> T;
}
pub struct Terms;
impl<'a> Visitor<'a, Vec<&'a Term>> for Terms {
fn visit_expr(&mut self, e: &'a Term) -> Vec<&'a Term> {
match *e {
Term::Lit(_) => vec![e],
Term::Neg(ref t) => {
let mut r = vec![e];
r.extend(self.visit_expr(&**t));
r
}
Term::Add(ref u, ref v) => {
let mut r = vec![e];
r.extend(self.visit_expr(&**u));
r.extend(self.visit_expr(&**v));
r
}
}
}
}
*/
// A type which can be traversed by a visitor.
pub trait Walkable<'a> {
fn accept(&'a self, v: &mut dyn Visitor<'a>) {
self.recurse(v);
}
fn recurse(&'a self, _v: &mut dyn Visitor<'a>) {}
}
// A visitor over data structures containing terms.
pub trait Visitor<'a> {
// Must return `self`.
fn object(&mut self) -> &mut dyn Visitor<'a>;
fn visit_term(&mut self, t: &'a Term) {
t.recurse(self.object());
}
}
impl<'a, T: Walkable<'a>> Walkable<'a> for Option<T> {
fn recurse(&'a self, v: &mut dyn Visitor<'a>) {
match self {
Some(some) => some.accept(v),
None => {}
}
}
}
impl<'a, A: Walkable<'a>, B: Walkable<'a>> Walkable<'a> for (A, B) {
fn recurse(&'a self, v: &mut dyn Visitor<'a>) {
self.0.accept(v);
self.1.accept(v);
}
}
impl<'a> Walkable<'a> for Term {
fn accept(&'a self, v: &mut dyn Visitor<'a>) {
v.visit_term(self);
}
fn recurse(&'a self, v: &mut dyn Visitor<'a>) {
match *self {
Term::Neg(ref t) => {
t.accept(v);
}
Term::Add(ref s, ref t) => {
s.accept(v);
t.accept(v);
}
_ => {}
}
}
}
|
use futures::task::Task;
use std::collections::HashMap;
use std::time::Instant;
pub trait Store<Path, Item> {
type Error;
fn get(&self, path: &Path, key: &str) -> Result<Option<Item>, Self::Error>;
fn get_all(&self, path: &Path) -> Result<HashMap<String, Item>, Self::Error>;
fn delete(&self, path: &Path, key: &str) -> Result<Option<Item>, Self::Error>;
fn upsert(&self, path: &Path, key: &str, item: &Item) -> Result<Option<Item>, Self::Error>;
fn updated_at(&self) -> Result<Instant, Self::Error>;
fn sub(&self, id: &str, path: &Path, task: Option<Task>) -> bool;
fn unsub(&self, id: &str, path: &Path) -> bool;
}
pub trait ThreadedStore<P, I>: Store<P, I> + Send + Sync {}
impl<T, P, I> ThreadedStore<P, I> for T
where
T: Store<P, I> + Send + Sync,
{
}
|
use piston::{
input::{RenderEvent, UpdateEvent},
window::Window,
};
use texture::CreateTexture;
use conrod_core::{
Borderable,
Labelable,
Positionable,
Sizeable,
Widget,
widget_ids,
};
use super::{game, main_menu::MainMenu, WindowContext};
use crate::{audio, chart, config::Config};
widget_ids! {
struct Ids {
list,
name_text,
by_text,
artist_text,
chart_by_text,
creator_text,
diff_list_canvas,
diff_list,
back_button,
}
}
pub struct SongSelect {
ui: conrod_core::Ui,
ids: Ids,
map: conrod_core::image::Map<opengl_graphics::Texture>,
glyph_cache: conrod_core::text::GlyphCache<'static>,
glyph_cache_texture: opengl_graphics::Texture,
song_list: Vec<chart::ChartSet>,
/// Index into song_list
selected_song_index: usize,
}
impl SongSelect {
pub(super) fn new(window_context: &mut WindowContext, _config: &Config) -> Self {
let song_list = window_context.resources.song_list
.take()
.unwrap_or_else(||
chart::osu::gen_song_list("test")
.expect("Failed to generate song list"));
let size = window_context.window.size();
let mut ui = conrod_core::UiBuilder::new([size.width, size.height]).build();
ui.handle_event(
conrod_core::event::Input::Motion(
conrod_core::input::Motion::MouseCursor {
x: window_context.mouse_position[0],
y: window_context.mouse_position[1],
}
)
);
ui.theme.font_id = Some(ui.fonts.insert(window_context.font.clone()));
ui.theme.shape_color = conrod_core::color::CHARCOAL;
ui.theme.label_color = conrod_core::color::WHITE;
let ids = Ids::new(ui.widget_id_generator());
let map = conrod_core::image::Map::new();
let glyph_cache = conrod_core::text::GlyphCache::builder()
.dimensions(1024, 1024)
.build();
let vec = vec![0; 1024*1024*4];
let glyph_cache_texture = opengl_graphics::Texture::create(
&mut (),
texture::Format::Rgba8,
&vec,
[1024, 1024],
&texture::TextureSettings::new(),
).expect("failed to create texture");
Self {
ui,
ids,
map,
glyph_cache,
glyph_cache_texture,
song_list,
selected_song_index: window_context.resources.last_selected_song_index, // default is 0
}
}
pub(super) fn event(
&mut self,
e: piston::input::Event,
config: &Config,
audio: &audio::Audio,
window_context: &mut WindowContext,
) {
let size = window_context.window.size();
if let Some(e) = conrod_piston::event::convert(e.clone(), size.width, size.height) {
self.ui.handle_event(e);
}
if let Some(_) = e.update_args() {
self.set_ui(config, audio, window_context);
}
if let Some(r) = e.render_args() {
if let Some(primitives) = self.ui.draw_if_changed() {
let self_glyph_cache_texture = &mut self.glyph_cache_texture;
let self_glyph_cache = &mut self.glyph_cache;
let self_map = &self.map;
window_context.gl.draw(r.viewport(), |c, gl| {
graphics::clear([0.0, 0.0, 0.0, 1.0], gl);
conrod_piston::draw::primitives(
primitives,
c,
gl,
self_glyph_cache_texture,
self_glyph_cache,
self_map,
super::cache_glyphs,
|t| t,
);
});
window_context.window.swap_buffers();
}
}
}
fn set_ui(&mut self, config: &Config, audio: &audio::Audio, window_context: &mut WindowContext) {
let ui = &mut self.ui.set_widgets();
{ // Song list
let (mut list_items_iter, scrollbar) = conrod_core::widget::List::flow_down(self.song_list.len())
.middle_of(ui.window)
.align_right_of(ui.window)
.item_size(45.0)
.w(ui.win_w/2.0)
.kid_area_h_of(ui.window)
.scrollbar_next_to()
.set(self.ids.list, ui);
scrollbar.map(|s| s.set(ui));
while let Some(item) = list_items_iter.next(ui) {
let mut button = conrod_core::widget::Button::new()
.label(self.song_list[item.i].song_name_unicode
.as_deref()
.or(self.song_list[item.i].song_name.as_deref())
.unwrap_or("<UNKNOWN>"))
.border(1.0)
.border_color(conrod_core::color::WHITE)
.label_font_size(15);
if item.i == self.selected_song_index {
button = button.border(2.0).border_color(conrod_core::color::RED);
}
if item.set(button, ui).was_clicked() {
self.selected_song_index = item.i;
}
}
}
{ // Selected song info
let selected_song = &self.song_list[self.selected_song_index];
let song_name = selected_song.song_name_unicode
.as_deref()
.or(selected_song.song_name.as_deref())
.unwrap_or("<UNKNOWN>");
let song_artist = selected_song.artist_unicode
.as_deref()
.or(selected_song.artist.as_deref())
.unwrap_or("<UNKNOWN>");
let chart_creator = selected_song.creator
.as_deref()
.unwrap_or("<UNKNOWN>");
conrod_core::widget::Text::new(song_name)
.w(ui.win_w/2.0-50.0)
.top_left_with_margins_on(ui.window, 50.0, 30.0)
.font_size(20)
.set(self.ids.name_text, ui);
conrod_core::widget::Text::new("Artist: ")
.down(5.0)
.font_size(15)
.set(self.ids.by_text, ui);
conrod_core::widget::Text::new(song_artist)
.w(ui.win_w/2.0-50.0-ui.w_of(self.ids.by_text).unwrap_or(0.0))
.right(0.0)
.font_size(15)
.set(self.ids.artist_text, ui);
conrod_core::widget::Text::new("Chart by: ")
.top_left_with_margins_on(ui.window, 50.0, 30.0)
.down(5.0)
.font_size(15)
.set(self.ids.chart_by_text, ui);
conrod_core::widget::Text::new(chart_creator)
.w(ui.win_w/2.0-50.0-ui.w_of(self.ids.by_text).unwrap_or(0.0))
.right(0.0)
.font_size(15)
.set(self.ids.creator_text, ui);
}
{ // Current song difficulty list
let selected_song = &self.song_list[self.selected_song_index];
let (mut list_items_iter, scrollbar) = conrod_core::widget::List::flow_down(selected_song.difficulties.len())
.top_left_with_margins_on(ui.window, ui.win_h/2.0, 30.0)
.item_size(35.0)
.h(ui.win_h/2.0-30.0)
.w(ui.win_w/2.0-60.0)
.scrollbar_on_top()
.set(self.ids.diff_list, ui);
scrollbar.map(|s| s.set(ui));
while let Some(item) = list_items_iter.next(ui) {
let difficulty = &selected_song.difficulties[item.i];
let button = conrod_core::widget::Button::new()
.label(&difficulty.name)
.border(1.0)
.border_color(conrod_core::color::WHITE)
.label_font_size(15);
if item.set(button, ui).was_clicked() {
match chart::osu::from_path(difficulty.path.clone()) {
Ok(x) => Self::change_scene(game::GameScene::new(Box::new(x), config, audio), window_context),
Err(e) => println!("{}", e),
}
}
}
}
// back button
if conrod_core::widget::Button::new()
.top_left_of(ui.window)
.w_h(35.0, 25.0)
.label("back")
.small_font(&ui)
.set(self.ids.back_button, ui)
.was_clicked()
{
Self::change_scene(MainMenu::new(), window_context);
}
}
fn change_scene<S: Into<super::Scene> + 'static>(scene: S, window_context: &mut WindowContext) {
window_context.change_scene_with(move |this: Self, window_context| {
window_context.resources.song_list = Some(this.song_list);
window_context.resources.last_selected_song_index = this.selected_song_index;
scene
});
}
}
|
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct AutoLoadedDisplayPropertyKind(pub i32);
impl AutoLoadedDisplayPropertyKind {
pub const None: AutoLoadedDisplayPropertyKind = AutoLoadedDisplayPropertyKind(0i32);
pub const MusicOrVideo: AutoLoadedDisplayPropertyKind = AutoLoadedDisplayPropertyKind(1i32);
pub const Music: AutoLoadedDisplayPropertyKind = AutoLoadedDisplayPropertyKind(2i32);
pub const Video: AutoLoadedDisplayPropertyKind = AutoLoadedDisplayPropertyKind(3i32);
}
impl ::core::convert::From<i32> for AutoLoadedDisplayPropertyKind {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for AutoLoadedDisplayPropertyKind {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for AutoLoadedDisplayPropertyKind {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.AutoLoadedDisplayPropertyKind;i4)");
}
impl ::windows::core::DefaultType for AutoLoadedDisplayPropertyKind {
type DefaultType = Self;
}
pub struct BackgroundMediaPlayer {}
impl BackgroundMediaPlayer {
#[cfg(feature = "deprecated")]
pub fn Current() -> ::windows::core::Result<MediaPlayer> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayer>(result__)
})
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn MessageReceivedFromBackground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<MediaPlayerDataReceivedEventArgs>>>(value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
})
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveMessageReceivedFromBackground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(token: Param0) -> ::windows::core::Result<()> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() })
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn MessageReceivedFromForeground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventHandler<MediaPlayerDataReceivedEventArgs>>>(value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
})
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveMessageReceivedFromForeground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(token: Param0) -> ::windows::core::Result<()> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() })
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation_Collections")]
pub fn SendMessageToBackground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::ValueSet>>(value: Param0) -> ::windows::core::Result<()> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() })
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation_Collections")]
pub fn SendMessageToForeground<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::ValueSet>>(value: Param0) -> ::windows::core::Result<()> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() })
}
#[cfg(feature = "deprecated")]
pub fn IsMediaPlaying() -> ::windows::core::Result<bool> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
})
}
#[cfg(feature = "deprecated")]
pub fn Shutdown() -> ::windows::core::Result<()> {
Self::IBackgroundMediaPlayerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this)).ok() })
}
pub fn IBackgroundMediaPlayerStatics<R, F: FnOnce(&IBackgroundMediaPlayerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<BackgroundMediaPlayer, IBackgroundMediaPlayerStatics> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
impl ::windows::core::RuntimeName for BackgroundMediaPlayer {
const NAME: &'static str = "Windows.Media.Playback.BackgroundMediaPlayer";
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct CurrentMediaPlaybackItemChangedEventArgs(pub ::windows::core::IInspectable);
impl CurrentMediaPlaybackItemChangedEventArgs {
pub fn NewItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn OldItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn Reason(&self) -> ::windows::core::Result<MediaPlaybackItemChangedReason> {
let this = &::windows::core::Interface::cast::<ICurrentMediaPlaybackItemChangedEventArgs2>(self)?;
unsafe {
let mut result__: MediaPlaybackItemChangedReason = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItemChangedReason>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for CurrentMediaPlaybackItemChangedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.CurrentMediaPlaybackItemChangedEventArgs;{1743a892-5c43-4a15-967a-572d2d0f26c6})");
}
unsafe impl ::windows::core::Interface for CurrentMediaPlaybackItemChangedEventArgs {
type Vtable = ICurrentMediaPlaybackItemChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1743a892_5c43_4a15_967a_572d2d0f26c6);
}
impl ::windows::core::RuntimeName for CurrentMediaPlaybackItemChangedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.CurrentMediaPlaybackItemChangedEventArgs";
}
impl ::core::convert::From<CurrentMediaPlaybackItemChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: CurrentMediaPlaybackItemChangedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&CurrentMediaPlaybackItemChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: &CurrentMediaPlaybackItemChangedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for CurrentMediaPlaybackItemChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a CurrentMediaPlaybackItemChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<CurrentMediaPlaybackItemChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: CurrentMediaPlaybackItemChangedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&CurrentMediaPlaybackItemChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: &CurrentMediaPlaybackItemChangedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for CurrentMediaPlaybackItemChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a CurrentMediaPlaybackItemChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for CurrentMediaPlaybackItemChangedEventArgs {}
unsafe impl ::core::marker::Sync for CurrentMediaPlaybackItemChangedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct FailedMediaStreamKind(pub i32);
impl FailedMediaStreamKind {
pub const Unknown: FailedMediaStreamKind = FailedMediaStreamKind(0i32);
pub const Audio: FailedMediaStreamKind = FailedMediaStreamKind(1i32);
pub const Video: FailedMediaStreamKind = FailedMediaStreamKind(2i32);
}
impl ::core::convert::From<i32> for FailedMediaStreamKind {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for FailedMediaStreamKind {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for FailedMediaStreamKind {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.FailedMediaStreamKind;i4)");
}
impl ::windows::core::DefaultType for FailedMediaStreamKind {
type DefaultType = Self;
}
#[repr(transparent)]
#[doc(hidden)]
pub struct IBackgroundMediaPlayerStatics(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IBackgroundMediaPlayerStatics {
type Vtable = IBackgroundMediaPlayerStatics_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x856ddbc1_55f7_471f_a0f2_68ac4c904592);
}
#[repr(C)]
#[doc(hidden)]
pub struct IBackgroundMediaPlayerStatics_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct ICurrentMediaPlaybackItemChangedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for ICurrentMediaPlaybackItemChangedEventArgs {
type Vtable = ICurrentMediaPlaybackItemChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1743a892_5c43_4a15_967a_572d2d0f26c6);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICurrentMediaPlaybackItemChangedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct ICurrentMediaPlaybackItemChangedEventArgs2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for ICurrentMediaPlaybackItemChangedEventArgs2 {
type Vtable = ICurrentMediaPlaybackItemChangedEventArgs2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1d80a51e_996e_40a9_be48_e66ec90b2b7d);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICurrentMediaPlaybackItemChangedEventArgs2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackItemChangedReason) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreak(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreak {
type Vtable = IMediaBreak_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x714be270_0def_4ebc_a489_6b34930e1558);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreak_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaBreakInsertionMethod) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakEndedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakEndedEventArgs {
type Vtable = IMediaBreakEndedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x32b93276_1c5d_4fee_8732_236dc3a88580);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakEndedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakFactory(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakFactory {
type Vtable = IMediaBreakFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4516e002_18e0_4079_8b5f_d33495c15d2e);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, insertionmethod: MediaBreakInsertionMethod, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, insertionmethod: MediaBreakInsertionMethod, presentationposition: super::super::Foundation::TimeSpan, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakManager(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakManager {
type Vtable = IMediaBreakManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa854ddb1_feb4_4d9b_9d97_0fdbe58e5e39);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakManager_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakSchedule(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakSchedule {
type Vtable = IMediaBreakSchedule_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa19a5813_98b6_41d8_83da_f971d22b7bba);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakSchedule_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mediabreak: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, mediabreak: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakSeekedOverEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakSeekedOverEventArgs {
type Vtable = IMediaBreakSeekedOverEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5aa6746_0606_4492_b9d3_c3c8fde0a4ea);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakSeekedOverEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakSkippedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakSkippedEventArgs {
type Vtable = IMediaBreakSkippedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6ee94c05_2f54_4a3e_a3ab_24c3b270b4a3);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakSkippedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaBreakStartedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaBreakStartedEventArgs {
type Vtable = IMediaBreakStartedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa87efe71_dfd4_454a_956e_0a4a648395f8);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaBreakStartedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IMediaEnginePlaybackSource(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaEnginePlaybackSource {
type Vtable = IMediaEnginePlaybackSource_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5c1d0ba7_3856_48b9_8dc6_244bf107bf8c);
}
impl IMediaEnginePlaybackSource {
#[cfg(feature = "deprecated")]
pub fn CurrentItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
#[cfg(feature = "deprecated")]
pub fn SetPlaybackSource<'a, Param0: ::windows::core::IntoParam<'a, IMediaPlaybackSource>>(&self, source: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), source.into_param().abi()).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for IMediaEnginePlaybackSource {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{5c1d0ba7-3856-48b9-8dc6-244bf107bf8c}");
}
impl ::core::convert::From<IMediaEnginePlaybackSource> for ::windows::core::IUnknown {
fn from(value: IMediaEnginePlaybackSource) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&IMediaEnginePlaybackSource> for ::windows::core::IUnknown {
fn from(value: &IMediaEnginePlaybackSource) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaEnginePlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaEnginePlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<IMediaEnginePlaybackSource> for ::windows::core::IInspectable {
fn from(value: IMediaEnginePlaybackSource) -> Self {
value.0
}
}
impl ::core::convert::From<&IMediaEnginePlaybackSource> for ::windows::core::IInspectable {
fn from(value: &IMediaEnginePlaybackSource) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaEnginePlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaEnginePlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaEnginePlaybackSource_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaItemDisplayProperties(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaItemDisplayProperties {
type Vtable = IMediaItemDisplayProperties_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e3c1b48_7097_4384_a217_c1291dfa8c16);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaItemDisplayProperties_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::MediaPlaybackType) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::MediaPlaybackType) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))] usize,
#[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManager(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManager {
type Vtable = IMediaPlaybackCommandManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5acee5a6_5cb6_4a5a_8521_cc86b1c1ed37);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManager_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d6f4f23_5230_4411_a0e9_bad94c2a045c);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::MediaPlaybackAutoRepeatMode) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerCommandBehavior(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerCommandBehavior {
type Vtable = IMediaPlaybackCommandManagerCommandBehavior_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x786c1e78_ce78_4a10_afd6_843fcbb90c2e);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerCommandBehavior_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaCommandEnablingRule) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaCommandEnablingRule) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerFastForwardReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerFastForwardReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerFastForwardReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30f064d9_b491_4d0a_bc21_3098bd1332e9);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerFastForwardReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerNextReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerNextReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerNextReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe1504433_a2b0_45d4_b9de_5f42ac14a839);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerNextReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPauseReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerPauseReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPauseReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ceccd1c_c25c_4221_b16c_c3c98ce012d6);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPauseReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPlayReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerPlayReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPlayReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9af0004e_578b_4c56_a006_16159d888a48);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPlayReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPositionReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerPositionReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPositionReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5591a754_d627_4bdd_a90d_86a015b24902);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPositionReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPreviousReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerPreviousReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPreviousReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x525e3081_4632_4f76_99b1_d771623f6287);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerPreviousReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerRateReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerRateReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerRateReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x18ea3939_4a16_4169_8b05_3eb9f5ff78eb);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerRateReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerRewindReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerRewindReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerRewindReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f085947_a3c0_425d_aaef_97ba7898b141);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerRewindReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerShuffleReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackCommandManagerShuffleReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerShuffleReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50a05cef_63ee_4a96_b7b5_fee08b9ff90c);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackCommandManagerShuffleReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItem(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItem {
type Vtable = IMediaPlaybackItem_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x047097d2_e4af_48ab_b283_6929e674ece2);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItem_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Media_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Core"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItem2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItem2 {
type Vtable = IMediaPlaybackItem2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd859d171_d7ef_4b81_ac1f_f40493cbb091);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItem2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItem3(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItem3 {
type Vtable = IMediaPlaybackItem3_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d328220_b80a_4d09_9ff8_f87094a1c831);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItem3_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut AutoLoadedDisplayPropertyKind) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: AutoLoadedDisplayPropertyKind) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemError(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemError {
type Vtable = IMediaPlaybackItemError_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69fbef2b_dcd6_4df9_a450_dbf4c6f1c2c2);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemError_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackItemErrorCode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFactory(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemFactory {
type Vtable = IMediaPlaybackItemFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7133fce1_1769_4ff9_a7c1_38d2c4d42360);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Core"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFactory2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemFactory2 {
type Vtable = IMediaPlaybackItemFactory2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd77cdf3a_b947_4972_b35d_adfb931a71e6);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFactory2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Foundation", feature = "Media_Core"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, starttime: super::super::Foundation::TimeSpan, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Media_Core")))] usize,
#[cfg(all(feature = "Foundation", feature = "Media_Core"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, starttime: super::super::Foundation::TimeSpan, durationlimit: super::super::Foundation::TimeSpan, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Media_Core")))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFailedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemFailedEventArgs {
type Vtable = IMediaPlaybackItemFailedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7703134a_e9a7_47c3_862c_c656d30683d4);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemFailedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemOpenedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemOpenedEventArgs {
type Vtable = IMediaPlaybackItemOpenedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcbd9bd82_3037_4fbe_ae8f_39fc39edf4ef);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemOpenedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackItemStatics(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackItemStatics {
type Vtable = IMediaPlaybackItemStatics_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4b1be7f4_4345_403c_8a67_f5de91df4c86);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackItemStatics_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Core"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackList(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackList {
type Vtable = IMediaPlaybackList_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7f77ee9c_dc42_4e26_a98d_7850df8ec925);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackList_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itemindex: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackList2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackList2 {
type Vtable = IMediaPlaybackList2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0e09b478_600a_4274_a14b_0b6723d0f48b);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackList2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackList3(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackList3 {
type Vtable = IMediaPlaybackList3_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdd24bba9_bc47_4463_aa90_c18b7e5ffde1);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackList3_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSession(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSession {
type Vtable = IMediaPlaybackSession_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc32b683d_0407_41ba_8946_8b345a5a5435);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSession_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackState) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Rect) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Rect) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::MediaProperties::StereoscopicVideoPackingMode) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::MediaProperties::StereoscopicVideoPackingMode) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSession2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSession2 {
type Vtable = IMediaPlaybackSession2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf8ba7c79_1fc8_4097_ad70_c0fa18cc0050);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSession2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rate1: f64, rate2: f64, result__: *mut bool) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSession3(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSession3 {
type Vtable = IMediaPlaybackSession3_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7ba2b41a_a3e2_405f_b77b_a4812c238b66);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSession3_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::MediaProperties::MediaRotation) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::MediaProperties::MediaRotation) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSessionBufferingStartedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSessionBufferingStartedEventArgs {
type Vtable = IMediaPlaybackSessionBufferingStartedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcd6aafed_74e2_43b5_b115_76236c33791a);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSessionBufferingStartedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSessionOutputDegradationPolicyState(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSessionOutputDegradationPolicyState {
type Vtable = IMediaPlaybackSessionOutputDegradationPolicyState_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x558e727d_f633_49f9_965a_abaa1db709be);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSessionOutputDegradationPolicyState_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlaybackSessionVideoConstrictionReason) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IMediaPlaybackSource(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSource {
type Vtable = IMediaPlaybackSource_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef9dc2bc_9317_4696_b051_2bad643177b5);
}
impl IMediaPlaybackSource {}
unsafe impl ::windows::core::RuntimeType for IMediaPlaybackSource {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{ef9dc2bc-9317-4696-b051-2bad643177b5}");
}
impl ::core::convert::From<IMediaPlaybackSource> for ::windows::core::IUnknown {
fn from(value: IMediaPlaybackSource) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&IMediaPlaybackSource> for ::windows::core::IUnknown {
fn from(value: &IMediaPlaybackSource) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaPlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaPlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<IMediaPlaybackSource> for ::windows::core::IInspectable {
fn from(value: IMediaPlaybackSource) -> Self {
value.0
}
}
impl ::core::convert::From<&IMediaPlaybackSource> for ::windows::core::IInspectable {
fn from(value: &IMediaPlaybackSource) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for IMediaPlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a IMediaPlaybackSource {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSource_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackSphericalVideoProjection(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackSphericalVideoProjection {
type Vtable = IMediaPlaybackSphericalVideoProjection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd405b37c_6f0e_4661_b8ee_d487ba9752d5);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackSphericalVideoProjection_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::MediaProperties::SphericalVideoFrameFormat) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
#[cfg(feature = "Media_MediaProperties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::MediaProperties::SphericalVideoFrameFormat) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_MediaProperties"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Numerics"))] usize,
#[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::Numerics::Quaternion) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Numerics"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SphericalVideoProjectionMode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: SphericalVideoProjectionMode) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlaybackTimedMetadataTrackList(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlaybackTimedMetadataTrackList {
type Vtable = IMediaPlaybackTimedMetadataTrackList_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x72b41319_bbfb_46a3_9372_9c9c744b9438);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlaybackTimedMetadataTrackList_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Foundation_Collections")))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, index: u32, result__: *mut TimedMetadataTrackPresentationMode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, index: u32, value: TimedMetadataTrackPresentationMode) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer {
type Vtable = IMediaPlayer_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x381a83cb_6fff_499b_8d64_2885dfc1249e);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlayerState) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer2 {
type Vtable = IMediaPlayer2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3c841218_2123_4fc5_9082_2f883f77bdf5);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlayerAudioCategory) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaPlayerAudioCategory) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlayerAudioDeviceType) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: MediaPlayerAudioDeviceType) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer3(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer3 {
type Vtable = IMediaPlayer3_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xee0660da_031b_4feb_bd9b_92e0a0a8d299);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer3_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: f64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut StereoscopicVideoRenderMode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: StereoscopicVideoRenderMode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Devices_Enumeration")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Devices_Enumeration"))] usize,
#[cfg(feature = "Devices_Enumeration")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Devices_Enumeration"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Casting")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Casting"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer4(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer4 {
type Vtable = IMediaPlayer4_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x80035db0_7448_4770_afcf_2a57450914c5);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer4_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, size: super::super::Foundation::Size) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "UI_Composition")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, compositor: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "UI_Composition"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer5(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer5 {
type Vtable = IMediaPlayer5_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcfe537fd_f86a_4446_bf4d_c8e792b7b4b3);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer5_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: bool) -> ::windows::core::HRESULT,
#[cfg(feature = "Graphics_DirectX_Direct3D11")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Graphics_DirectX_Direct3D11"))] usize,
#[cfg(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, destination: ::windows::core::RawPtr, targetrectangle: super::super::Foundation::Rect) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11")))] usize,
#[cfg(feature = "Graphics_DirectX_Direct3D11")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, destinationlefteye: ::windows::core::RawPtr, destinationrighteye: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Graphics_DirectX_Direct3D11"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer6(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer6 {
type Vtable = IMediaPlayer6_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe0caa086_ae65_414c_b010_8bc55f00e692);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer6_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Graphics_DirectX_Direct3D11")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, destination: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Graphics_DirectX_Direct3D11"))] usize,
#[cfg(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, destination: ::windows::core::RawPtr, targetrectangle: super::super::Foundation::Rect, result__: *mut bool) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11")))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayer7(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayer7 {
type Vtable = IMediaPlayer7_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d1dc478_4500_4531_b3f4_777a71491f7f);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayer7_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Audio")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Audio"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerDataReceivedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerDataReceivedEventArgs {
type Vtable = IMediaPlayerDataReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc75a9405_c801_412a_835b_83fc0e622a8e);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerDataReceivedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerEffects(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerEffects {
type Vtable = IMediaPlayerEffects_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x85a1deda_cab6_4cc0_8be3_6035f4de2591);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerEffects_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, effectoptional: bool, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerEffects2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerEffects2 {
type Vtable = IMediaPlayerEffects2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfa419a79_1bbe_46c5_ae1f_8ee69fb3c2c7);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerEffects2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, effectoptional: bool, effectconfiguration: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerFailedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerFailedEventArgs {
type Vtable = IMediaPlayerFailedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2744e9b9_a7e3_4f16_bac4_7914ebc08301);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerFailedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut MediaPlayerError) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerRateChangedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerRateChangedEventArgs {
type Vtable = IMediaPlayerRateChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40600d58_3b61_4bb2_989f_fc65608b6cab);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerRateChangedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut f64) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerSource(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerSource {
type Vtable = IMediaPlayerSource_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbd4f8897_1423_4c3e_82c5_0fb1af94f715);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerSource_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Protection")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Protection"))] usize,
#[cfg(feature = "Media_Protection")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Protection"))] usize,
#[cfg(feature = "Storage")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, file: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Storage"))] usize,
#[cfg(feature = "Storage_Streams")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, stream: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))] usize,
#[cfg(feature = "Media_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Core"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerSource2(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerSource2 {
type Vtable = IMediaPlayerSource2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x82449b9f_7322_4c0b_b03b_3e69a48260c5);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerSource2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IMediaPlayerSurface(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IMediaPlayerSurface {
type Vtable = IMediaPlayerSurface_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0ed653bc_b736_49c3_830b_764a3845313a);
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaPlayerSurface_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "UI_Composition")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "UI_Composition"))] usize,
#[cfg(feature = "UI_Composition")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "UI_Composition"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IPlaybackMediaMarker(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IPlaybackMediaMarker {
type Vtable = IPlaybackMediaMarker_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc4d22f5c_3c1c_4444_b6b9_778b0422d41a);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlaybackMediaMarker_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerFactory(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IPlaybackMediaMarkerFactory {
type Vtable = IPlaybackMediaMarkerFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8c530a78_e0ae_4e1a_a8c8_e23f982a937b);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
#[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: super::super::Foundation::TimeSpan, mediamarkettype: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Foundation"))] usize,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerReachedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IPlaybackMediaMarkerReachedEventArgs {
type Vtable = IPlaybackMediaMarkerReachedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x578cd1b9_90e2_4e60_abc4_8740b01f6196);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerReachedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerSequence(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for IPlaybackMediaMarkerSequence {
type Vtable = IPlaybackMediaMarkerSequence_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2810cee_638b_46cf_8817_1d111fe9d8c4);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlaybackMediaMarkerSequence_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[doc(hidden)]
pub struct ITimedMetadataPresentationModeChangedEventArgs(pub ::windows::core::IInspectable);
unsafe impl ::windows::core::Interface for ITimedMetadataPresentationModeChangedEventArgs {
type Vtable = ITimedMetadataPresentationModeChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd1636099_65df_45ae_8cef_dc0b53fdc2bb);
}
#[repr(C)]
#[doc(hidden)]
pub struct ITimedMetadataPresentationModeChangedEventArgs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT,
#[cfg(feature = "Media_Core")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Media_Core"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut TimedMetadataTrackPresentationMode) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut TimedMetadataTrackPresentationMode) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreak(pub ::windows::core::IInspectable);
impl MediaBreak {
pub fn PlaybackList(&self) -> ::windows::core::Result<MediaPlaybackList> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackList>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn PresentationPosition(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>>(result__)
}
}
pub fn InsertionMethod(&self) -> ::windows::core::Result<MediaBreakInsertionMethod> {
let this = self;
unsafe {
let mut result__: MediaBreakInsertionMethod = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreakInsertionMethod>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn CustomProperties(&self) -> ::windows::core::Result<super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::ValueSet>(result__)
}
}
pub fn CanStart(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetCanStart(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn Create(insertionmethod: MediaBreakInsertionMethod) -> ::windows::core::Result<MediaBreak> {
Self::IMediaBreakFactory(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), insertionmethod, &mut result__).from_abi::<MediaBreak>(result__)
})
}
#[cfg(feature = "Foundation")]
pub fn CreateWithPresentationPosition<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(insertionmethod: MediaBreakInsertionMethod, presentationposition: Param1) -> ::windows::core::Result<MediaBreak> {
Self::IMediaBreakFactory(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), insertionmethod, presentationposition.into_param().abi(), &mut result__).from_abi::<MediaBreak>(result__)
})
}
pub fn IMediaBreakFactory<R, F: FnOnce(&IMediaBreakFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaBreak, IMediaBreakFactory> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreak {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreak;{714be270-0def-4ebc-a489-6b34930e1558})");
}
unsafe impl ::windows::core::Interface for MediaBreak {
type Vtable = IMediaBreak_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x714be270_0def_4ebc_a489_6b34930e1558);
}
impl ::windows::core::RuntimeName for MediaBreak {
const NAME: &'static str = "Windows.Media.Playback.MediaBreak";
}
impl ::core::convert::From<MediaBreak> for ::windows::core::IUnknown {
fn from(value: MediaBreak) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreak> for ::windows::core::IUnknown {
fn from(value: &MediaBreak) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreak {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreak {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreak> for ::windows::core::IInspectable {
fn from(value: MediaBreak) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreak> for ::windows::core::IInspectable {
fn from(value: &MediaBreak) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreak {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreak {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreak {}
unsafe impl ::core::marker::Sync for MediaBreak {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakEndedEventArgs(pub ::windows::core::IInspectable);
impl MediaBreakEndedEventArgs {
pub fn MediaBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakEndedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakEndedEventArgs;{32b93276-1c5d-4fee-8732-236dc3a88580})");
}
unsafe impl ::windows::core::Interface for MediaBreakEndedEventArgs {
type Vtable = IMediaBreakEndedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x32b93276_1c5d_4fee_8732_236dc3a88580);
}
impl ::windows::core::RuntimeName for MediaBreakEndedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakEndedEventArgs";
}
impl ::core::convert::From<MediaBreakEndedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaBreakEndedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakEndedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaBreakEndedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakEndedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakEndedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakEndedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaBreakEndedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakEndedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaBreakEndedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakEndedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakEndedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakEndedEventArgs {}
unsafe impl ::core::marker::Sync for MediaBreakEndedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaBreakInsertionMethod(pub i32);
impl MediaBreakInsertionMethod {
pub const Interrupt: MediaBreakInsertionMethod = MediaBreakInsertionMethod(0i32);
pub const Replace: MediaBreakInsertionMethod = MediaBreakInsertionMethod(1i32);
}
impl ::core::convert::From<i32> for MediaBreakInsertionMethod {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaBreakInsertionMethod {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaBreakInsertionMethod {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaBreakInsertionMethod;i4)");
}
impl ::windows::core::DefaultType for MediaBreakInsertionMethod {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakManager(pub ::windows::core::IInspectable);
impl MediaBreakManager {
#[cfg(feature = "Foundation")]
pub fn BreaksSeekedOver<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaBreakManager, MediaBreakSeekedOverEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBreaksSeekedOver<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BreakStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaBreakManager, MediaBreakStartedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBreakStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BreakEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaBreakManager, MediaBreakEndedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBreakEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BreakSkipped<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaBreakManager, MediaBreakSkippedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBreakSkipped<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn CurrentBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
pub fn PlaybackSession(&self) -> ::windows::core::Result<MediaPlaybackSession> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackSession>(result__)
}
}
pub fn PlayBreak<'a, Param0: ::windows::core::IntoParam<'a, MediaBreak>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn SkipCurrentBreak(&self) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this)).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakManager {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakManager;{a854ddb1-feb4-4d9b-9d97-0fdbe58e5e39})");
}
unsafe impl ::windows::core::Interface for MediaBreakManager {
type Vtable = IMediaBreakManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa854ddb1_feb4_4d9b_9d97_0fdbe58e5e39);
}
impl ::windows::core::RuntimeName for MediaBreakManager {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakManager";
}
impl ::core::convert::From<MediaBreakManager> for ::windows::core::IUnknown {
fn from(value: MediaBreakManager) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakManager> for ::windows::core::IUnknown {
fn from(value: &MediaBreakManager) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakManager> for ::windows::core::IInspectable {
fn from(value: MediaBreakManager) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakManager> for ::windows::core::IInspectable {
fn from(value: &MediaBreakManager) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakManager {}
unsafe impl ::core::marker::Sync for MediaBreakManager {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakSchedule(pub ::windows::core::IInspectable);
impl MediaBreakSchedule {
#[cfg(feature = "Foundation")]
pub fn ScheduleChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaBreakSchedule, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveScheduleChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn InsertMidrollBreak<'a, Param0: ::windows::core::IntoParam<'a, MediaBreak>>(&self, mediabreak: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), mediabreak.into_param().abi()).ok() }
}
pub fn RemoveMidrollBreak<'a, Param0: ::windows::core::IntoParam<'a, MediaBreak>>(&self, mediabreak: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), mediabreak.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn MidrollBreaks(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<MediaBreak>> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<MediaBreak>>(result__)
}
}
pub fn SetPrerollBreak<'a, Param0: ::windows::core::IntoParam<'a, MediaBreak>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn PrerollBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
pub fn SetPostrollBreak<'a, Param0: ::windows::core::IntoParam<'a, MediaBreak>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn PostrollBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
pub fn PlaybackItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakSchedule {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakSchedule;{a19a5813-98b6-41d8-83da-f971d22b7bba})");
}
unsafe impl ::windows::core::Interface for MediaBreakSchedule {
type Vtable = IMediaBreakSchedule_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa19a5813_98b6_41d8_83da_f971d22b7bba);
}
impl ::windows::core::RuntimeName for MediaBreakSchedule {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakSchedule";
}
impl ::core::convert::From<MediaBreakSchedule> for ::windows::core::IUnknown {
fn from(value: MediaBreakSchedule) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakSchedule> for ::windows::core::IUnknown {
fn from(value: &MediaBreakSchedule) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakSchedule {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakSchedule {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakSchedule> for ::windows::core::IInspectable {
fn from(value: MediaBreakSchedule) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakSchedule> for ::windows::core::IInspectable {
fn from(value: &MediaBreakSchedule) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakSchedule {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakSchedule {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakSchedule {}
unsafe impl ::core::marker::Sync for MediaBreakSchedule {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakSeekedOverEventArgs(pub ::windows::core::IInspectable);
impl MediaBreakSeekedOverEventArgs {
#[cfg(feature = "Foundation_Collections")]
pub fn SeekedOverBreaks(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<MediaBreak>> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<MediaBreak>>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn OldPosition(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn NewPosition(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakSeekedOverEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakSeekedOverEventArgs;{e5aa6746-0606-4492-b9d3-c3c8fde0a4ea})");
}
unsafe impl ::windows::core::Interface for MediaBreakSeekedOverEventArgs {
type Vtable = IMediaBreakSeekedOverEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5aa6746_0606_4492_b9d3_c3c8fde0a4ea);
}
impl ::windows::core::RuntimeName for MediaBreakSeekedOverEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakSeekedOverEventArgs";
}
impl ::core::convert::From<MediaBreakSeekedOverEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaBreakSeekedOverEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakSeekedOverEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaBreakSeekedOverEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakSeekedOverEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakSeekedOverEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakSeekedOverEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaBreakSeekedOverEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakSeekedOverEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaBreakSeekedOverEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakSeekedOverEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakSeekedOverEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakSeekedOverEventArgs {}
unsafe impl ::core::marker::Sync for MediaBreakSeekedOverEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakSkippedEventArgs(pub ::windows::core::IInspectable);
impl MediaBreakSkippedEventArgs {
pub fn MediaBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakSkippedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakSkippedEventArgs;{6ee94c05-2f54-4a3e-a3ab-24c3b270b4a3})");
}
unsafe impl ::windows::core::Interface for MediaBreakSkippedEventArgs {
type Vtable = IMediaBreakSkippedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6ee94c05_2f54_4a3e_a3ab_24c3b270b4a3);
}
impl ::windows::core::RuntimeName for MediaBreakSkippedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakSkippedEventArgs";
}
impl ::core::convert::From<MediaBreakSkippedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaBreakSkippedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakSkippedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaBreakSkippedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakSkippedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakSkippedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakSkippedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaBreakSkippedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakSkippedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaBreakSkippedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakSkippedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakSkippedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakSkippedEventArgs {}
unsafe impl ::core::marker::Sync for MediaBreakSkippedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaBreakStartedEventArgs(pub ::windows::core::IInspectable);
impl MediaBreakStartedEventArgs {
pub fn MediaBreak(&self) -> ::windows::core::Result<MediaBreak> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreak>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaBreakStartedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaBreakStartedEventArgs;{a87efe71-dfd4-454a-956e-0a4a648395f8})");
}
unsafe impl ::windows::core::Interface for MediaBreakStartedEventArgs {
type Vtable = IMediaBreakStartedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa87efe71_dfd4_454a_956e_0a4a648395f8);
}
impl ::windows::core::RuntimeName for MediaBreakStartedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaBreakStartedEventArgs";
}
impl ::core::convert::From<MediaBreakStartedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaBreakStartedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaBreakStartedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaBreakStartedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaBreakStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaBreakStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaBreakStartedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaBreakStartedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaBreakStartedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaBreakStartedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaBreakStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaBreakStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaBreakStartedEventArgs {}
unsafe impl ::core::marker::Sync for MediaBreakStartedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaCommandEnablingRule(pub i32);
impl MediaCommandEnablingRule {
pub const Auto: MediaCommandEnablingRule = MediaCommandEnablingRule(0i32);
pub const Always: MediaCommandEnablingRule = MediaCommandEnablingRule(1i32);
pub const Never: MediaCommandEnablingRule = MediaCommandEnablingRule(2i32);
}
impl ::core::convert::From<i32> for MediaCommandEnablingRule {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaCommandEnablingRule {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaCommandEnablingRule {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaCommandEnablingRule;i4)");
}
impl ::windows::core::DefaultType for MediaCommandEnablingRule {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaItemDisplayProperties(pub ::windows::core::IInspectable);
impl MediaItemDisplayProperties {
pub fn Type(&self) -> ::windows::core::Result<super::MediaPlaybackType> {
let this = self;
unsafe {
let mut result__: super::MediaPlaybackType = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaPlaybackType>(result__)
}
}
pub fn SetType(&self, value: super::MediaPlaybackType) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn MusicProperties(&self) -> ::windows::core::Result<super::MusicDisplayProperties> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MusicDisplayProperties>(result__)
}
}
pub fn VideoProperties(&self) -> ::windows::core::Result<super::VideoDisplayProperties> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::VideoDisplayProperties>(result__)
}
}
#[cfg(feature = "Storage_Streams")]
pub fn Thumbnail(&self) -> ::windows::core::Result<super::super::Storage::Streams::RandomAccessStreamReference> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Storage::Streams::RandomAccessStreamReference>(result__)
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SetThumbnail<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::Streams::RandomAccessStreamReference>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn ClearAll(&self) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this)).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaItemDisplayProperties {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaItemDisplayProperties;{1e3c1b48-7097-4384-a217-c1291dfa8c16})");
}
unsafe impl ::windows::core::Interface for MediaItemDisplayProperties {
type Vtable = IMediaItemDisplayProperties_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1e3c1b48_7097_4384_a217_c1291dfa8c16);
}
impl ::windows::core::RuntimeName for MediaItemDisplayProperties {
const NAME: &'static str = "Windows.Media.Playback.MediaItemDisplayProperties";
}
impl ::core::convert::From<MediaItemDisplayProperties> for ::windows::core::IUnknown {
fn from(value: MediaItemDisplayProperties) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaItemDisplayProperties> for ::windows::core::IUnknown {
fn from(value: &MediaItemDisplayProperties) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaItemDisplayProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaItemDisplayProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaItemDisplayProperties> for ::windows::core::IInspectable {
fn from(value: MediaItemDisplayProperties) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaItemDisplayProperties> for ::windows::core::IInspectable {
fn from(value: &MediaItemDisplayProperties) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaItemDisplayProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaItemDisplayProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaItemDisplayProperties {}
unsafe impl ::core::marker::Sync for MediaItemDisplayProperties {}
#[cfg(feature = "Foundation_Collections")]
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackAudioTrackList(pub ::windows::core::IInspectable);
#[cfg(feature = "Foundation_Collections")]
impl MediaPlaybackAudioTrackList {
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetAt(&self, index: u32) -> ::windows::core::Result<super::Core::AudioTrack> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<super::Core::AudioTrack>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn Size(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn IndexOf<'a, Param0: ::windows::core::IntoParam<'a, super::Core::AudioTrack>>(&self, value: Param0, index: &mut u32) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetMany(&self, startindex: u32, items: &mut [<super::Core::AudioTrack as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<super::Core::AudioTrack>> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<super::Core::AudioTrack>>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn SelectedIndexChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<super::Core::ISingleSelectMediaTrackList, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn RemoveSelectedIndexChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Media_Core")]
pub fn SetSelectedIndex(&self, value: i32) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Media_Core")]
pub fn SelectedIndex(&self) -> ::windows::core::Result<i32> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe {
let mut result__: i32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__)
}
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::RuntimeType for MediaPlaybackAudioTrackList {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackAudioTrackList;pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56};rc(Windows.Media.Core.AudioTrack;{03e1fafc-c931-491a-b46b-c10ee8c256b7})))");
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::Interface for MediaPlaybackAudioTrackList {
type Vtable = super::super::Foundation::Collections::IVectorView_abi<super::Core::AudioTrack>;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack> as ::windows::core::RuntimeType>::SIGNATURE);
}
#[cfg(feature = "Foundation_Collections")]
impl ::windows::core::RuntimeName for MediaPlaybackAudioTrackList {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackAudioTrackList";
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackAudioTrackList> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackAudioTrackList) -> Self {
value.0 .0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackAudioTrackList> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackAudioTrackList) -> Self {
value.0 .0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackAudioTrackList> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackAudioTrackList) -> Self {
value.0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackAudioTrackList> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackAudioTrackList) -> Self {
value.0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackAudioTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack> {
fn from(value: MediaPlaybackAudioTrackList) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackAudioTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack> {
fn from(value: &MediaPlaybackAudioTrackList) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack>> for MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack>> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack>> for &MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::AudioTrack>> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<MediaPlaybackAudioTrackList> for super::super::Foundation::Collections::IIterable<super::Core::AudioTrack> {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackAudioTrackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<&MediaPlaybackAudioTrackList> for super::super::Foundation::Collections::IIterable<super::Core::AudioTrack> {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackAudioTrackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>> for MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>> for &MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>> {
::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<super::Core::AudioTrack>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl ::core::convert::TryFrom<MediaPlaybackAudioTrackList> for super::Core::ISingleSelectMediaTrackList {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackAudioTrackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl ::core::convert::TryFrom<&MediaPlaybackAudioTrackList> for super::Core::ISingleSelectMediaTrackList {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackAudioTrackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl<'a> ::windows::core::IntoParam<'a, super::Core::ISingleSelectMediaTrackList> for MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::Core::ISingleSelectMediaTrackList> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl<'a> ::windows::core::IntoParam<'a, super::Core::ISingleSelectMediaTrackList> for &MediaPlaybackAudioTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::Core::ISingleSelectMediaTrackList> {
::core::convert::TryInto::<super::Core::ISingleSelectMediaTrackList>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Send for MediaPlaybackAudioTrackList {}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Sync for MediaPlaybackAudioTrackList {}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for MediaPlaybackAudioTrackList {
type Item = super::Core::AudioTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for &MediaPlaybackAudioTrackList {
type Item = super::Core::AudioTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
super::super::Foundation::Collections::VectorViewIterator::new(::core::convert::TryInto::try_into(self).ok())
}
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManager(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManager {
pub fn IsEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn MediaPlayer(&self) -> ::windows::core::Result<MediaPlayer> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayer>(result__)
}
}
pub fn PlayBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn PauseBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn NextBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn PreviousBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn FastForwardBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn RewindBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn ShuffleBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn AutoRepeatModeBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn PositionBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
pub fn RateBehavior(&self) -> ::windows::core::Result<MediaPlaybackCommandManagerCommandBehavior> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManagerCommandBehavior>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn PlayReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerPlayReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePlayReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PauseReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerPauseReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePauseReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn NextReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerNextReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveNextReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PreviousReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerPreviousReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePreviousReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn FastForwardReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerFastForwardReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveFastForwardReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn RewindReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerRewindReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveRewindReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn ShuffleReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerShuffleReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveShuffleReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn AutoRepeatModeReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveAutoRepeatModeReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PositionReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerPositionReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePositionReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn RateReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManager, MediaPlaybackCommandManagerRateReceivedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveRateReceived<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManager {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManager;{5acee5a6-5cb6-4a5a-8521-cc86b1c1ed37})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManager {
type Vtable = IMediaPlaybackCommandManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5acee5a6_5cb6_4a5a_8521_cc86b1c1ed37);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManager {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManager";
}
impl ::core::convert::From<MediaPlaybackCommandManager> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManager) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManager> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManager) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManager> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManager) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManager> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManager) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManager {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManager {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn AutoRepeatMode(&self) -> ::windows::core::Result<super::MediaPlaybackAutoRepeatMode> {
let this = self;
unsafe {
let mut result__: super::MediaPlaybackAutoRepeatMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaPlaybackAutoRepeatMode>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs;{3d6f4f23-5230-4411-a0e9-bad94c2a045c})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d6f4f23_5230_4411_a0e9_bad94c2a045c);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerCommandBehavior(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerCommandBehavior {
pub fn CommandManager(&self) -> ::windows::core::Result<MediaPlaybackCommandManager> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManager>(result__)
}
}
pub fn IsEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn EnablingRule(&self) -> ::windows::core::Result<MediaCommandEnablingRule> {
let this = self;
unsafe {
let mut result__: MediaCommandEnablingRule = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaCommandEnablingRule>(result__)
}
}
pub fn SetEnablingRule(&self, value: MediaCommandEnablingRule) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn IsEnabledChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackCommandManagerCommandBehavior, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveIsEnabledChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerCommandBehavior {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerCommandBehavior;{786c1e78-ce78-4a10-afd6-843fcbb90c2e})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerCommandBehavior {
type Vtable = IMediaPlaybackCommandManagerCommandBehavior_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x786c1e78_ce78_4a10_afd6_843fcbb90c2e);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerCommandBehavior {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerCommandBehavior";
}
impl ::core::convert::From<MediaPlaybackCommandManagerCommandBehavior> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerCommandBehavior) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerCommandBehavior> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerCommandBehavior) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerCommandBehavior {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerCommandBehavior {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerCommandBehavior> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerCommandBehavior) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerCommandBehavior> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerCommandBehavior) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerCommandBehavior {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerCommandBehavior {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerCommandBehavior {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerCommandBehavior {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerFastForwardReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerFastForwardReceivedEventArgs;{30f064d9-b491-4d0a-bc21-3098bd1332e9})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerFastForwardReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30f064d9_b491_4d0a_bc21_3098bd1332e9);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerFastForwardReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerFastForwardReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerFastForwardReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerFastForwardReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerFastForwardReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerFastForwardReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerFastForwardReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerFastForwardReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerFastForwardReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerFastForwardReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerFastForwardReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerNextReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerNextReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerNextReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerNextReceivedEventArgs;{e1504433-a2b0-45d4-b9de-5f42ac14a839})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerNextReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerNextReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe1504433_a2b0_45d4_b9de_5f42ac14a839);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerNextReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerNextReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerNextReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerNextReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerNextReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerNextReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerNextReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerNextReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerNextReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerNextReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerNextReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerNextReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerNextReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerNextReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerNextReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerNextReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerPauseReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerPauseReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerPauseReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerPauseReceivedEventArgs;{5ceccd1c-c25c-4221-b16c-c3c98ce012d6})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerPauseReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPauseReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ceccd1c_c25c_4221_b16c_c3c98ce012d6);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerPauseReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerPauseReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerPauseReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerPauseReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPauseReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerPauseReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerPauseReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerPauseReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerPauseReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerPauseReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPauseReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerPauseReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerPauseReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerPauseReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerPauseReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerPauseReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerPlayReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerPlayReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerPlayReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerPlayReceivedEventArgs;{9af0004e-578b-4c56-a006-16159d888a48})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerPlayReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPlayReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9af0004e_578b_4c56_a006_16159d888a48);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerPlayReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerPlayReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerPlayReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerPlayReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPlayReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerPlayReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerPlayReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerPlayReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerPlayReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerPlayReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPlayReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerPlayReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerPlayReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerPlayReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerPlayReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerPlayReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerPositionReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerPositionReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn Position(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerPositionReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerPositionReceivedEventArgs;{5591a754-d627-4bdd-a90d-86a015b24902})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerPositionReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPositionReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5591a754_d627_4bdd_a90d_86a015b24902);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerPositionReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerPositionReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerPositionReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerPositionReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPositionReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerPositionReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerPositionReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerPositionReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerPositionReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerPositionReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPositionReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerPositionReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerPositionReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerPositionReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerPositionReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerPositionReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerPreviousReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerPreviousReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerPreviousReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerPreviousReceivedEventArgs;{525e3081-4632-4f76-99b1-d771623f6287})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerPreviousReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerPreviousReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x525e3081_4632_4f76_99b1_d771623f6287);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerPreviousReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerPreviousReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerPreviousReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerPreviousReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPreviousReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerPreviousReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerPreviousReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerPreviousReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerPreviousReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerPreviousReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerPreviousReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerPreviousReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerPreviousReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerPreviousReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerPreviousReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerPreviousReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerRateReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerRateReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn PlaybackRate(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerRateReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerRateReceivedEventArgs;{18ea3939-4a16-4169-8b05-3eb9f5ff78eb})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerRateReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerRateReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x18ea3939_4a16_4169_8b05_3eb9f5ff78eb);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerRateReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerRateReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerRateReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerRateReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerRateReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerRateReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerRateReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerRateReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerRateReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerRateReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerRateReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerRateReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerRateReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerRateReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerRateReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerRateReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerRewindReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerRewindReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerRewindReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerRewindReceivedEventArgs;{9f085947-a3c0-425d-aaef-97ba7898b141})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerRewindReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerRewindReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9f085947_a3c0_425d_aaef_97ba7898b141);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerRewindReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerRewindReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerRewindReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerRewindReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerRewindReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerRewindReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerRewindReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerRewindReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerRewindReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerRewindReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerRewindReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerRewindReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerRewindReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerRewindReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerRewindReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerRewindReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackCommandManagerShuffleReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackCommandManagerShuffleReceivedEventArgs {
pub fn Handled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetHandled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn IsShuffleRequested(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Deferral>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackCommandManagerShuffleReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackCommandManagerShuffleReceivedEventArgs;{50a05cef-63ee-4a96-b7b5-fee08b9ff90c})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackCommandManagerShuffleReceivedEventArgs {
type Vtable = IMediaPlaybackCommandManagerShuffleReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x50a05cef_63ee_4a96_b7b5_fee08b9ff90c);
}
impl ::windows::core::RuntimeName for MediaPlaybackCommandManagerShuffleReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackCommandManagerShuffleReceivedEventArgs";
}
impl ::core::convert::From<MediaPlaybackCommandManagerShuffleReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackCommandManagerShuffleReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerShuffleReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackCommandManagerShuffleReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackCommandManagerShuffleReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackCommandManagerShuffleReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackCommandManagerShuffleReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackCommandManagerShuffleReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackCommandManagerShuffleReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackCommandManagerShuffleReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackCommandManagerShuffleReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackCommandManagerShuffleReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackCommandManagerShuffleReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackCommandManagerShuffleReceivedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackItem(pub ::windows::core::IInspectable);
impl MediaPlaybackItem {
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn AudioTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackItem, super::super::Foundation::Collections::IVectorChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveAudioTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn VideoTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackItem, super::super::Foundation::Collections::IVectorChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveVideoTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn TimedMetadataTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackItem, super::super::Foundation::Collections::IVectorChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveTimedMetadataTracksChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Media_Core")]
pub fn Source(&self) -> ::windows::core::Result<super::Core::MediaSource> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::MediaSource>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn AudioTracks(&self) -> ::windows::core::Result<MediaPlaybackAudioTrackList> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackAudioTrackList>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn VideoTracks(&self) -> ::windows::core::Result<MediaPlaybackVideoTrackList> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackVideoTrackList>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn TimedMetadataTracks(&self) -> ::windows::core::Result<MediaPlaybackTimedMetadataTrackList> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackTimedMetadataTrackList>(result__)
}
}
#[cfg(feature = "Media_Core")]
pub fn Create<'a, Param0: ::windows::core::IntoParam<'a, super::Core::MediaSource>>(source: Param0) -> ::windows::core::Result<MediaPlaybackItem> {
Self::IMediaPlaybackItemFactory(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), source.into_param().abi(), &mut result__).from_abi::<MediaPlaybackItem>(result__)
})
}
#[cfg(feature = "Media_Core")]
pub fn FindFromMediaSource<'a, Param0: ::windows::core::IntoParam<'a, super::Core::MediaSource>>(source: Param0) -> ::windows::core::Result<MediaPlaybackItem> {
Self::IMediaPlaybackItemStatics(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), source.into_param().abi(), &mut result__).from_abi::<MediaPlaybackItem>(result__)
})
}
pub fn BreakSchedule(&self) -> ::windows::core::Result<MediaBreakSchedule> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreakSchedule>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn StartTime(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn DurationLimit(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>>(result__)
}
}
pub fn CanSkip(&self) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetCanSkip(&self, value: bool) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn GetDisplayProperties(&self) -> ::windows::core::Result<MediaItemDisplayProperties> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaItemDisplayProperties>(result__)
}
}
pub fn ApplyDisplayProperties<'a, Param0: ::windows::core::IntoParam<'a, MediaItemDisplayProperties>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn CreateWithStartTime<'a, Param0: ::windows::core::IntoParam<'a, super::Core::MediaSource>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(source: Param0, starttime: Param1) -> ::windows::core::Result<MediaPlaybackItem> {
Self::IMediaPlaybackItemFactory2(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), source.into_param().abi(), starttime.into_param().abi(), &mut result__).from_abi::<MediaPlaybackItem>(result__)
})
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn CreateWithStartTimeAndDurationLimit<'a, Param0: ::windows::core::IntoParam<'a, super::Core::MediaSource>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(source: Param0, starttime: Param1, durationlimit: Param2) -> ::windows::core::Result<MediaPlaybackItem> {
Self::IMediaPlaybackItemFactory2(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), source.into_param().abi(), starttime.into_param().abi(), durationlimit.into_param().abi(), &mut result__).from_abi::<MediaPlaybackItem>(result__)
})
}
pub fn IsDisabledInPlaybackList(&self) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem3>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsDisabledInPlaybackList(&self, value: bool) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn TotalDownloadProgress(&self) -> ::windows::core::Result<f64> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem3>(self)?;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn AutoLoadedDisplayProperties(&self) -> ::windows::core::Result<AutoLoadedDisplayPropertyKind> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem3>(self)?;
unsafe {
let mut result__: AutoLoadedDisplayPropertyKind = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<AutoLoadedDisplayPropertyKind>(result__)
}
}
pub fn SetAutoLoadedDisplayProperties(&self, value: AutoLoadedDisplayPropertyKind) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackItem3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn IMediaPlaybackItemFactory<R, F: FnOnce(&IMediaPlaybackItemFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaPlaybackItem, IMediaPlaybackItemFactory> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IMediaPlaybackItemStatics<R, F: FnOnce(&IMediaPlaybackItemStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaPlaybackItem, IMediaPlaybackItemStatics> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IMediaPlaybackItemFactory2<R, F: FnOnce(&IMediaPlaybackItemFactory2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaPlaybackItem, IMediaPlaybackItemFactory2> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItem {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackItem;{047097d2-e4af-48ab-b283-6929e674ece2})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackItem {
type Vtable = IMediaPlaybackItem_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x047097d2_e4af_48ab_b283_6929e674ece2);
}
impl ::windows::core::RuntimeName for MediaPlaybackItem {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackItem";
}
impl ::core::convert::From<MediaPlaybackItem> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackItem) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackItem> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackItem) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackItem> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackItem) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackItem> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackItem) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::TryFrom<MediaPlaybackItem> for IMediaPlaybackSource {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackItem) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
impl ::core::convert::TryFrom<&MediaPlaybackItem> for IMediaPlaybackSource {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackItem) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
impl<'a> ::windows::core::IntoParam<'a, IMediaPlaybackSource> for MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, IMediaPlaybackSource> {
::windows::core::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::core::IntoParam<'a, IMediaPlaybackSource> for &MediaPlaybackItem {
fn into_param(self) -> ::windows::core::Param<'a, IMediaPlaybackSource> {
::core::convert::TryInto::<IMediaPlaybackSource>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackItem {}
unsafe impl ::core::marker::Sync for MediaPlaybackItem {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlaybackItemChangedReason(pub i32);
impl MediaPlaybackItemChangedReason {
pub const InitialItem: MediaPlaybackItemChangedReason = MediaPlaybackItemChangedReason(0i32);
pub const EndOfStream: MediaPlaybackItemChangedReason = MediaPlaybackItemChangedReason(1i32);
pub const Error: MediaPlaybackItemChangedReason = MediaPlaybackItemChangedReason(2i32);
pub const AppRequested: MediaPlaybackItemChangedReason = MediaPlaybackItemChangedReason(3i32);
}
impl ::core::convert::From<i32> for MediaPlaybackItemChangedReason {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlaybackItemChangedReason {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItemChangedReason {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlaybackItemChangedReason;i4)");
}
impl ::windows::core::DefaultType for MediaPlaybackItemChangedReason {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackItemError(pub ::windows::core::IInspectable);
impl MediaPlaybackItemError {
pub fn ErrorCode(&self) -> ::windows::core::Result<MediaPlaybackItemErrorCode> {
let this = self;
unsafe {
let mut result__: MediaPlaybackItemErrorCode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItemErrorCode>(result__)
}
}
pub fn ExtendedError(&self) -> ::windows::core::Result<::windows::core::HRESULT> {
let this = self;
unsafe {
let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HRESULT>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItemError {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackItemError;{69fbef2b-dcd6-4df9-a450-dbf4c6f1c2c2})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackItemError {
type Vtable = IMediaPlaybackItemError_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x69fbef2b_dcd6_4df9_a450_dbf4c6f1c2c2);
}
impl ::windows::core::RuntimeName for MediaPlaybackItemError {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackItemError";
}
impl ::core::convert::From<MediaPlaybackItemError> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackItemError) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackItemError> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackItemError) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackItemError {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackItemError {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackItemError> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackItemError) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackItemError> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackItemError) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackItemError {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackItemError {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackItemError {}
unsafe impl ::core::marker::Sync for MediaPlaybackItemError {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlaybackItemErrorCode(pub i32);
impl MediaPlaybackItemErrorCode {
pub const None: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(0i32);
pub const Aborted: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(1i32);
pub const NetworkError: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(2i32);
pub const DecodeError: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(3i32);
pub const SourceNotSupportedError: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(4i32);
pub const EncryptionError: MediaPlaybackItemErrorCode = MediaPlaybackItemErrorCode(5i32);
}
impl ::core::convert::From<i32> for MediaPlaybackItemErrorCode {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlaybackItemErrorCode {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItemErrorCode {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlaybackItemErrorCode;i4)");
}
impl ::windows::core::DefaultType for MediaPlaybackItemErrorCode {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackItemFailedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackItemFailedEventArgs {
pub fn Item(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn Error(&self) -> ::windows::core::Result<MediaPlaybackItemError> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItemError>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItemFailedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackItemFailedEventArgs;{7703134a-e9a7-47c3-862c-c656d30683d4})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackItemFailedEventArgs {
type Vtable = IMediaPlaybackItemFailedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7703134a_e9a7_47c3_862c_c656d30683d4);
}
impl ::windows::core::RuntimeName for MediaPlaybackItemFailedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackItemFailedEventArgs";
}
impl ::core::convert::From<MediaPlaybackItemFailedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackItemFailedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackItemFailedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackItemFailedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackItemFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackItemFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackItemFailedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackItemFailedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackItemFailedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackItemFailedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackItemFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackItemFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackItemFailedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackItemFailedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackItemOpenedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackItemOpenedEventArgs {
pub fn Item(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackItemOpenedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackItemOpenedEventArgs;{cbd9bd82-3037-4fbe-ae8f-39fc39edf4ef})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackItemOpenedEventArgs {
type Vtable = IMediaPlaybackItemOpenedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcbd9bd82_3037_4fbe_ae8f_39fc39edf4ef);
}
impl ::windows::core::RuntimeName for MediaPlaybackItemOpenedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackItemOpenedEventArgs";
}
impl ::core::convert::From<MediaPlaybackItemOpenedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackItemOpenedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackItemOpenedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackItemOpenedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackItemOpenedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackItemOpenedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackItemOpenedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackItemOpenedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackItemOpenedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackItemOpenedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackItemOpenedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackItemOpenedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackItemOpenedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackItemOpenedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackList(pub ::windows::core::IInspectable);
impl MediaPlaybackList {
pub fn new() -> ::windows::core::Result<Self> {
Self::IActivationFactory(|f| f.activate_instance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaPlaybackList, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
#[cfg(feature = "Foundation")]
pub fn ItemFailed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackList, MediaPlaybackItemFailedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveItemFailed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn CurrentItemChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackList, CurrentMediaPlaybackItemChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveCurrentItemChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn ItemOpened<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackList, MediaPlaybackItemOpenedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveItemOpened<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn Items(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IObservableVector<MediaPlaybackItem>> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IObservableVector<MediaPlaybackItem>>(result__)
}
}
pub fn AutoRepeatEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetAutoRepeatEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn ShuffleEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetShuffleEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn CurrentItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn CurrentItemIndex(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
pub fn MoveNext(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn MovePrevious(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn MoveTo(&self, itemindex: u32) -> ::windows::core::Result<MediaPlaybackItem> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), itemindex, &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn MaxPrefetchTime(&self) -> ::windows::core::Result<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<super::super::Foundation::TimeSpan>>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetMaxPrefetchTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<super::super::Foundation::TimeSpan>>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn StartingItem(&self) -> ::windows::core::Result<MediaPlaybackItem> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackItem>(result__)
}
}
pub fn SetStartingItem<'a, Param0: ::windows::core::IntoParam<'a, MediaPlaybackItem>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn ShuffledItems(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<MediaPlaybackItem>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<MediaPlaybackItem>>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn SetShuffledItems<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<MediaPlaybackItem>>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn MaxPlayedItemsToKeepOpen(&self) -> ::windows::core::Result<super::super::Foundation::IReference<u32>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IReference<u32>>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetMaxPlayedItemsToKeepOpen<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::IReference<u32>>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackList3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackList {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackList;{7f77ee9c-dc42-4e26-a98d-7850df8ec925})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackList {
type Vtable = IMediaPlaybackList_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7f77ee9c_dc42_4e26_a98d_7850df8ec925);
}
impl ::windows::core::RuntimeName for MediaPlaybackList {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackList";
}
impl ::core::convert::From<MediaPlaybackList> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackList) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackList> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackList) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackList> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackList) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackList> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackList) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::TryFrom<MediaPlaybackList> for IMediaPlaybackSource {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
impl ::core::convert::TryFrom<&MediaPlaybackList> for IMediaPlaybackSource {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
impl<'a> ::windows::core::IntoParam<'a, IMediaPlaybackSource> for MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, IMediaPlaybackSource> {
::windows::core::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::core::IntoParam<'a, IMediaPlaybackSource> for &MediaPlaybackList {
fn into_param(self) -> ::windows::core::Param<'a, IMediaPlaybackSource> {
::core::convert::TryInto::<IMediaPlaybackSource>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackList {}
unsafe impl ::core::marker::Sync for MediaPlaybackList {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackSession(pub ::windows::core::IInspectable);
impl MediaPlaybackSession {
#[cfg(feature = "Foundation")]
pub fn PlaybackStateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePlaybackStateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PlaybackRateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePlaybackRateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn SeekCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveSeekCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BufferingStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBufferingStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BufferingEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBufferingEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BufferingProgressChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBufferingProgressChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn DownloadProgressChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveDownloadProgressChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn NaturalDurationChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveNaturalDurationChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PositionChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePositionChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn NaturalVideoSizeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveNaturalVideoSizeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn MediaPlayer(&self) -> ::windows::core::Result<MediaPlayer> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayer>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn NaturalDuration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn Position(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetPosition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn PlaybackState(&self) -> ::windows::core::Result<MediaPlaybackState> {
let this = self;
unsafe {
let mut result__: MediaPlaybackState = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackState>(result__)
}
}
pub fn CanSeek(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn CanPause(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn IsProtected(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn PlaybackRate(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn SetPlaybackRate(&self, value: f64) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn BufferingProgress(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn DownloadProgress(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn NaturalVideoHeight(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
pub fn NaturalVideoWidth(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).39)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn NormalizedSourceRect(&self) -> ::windows::core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::Rect = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).40)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Rect>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetNormalizedSourceRect<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).41)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Media_MediaProperties")]
pub fn StereoscopicVideoPackingMode(&self) -> ::windows::core::Result<super::MediaProperties::StereoscopicVideoPackingMode> {
let this = self;
unsafe {
let mut result__: super::MediaProperties::StereoscopicVideoPackingMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).42)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaProperties::StereoscopicVideoPackingMode>(result__)
}
}
#[cfg(feature = "Media_MediaProperties")]
pub fn SetStereoscopicVideoPackingMode(&self, value: super::MediaProperties::StereoscopicVideoPackingMode) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).43)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation")]
pub fn BufferedRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveBufferedRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn PlayedRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePlayedRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn SeekableRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveSeekableRangesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn SupportedPlaybackRatesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackSession, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveSupportedPlaybackRatesChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn SphericalVideoProjection(&self) -> ::windows::core::Result<MediaPlaybackSphericalVideoProjection> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackSphericalVideoProjection>(result__)
}
}
pub fn IsMirroring(&self) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsMirroring(&self, value: bool) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn GetBufferedRanges(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn GetPlayedRanges(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn GetSeekableRanges(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<super::MediaTimeRange>>(result__)
}
}
pub fn IsSupportedPlaybackRateRange(&self, rate1: f64, rate2: f64) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession2>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), rate1, rate2, &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(feature = "Media_MediaProperties")]
pub fn PlaybackRotation(&self) -> ::windows::core::Result<super::MediaProperties::MediaRotation> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession3>(self)?;
unsafe {
let mut result__: super::MediaProperties::MediaRotation = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaProperties::MediaRotation>(result__)
}
}
#[cfg(feature = "Media_MediaProperties")]
pub fn SetPlaybackRotation(&self, value: super::MediaProperties::MediaRotation) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn GetOutputDegradationPolicyState(&self) -> ::windows::core::Result<MediaPlaybackSessionOutputDegradationPolicyState> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackSession3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackSessionOutputDegradationPolicyState>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackSession {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackSession;{c32b683d-0407-41ba-8946-8b345a5a5435})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackSession {
type Vtable = IMediaPlaybackSession_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc32b683d_0407_41ba_8946_8b345a5a5435);
}
impl ::windows::core::RuntimeName for MediaPlaybackSession {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackSession";
}
impl ::core::convert::From<MediaPlaybackSession> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackSession) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackSession> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackSession) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackSession {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackSession {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackSession> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackSession) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackSession> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackSession) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackSession {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackSession {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackSession {}
unsafe impl ::core::marker::Sync for MediaPlaybackSession {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackSessionBufferingStartedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlaybackSessionBufferingStartedEventArgs {
pub fn IsPlaybackInterruption(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackSessionBufferingStartedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackSessionBufferingStartedEventArgs;{cd6aafed-74e2-43b5-b115-76236c33791a})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackSessionBufferingStartedEventArgs {
type Vtable = IMediaPlaybackSessionBufferingStartedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcd6aafed_74e2_43b5_b115_76236c33791a);
}
impl ::windows::core::RuntimeName for MediaPlaybackSessionBufferingStartedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackSessionBufferingStartedEventArgs";
}
impl ::core::convert::From<MediaPlaybackSessionBufferingStartedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackSessionBufferingStartedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackSessionBufferingStartedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackSessionBufferingStartedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackSessionBufferingStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackSessionBufferingStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackSessionBufferingStartedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackSessionBufferingStartedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackSessionBufferingStartedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackSessionBufferingStartedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackSessionBufferingStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackSessionBufferingStartedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackSessionBufferingStartedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlaybackSessionBufferingStartedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackSessionOutputDegradationPolicyState(pub ::windows::core::IInspectable);
impl MediaPlaybackSessionOutputDegradationPolicyState {
pub fn VideoConstrictionReason(&self) -> ::windows::core::Result<MediaPlaybackSessionVideoConstrictionReason> {
let this = self;
unsafe {
let mut result__: MediaPlaybackSessionVideoConstrictionReason = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackSessionVideoConstrictionReason>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackSessionOutputDegradationPolicyState {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackSessionOutputDegradationPolicyState;{558e727d-f633-49f9-965a-abaa1db709be})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackSessionOutputDegradationPolicyState {
type Vtable = IMediaPlaybackSessionOutputDegradationPolicyState_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x558e727d_f633_49f9_965a_abaa1db709be);
}
impl ::windows::core::RuntimeName for MediaPlaybackSessionOutputDegradationPolicyState {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackSessionOutputDegradationPolicyState";
}
impl ::core::convert::From<MediaPlaybackSessionOutputDegradationPolicyState> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackSessionOutputDegradationPolicyState) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackSessionOutputDegradationPolicyState> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackSessionOutputDegradationPolicyState) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackSessionOutputDegradationPolicyState {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackSessionOutputDegradationPolicyState {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackSessionOutputDegradationPolicyState> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackSessionOutputDegradationPolicyState) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackSessionOutputDegradationPolicyState> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackSessionOutputDegradationPolicyState) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackSessionOutputDegradationPolicyState {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackSessionOutputDegradationPolicyState {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackSessionOutputDegradationPolicyState {}
unsafe impl ::core::marker::Sync for MediaPlaybackSessionOutputDegradationPolicyState {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlaybackSessionVideoConstrictionReason(pub i32);
impl MediaPlaybackSessionVideoConstrictionReason {
pub const None: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(0i32);
pub const VirtualMachine: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(1i32);
pub const UnsupportedDisplayAdapter: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(2i32);
pub const UnsignedDriver: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(3i32);
pub const FrameServerEnabled: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(4i32);
pub const OutputProtectionFailed: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(5i32);
pub const Unknown: MediaPlaybackSessionVideoConstrictionReason = MediaPlaybackSessionVideoConstrictionReason(6i32);
}
impl ::core::convert::From<i32> for MediaPlaybackSessionVideoConstrictionReason {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlaybackSessionVideoConstrictionReason {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackSessionVideoConstrictionReason {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlaybackSessionVideoConstrictionReason;i4)");
}
impl ::windows::core::DefaultType for MediaPlaybackSessionVideoConstrictionReason {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackSphericalVideoProjection(pub ::windows::core::IInspectable);
impl MediaPlaybackSphericalVideoProjection {
pub fn IsEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Media_MediaProperties")]
pub fn FrameFormat(&self) -> ::windows::core::Result<super::MediaProperties::SphericalVideoFrameFormat> {
let this = self;
unsafe {
let mut result__: super::MediaProperties::SphericalVideoFrameFormat = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaProperties::SphericalVideoFrameFormat>(result__)
}
}
#[cfg(feature = "Media_MediaProperties")]
pub fn SetFrameFormat(&self, value: super::MediaProperties::SphericalVideoFrameFormat) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn HorizontalFieldOfViewInDegrees(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn SetHorizontalFieldOfViewInDegrees(&self, value: f64) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Foundation_Numerics")]
pub fn ViewOrientation(&self) -> ::windows::core::Result<super::super::Foundation::Numerics::Quaternion> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::Numerics::Quaternion = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Numerics::Quaternion>(result__)
}
}
#[cfg(feature = "Foundation_Numerics")]
pub fn SetViewOrientation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Numerics::Quaternion>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn ProjectionMode(&self) -> ::windows::core::Result<SphericalVideoProjectionMode> {
let this = self;
unsafe {
let mut result__: SphericalVideoProjectionMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SphericalVideoProjectionMode>(result__)
}
}
pub fn SetProjectionMode(&self, value: SphericalVideoProjectionMode) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() }
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackSphericalVideoProjection {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackSphericalVideoProjection;{d405b37c-6f0e-4661-b8ee-d487ba9752d5})");
}
unsafe impl ::windows::core::Interface for MediaPlaybackSphericalVideoProjection {
type Vtable = IMediaPlaybackSphericalVideoProjection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd405b37c_6f0e_4661_b8ee_d487ba9752d5);
}
impl ::windows::core::RuntimeName for MediaPlaybackSphericalVideoProjection {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackSphericalVideoProjection";
}
impl ::core::convert::From<MediaPlaybackSphericalVideoProjection> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackSphericalVideoProjection) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlaybackSphericalVideoProjection> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackSphericalVideoProjection) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackSphericalVideoProjection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackSphericalVideoProjection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlaybackSphericalVideoProjection> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackSphericalVideoProjection) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlaybackSphericalVideoProjection> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackSphericalVideoProjection) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackSphericalVideoProjection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackSphericalVideoProjection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlaybackSphericalVideoProjection {}
unsafe impl ::core::marker::Sync for MediaPlaybackSphericalVideoProjection {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlaybackState(pub i32);
impl MediaPlaybackState {
pub const None: MediaPlaybackState = MediaPlaybackState(0i32);
pub const Opening: MediaPlaybackState = MediaPlaybackState(1i32);
pub const Buffering: MediaPlaybackState = MediaPlaybackState(2i32);
pub const Playing: MediaPlaybackState = MediaPlaybackState(3i32);
pub const Paused: MediaPlaybackState = MediaPlaybackState(4i32);
}
impl ::core::convert::From<i32> for MediaPlaybackState {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlaybackState {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlaybackState {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlaybackState;i4)");
}
impl ::windows::core::DefaultType for MediaPlaybackState {
type DefaultType = Self;
}
#[cfg(feature = "Foundation_Collections")]
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackTimedMetadataTrackList(pub ::windows::core::IInspectable);
#[cfg(feature = "Foundation_Collections")]
impl MediaPlaybackTimedMetadataTrackList {
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetAt(&self, index: u32) -> ::windows::core::Result<super::Core::TimedMetadataTrack> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<super::Core::TimedMetadataTrack>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn Size(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn IndexOf<'a, Param0: ::windows::core::IntoParam<'a, super::Core::TimedMetadataTrack>>(&self, value: Param0, index: &mut u32) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetMany(&self, startindex: u32, items: &mut [<super::Core::TimedMetadataTrack as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<super::Core::TimedMetadataTrack>> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<super::Core::TimedMetadataTrack>>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Foundation_Collections"))]
pub fn PresentationModeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlaybackTimedMetadataTrackList, TimedMetadataPresentationModeChangedEventArgs>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackTimedMetadataTrackList>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemovePresentationModeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackTimedMetadataTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn GetPresentationMode(&self, index: u32) -> ::windows::core::Result<TimedMetadataTrackPresentationMode> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackTimedMetadataTrackList>(self)?;
unsafe {
let mut result__: TimedMetadataTrackPresentationMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<TimedMetadataTrackPresentationMode>(result__)
}
}
pub fn SetPresentationMode(&self, index: u32, value: TimedMetadataTrackPresentationMode) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlaybackTimedMetadataTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), index, value).ok() }
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::RuntimeType for MediaPlaybackTimedMetadataTrackList {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackTimedMetadataTrackList;pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56};rc(Windows.Media.Core.TimedMetadataTrack;{9e6aed9e-f67a-49a9-b330-cf03b0e9cf07})))");
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::Interface for MediaPlaybackTimedMetadataTrackList {
type Vtable = super::super::Foundation::Collections::IVectorView_abi<super::Core::TimedMetadataTrack>;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack> as ::windows::core::RuntimeType>::SIGNATURE);
}
#[cfg(feature = "Foundation_Collections")]
impl ::windows::core::RuntimeName for MediaPlaybackTimedMetadataTrackList {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackTimedMetadataTrackList";
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackTimedMetadataTrackList> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackTimedMetadataTrackList) -> Self {
value.0 .0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackTimedMetadataTrackList> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackTimedMetadataTrackList) -> Self {
value.0 .0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackTimedMetadataTrackList> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackTimedMetadataTrackList) -> Self {
value.0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackTimedMetadataTrackList> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackTimedMetadataTrackList) -> Self {
value.0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackTimedMetadataTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack> {
fn from(value: MediaPlaybackTimedMetadataTrackList) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackTimedMetadataTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack> {
fn from(value: &MediaPlaybackTimedMetadataTrackList) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack>> for MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack>> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack>> for &MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::TimedMetadataTrack>> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<MediaPlaybackTimedMetadataTrackList> for super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack> {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackTimedMetadataTrackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<&MediaPlaybackTimedMetadataTrackList> for super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack> {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackTimedMetadataTrackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>> for MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>> for &MediaPlaybackTimedMetadataTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>> {
::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<super::Core::TimedMetadataTrack>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Send for MediaPlaybackTimedMetadataTrackList {}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Sync for MediaPlaybackTimedMetadataTrackList {}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for MediaPlaybackTimedMetadataTrackList {
type Item = super::Core::TimedMetadataTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for &MediaPlaybackTimedMetadataTrackList {
type Item = super::Core::TimedMetadataTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
super::super::Foundation::Collections::VectorViewIterator::new(::core::convert::TryInto::try_into(self).ok())
}
}
#[cfg(feature = "Foundation_Collections")]
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlaybackVideoTrackList(pub ::windows::core::IInspectable);
#[cfg(feature = "Foundation_Collections")]
impl MediaPlaybackVideoTrackList {
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetAt(&self, index: u32) -> ::windows::core::Result<super::Core::VideoTrack> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), index, &mut result__).from_abi::<super::Core::VideoTrack>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn Size(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn IndexOf<'a, Param0: ::windows::core::IntoParam<'a, super::Core::VideoTrack>>(&self, value: Param0, index: &mut u32) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), index, &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn GetMany(&self, startindex: u32, items: &mut [<super::Core::VideoTrack as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi::<u32>(result__)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<super::Core::VideoTrack>> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<super::Core::VideoTrack>>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn SelectedIndexChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<super::Core::ISingleSelectMediaTrackList, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Media_Core"))]
pub fn RemoveSelectedIndexChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Media_Core")]
pub fn SetSelectedIndex(&self, value: i32) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Media_Core")]
pub fn SelectedIndex(&self) -> ::windows::core::Result<i32> {
let this = &::windows::core::Interface::cast::<super::Core::ISingleSelectMediaTrackList>(self)?;
unsafe {
let mut result__: i32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__)
}
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::RuntimeType for MediaPlaybackVideoTrackList {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlaybackVideoTrackList;pinterface({bbe1fa4c-b0e3-4583-baef-1f1b2e483e56};rc(Windows.Media.Core.VideoTrack;{03e1fafc-c931-491a-b46b-c10ee8c256b7})))");
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::windows::core::Interface for MediaPlaybackVideoTrackList {
type Vtable = super::super::Foundation::Collections::IVectorView_abi<super::Core::VideoTrack>;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_signature(<super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack> as ::windows::core::RuntimeType>::SIGNATURE);
}
#[cfg(feature = "Foundation_Collections")]
impl ::windows::core::RuntimeName for MediaPlaybackVideoTrackList {
const NAME: &'static str = "Windows.Media.Playback.MediaPlaybackVideoTrackList";
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackVideoTrackList> for ::windows::core::IUnknown {
fn from(value: MediaPlaybackVideoTrackList) -> Self {
value.0 .0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackVideoTrackList> for ::windows::core::IUnknown {
fn from(value: &MediaPlaybackVideoTrackList) -> Self {
value.0 .0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackVideoTrackList> for ::windows::core::IInspectable {
fn from(value: MediaPlaybackVideoTrackList) -> Self {
value.0
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackVideoTrackList> for ::windows::core::IInspectable {
fn from(value: &MediaPlaybackVideoTrackList) -> Self {
value.0.clone()
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<MediaPlaybackVideoTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack> {
fn from(value: MediaPlaybackVideoTrackList) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::From<&MediaPlaybackVideoTrackList> for super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack> {
fn from(value: &MediaPlaybackVideoTrackList) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack>> for MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack>> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack>> for &MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IVectorView<super::Core::VideoTrack>> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<MediaPlaybackVideoTrackList> for super::super::Foundation::Collections::IIterable<super::Core::VideoTrack> {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackVideoTrackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<&MediaPlaybackVideoTrackList> for super::super::Foundation::Collections::IIterable<super::Core::VideoTrack> {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackVideoTrackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>> for MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>> for &MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>> {
::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<super::Core::VideoTrack>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl ::core::convert::TryFrom<MediaPlaybackVideoTrackList> for super::Core::ISingleSelectMediaTrackList {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlaybackVideoTrackList) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl ::core::convert::TryFrom<&MediaPlaybackVideoTrackList> for super::Core::ISingleSelectMediaTrackList {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlaybackVideoTrackList) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl<'a> ::windows::core::IntoParam<'a, super::Core::ISingleSelectMediaTrackList> for MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::Core::ISingleSelectMediaTrackList> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(all(feature = "Foundation_Collections", feature = "Media_Core"))]
impl<'a> ::windows::core::IntoParam<'a, super::Core::ISingleSelectMediaTrackList> for &MediaPlaybackVideoTrackList {
fn into_param(self) -> ::windows::core::Param<'a, super::Core::ISingleSelectMediaTrackList> {
::core::convert::TryInto::<super::Core::ISingleSelectMediaTrackList>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Send for MediaPlaybackVideoTrackList {}
#[cfg(feature = "Foundation_Collections")]
unsafe impl ::core::marker::Sync for MediaPlaybackVideoTrackList {}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for MediaPlaybackVideoTrackList {
type Item = super::Core::VideoTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for &MediaPlaybackVideoTrackList {
type Item = super::Core::VideoTrack;
type IntoIter = super::super::Foundation::Collections::VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
super::super::Foundation::Collections::VectorViewIterator::new(::core::convert::TryInto::try_into(self).ok())
}
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlayer(pub ::windows::core::IInspectable);
impl MediaPlayer {
pub fn new() -> ::windows::core::Result<Self> {
Self::IActivationFactory(|f| f.activate_instance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&::windows::core::IActivationFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<MediaPlayer, ::windows::core::IActivationFactory> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn AutoPlay(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetAutoPlay(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn NaturalDuration(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn Position(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn SetPosition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
pub fn BufferingProgress(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
#[cfg(feature = "deprecated")]
pub fn CurrentState(&self) -> ::windows::core::Result<MediaPlayerState> {
let this = self;
unsafe {
let mut result__: MediaPlayerState = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayerState>(result__)
}
}
#[cfg(feature = "deprecated")]
pub fn CanSeek(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(feature = "deprecated")]
pub fn CanPause(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn IsLoopingEnabled(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsLoopingEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "deprecated")]
pub fn IsProtected(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn IsMuted(&self) -> ::windows::core::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsMuted(&self, value: bool) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "deprecated")]
pub fn PlaybackRate(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
#[cfg(feature = "deprecated")]
pub fn SetPlaybackRate(&self, value: f64) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn Volume(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn SetVolume(&self, value: f64) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "deprecated")]
pub fn PlaybackMediaMarkers(&self) -> ::windows::core::Result<PlaybackMediaMarkerSequence> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PlaybackMediaMarkerSequence>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn MediaOpened<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveMediaOpened<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn MediaEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveMediaEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).28)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn MediaFailed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, MediaPlayerFailedEventArgs>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).29)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveMediaFailed<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).30)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn CurrentStateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).31)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveCurrentStateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).32)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn PlaybackMediaMarkerReached<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, PlaybackMediaMarkerReachedEventArgs>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).33)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemovePlaybackMediaMarkerReached<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).34)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn MediaPlayerRateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, MediaPlayerRateChangedEventArgs>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).35)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveMediaPlayerRateChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).36)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn VolumeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).37)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveVolumeChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).38)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn SeekCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).39)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveSeekCompleted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).40)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn BufferingStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).41)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveBufferingStarted<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).42)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn BufferingEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).43)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn RemoveBufferingEnded<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).44)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn Play(&self) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).45)(::core::mem::transmute_copy(this)).ok() }
}
pub fn Pause(&self) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).46)(::core::mem::transmute_copy(this)).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Foundation")]
pub fn SetUriSource<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Uri>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).47)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn Close(&self) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() }
}
pub fn SystemMediaTransportControls(&self) -> ::windows::core::Result<super::SystemMediaTransportControls> {
let this = &::windows::core::Interface::cast::<IMediaPlayer2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::SystemMediaTransportControls>(result__)
}
}
pub fn AudioCategory(&self) -> ::windows::core::Result<MediaPlayerAudioCategory> {
let this = &::windows::core::Interface::cast::<IMediaPlayer2>(self)?;
unsafe {
let mut result__: MediaPlayerAudioCategory = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayerAudioCategory>(result__)
}
}
pub fn SetAudioCategory(&self, value: MediaPlayerAudioCategory) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn AudioDeviceType(&self) -> ::windows::core::Result<MediaPlayerAudioDeviceType> {
let this = &::windows::core::Interface::cast::<IMediaPlayer2>(self)?;
unsafe {
let mut result__: MediaPlayerAudioDeviceType = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayerAudioDeviceType>(result__)
}
}
pub fn SetAudioDeviceType(&self, value: MediaPlayerAudioDeviceType) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Media_Protection")]
pub fn ProtectionManager(&self) -> ::windows::core::Result<super::Protection::MediaProtectionManager> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Protection::MediaProtectionManager>(result__)
}
}
#[cfg(feature = "Media_Protection")]
pub fn SetProtectionManager<'a, Param0: ::windows::core::IntoParam<'a, super::Protection::MediaProtectionManager>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Storage")]
pub fn SetFileSource<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::IStorageFile>>(&self, file: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource>(self)?;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), file.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Storage_Streams")]
pub fn SetStreamSource<'a, Param0: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IRandomAccessStream>>(&self, stream: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), stream.into_param().abi()).ok() }
}
#[cfg(feature = "deprecated")]
#[cfg(feature = "Media_Core")]
pub fn SetMediaSource<'a, Param0: ::windows::core::IntoParam<'a, super::Core::IMediaSource>>(&self, source: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource>(self)?;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), source.into_param().abi()).ok() }
}
pub fn Source(&self) -> ::windows::core::Result<IMediaPlaybackSource> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource2>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<IMediaPlaybackSource>(result__)
}
}
pub fn SetSource<'a, Param0: ::windows::core::IntoParam<'a, IMediaPlaybackSource>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerSource2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn AddAudioEffect<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, effectoptional: bool, configuration: Param2) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerEffects>(self)?;
unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), effectoptional, configuration.into_param().abi()).ok() }
}
pub fn RemoveAllEffects(&self) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerEffects>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this)).ok() }
}
#[cfg(feature = "Foundation")]
pub fn IsMutedChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveIsMutedChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn SourceChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveSourceChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn AudioBalance(&self) -> ::windows::core::Result<f64> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
pub fn SetAudioBalance(&self, value: f64) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn RealTimePlayback(&self) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetRealTimePlayback(&self, value: bool) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn StereoscopicVideoRenderMode(&self) -> ::windows::core::Result<StereoscopicVideoRenderMode> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: StereoscopicVideoRenderMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<StereoscopicVideoRenderMode>(result__)
}
}
pub fn SetStereoscopicVideoRenderMode(&self, value: StereoscopicVideoRenderMode) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() }
}
pub fn BreakManager(&self) -> ::windows::core::Result<MediaBreakManager> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).16)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaBreakManager>(result__)
}
}
pub fn CommandManager(&self) -> ::windows::core::Result<MediaPlaybackCommandManager> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).17)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackCommandManager>(result__)
}
}
#[cfg(feature = "Devices_Enumeration")]
pub fn AudioDevice(&self) -> ::windows::core::Result<super::super::Devices::Enumeration::DeviceInformation> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).18)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Devices::Enumeration::DeviceInformation>(result__)
}
}
#[cfg(feature = "Devices_Enumeration")]
pub fn SetAudioDevice<'a, Param0: ::windows::core::IntoParam<'a, super::super::Devices::Enumeration::DeviceInformation>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).19)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn TimelineController(&self) -> ::windows::core::Result<super::MediaTimelineController> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).20)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::MediaTimelineController>(result__)
}
}
pub fn SetTimelineController<'a, Param0: ::windows::core::IntoParam<'a, super::MediaTimelineController>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).21)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn TimelineControllerPositionOffset(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).22)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetTimelineControllerPositionOffset<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).23)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn PlaybackSession(&self) -> ::windows::core::Result<MediaPlaybackSession> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).24)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlaybackSession>(result__)
}
}
pub fn StepForwardOneFrame(&self) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).25)(::core::mem::transmute_copy(this)).ok() }
}
pub fn StepBackwardOneFrame(&self) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe { (::windows::core::Interface::vtable(this).26)(::core::mem::transmute_copy(this)).ok() }
}
#[cfg(feature = "Media_Casting")]
pub fn GetAsCastingSource(&self) -> ::windows::core::Result<super::Casting::CastingSource> {
let this = &::windows::core::Interface::cast::<IMediaPlayer3>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).27)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Casting::CastingSource>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn SetSurfaceSize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Size>>(&self, size: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer4>(self)?;
unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), size.into_param().abi()).ok() }
}
#[cfg(feature = "UI_Composition")]
pub fn GetSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::UI::Composition::Compositor>>(&self, compositor: Param0) -> ::windows::core::Result<MediaPlayerSurface> {
let this = &::windows::core::Interface::cast::<IMediaPlayer4>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), compositor.into_param().abi(), &mut result__).from_abi::<MediaPlayerSurface>(result__)
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn AddVideoEffect<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IPropertySet>>(&self, activatableclassid: Param0, effectoptional: bool, effectconfiguration: Param2) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayerEffects2>(self)?;
unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), activatableclassid.into_param().abi(), effectoptional, effectconfiguration.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn VideoFrameAvailable<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, value: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveVideoFrameAvailable<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
pub fn IsVideoFrameServerEnabled(&self) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__)
}
}
pub fn SetIsVideoFrameServerEnabled(&self, value: bool) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() }
}
#[cfg(feature = "Graphics_DirectX_Direct3D11")]
pub fn CopyFrameToVideoSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>>(&self, destination: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), destination.into_param().abi()).ok() }
}
#[cfg(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11"))]
pub fn CopyFrameToVideoSurfaceWithTargetRectangle<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&self, destination: Param0, targetrectangle: Param1) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), destination.into_param().abi(), targetrectangle.into_param().abi()).ok() }
}
#[cfg(feature = "Graphics_DirectX_Direct3D11")]
pub fn CopyFrameToStereoscopicVideoSurfaces<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>, Param1: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>>(&self, destinationlefteye: Param0, destinationrighteye: Param1) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer5>(self)?;
unsafe { (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), destinationlefteye.into_param().abi(), destinationrighteye.into_param().abi()).ok() }
}
#[cfg(feature = "Foundation")]
pub fn SubtitleFrameChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TypedEventHandler<MediaPlayer, ::windows::core::IInspectable>>>(&self, handler: Param0) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
let this = &::windows::core::Interface::cast::<IMediaPlayer6>(self)?;
unsafe {
let mut result__: super::super::Foundation::EventRegistrationToken = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), handler.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::EventRegistrationToken>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn RemoveSubtitleFrameChanged<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::EventRegistrationToken>>(&self, token: Param0) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<IMediaPlayer6>(self)?;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() }
}
#[cfg(feature = "Graphics_DirectX_Direct3D11")]
pub fn RenderSubtitlesToSurface<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>>(&self, destination: Param0) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlayer6>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), destination.into_param().abi(), &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(all(feature = "Foundation", feature = "Graphics_DirectX_Direct3D11"))]
pub fn RenderSubtitlesToSurfaceWithTargetRectangle<'a, Param0: ::windows::core::IntoParam<'a, super::super::Graphics::DirectX::Direct3D11::IDirect3DSurface>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>>(&self, destination: Param0, targetrectangle: Param1) -> ::windows::core::Result<bool> {
let this = &::windows::core::Interface::cast::<IMediaPlayer6>(self)?;
unsafe {
let mut result__: bool = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), destination.into_param().abi(), targetrectangle.into_param().abi(), &mut result__).from_abi::<bool>(result__)
}
}
#[cfg(feature = "Media_Audio")]
pub fn AudioStateMonitor(&self) -> ::windows::core::Result<super::Audio::AudioStateMonitor> {
let this = &::windows::core::Interface::cast::<IMediaPlayer7>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Audio::AudioStateMonitor>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlayer {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlayer;{381a83cb-6fff-499b-8d64-2885dfc1249e})");
}
unsafe impl ::windows::core::Interface for MediaPlayer {
type Vtable = IMediaPlayer_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x381a83cb_6fff_499b_8d64_2885dfc1249e);
}
impl ::windows::core::RuntimeName for MediaPlayer {
const NAME: &'static str = "Windows.Media.Playback.MediaPlayer";
}
impl ::core::convert::From<MediaPlayer> for ::windows::core::IUnknown {
fn from(value: MediaPlayer) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlayer> for ::windows::core::IUnknown {
fn from(value: &MediaPlayer) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlayer> for ::windows::core::IInspectable {
fn from(value: MediaPlayer) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlayer> for ::windows::core::IInspectable {
fn from(value: &MediaPlayer) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation")]
impl ::core::convert::TryFrom<MediaPlayer> for super::super::Foundation::IClosable {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlayer) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation")]
impl ::core::convert::TryFrom<&MediaPlayer> for super::super::Foundation::IClosable {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlayer) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &MediaPlayer {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> {
::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
unsafe impl ::core::marker::Send for MediaPlayer {}
unsafe impl ::core::marker::Sync for MediaPlayer {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlayerAudioCategory(pub i32);
impl MediaPlayerAudioCategory {
pub const Other: MediaPlayerAudioCategory = MediaPlayerAudioCategory(0i32);
pub const Communications: MediaPlayerAudioCategory = MediaPlayerAudioCategory(3i32);
pub const Alerts: MediaPlayerAudioCategory = MediaPlayerAudioCategory(4i32);
pub const SoundEffects: MediaPlayerAudioCategory = MediaPlayerAudioCategory(5i32);
pub const GameEffects: MediaPlayerAudioCategory = MediaPlayerAudioCategory(6i32);
pub const GameMedia: MediaPlayerAudioCategory = MediaPlayerAudioCategory(7i32);
pub const GameChat: MediaPlayerAudioCategory = MediaPlayerAudioCategory(8i32);
pub const Speech: MediaPlayerAudioCategory = MediaPlayerAudioCategory(9i32);
pub const Movie: MediaPlayerAudioCategory = MediaPlayerAudioCategory(10i32);
pub const Media: MediaPlayerAudioCategory = MediaPlayerAudioCategory(11i32);
}
impl ::core::convert::From<i32> for MediaPlayerAudioCategory {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlayerAudioCategory {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerAudioCategory {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlayerAudioCategory;i4)");
}
impl ::windows::core::DefaultType for MediaPlayerAudioCategory {
type DefaultType = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlayerAudioDeviceType(pub i32);
impl MediaPlayerAudioDeviceType {
pub const Console: MediaPlayerAudioDeviceType = MediaPlayerAudioDeviceType(0i32);
pub const Multimedia: MediaPlayerAudioDeviceType = MediaPlayerAudioDeviceType(1i32);
pub const Communications: MediaPlayerAudioDeviceType = MediaPlayerAudioDeviceType(2i32);
}
impl ::core::convert::From<i32> for MediaPlayerAudioDeviceType {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlayerAudioDeviceType {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerAudioDeviceType {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlayerAudioDeviceType;i4)");
}
impl ::windows::core::DefaultType for MediaPlayerAudioDeviceType {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlayerDataReceivedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlayerDataReceivedEventArgs {
#[cfg(feature = "Foundation_Collections")]
pub fn Data(&self) -> ::windows::core::Result<super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::ValueSet>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerDataReceivedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlayerDataReceivedEventArgs;{c75a9405-c801-412a-835b-83fc0e622a8e})");
}
unsafe impl ::windows::core::Interface for MediaPlayerDataReceivedEventArgs {
type Vtable = IMediaPlayerDataReceivedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc75a9405_c801_412a_835b_83fc0e622a8e);
}
impl ::windows::core::RuntimeName for MediaPlayerDataReceivedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlayerDataReceivedEventArgs";
}
impl ::core::convert::From<MediaPlayerDataReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlayerDataReceivedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlayerDataReceivedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlayerDataReceivedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayerDataReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlayerDataReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlayerDataReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlayerDataReceivedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlayerDataReceivedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlayerDataReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayerDataReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlayerDataReceivedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlayerDataReceivedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlayerDataReceivedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlayerError(pub i32);
impl MediaPlayerError {
pub const Unknown: MediaPlayerError = MediaPlayerError(0i32);
pub const Aborted: MediaPlayerError = MediaPlayerError(1i32);
pub const NetworkError: MediaPlayerError = MediaPlayerError(2i32);
pub const DecodingError: MediaPlayerError = MediaPlayerError(3i32);
pub const SourceNotSupported: MediaPlayerError = MediaPlayerError(4i32);
}
impl ::core::convert::From<i32> for MediaPlayerError {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlayerError {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerError {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlayerError;i4)");
}
impl ::windows::core::DefaultType for MediaPlayerError {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlayerFailedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlayerFailedEventArgs {
pub fn Error(&self) -> ::windows::core::Result<MediaPlayerError> {
let this = self;
unsafe {
let mut result__: MediaPlayerError = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayerError>(result__)
}
}
pub fn ExtendedErrorCode(&self) -> ::windows::core::Result<::windows::core::HRESULT> {
let this = self;
unsafe {
let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HRESULT>(result__)
}
}
pub fn ErrorMessage(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
let this = self;
unsafe {
let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerFailedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlayerFailedEventArgs;{2744e9b9-a7e3-4f16-bac4-7914ebc08301})");
}
unsafe impl ::windows::core::Interface for MediaPlayerFailedEventArgs {
type Vtable = IMediaPlayerFailedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2744e9b9_a7e3_4f16_bac4_7914ebc08301);
}
impl ::windows::core::RuntimeName for MediaPlayerFailedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlayerFailedEventArgs";
}
impl ::core::convert::From<MediaPlayerFailedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlayerFailedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlayerFailedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlayerFailedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayerFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlayerFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlayerFailedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlayerFailedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlayerFailedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlayerFailedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayerFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlayerFailedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlayerFailedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlayerFailedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlayerRateChangedEventArgs(pub ::windows::core::IInspectable);
impl MediaPlayerRateChangedEventArgs {
pub fn NewRate(&self) -> ::windows::core::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerRateChangedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlayerRateChangedEventArgs;{40600d58-3b61-4bb2-989f-fc65608b6cab})");
}
unsafe impl ::windows::core::Interface for MediaPlayerRateChangedEventArgs {
type Vtable = IMediaPlayerRateChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x40600d58_3b61_4bb2_989f_fc65608b6cab);
}
impl ::windows::core::RuntimeName for MediaPlayerRateChangedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.MediaPlayerRateChangedEventArgs";
}
impl ::core::convert::From<MediaPlayerRateChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: MediaPlayerRateChangedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlayerRateChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: &MediaPlayerRateChangedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayerRateChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlayerRateChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlayerRateChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: MediaPlayerRateChangedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlayerRateChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: &MediaPlayerRateChangedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayerRateChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlayerRateChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for MediaPlayerRateChangedEventArgs {}
unsafe impl ::core::marker::Sync for MediaPlayerRateChangedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct MediaPlayerState(pub i32);
impl MediaPlayerState {
pub const Closed: MediaPlayerState = MediaPlayerState(0i32);
pub const Opening: MediaPlayerState = MediaPlayerState(1i32);
pub const Buffering: MediaPlayerState = MediaPlayerState(2i32);
pub const Playing: MediaPlayerState = MediaPlayerState(3i32);
pub const Paused: MediaPlayerState = MediaPlayerState(4i32);
pub const Stopped: MediaPlayerState = MediaPlayerState(5i32);
}
impl ::core::convert::From<i32> for MediaPlayerState {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for MediaPlayerState {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerState {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.MediaPlayerState;i4)");
}
impl ::windows::core::DefaultType for MediaPlayerState {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct MediaPlayerSurface(pub ::windows::core::IInspectable);
impl MediaPlayerSurface {
#[cfg(feature = "Foundation")]
pub fn Close(&self) -> ::windows::core::Result<()> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() }
}
#[cfg(feature = "UI_Composition")]
pub fn CompositionSurface(&self) -> ::windows::core::Result<super::super::UI::Composition::ICompositionSurface> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::UI::Composition::ICompositionSurface>(result__)
}
}
#[cfg(feature = "UI_Composition")]
pub fn Compositor(&self) -> ::windows::core::Result<super::super::UI::Composition::Compositor> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::UI::Composition::Compositor>(result__)
}
}
pub fn MediaPlayer(&self) -> ::windows::core::Result<MediaPlayer> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<MediaPlayer>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for MediaPlayerSurface {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.MediaPlayerSurface;{0ed653bc-b736-49c3-830b-764a3845313a})");
}
unsafe impl ::windows::core::Interface for MediaPlayerSurface {
type Vtable = IMediaPlayerSurface_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0ed653bc_b736_49c3_830b_764a3845313a);
}
impl ::windows::core::RuntimeName for MediaPlayerSurface {
const NAME: &'static str = "Windows.Media.Playback.MediaPlayerSurface";
}
impl ::core::convert::From<MediaPlayerSurface> for ::windows::core::IUnknown {
fn from(value: MediaPlayerSurface) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&MediaPlayerSurface> for ::windows::core::IUnknown {
fn from(value: &MediaPlayerSurface) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<MediaPlayerSurface> for ::windows::core::IInspectable {
fn from(value: MediaPlayerSurface) -> Self {
value.0
}
}
impl ::core::convert::From<&MediaPlayerSurface> for ::windows::core::IInspectable {
fn from(value: &MediaPlayerSurface) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation")]
impl ::core::convert::TryFrom<MediaPlayerSurface> for super::super::Foundation::IClosable {
type Error = ::windows::core::Error;
fn try_from(value: MediaPlayerSurface) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation")]
impl ::core::convert::TryFrom<&MediaPlayerSurface> for super::super::Foundation::IClosable {
type Error = ::windows::core::Error;
fn try_from(value: &MediaPlayerSurface) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &MediaPlayerSurface {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> {
::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
unsafe impl ::core::marker::Send for MediaPlayerSurface {}
unsafe impl ::core::marker::Sync for MediaPlayerSurface {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct PlaybackMediaMarker(pub ::windows::core::IInspectable);
impl PlaybackMediaMarker {
#[cfg(feature = "Foundation")]
pub fn Time(&self) -> ::windows::core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__: super::super::Foundation::TimeSpan = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::TimeSpan>(result__)
}
}
pub fn MediaMarkerType(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
let this = self;
unsafe {
let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__)
}
}
pub fn Text(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
let this = self;
unsafe {
let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__)
}
}
#[cfg(feature = "Foundation")]
pub fn CreateFromTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>>(value: Param0) -> ::windows::core::Result<PlaybackMediaMarker> {
Self::IPlaybackMediaMarkerFactory(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<PlaybackMediaMarker>(result__)
})
}
#[cfg(feature = "Foundation")]
pub fn Create<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::TimeSpan>, Param1: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param2: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(value: Param0, mediamarkettype: Param1, text: Param2) -> ::windows::core::Result<PlaybackMediaMarker> {
Self::IPlaybackMediaMarkerFactory(|this| unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi(), mediamarkettype.into_param().abi(), text.into_param().abi(), &mut result__).from_abi::<PlaybackMediaMarker>(result__)
})
}
pub fn IPlaybackMediaMarkerFactory<R, F: FnOnce(&IPlaybackMediaMarkerFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
static mut SHARED: ::windows::core::FactoryCache<PlaybackMediaMarker, IPlaybackMediaMarkerFactory> = ::windows::core::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::core::RuntimeType for PlaybackMediaMarker {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.PlaybackMediaMarker;{c4d22f5c-3c1c-4444-b6b9-778b0422d41a})");
}
unsafe impl ::windows::core::Interface for PlaybackMediaMarker {
type Vtable = IPlaybackMediaMarker_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc4d22f5c_3c1c_4444_b6b9_778b0422d41a);
}
impl ::windows::core::RuntimeName for PlaybackMediaMarker {
const NAME: &'static str = "Windows.Media.Playback.PlaybackMediaMarker";
}
impl ::core::convert::From<PlaybackMediaMarker> for ::windows::core::IUnknown {
fn from(value: PlaybackMediaMarker) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&PlaybackMediaMarker> for ::windows::core::IUnknown {
fn from(value: &PlaybackMediaMarker) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PlaybackMediaMarker {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PlaybackMediaMarker {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<PlaybackMediaMarker> for ::windows::core::IInspectable {
fn from(value: PlaybackMediaMarker) -> Self {
value.0
}
}
impl ::core::convert::From<&PlaybackMediaMarker> for ::windows::core::IInspectable {
fn from(value: &PlaybackMediaMarker) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PlaybackMediaMarker {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PlaybackMediaMarker {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for PlaybackMediaMarker {}
unsafe impl ::core::marker::Sync for PlaybackMediaMarker {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct PlaybackMediaMarkerReachedEventArgs(pub ::windows::core::IInspectable);
impl PlaybackMediaMarkerReachedEventArgs {
pub fn PlaybackMediaMarker(&self) -> ::windows::core::Result<PlaybackMediaMarker> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<PlaybackMediaMarker>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for PlaybackMediaMarkerReachedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.PlaybackMediaMarkerReachedEventArgs;{578cd1b9-90e2-4e60-abc4-8740b01f6196})");
}
unsafe impl ::windows::core::Interface for PlaybackMediaMarkerReachedEventArgs {
type Vtable = IPlaybackMediaMarkerReachedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x578cd1b9_90e2_4e60_abc4_8740b01f6196);
}
impl ::windows::core::RuntimeName for PlaybackMediaMarkerReachedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.PlaybackMediaMarkerReachedEventArgs";
}
impl ::core::convert::From<PlaybackMediaMarkerReachedEventArgs> for ::windows::core::IUnknown {
fn from(value: PlaybackMediaMarkerReachedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&PlaybackMediaMarkerReachedEventArgs> for ::windows::core::IUnknown {
fn from(value: &PlaybackMediaMarkerReachedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PlaybackMediaMarkerReachedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PlaybackMediaMarkerReachedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<PlaybackMediaMarkerReachedEventArgs> for ::windows::core::IInspectable {
fn from(value: PlaybackMediaMarkerReachedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&PlaybackMediaMarkerReachedEventArgs> for ::windows::core::IInspectable {
fn from(value: &PlaybackMediaMarkerReachedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PlaybackMediaMarkerReachedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PlaybackMediaMarkerReachedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for PlaybackMediaMarkerReachedEventArgs {}
unsafe impl ::core::marker::Sync for PlaybackMediaMarkerReachedEventArgs {}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct PlaybackMediaMarkerSequence(pub ::windows::core::IInspectable);
impl PlaybackMediaMarkerSequence {
pub fn Size(&self) -> ::windows::core::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<u32>(result__)
}
}
pub fn Insert<'a, Param0: ::windows::core::IntoParam<'a, PlaybackMediaMarker>>(&self, value: Param0) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value.into_param().abi()).ok() }
}
pub fn Clear(&self) -> ::windows::core::Result<()> {
let this = self;
unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this)).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn First(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IIterator<PlaybackMediaMarker>> {
let this = &::windows::core::Interface::cast::<super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>>(self)?;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IIterator<PlaybackMediaMarker>>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for PlaybackMediaMarkerSequence {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.PlaybackMediaMarkerSequence;{f2810cee-638b-46cf-8817-1d111fe9d8c4})");
}
unsafe impl ::windows::core::Interface for PlaybackMediaMarkerSequence {
type Vtable = IPlaybackMediaMarkerSequence_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2810cee_638b_46cf_8817_1d111fe9d8c4);
}
impl ::windows::core::RuntimeName for PlaybackMediaMarkerSequence {
const NAME: &'static str = "Windows.Media.Playback.PlaybackMediaMarkerSequence";
}
impl ::core::convert::From<PlaybackMediaMarkerSequence> for ::windows::core::IUnknown {
fn from(value: PlaybackMediaMarkerSequence) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&PlaybackMediaMarkerSequence> for ::windows::core::IUnknown {
fn from(value: &PlaybackMediaMarkerSequence) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<PlaybackMediaMarkerSequence> for ::windows::core::IInspectable {
fn from(value: PlaybackMediaMarkerSequence) -> Self {
value.0
}
}
impl ::core::convert::From<&PlaybackMediaMarkerSequence> for ::windows::core::IInspectable {
fn from(value: &PlaybackMediaMarkerSequence) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<PlaybackMediaMarkerSequence> for super::super::Foundation::Collections::IIterable<PlaybackMediaMarker> {
type Error = ::windows::core::Error;
fn try_from(value: PlaybackMediaMarkerSequence) -> ::windows::core::Result<Self> {
::core::convert::TryFrom::try_from(&value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl ::core::convert::TryFrom<&PlaybackMediaMarkerSequence> for super::super::Foundation::Collections::IIterable<PlaybackMediaMarker> {
type Error = ::windows::core::Error;
fn try_from(value: &PlaybackMediaMarkerSequence) -> ::windows::core::Result<Self> {
::windows::core::Interface::cast(value)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>> for PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>> {
::windows::core::IntoParam::into_param(&self)
}
}
#[cfg(feature = "Foundation_Collections")]
impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>> for &PlaybackMediaMarkerSequence {
fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>> {
::core::convert::TryInto::<super::super::Foundation::Collections::IIterable<PlaybackMediaMarker>>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None)
}
}
unsafe impl ::core::marker::Send for PlaybackMediaMarkerSequence {}
unsafe impl ::core::marker::Sync for PlaybackMediaMarkerSequence {}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for PlaybackMediaMarkerSequence {
type Item = PlaybackMediaMarker;
type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
#[cfg(all(feature = "Foundation_Collections"))]
impl ::core::iter::IntoIterator for &PlaybackMediaMarkerSequence {
type Item = PlaybackMediaMarker;
type IntoIter = super::super::Foundation::Collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.First().unwrap()
}
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct SphericalVideoProjectionMode(pub i32);
impl SphericalVideoProjectionMode {
pub const Spherical: SphericalVideoProjectionMode = SphericalVideoProjectionMode(0i32);
pub const Flat: SphericalVideoProjectionMode = SphericalVideoProjectionMode(1i32);
}
impl ::core::convert::From<i32> for SphericalVideoProjectionMode {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for SphericalVideoProjectionMode {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for SphericalVideoProjectionMode {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.SphericalVideoProjectionMode;i4)");
}
impl ::windows::core::DefaultType for SphericalVideoProjectionMode {
type DefaultType = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct StereoscopicVideoRenderMode(pub i32);
impl StereoscopicVideoRenderMode {
pub const Mono: StereoscopicVideoRenderMode = StereoscopicVideoRenderMode(0i32);
pub const Stereo: StereoscopicVideoRenderMode = StereoscopicVideoRenderMode(1i32);
}
impl ::core::convert::From<i32> for StereoscopicVideoRenderMode {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for StereoscopicVideoRenderMode {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for StereoscopicVideoRenderMode {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.StereoscopicVideoRenderMode;i4)");
}
impl ::windows::core::DefaultType for StereoscopicVideoRenderMode {
type DefaultType = Self;
}
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct TimedMetadataPresentationModeChangedEventArgs(pub ::windows::core::IInspectable);
impl TimedMetadataPresentationModeChangedEventArgs {
#[cfg(feature = "Media_Core")]
pub fn Track(&self) -> ::windows::core::Result<super::Core::TimedMetadataTrack> {
let this = self;
unsafe {
let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::Core::TimedMetadataTrack>(result__)
}
}
pub fn OldPresentationMode(&self) -> ::windows::core::Result<TimedMetadataTrackPresentationMode> {
let this = self;
unsafe {
let mut result__: TimedMetadataTrackPresentationMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<TimedMetadataTrackPresentationMode>(result__)
}
}
pub fn NewPresentationMode(&self) -> ::windows::core::Result<TimedMetadataTrackPresentationMode> {
let this = self;
unsafe {
let mut result__: TimedMetadataTrackPresentationMode = ::core::mem::zeroed();
(::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<TimedMetadataTrackPresentationMode>(result__)
}
}
}
unsafe impl ::windows::core::RuntimeType for TimedMetadataPresentationModeChangedEventArgs {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Media.Playback.TimedMetadataPresentationModeChangedEventArgs;{d1636099-65df-45ae-8cef-dc0b53fdc2bb})");
}
unsafe impl ::windows::core::Interface for TimedMetadataPresentationModeChangedEventArgs {
type Vtable = ITimedMetadataPresentationModeChangedEventArgs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd1636099_65df_45ae_8cef_dc0b53fdc2bb);
}
impl ::windows::core::RuntimeName for TimedMetadataPresentationModeChangedEventArgs {
const NAME: &'static str = "Windows.Media.Playback.TimedMetadataPresentationModeChangedEventArgs";
}
impl ::core::convert::From<TimedMetadataPresentationModeChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: TimedMetadataPresentationModeChangedEventArgs) -> Self {
value.0 .0
}
}
impl ::core::convert::From<&TimedMetadataPresentationModeChangedEventArgs> for ::windows::core::IUnknown {
fn from(value: &TimedMetadataPresentationModeChangedEventArgs) -> Self {
value.0 .0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for TimedMetadataPresentationModeChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0 .0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a TimedMetadataPresentationModeChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0 .0)
}
}
impl ::core::convert::From<TimedMetadataPresentationModeChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: TimedMetadataPresentationModeChangedEventArgs) -> Self {
value.0
}
}
impl ::core::convert::From<&TimedMetadataPresentationModeChangedEventArgs> for ::windows::core::IInspectable {
fn from(value: &TimedMetadataPresentationModeChangedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for TimedMetadataPresentationModeChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a TimedMetadataPresentationModeChangedEventArgs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> {
::windows::core::Param::Borrowed(&self.0)
}
}
unsafe impl ::core::marker::Send for TimedMetadataPresentationModeChangedEventArgs {}
unsafe impl ::core::marker::Sync for TimedMetadataPresentationModeChangedEventArgs {}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct TimedMetadataTrackPresentationMode(pub i32);
impl TimedMetadataTrackPresentationMode {
pub const Disabled: TimedMetadataTrackPresentationMode = TimedMetadataTrackPresentationMode(0i32);
pub const Hidden: TimedMetadataTrackPresentationMode = TimedMetadataTrackPresentationMode(1i32);
pub const ApplicationPresented: TimedMetadataTrackPresentationMode = TimedMetadataTrackPresentationMode(2i32);
pub const PlatformPresented: TimedMetadataTrackPresentationMode = TimedMetadataTrackPresentationMode(3i32);
}
impl ::core::convert::From<i32> for TimedMetadataTrackPresentationMode {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for TimedMetadataTrackPresentationMode {
type Abi = Self;
}
unsafe impl ::windows::core::RuntimeType for TimedMetadataTrackPresentationMode {
const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Media.Playback.TimedMetadataTrackPresentationMode;i4)");
}
impl ::windows::core::DefaultType for TimedMetadataTrackPresentationMode {
type DefaultType = Self;
}
|
use piston_window::G2d;
use graphics::math::{ Scalar, Vec2d, Matrix2d, identity };
use graphics::Transformed;
use std::f64::consts::PI;
use game::camera::Camera;
use game::world::TILE_RECT;
use game::world::TILE_SIZE;
use util::graphics::Image;
use game::*;
const CAMERA_BASE: Scalar = 0.8;
const MOVE: Scalar = 5.0;
pub const VIEW_RANGE: Scalar = PI * 2f64 / 3f64; // 120 deg
const NORMAL_SPEED: Scalar = 1.0;
const BACK_SPEED: Scalar = 0.6;
#[allow(dead_code)]
pub struct Player {
pub pos: Vec2d,
pub rotation: Scalar,
}
impl Player {
pub fn new() -> Player {
Player {
pos: [0.0, 0.0],
rotation: 0.0,
}
}
pub fn get_transform(&self) -> Matrix2d {
identity().rot_rad(self.rotation)
}
pub fn update(&mut self, con: &UContext, camera: &mut Camera) {
let (mut x, mut y) = (0 as Scalar, 0 as Scalar);
let mut speed = NORMAL_SPEED;
if con.input_state.left { x -= 1.0; }
if con.input_state.right { x += 1.0; }
if con.input_state.up { y -= 1.0; }
if con.input_state.down { y += 1.0; speed = BACK_SPEED; }
if x != 0.0 || y != 0.0 {
let l = (x * x + y * y).sqrt();
let vec = self.move_dir([x / l * speed * con.dt, y / l * speed * con.dt]);
camera.move_by(vec);
}
}
pub fn draw(&self, con: &mut DContext, g: &mut G2d) {
// TODO 肩から下は動いている方向に傾ける
Image::new(con.tile_textures.get("man"), TILE_RECT)
.draw(g, con.transform
.trans(self.pos[0], self.pos[1])
.rot_rad(self.rotation)
.trans(- 0.5, - 0.5));
}
pub fn move_dir(&mut self, vec: [f64; 2]) -> Vec2d {
use math::rotate_vec;
let vec = rotate_vec([vec[0] * MOVE, vec[1] * MOVE], - self.rotation);
self.move_by(vec);
vec
}
pub fn move_by(&mut self, m: Vec2d) -> &mut Self {
for i in 0..2 {
self.pos[i] = self.pos[i] + m[i]
}
self
}
pub fn move_to(&mut self, m: Vec2d) -> &mut Self {
for i in 0..2 {
self.pos[i] = m[i]
}
self
}
pub fn rotate(&mut self, r: Scalar) -> &mut Self {
self.rotation = self.rotation + r;
self
}
pub fn set_rotation(&mut self, r: Scalar) -> &mut Self {
self.rotation = r;
self
}
}
|
fn func1(a: i32) -> impl Fn(i32) -> i32 {
move |b| a + b
}
fn func2(a: i32, f: fn(i32) -> i32) -> impl Fn(i32) -> i32 {
move |b| f(a) + b
}
fn func3<A, B>(f: &dyn Fn(A) -> B) -> impl Fn(A) -> B + '_ {
move |a| f(a)
}
fn func4<'a, A, B, C>(f: &'a dyn Fn(A) -> B, g: &'a dyn Fn(B) -> C) -> impl Fn(A) -> C + 'a {
move |a| g(f(a))
}
fn func4a<'a, A, B, C, F, G>(f: &'a F, g: &'a G) -> impl Fn(A) -> C + 'a
where
F: Fn(A) -> B,
G: Fn(B) -> C,
{
move |a| g(f(a))
}
fn func5() -> impl Fn(i32) -> i32 {
|a| a * 2
}
fn func6() -> impl Fn(i32) -> Box<dyn Fn(i32) -> i32> {
|a| Box::new(move |b| a * b)
}
fn func6a() -> impl Fn(i32) -> fn(i32) -> i32 {
|_| |b: i32| b
}
fn func7() -> impl Fn(i32) -> Box<dyn Fn(i32) -> Box<dyn Fn(i32) -> i32>> {
|a: i32| Box::new(move |b: i32| Box::new(move |c: i32| a * b + c))
}
fn main() {
let f1 = func1(1);
println!("f1 = {}", f1(2));
println!("f1 = {}", f1(3));
let f2 = func2(2, |a| a * 5);
println!("f2 = {}", f2(4));
println!("f2 = {}", f2(5));
let f3 = func3(&|a: i32| format!("-{}-", a));
println!("f3 = {}", f3(6));
println!("f3 = {}", f3(7));
let f4 = func4(&|a: i32| a * 3, &|b| format!("**{}**", b));
println!("f4 = {}", f4(8));
println!("f4 = {}", f4(9));
let f4a = func4a(&|a: i32| a * 3, &|b| format!("# {} #", b));
println!("f4a = {}", f4a(10));
println!("f4a = {}", f4a(11));
let f5 = func5();
println!("f5 = {}", f5(7));
let c1 = |a: i32| move |b: i32| a * b;
println!("c1 = {}", c1(2)(3));
let f6 = func6();
println!("f6 = {}", f6(2)(3));
let f6a = func6a();
println!("f6a = {}", f6a(2)(3));
let c2 = |a: i32| move |b: i32| move |c: i32| a * b + c;
println!("c2 = {}", c2(2)(3)(4));
let f7 = func7();
println!("f7 = {}", f7(2)(3)(4));
}
|
use std::{cmp, fmt::Debug};
// I provide two types of the People struct. The first is a simple, non generic struct, which I use to show how Rust's Vec type
// can sort our data. The second is generic over the ordering.
pub mod simple {
#[derive(Default, PartialEq, Eq, PartialOrd, Ord, Clone)]
// Rust's macro system allows for us to derive implementations of some traits without having to implement them ourselves.
// Traits fall somewhere in between Java's interfaces and Haskell's type classes.
// #[derive(Ord)] defaults to lexicographic ordering of the fields in the order in which they are written.
// See: https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#derivable
pub struct People {
pub name: String,
pub age: u32,
}
impl From<(&str, u32)> for People {
fn from((name, age): (&str, u32)) -> Self {
Self {
name: String::from(name),
age,
}
}
}
impl super::Debug for People {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "Name: {}, Age: {}", self.name, self.age)
}
}
}
pub mod generic {
use super::{cmp, simple::People, Debug};
use std::marker::PhantomData;
#[derive(Default, Clone, PartialEq, Eq)]
pub struct GenericPeople<Order> {
name: String,
age: u32,
_phantom: PhantomData<Order>,
// I use Rust's PhantomData type to sort generically over different orderings of people, which I represent with ZSTs.
}
impl<T> Debug for GenericPeople<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "Name: {}, Age: {}", self.name, self.age)
}
}
// Rust allows for "Zero Sized Types" (ZSTs), data types which take no space (https://doc.rust-lang.org/nomicon/exotic-sizes.html).
// I use this feature to encode how People should be ordered into the type itself. This use case is perhaps a bit overkill, but it
// allows me to show off some of Rust's more unique features.
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord)] // Required for PartialOrd and Ord
pub struct Lexicographic;
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
pub struct AgeDescending;
impl cmp::PartialOrd for GenericPeople<Lexicographic> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.name.partial_cmp(&other.name) // I do not handle the equals case.
}
}
// Rust requires correctness as much as is reasonable. To implement Ord (equivalent to the Ord type class in Haskell) you must also
// implement Eq, which requires PartialEq, and PartialOrd.
impl cmp::Ord for GenericPeople<Lexicographic> {
fn cmp(&self, other: &Self) -> cmp::Ordering {
self.name.cmp(&other.name)
}
}
impl From<People> for GenericPeople<Lexicographic> {
fn from(people: People) -> Self {
Self {
name: people.name,
age: people.age,
..Default::default()
}
}
}
impl cmp::PartialOrd for GenericPeople<AgeDescending> {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
// String and u32 both implement Ord, so I just use that instead of the partial comparators.
Some(match self.age.cmp(&other.age) {
cmp::Ordering::Less => cmp::Ordering::Greater,
cmp::Ordering::Equal => self.name.cmp(&other.name), // Compare lexicographically if they have the same age.
cmp::Ordering::Greater => cmp::Ordering::Less,
})
}
}
impl cmp::Ord for GenericPeople<AgeDescending> {
fn cmp(&self, other: &Self) -> cmp::Ordering {
self.partial_cmp(&other).unwrap() // Our partial_cmp always returns Some(cmp::Order), so we can safely unwrap.
}
}
impl From<People> for GenericPeople<AgeDescending> {
fn from(people: People) -> Self {
Self {
name: people.name,
age: people.age,
..Default::default()
}
}
}
}
|
// Copyright 2022 Datafuse Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use std::hash::BuildHasher;
use std::sync::Arc;
use common_cache::BytesMeter;
use common_cache::Cache;
use common_cache::Count;
use common_cache::CountableMeter;
use common_cache::DefaultHashBuilder;
use common_cache::LruCache;
use parking_lot::RwLock;
pub type ImMemoryCache<V, S, M> = LruCache<String, Arc<V>, S, M>;
pub type BytesCache = LruCache<String, Arc<Vec<u8>>, DefaultHashBuilder, BytesMeter>;
pub type InMemoryItemCacheHolder<T, S = DefaultHashBuilder, M = Count> =
Arc<RwLock<ImMemoryCache<T, S, M>>>;
pub type InMemoryBytesCacheHolder = Arc<RwLock<BytesCache>>;
pub struct InMemoryCacheBuilder;
impl InMemoryCacheBuilder {
// new cache that cache `V`, and metered by the given `meter`
pub fn new_in_memory_cache<V, M>(
capacity: u64,
meter: M,
) -> InMemoryItemCacheHolder<V, DefaultHashBuilder, M>
where
M: CountableMeter<String, Arc<V>>,
{
let cache = LruCache::with_meter_and_hasher(capacity, meter, DefaultHashBuilder::new());
Arc::new(RwLock::new(cache))
}
// new cache that caches `V` and meter by counting
pub fn new_item_cache<V>(capacity: u64) -> InMemoryItemCacheHolder<V> {
let cache = LruCache::new(capacity);
Arc::new(RwLock::new(cache))
}
// new cache that cache `Vec<u8>`, and metered by byte size
pub fn new_bytes_cache(capacity: u64) -> InMemoryBytesCacheHolder {
let cache =
LruCache::with_meter_and_hasher(capacity, BytesMeter, DefaultHashBuilder::new());
Arc::new(RwLock::new(cache))
}
}
// default impls
mod impls {
use std::sync::Arc;
use parking_lot::RwLock;
use super::*;
use crate::cache::CacheAccessor;
// Wrap a Cache with RwLock, and impl CacheAccessor for it
impl<V, C, S, M> CacheAccessor<String, V, S, M> for Arc<RwLock<C>>
where
C: Cache<String, Arc<V>, S, M>,
M: CountableMeter<String, Arc<V>>,
S: BuildHasher,
{
fn get<Q: AsRef<str>>(&self, k: Q) -> Option<Arc<V>> {
let mut guard = self.write();
guard.get(k.as_ref()).cloned()
}
fn put(&self, k: String, v: Arc<V>) {
let mut guard = self.write();
guard.put(k, v);
}
fn evict(&self, k: &str) -> bool {
let mut guard = self.write();
guard.pop(k).is_some()
}
fn contains_key(&self, k: &str) -> bool {
let guard = self.read();
guard.contains(k)
}
}
// Wrap an Option<CacheAccessor>, and impl CacheAccessor for it
impl<V, C, S, M> CacheAccessor<String, V, S, M> for Option<C>
where
C: CacheAccessor<String, V, S, M>,
M: CountableMeter<String, Arc<V>>,
S: BuildHasher,
{
fn get<Q: AsRef<str>>(&self, k: Q) -> Option<Arc<V>> {
self.as_ref().and_then(|cache| cache.get(k))
}
fn put(&self, k: String, v: Arc<V>) {
if let Some(cache) = self {
cache.put(k, v);
}
}
fn evict(&self, k: &str) -> bool {
if let Some(cache) = self {
cache.evict(k)
} else {
false
}
}
fn contains_key(&self, k: &str) -> bool {
if let Some(cache) = self {
cache.contains_key(k)
} else {
false
}
}
}
}
|
use clap::{App, Arg};
use fonttools::font::{self, Font};
use std::fs::File;
use std::io;
pub fn read_args(name: &str, description: &str) -> clap::ArgMatches<'static> {
App::new(name)
.about(description)
.arg(
Arg::with_name("INPUT")
.help("Sets the input file to use")
.required(false),
)
.arg(
Arg::with_name("OUTPUT")
.help("Sets the output file to use")
.required(false),
)
.get_matches()
}
pub fn open_font(matches: &clap::ArgMatches) -> Font {
if matches.is_present("INPUT") {
let filename = matches.value_of("INPUT").unwrap();
let infile = File::open(filename).unwrap();
font::load(infile)
} else {
font::load(io::stdin())
}
.expect("Could not parse font")
}
pub fn save_font(mut font: Font, matches: &clap::ArgMatches) {
if matches.is_present("OUTPUT") {
let mut outfile = File::create(matches.value_of("OUTPUT").unwrap())
.expect("Could not open file for writing");
font.save(&mut outfile);
} else {
font.save(&mut io::stdout());
};
}
/* FontInfo things for ufo2ttf */
pub mod font_info_data {
pub fn ascender(info: &norad::FontInfo) -> i16 {
let upm = info.units_per_em.map_or(1000.0, |f| f.get()) as f64;
info.ascender
.map_or((upm * 0.80) as i16, |f| f.get() as i16)
}
pub fn descender(info: &norad::FontInfo) -> i16 {
let upm = info.units_per_em.map_or(1000.0, |f| f.get()) as f64;
info.descender
.map_or((-upm * 0.20) as i16, |f| f.get() as i16)
}
pub fn hhea_ascender(info: &norad::FontInfo) -> i16 {
info.open_type_hhea_ascender
.map_or_else(|| ascender(info), |x| x as i16)
}
pub fn hhea_descender(info: &norad::FontInfo) -> i16 {
info.open_type_hhea_descender
.map_or_else(|| descender(info), |x| x as i16)
}
pub fn preferred_family_name(info: &norad::FontInfo) -> String {
info.open_type_name_preferred_family_name
.as_ref()
.or_else(|| info.family_name.as_ref())
.map_or("New Font".to_string(), |x| x.to_string())
}
pub fn preferred_subfamily_name(info: &norad::FontInfo) -> String {
info.open_type_name_preferred_subfamily_name
.as_ref()
.or_else(|| info.style_name.as_ref())
.map_or("Regular".to_string(), |x| x.to_string())
}
pub fn style_map_family_name(info: &norad::FontInfo) -> String {
if let Some(smfn) = &info.style_map_family_name {
return smfn.to_string();
}
let style_name = info
.style_name
.as_ref()
.or_else(|| info.open_type_name_preferred_subfamily_name.as_ref());
let family_name = preferred_family_name(&info);
if style_name.is_none() {
return family_name;
}
let lower = style_name.unwrap().to_lowercase();
match &lower[..] {
"regular" => family_name,
"bold" => family_name,
"italic" => family_name,
"bold italic" => family_name,
_ => {
let mut res = String::new();
res.push_str(&family_name);
if !lower.is_empty() {
res.push_str(&" ".to_string());
res.push_str(style_name.unwrap());
}
res
}
}
}
pub fn style_map_style_name(info: &norad::FontInfo) -> String {
match info
.style_map_style_name
.as_ref()
.map_or(1, |x| x.clone() as u16) // Tricks we have to pull to use private fields
{
2 => "bold",
3 => "italic",
4 => "bold italic",
_ => "regular",
}
.to_string()
}
pub fn postscript_font_name(info: &norad::FontInfo) -> String {
format!(
"{0}-{1}",
preferred_family_name(info),
preferred_subfamily_name(info)
)
// XXX check postscript characters here
}
pub fn name_version(info: &norad::FontInfo) -> String {
info.open_type_name_version.as_ref().map_or_else(
{
|| {
format!(
"Version {0}.{1:03}",
info.version_major.unwrap_or(0),
info.version_minor.unwrap_or(0)
)
}
},
|x| x.clone(),
)
}
pub fn unique_id(info: &norad::FontInfo) -> String {
info.open_type_name_unique_id.as_ref().map_or_else(
|| {
format!(
"{0};{1};{2}",
name_version(info),
info.open_type_os2_vendor_id.as_ref().map_or("NONE", |x| x),
postscript_font_name(info)
)
},
|x| x.clone(),
)
}
pub fn postscript_underline_thickness(info: &norad::FontInfo) -> i16 {
let upm = info.units_per_em.map_or(1000.0, |f| f.get()) as f64;
info.postscript_underline_thickness
.map_or_else(|| upm * 0.05, |f| f.get()) as i16
}
pub fn get_panose(_info: &norad::FontInfo) -> fonttools::os2::Panose {
// Struct not public, unfortunately.
fonttools::os2::Panose {
panose0: 0,
panose1: 0,
panose2: 0,
panose3: 0,
panose4: 0,
panose5: 0,
panose6: 0,
panose7: 0,
panose8: 0,
panose9: 0,
}
}
}
|
use crate::utils::*;
pub(crate) const NAME: &[&str] = &["rayon::IndexedParallelIterator"];
pub(crate) fn derive(data: &Data, items: &mut Vec<ItemImpl>) -> Result<()> {
let iter = quote!(::rayon::iter);
derive_trait!(
data,
Some(format_ident!("Item")),
parse_quote!(#iter::IndexedParallelIterator)?,
parse_quote! {
trait IndexedParallelIterator: #iter::ParallelIterator {
#[inline]
fn drive<__C>(self, consumer: __C) -> __C::Result
where
__C: #iter::plumbing::Consumer<Self::Item>;
#[inline]
fn len(&self) -> usize;
#[inline]
fn with_producer<__CB>(self, callback: __CB) -> __CB::Output
where
__CB: #iter::plumbing::ProducerCallback<Self::Item>;
}
}?,
)
.map(|item| items.push(item))
}
|
use rom;
use register;
use shared::*;
pub struct Mmu {
///cartridge provides 0x0000 - 0x7fff in two banks
rom: Box<rom::Cartridge>,
///0x8000 - 0x9fff (1fff wide)
vram: [u8; 0x1fff],
///0xc000 - 0xcfff (1fff wide) (0xc000 - 0xddff echoed in 0xe000-0xfdff)
work_ram_0: [u8; 0x1fff],
///0xd000 - 0xdfff (1fff wide) (1 bank in DMG, 1~7 in CGB) (0xc000 - 0xddff echoed in 0xe000-0xfdff)
work_ram_1: [u8; 0x1fff],
///0xfe00 - 0xfe9f (0x9f wide)
sprite_table: [u8; 0x9f],
///0xff00 - 0xff7f (0x7f wide)
///todo: encapsulate IO memory for easier use
io_registers: [u8; 0x7f],
///0xff80 - 0xfffe (0x7e wide)
hram: [u8; 0x7e],
/// 0xffff
interrupts: u8,
}
impl Mmu {
pub fn new(rom: Box<rom::Cartridge>) -> Self {
Mmu {
rom: rom,
vram: [0; 0x1fff],
work_ram_0: [0; 0x1fff],
work_ram_1: [0; 0x1fff],
sprite_table: [0; 0x9f],
io_registers: [0; 0x7f],
hram: [0; 0x7e],
interrupts: 0,
}
}
pub fn read8(&self, add: u16) -> u8 {
let addr = add as usize;
match addr {
//rom memory banks
0x0000...0x7fff => self.rom.read8(add),
0x8000...0x9fff => self.vram[addr - 0x8000],
//external ram (handled by cartridge)
0xa000...0xbfff => self.rom.read8(add),
//work ram 0
0xc000...0xcfff => self.work_ram_0[addr - 0xa000],
//work ram 1..n
0xd000...0xdfff => self.work_ram_1[addr - 0xd000],
//echo ram
0xe000...0xfdff => self.read8(add - 0x2000),
//sprite table
0xfe00...0xfe9f => self.sprite_table[addr - 0xfe00],
//unusable, I'll just return a 0
0xfea0...0xfeff => 0,
//io registers
0xff00...0xff7f => self.io_registers[addr - 0xff00],
//hram
0xff80...0xfffe => self.hram[(addr - 0xff81) as usize],
//interrupt register
0xffff => self.interrupts,
_ => 0,
}
}
pub fn read16(&self, addr: u16) -> u16 {
if addr < 0xffff {
join_u8(self.read8(addr), self.read8(addr + 1))
} else {
//todo: probably wrong
//this just left-shifts the last address's value 8 places when reading past the last byte
join_u8(self.read8(addr), 0)
}
}
pub fn write8(&mut self, add: Addr, dat: u8) {
let addr = add as usize;
match addr {
//rom memory banks
0x8000...0x9fff => self.vram[addr - 0x8000] = dat,
//external ram (handled by cartridge)
// 0xa000...0xbfff => self.rom.read8(addr),
//work ram 0
0xc000...0xcfff => self.work_ram_0[addr - 0xa000] = dat,
//work ram 1..n
0xd000...0xdfff => self.work_ram_1[addr - 0xd000] = dat,
//echo ram
0xe000...0xfdff => self.work_ram_0[addr - 0x2000] = dat,
//sprite table
0xfe00...0xfe9f => self.sprite_table[addr - 0xfe00] = dat,
//unusable, I'll just return a 0
// 0xfea0...0xfeff => 0,
//io registers
0xff00...0xff7f => self.io_registers[addr] = dat,
//hram
0xff80...0xfffe => self.hram[addr - 0xff81] = dat,
//interrupt register
0xffff => self.interrupts = dat,
_ => (),
}
}
pub fn write16(&mut self, addr: Addr, dat: u16) {
let (hi, lo) = split_u16(dat);
self.write8(addr, hi);
self.write8(addr + 1, lo);
}
pub fn push_stack(&mut self, sp: &mut u16, val: u16) {
*sp -= 2;
self.write16(*sp, val);
}
pub fn pop_stack(&mut self, sp: &mut u16) -> u16 {
let val = self.read16(*sp);
*sp += 2;
val
}
pub fn enable_interrupts(&mut self) {}
pub fn disable_interrupts(&mut self) {}
}
|
use super::{Coordinates, Side};
use crossterm::style::{Color, Print, ResetColor, SetBackgroundColor, SetForegroundColor};
use crossterm::{cursor, execute, terminal};
use std::io;
use std::io::stdout;
/// The Grid draws empty boxes and defines the layout for the game.
#[derive(Debug, PartialEq)]
pub struct Grid {
pub side: Side,
}
impl Grid {
pub fn from(side: Side) -> Self {
Self { side: side }
}
/// Removes already existing text on the terminal.
fn cleanup() -> crossterm::Result<()> {
terminal::enable_raw_mode().unwrap();
execute!(stdout(), terminal::Clear(terminal::ClearType::All))?;
Ok(())
}
/// Draws a square grid of the specified side.
pub fn draw(&mut self) -> crossterm::Result<&mut Self> {
Self::cleanup()?;
let Side(side) = self.side;
let grid_length = side * 4 - 1;
let grid_background = std::iter::repeat(" ")
.take(grid_length.into())
.collect::<String>();
for y in 0..side {
execute!(
stdout(),
cursor::MoveTo(0, y),
SetBackgroundColor(Color::White),
Print(&grid_background),
ResetColor
)?;
for x in 0..(side - 1) {
let boundary_position = x * 4 + 3;
execute!(
stdout(),
cursor::MoveTo(boundary_position, y),
SetForegroundColor(Color::Black),
SetBackgroundColor(Color::White),
Print("|"),
ResetColor
)?;
}
}
Ok(self)
}
/// Grid coordinates are the coordinates used to locate a box in the grid,
/// whereas the screen coordinates are based on the actual screen pixels.
pub fn grid_coords_to_screen_coords(position: &Coordinates) -> Coordinates {
Coordinates {
x: position.x * 4 + 1,
y: position.y,
}
}
/// Draw a character marker at some specific grid coordinates.
pub fn mark_at(&mut self, position: Coordinates, marker: char) -> crossterm::Result<&Self> {
let Side(side) = &self.side;
let _position = {
if side >= &(position.x as u16) && side >= &(position.y as u16) {
Ok(position)
} else {
Err(io::Error::new(
io::ErrorKind::Other,
"position coordinates are out of bounds from the grid area",
))
}
}?;
execute!(
stdout(),
SetForegroundColor(Color::Red),
SetBackgroundColor(Color::White),
Print(marker),
ResetColor
)?;
Ok(self)
}
}
|
extern crate olin;
use log::{error, info};
use olin::sys;
pub extern "C" fn test() -> Result<(), i32> {
info!("testing for issue 37: https://github.com/Xe/olin/issues/37");
let mut envvar_val = [0u8; 64];
let resp = unsafe { sys::env_get("BUTTS".as_bytes().as_ptr(), 5, envvar_val.as_mut_ptr(), 64) };
info!("env_get(\"BUTTS\", 5) => {}", resp);
match resp {
-4 => info!("got expected value"),
_ => {
error!("expected -4");
return Err(1);
}
}
info!("issue 37 test passed");
Ok(())
}
|
// Copyright 2019. The Tari Project
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
// following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
// disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
// following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
// products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
use crate::{
output_manager_service::{handle::OutputManagerHandle, TxId},
transaction_service::{
config::TransactionServiceConfig,
error::{TransactionServiceError, TransactionServiceProtocolError},
handle::{TransactionEvent, TransactionEventSender, TransactionServiceRequest, TransactionServiceResponse},
protocols::{
transaction_broadcast_protocol::TransactionBroadcastProtocol,
transaction_chain_monitoring_protocol::TransactionChainMonitoringProtocol,
transaction_send_protocol::{TransactionProtocolStage, TransactionSendProtocol},
},
storage::database::{
CompletedTransaction,
InboundTransaction,
OutboundTransaction,
PendingCoinbaseTransaction,
TransactionBackend,
TransactionDatabase,
TransactionStatus,
},
},
};
use chrono::Utc;
use futures::{
channel::{mpsc, mpsc::Sender, oneshot},
pin_mut,
stream::FuturesUnordered,
SinkExt,
Stream,
StreamExt,
};
use log::*;
use rand::{rngs::OsRng, RngCore};
use std::{
collections::HashMap,
convert::{TryFrom, TryInto},
sync::Arc,
};
use tari_comms::{
peer_manager::{NodeId, NodeIdentity},
types::CommsPublicKey,
};
use tari_comms_dht::{
domain_message::OutboundDomainMessage,
envelope::NodeDestination,
outbound::{OutboundEncryption, OutboundMessageRequester},
};
#[cfg(feature = "test_harness")]
use tari_core::transactions::{tari_amount::uT, types::BlindingFactor};
use tari_core::{
base_node::proto::base_node as BaseNodeProto,
mempool::{proto::mempool as MempoolProto, service::MempoolServiceResponse},
transactions::{
tari_amount::MicroTari,
transaction::{KernelFeatures, OutputFeatures, OutputFlags, Transaction},
transaction_protocol::{
proto,
recipient::{RecipientSignedMessage, RecipientState},
sender::TransactionSenderMessage,
},
types::{CryptoFactories, PrivateKey},
ReceiverTransactionProtocol,
},
};
use tari_crypto::{commitment::HomomorphicCommitmentFactory, keys::SecretKey};
use tari_p2p::{domain_message::DomainMessage, tari_message::TariMessageType};
use tari_service_framework::{reply_channel, reply_channel::Receiver};
use tokio::task::JoinHandle;
const LOG_TARGET: &str = "wallet::transaction_service::service";
/// Contains the generated TxId and SpendingKey for a Pending Coinbase transaction
#[derive(Debug)]
pub struct PendingCoinbaseSpendingKey {
pub tx_id: TxId,
pub spending_key: PrivateKey,
}
/// TransactionService allows for the management of multiple inbound and outbound transaction protocols
/// which are uniquely identified by a tx_id. The TransactionService generates and accepts the various protocol
/// messages and applies them to the appropriate protocol instances based on the tx_id.
/// The TransactionService allows for the sending of transactions to single receivers, when the appropriate recipient
/// response is handled the transaction is completed and moved to the completed_transaction buffer.
/// The TransactionService will accept inbound transactions and generate a reply. Received transactions will remain
/// in the pending_inbound_transactions buffer.
/// TODO Allow for inbound transactions that are detected on the blockchain to be marked as complete in the
/// OutputManagerService
/// TODO Detect Completed Transactions on the blockchain before marking them as completed in OutputManagerService
/// # Fields
/// `pending_outbound_transactions` - List of transaction protocols sent by this client and waiting response from the
/// recipient
/// `pending_inbound_transactions` - List of transaction protocols that have been received and responded to.
/// `completed_transaction` - List of sent transactions that have been responded to and are completed.
pub struct TransactionService<TTxStream, TTxReplyStream, TTxFinalizedStream, MReplyStream, BNResponseStream, TBackend>
where TBackend: TransactionBackend + Clone + 'static
{
config: TransactionServiceConfig,
db: TransactionDatabase<TBackend>,
outbound_message_service: OutboundMessageRequester,
output_manager_service: OutputManagerHandle,
transaction_stream: Option<TTxStream>,
transaction_reply_stream: Option<TTxReplyStream>,
transaction_finalized_stream: Option<TTxFinalizedStream>,
mempool_response_stream: Option<MReplyStream>,
base_node_response_stream: Option<BNResponseStream>,
request_stream: Option<
reply_channel::Receiver<TransactionServiceRequest, Result<TransactionServiceResponse, TransactionServiceError>>,
>,
event_publisher: TransactionEventSender,
node_identity: Arc<NodeIdentity>,
factories: CryptoFactories,
base_node_public_key: Option<CommsPublicKey>,
service_resources: TransactionServiceResources<TBackend>,
pending_transaction_reply_senders: HashMap<TxId, Sender<(CommsPublicKey, RecipientSignedMessage)>>,
mempool_response_senders: HashMap<u64, Sender<MempoolServiceResponse>>,
base_node_response_senders: HashMap<u64, Sender<BaseNodeProto::BaseNodeServiceResponse>>,
send_transaction_cancellation_senders: HashMap<u64, oneshot::Sender<()>>,
}
#[allow(clippy::too_many_arguments)]
impl<TTxStream, TTxReplyStream, TTxFinalizedStream, MReplyStream, BNResponseStream, TBackend>
TransactionService<TTxStream, TTxReplyStream, TTxFinalizedStream, MReplyStream, BNResponseStream, TBackend>
where
TTxStream: Stream<Item = DomainMessage<proto::TransactionSenderMessage>>,
TTxReplyStream: Stream<Item = DomainMessage<proto::RecipientSignedMessage>>,
TTxFinalizedStream: Stream<Item = DomainMessage<proto::TransactionFinalizedMessage>>,
MReplyStream: Stream<Item = DomainMessage<MempoolProto::MempoolServiceResponse>>,
BNResponseStream: Stream<Item = DomainMessage<BaseNodeProto::BaseNodeServiceResponse>>,
TBackend: TransactionBackend + Clone + 'static,
{
pub fn new(
config: TransactionServiceConfig,
db: TransactionDatabase<TBackend>,
request_stream: Receiver<
TransactionServiceRequest,
Result<TransactionServiceResponse, TransactionServiceError>,
>,
transaction_stream: TTxStream,
transaction_reply_stream: TTxReplyStream,
transaction_finalized_stream: TTxFinalizedStream,
mempool_response_stream: MReplyStream,
base_node_response_stream: BNResponseStream,
output_manager_service: OutputManagerHandle,
outbound_message_service: OutboundMessageRequester,
event_publisher: TransactionEventSender,
node_identity: Arc<NodeIdentity>,
factories: CryptoFactories,
) -> Self
{
// Collect the resources that all protocols will need so that they can be neatly cloned as the protocols are
// spawned.
let service_resources = TransactionServiceResources {
db: db.clone(),
output_manager_service: output_manager_service.clone(),
outbound_message_service: outbound_message_service.clone(),
event_publisher: event_publisher.clone(),
node_identity: node_identity.clone(),
factories: factories.clone(),
};
TransactionService {
config,
db,
outbound_message_service,
output_manager_service,
transaction_stream: Some(transaction_stream),
transaction_reply_stream: Some(transaction_reply_stream),
transaction_finalized_stream: Some(transaction_finalized_stream),
mempool_response_stream: Some(mempool_response_stream),
base_node_response_stream: Some(base_node_response_stream),
request_stream: Some(request_stream),
event_publisher,
node_identity,
factories,
base_node_public_key: None,
service_resources,
pending_transaction_reply_senders: HashMap::new(),
mempool_response_senders: HashMap::new(),
base_node_response_senders: HashMap::new(),
send_transaction_cancellation_senders: HashMap::new(),
}
}
#[warn(unreachable_code)]
pub async fn start(mut self) -> Result<(), TransactionServiceError> {
let request_stream = self
.request_stream
.take()
.expect("Transaction Service initialized without request_stream")
.fuse();
pin_mut!(request_stream);
let transaction_stream = self
.transaction_stream
.take()
.expect("Transaction Service initialized without transaction_stream")
.fuse();
pin_mut!(transaction_stream);
let transaction_reply_stream = self
.transaction_reply_stream
.take()
.expect("Transaction Service initialized without transaction_reply_stream")
.fuse();
pin_mut!(transaction_reply_stream);
let transaction_finalized_stream = self
.transaction_finalized_stream
.take()
.expect("Transaction Service initialized without transaction_finalized_stream")
.fuse();
pin_mut!(transaction_finalized_stream);
let mempool_response_stream = self
.mempool_response_stream
.take()
.expect("Transaction Service initialized without mempool_response_stream")
.fuse();
pin_mut!(mempool_response_stream);
let base_node_response_stream = self
.base_node_response_stream
.take()
.expect("Transaction Service initialized without base_node_response_stream")
.fuse();
pin_mut!(base_node_response_stream);
let mut send_transaction_protocol_handles: FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
> = FuturesUnordered::new();
let mut transaction_broadcast_protocol_handles: FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
> = FuturesUnordered::new();
let mut transaction_chain_monitoring_protocol_handles: FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
> = FuturesUnordered::new();
info!(target: LOG_TARGET, "Transaction Service started");
loop {
futures::select! {
//Incoming request
request_context = request_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Service API Request");
let (request, reply_tx) = request_context.split();
let _ = reply_tx.send(self.handle_request(request, &mut send_transaction_protocol_handles, &mut transaction_broadcast_protocol_handles, &mut transaction_chain_monitoring_protocol_handles).await.or_else(|resp| {
error!(target: LOG_TARGET, "Error handling request: {:?}", resp);
Err(resp)
})).or_else(|resp| {
error!(target: LOG_TARGET, "Failed to send reply");
Err(resp)
});
},
// Incoming messages from the Comms layer
msg = transaction_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Transaction Message");
let (origin_public_key, inner_msg) = msg.into_origin_and_inner();
let result = self.accept_transaction(origin_public_key, inner_msg).await;
match result {
Err(TransactionServiceError::RepeatedMessageError) => {
trace!(target: LOG_TARGET, "A repeated Transaction message was received");
}
Err(e) => {
error!(target: LOG_TARGET, "Failed to handle incoming Transaction message: {:?} for NodeID: {}", e, self.node_identity.node_id().short_str());
let _ = self.event_publisher.send(Arc::new(TransactionEvent::Error(format!("Error handling Transaction Sender message: {:?}", e).to_string())));
}
_ => (),
}
},
// Incoming messages from the Comms layer
msg = transaction_reply_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Transaction Reply Message");
let (origin_public_key, inner_msg) = msg.into_origin_and_inner();
let result = self.accept_recipient_reply(origin_public_key, inner_msg).await;
match result {
Err(TransactionServiceError::TransactionDoesNotExistError) => {
debug!(target: LOG_TARGET, "Unable to handle incoming Transaction Reply message from NodeId: {} due to Transaction not Existing. This usually means the message was a repeated message from Store and Forward", self.node_identity.node_id().short_str());
},
Err(e) => {
error!(target: LOG_TARGET, "Failed to handle incoming Transaction Reply message: {:?} for NodeId: {}", e, self.node_identity.node_id().short_str());
let _ = self.event_publisher.send(Arc::new(TransactionEvent::Error("Error handling Transaction Recipient Reply message".to_string())));
},
Ok(_) => (),
}
},
// Incoming messages from the Comms layer
msg = transaction_finalized_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Transaction Finalized Message");
let (origin_public_key, inner_msg) = msg.into_origin_and_inner();
let result = self.accept_finalized_transaction(origin_public_key, inner_msg, &mut transaction_broadcast_protocol_handles).await.or_else(|err| {
error!(target: LOG_TARGET, "Failed to handle incoming Transaction Finalized message: {:?} for NodeID: {}", err , self.node_identity.node_id().short_str());
Err(err)
});
if result.is_err() {
let _ = self.event_publisher.send(Arc::new(TransactionEvent::Error("Error handling Transaction Finalized message".to_string(),)));
}
},
// Incoming messages from the Comms layer
msg = mempool_response_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Mempool Response");
let (origin_public_key, inner_msg) = msg.into_origin_and_inner();
let _ = self.handle_mempool_response(inner_msg).await.or_else(|resp| {
error!(target: LOG_TARGET, "Error handling mempool service response: {:?}", resp);
Err(resp)
});
}
// Incoming messages from the Comms layer
msg = base_node_response_stream.select_next_some() => {
trace!(target: LOG_TARGET, "Handling Base Node Response");
let (origin_public_key, inner_msg) = msg.into_origin_and_inner();
let _ = self.handle_base_node_response(inner_msg).await.or_else(|resp| {
error!(target: LOG_TARGET, "Error handling base node service response from {}: {:?} for NodeID: {}", origin_public_key, resp, self.node_identity.node_id().short_str());
Err(resp)
});
}
join_result = send_transaction_protocol_handles.select_next_some() => {
trace!(target: LOG_TARGET, "Send Protocol for Transaction has ended with result {:?}", join_result);
match join_result {
Ok(join_result_inner) => self.complete_send_transaction_protocol(join_result_inner, &mut transaction_broadcast_protocol_handles).await,
Err(e) => error!(target: LOG_TARGET, "Error resolving Join Handle: {:?}", e),
};
}
join_result = transaction_broadcast_protocol_handles.select_next_some() => {
trace!(target: LOG_TARGET, "Transaction Broadcast protocol has ended with result {:?}", join_result);
match join_result {
Ok(join_result_inner) => self.complete_transaction_broadcast_protocol(join_result_inner, &mut transaction_chain_monitoring_protocol_handles).await,
Err(e) => error!(target: LOG_TARGET, "Error resolving Join Handle: {:?}", e),
};
}
join_result = transaction_chain_monitoring_protocol_handles.select_next_some() => {
trace!(target: LOG_TARGET, "Transaction chain monitoring protocol has ended with result {:?}", join_result);
match join_result {
Ok(join_result_inner) => self.complete_transaction_chain_monitoring_protocol(join_result_inner),
Err(e) => error!(target: LOG_TARGET, "Error resolving Join Handle: {:?}", e),
};
}
complete => {
info!(target: LOG_TARGET, "Transaction service shutting down");
break;
}
}
}
Ok(())
}
/// This handler is called when requests arrive from the various streams
async fn handle_request(
&mut self,
request: TransactionServiceRequest,
send_transaction_join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
transaction_broadcast_join_handles: &mut FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
>,
chain_monitoring_join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<TransactionServiceResponse, TransactionServiceError>
{
trace!(target: LOG_TARGET, "Handling Service Request: {}", request);
match request {
TransactionServiceRequest::SendTransaction((dest_pubkey, amount, fee_per_gram, message)) => self
.send_transaction(
dest_pubkey,
amount,
fee_per_gram,
message,
send_transaction_join_handles,
)
.await
.map(TransactionServiceResponse::TransactionSent),
TransactionServiceRequest::CancelTransaction(tx_id) => self
.cancel_transaction(tx_id)
.await
.map(|_| TransactionServiceResponse::TransactionCancelled),
TransactionServiceRequest::GetPendingInboundTransactions => Ok(
TransactionServiceResponse::PendingInboundTransactions(self.get_pending_inbound_transactions().await?),
),
TransactionServiceRequest::GetPendingOutboundTransactions => {
Ok(TransactionServiceResponse::PendingOutboundTransactions(
self.get_pending_outbound_transactions().await?,
))
},
TransactionServiceRequest::GetCompletedTransactions => Ok(
TransactionServiceResponse::CompletedTransactions(self.get_completed_transactions().await?),
),
TransactionServiceRequest::RequestCoinbaseSpendingKey((amount, maturity_height)) => Ok(
TransactionServiceResponse::CoinbaseKey(self.request_coinbase_key(amount, maturity_height).await?),
),
TransactionServiceRequest::CompleteCoinbaseTransaction((tx_id, completed_transaction)) => {
self.submit_completed_coinbase_transaction(tx_id, completed_transaction)
.await?;
Ok(TransactionServiceResponse::CompletedCoinbaseTransactionReceived)
},
TransactionServiceRequest::CancelPendingCoinbaseTransaction(tx_id) => {
self.cancel_pending_coinbase_transaction(tx_id).await?;
Ok(TransactionServiceResponse::CoinbaseTransactionCancelled)
},
TransactionServiceRequest::SetBaseNodePublicKey(public_key) => self
.set_base_node_public_key(
public_key,
transaction_broadcast_join_handles,
chain_monitoring_join_handles,
send_transaction_join_handles,
)
.await
.map(|_| TransactionServiceResponse::BaseNodePublicKeySet),
TransactionServiceRequest::ImportUtxo(value, source_public_key, message) => self
.add_utxo_import_transaction(value, source_public_key, message)
.await
.map(TransactionServiceResponse::UtxoImported),
TransactionServiceRequest::SubmitTransaction((tx_id, tx, fee, amount, message)) => self
.submit_transaction(transaction_broadcast_join_handles, tx_id, tx, fee, amount, message)
.await
.map(|_| TransactionServiceResponse::TransactionSubmitted),
#[cfg(feature = "test_harness")]
TransactionServiceRequest::CompletePendingOutboundTransaction(completed_transaction) => {
self.complete_pending_outbound_transaction(completed_transaction)
.await?;
Ok(TransactionServiceResponse::CompletedPendingTransaction)
},
#[cfg(feature = "test_harness")]
TransactionServiceRequest::FinalizePendingInboundTransaction(tx_id) => {
self.finalize_received_test_transaction(tx_id).await?;
Ok(TransactionServiceResponse::FinalizedPendingInboundTransaction)
},
#[cfg(feature = "test_harness")]
TransactionServiceRequest::AcceptTestTransaction((tx_id, amount, source_pubkey)) => {
self.receive_test_transaction(tx_id, amount, source_pubkey).await?;
Ok(TransactionServiceResponse::AcceptedTestTransaction)
},
#[cfg(feature = "test_harness")]
TransactionServiceRequest::BroadcastTransaction(tx_id) => {
self.broadcast_transaction(tx_id).await?;
Ok(TransactionServiceResponse::TransactionBroadcast)
},
#[cfg(feature = "test_harness")]
TransactionServiceRequest::MineTransaction(tx_id) => {
self.mine_transaction(tx_id).await?;
Ok(TransactionServiceResponse::TransactionMined)
},
}
}
/// Sends a new transaction to a recipient
/// # Arguments
/// 'dest_pubkey': The Comms pubkey of the recipient node
/// 'amount': The amount of Tari to send to the recipient
/// 'fee_per_gram': The amount of fee per transaction gram to be included in transaction
pub async fn send_transaction(
&mut self,
dest_pubkey: CommsPublicKey,
amount: MicroTari,
fee_per_gram: MicroTari,
message: String,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<TxId, TransactionServiceError>
{
let sender_protocol = self
.output_manager_service
.prepare_transaction_to_send(amount, fee_per_gram, None, message.clone())
.await?;
let tx_id = sender_protocol.get_tx_id()?;
let (tx_reply_sender, tx_reply_receiver) = mpsc::channel(100);
let (cancellation_sender, cancellation_receiver) = oneshot::channel();
self.pending_transaction_reply_senders.insert(tx_id, tx_reply_sender);
self.send_transaction_cancellation_senders
.insert(tx_id, cancellation_sender);
let protocol = TransactionSendProtocol::new(
tx_id,
self.service_resources.clone(),
tx_reply_receiver,
cancellation_receiver,
dest_pubkey,
amount,
message,
sender_protocol,
TransactionProtocolStage::Initial,
);
let join_handle = tokio::spawn(protocol.execute());
join_handles.push(join_handle);
Ok(tx_id)
}
/// Accept the public reply from a recipient and apply the reply to the relevant transaction protocol
/// # Arguments
/// 'recipient_reply' - The public response from a recipient with data required to complete the transaction
pub async fn accept_recipient_reply(
&mut self,
source_pubkey: CommsPublicKey,
recipient_reply: proto::RecipientSignedMessage,
) -> Result<(), TransactionServiceError>
{
let recipient_reply: RecipientSignedMessage = recipient_reply
.try_into()
.map_err(TransactionServiceError::InvalidMessageError)?;
let tx_id = recipient_reply.tx_id;
let sender = match self.pending_transaction_reply_senders.get_mut(&tx_id) {
None => return Err(TransactionServiceError::TransactionDoesNotExistError),
Some(s) => s,
};
sender
.send((source_pubkey, recipient_reply))
.await
.map_err(|_| TransactionServiceError::ProtocolChannelError)?;
Ok(())
}
/// Handle the final clean up after a Send Transaction protocol completes
async fn complete_send_transaction_protocol(
&mut self,
join_result: Result<u64, TransactionServiceProtocolError>,
transaction_broadcast_join_handles: &mut FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
>,
)
{
match join_result {
Ok(id) => {
let _ = self.pending_transaction_reply_senders.remove(&id);
let _ = self.send_transaction_cancellation_senders.remove(&id);
let _ = self
.broadcast_completed_transaction_to_mempool(id, transaction_broadcast_join_handles)
.await
.or_else(|resp| {
error!(
target: LOG_TARGET,
"Error starting Broadcast Protocol after completed Send Transaction Protocol : {:?}", resp
);
Err(resp)
});
trace!(
target: LOG_TARGET,
"Send Transaction Protocol for TxId: {} completed successfully",
id
);
},
Err(TransactionServiceProtocolError { id, error }) => {
let _ = self.pending_transaction_reply_senders.remove(&id);
let _ = self.send_transaction_cancellation_senders.remove(&id);
error!(
target: LOG_TARGET,
"Error completing Send Transaction Protocol (Id: {}): {:?}", id, error
);
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::Error(format!("{:?}", error))));
},
}
}
/// Cancel a pending outbound transaction
async fn cancel_transaction(&mut self, tx_id: TxId) -> Result<(), TransactionServiceError> {
self.db.cancel_pending_transaction(tx_id).await.map_err(|e| {
error!(
target: LOG_TARGET,
"Pending Transaction does not exist and could not be cancelled: {:?}", e
);
e
})?;
self.output_manager_service.cancel_transaction(tx_id).await?;
if let Some(cancellation_sender) = self.send_transaction_cancellation_senders.remove(&tx_id) {
let _ = cancellation_sender.send(());
}
let _ = self.pending_transaction_reply_senders.remove(&tx_id);
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::TransactionCancelled(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
info!(target: LOG_TARGET, "Pending Transaction (TxId: {}) cancelled", tx_id);
Ok(())
}
async fn restart_all_send_transaction_protocols(
&mut self,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
let outbound_txs = self.db.get_pending_outbound_transactions().await?;
for (tx_id, tx) in outbound_txs {
if !self.pending_transaction_reply_senders.contains_key(&tx_id) {
debug!(
target: LOG_TARGET,
"Restarting listening for Reply for Pending Outbound Transaction TxId: {}", tx_id
);
let (tx_reply_sender, tx_reply_receiver) = mpsc::channel(100);
let (cancellation_sender, cancellation_receiver) = oneshot::channel();
self.pending_transaction_reply_senders.insert(tx_id, tx_reply_sender);
self.send_transaction_cancellation_senders
.insert(tx_id, cancellation_sender);
let protocol = TransactionSendProtocol::new(
tx_id,
self.service_resources.clone(),
tx_reply_receiver,
cancellation_receiver,
tx.destination_public_key,
tx.amount,
tx.message,
tx.sender_protocol,
TransactionProtocolStage::WaitForReply,
);
let join_handle = tokio::spawn(protocol.execute());
join_handles.push(join_handle);
}
}
Ok(())
}
/// Accept a new transaction from a sender by handling a public SenderMessage. The reply is generated and sent.
/// # Arguments
/// 'source_pubkey' - The pubkey from which the message was sent and to which the reply will be sent.
/// 'sender_message' - Message from a sender containing the setup of the transaction being sent to you
pub async fn accept_transaction(
&mut self,
source_pubkey: CommsPublicKey,
sender_message: proto::TransactionSenderMessage,
) -> Result<(), TransactionServiceError>
{
let sender_message: TransactionSenderMessage = sender_message
.try_into()
.map_err(TransactionServiceError::InvalidMessageError)?;
// Currently we will only reply to a Single sender transaction protocol
if let TransactionSenderMessage::Single(data) = sender_message.clone() {
trace!(
target: LOG_TARGET,
"Transaction (TxId: {}) received from {}",
data.tx_id,
source_pubkey
);
// Check this is not a repeat message i.e. tx_id doesn't already exist in our pending or completed
// transactions
if self.db.transaction_exists(data.tx_id).await? {
trace!(
target: LOG_TARGET,
"Transaction (TxId: {}) already present in database.",
data.tx_id
);
return Err(TransactionServiceError::RepeatedMessageError);
}
let amount = data.amount;
let spending_key = self
.output_manager_service
.get_recipient_spending_key(data.tx_id, data.amount)
.await?;
let nonce = PrivateKey::random(&mut OsRng);
let rtp = ReceiverTransactionProtocol::new(
sender_message,
nonce,
spending_key,
OutputFeatures::default(),
&self.factories,
);
let recipient_reply = rtp.get_signed_data()?.clone();
let tx_id = recipient_reply.tx_id;
let proto_message: proto::RecipientSignedMessage = recipient_reply.into();
self.outbound_message_service
.send_direct(
source_pubkey.clone(),
OutboundEncryption::None,
OutboundDomainMessage::new(TariMessageType::ReceiverPartialTransactionReply, proto_message.clone()),
)
.await?;
self.outbound_message_service
.propagate(
NodeDestination::NodeId(Box::new(NodeId::from_key(&source_pubkey)?)),
OutboundEncryption::EncryptFor(Box::new(source_pubkey.clone())),
vec![],
OutboundDomainMessage::new(TariMessageType::ReceiverPartialTransactionReply, proto_message),
)
.await?;
// Otherwise add it to our pending transaction list and return reply
let inbound_transaction = InboundTransaction {
tx_id,
source_public_key: source_pubkey.clone(),
amount,
receiver_protocol: rtp.clone(),
status: TransactionStatus::Pending,
message: data.message.clone(),
timestamp: Utc::now().naive_utc(),
};
self.db
.add_pending_inbound_transaction(tx_id, inbound_transaction.clone())
.await?;
info!(
target: LOG_TARGET,
"Transaction with TX_ID = {} received from {}. Reply Sent", tx_id, source_pubkey,
);
info!(
target: LOG_TARGET,
"Transaction (TX_ID: {}) - Amount: {} - Message: {}", tx_id, amount, data.message
);
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::ReceivedTransaction(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
}
Ok(())
}
/// Accept a new transaction from a sender by handling a public SenderMessage. The reply is generated and sent.
/// # Arguments
/// 'source_pubkey' - The pubkey from which the message was sent and to which the reply will be sent.
/// 'sender_message' - Message from a sender containing the setup of the transaction being sent to you
pub async fn accept_finalized_transaction(
&mut self,
source_pubkey: CommsPublicKey,
finalized_transaction: proto::TransactionFinalizedMessage,
transaction_broadcast_join_handles: &mut FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
>,
) -> Result<(), TransactionServiceError>
{
let tx_id = finalized_transaction.tx_id;
let transaction: Transaction = finalized_transaction
.transaction
.ok_or_else(|| {
TransactionServiceError::InvalidMessageError(
"Finalized Transaction missing Transaction field".to_string(),
)
})?
.try_into()
.map_err(|_| {
TransactionServiceError::InvalidMessageError(
"Cannot convert Transaction field from TransactionFinalized message".to_string(),
)
})?;
let inbound_tx = match self.db.get_pending_inbound_transaction(tx_id).await {
Ok(tx) => tx,
Err(_e) => {
warn!(
target: LOG_TARGET,
"TxId for received Finalized Transaction does not exist in Pending Inbound Transactions, could be \
a repeat Store and Forward message"
);
return Ok(());
},
};
info!(
target: LOG_TARGET,
"Finalized Transaction with TX_ID = {} received from {}",
tx_id,
source_pubkey.clone()
);
if inbound_tx.source_public_key != source_pubkey {
error!(
target: LOG_TARGET,
"Finalized transaction Source Public Key does not correspond to stored value"
);
return Err(TransactionServiceError::InvalidSourcePublicKey);
}
let rtp_output = match inbound_tx.receiver_protocol.state {
RecipientState::Finalized(s) => s.output.clone(),
RecipientState::Failed(_) => return Err(TransactionServiceError::InvalidStateError),
};
let finalized_outputs = transaction.body.outputs();
if finalized_outputs.iter().find(|o| o == &&rtp_output).is_none() {
error!(
target: LOG_TARGET,
"Finalized transaction not contain the Receiver's output"
);
return Err(TransactionServiceError::ReceiverOutputNotFound);
}
let completed_transaction = CompletedTransaction {
tx_id,
source_public_key: source_pubkey.clone(),
destination_public_key: self.node_identity.public_key().clone(),
amount: inbound_tx.amount,
fee: transaction.body.get_total_fee(),
transaction: transaction.clone(),
status: TransactionStatus::Completed,
message: inbound_tx.message.clone(),
timestamp: inbound_tx.timestamp,
};
self.db
.complete_inbound_transaction(tx_id, completed_transaction.clone())
.await?;
info!(
target: LOG_TARGET,
"Inbound Transaction with TX_ID = {} from {} moved to Completed Transactions",
tx_id,
source_pubkey.clone()
);
// Logging this error here instead of propogating it up to the select! catchall which generates the Error Event.
let _ = self
.broadcast_completed_transaction_to_mempool(tx_id, transaction_broadcast_join_handles)
.await
.map_err(|e| {
error!(
target: LOG_TARGET,
"Error broadcasting completed transaction to mempool: {:?}", e
);
e
});
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::ReceivedFinalizedTransaction(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
Ok(())
}
/// Request a tx_id and spending_key for a coinbase output to be mined
pub async fn request_coinbase_key(
&mut self,
amount: MicroTari,
maturity_height: u64,
) -> Result<PendingCoinbaseSpendingKey, TransactionServiceError>
{
let tx_id: TxId = OsRng.next_u64();
let spending_key = self
.output_manager_service
.get_coinbase_spending_key(tx_id, amount.clone(), maturity_height)
.await?;
self.db
.add_pending_coinbase_transaction(tx_id, PendingCoinbaseTransaction {
tx_id,
amount,
commitment: self.factories.commitment.commit_value(&spending_key, u64::from(amount)),
timestamp: Utc::now().naive_utc(),
})
.await?;
Ok(PendingCoinbaseSpendingKey { tx_id, spending_key })
}
/// Once the miner has constructed the completed Coinbase transaction they will submit it to the Transaction Service
/// which will monitor the chain to see when it has been mined.
pub async fn submit_completed_coinbase_transaction(
&mut self,
tx_id: TxId,
completed_transaction: Transaction,
) -> Result<(), TransactionServiceError>
{
let coinbase_tx = self.db.get_pending_coinbase_transaction(tx_id).await.map_err(|e| {
error!(
target: LOG_TARGET,
"Finalized coinbase transaction TxId does not exist in Pending Inbound Transactions"
);
e
})?;
if !completed_transaction.body.inputs().is_empty() ||
completed_transaction.body.outputs().len() != 1 ||
completed_transaction.body.kernels().len() != 1
{
error!(
target: LOG_TARGET,
"Provided Completed Transaction for Coinbase Transaction does not contain just a single output"
);
return Err(TransactionServiceError::InvalidCompletedTransaction);
}
if coinbase_tx.commitment != completed_transaction.body.outputs()[0].commitment ||
completed_transaction.body.outputs()[0].features.flags != OutputFlags::COINBASE_OUTPUT ||
completed_transaction.body.kernels()[0].features != KernelFeatures::COINBASE_KERNEL
{
error!(
target: LOG_TARGET,
"Provided Completed Transaction commitment for Coinbase Transaction does not match the stored \
commitment for this TxId"
);
return Err(TransactionServiceError::InvalidCompletedTransaction);
}
self.db
.complete_coinbase_transaction(tx_id, CompletedTransaction {
tx_id,
source_public_key: self.node_identity.public_key().clone(),
destination_public_key: self.node_identity.public_key().clone(),
amount: coinbase_tx.amount,
fee: MicroTari::from(0),
transaction: completed_transaction,
status: TransactionStatus::Completed,
message: "Coinbase Transaction".to_string(),
timestamp: Utc::now().naive_utc(),
})
.await?;
Ok(())
}
/// If a specific coinbase transaction will not be mined then the Miner can cancel it
pub async fn cancel_pending_coinbase_transaction(&mut self, tx_id: TxId) -> Result<(), TransactionServiceError> {
let _ = self.db.get_pending_coinbase_transaction(tx_id).await.map_err(|e| {
error!(
target: LOG_TARGET,
"Finalized coinbase transaction TxId does not exist in Pending Inbound Transactions"
);
e
})?;
self.output_manager_service.cancel_transaction(tx_id).await?;
self.db.cancel_coinbase_transaction(tx_id).await?;
Ok(())
}
pub async fn get_pending_inbound_transactions(
&self,
) -> Result<HashMap<u64, InboundTransaction>, TransactionServiceError> {
Ok(self.db.get_pending_inbound_transactions().await?)
}
pub async fn get_pending_outbound_transactions(
&self,
) -> Result<HashMap<u64, OutboundTransaction>, TransactionServiceError> {
Ok(self.db.get_pending_outbound_transactions().await?)
}
pub async fn get_completed_transactions(
&self,
) -> Result<HashMap<u64, CompletedTransaction>, TransactionServiceError> {
Ok(self.db.get_completed_transactions().await?)
}
/// Add a base node public key to the list that will be used to broadcast transactions and monitor the base chain
/// for the presence of spendable outputs. If this is the first time the base node public key is set do the initial
/// mempool broadcast
async fn set_base_node_public_key(
&mut self,
base_node_public_key: CommsPublicKey,
broadcast_join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
chain_monitoring_join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
send_transaction_join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
let startup_broadcast = self.base_node_public_key.is_none();
self.base_node_public_key = Some(base_node_public_key);
if startup_broadcast {
let _ = self
.broadcast_all_completed_transactions_to_mempool(broadcast_join_handles)
.await
.or_else(|resp| {
error!(
target: LOG_TARGET,
"Error broadcasting all completed transactions: {:?}", resp
);
Err(resp)
});
let _ = self
.start_chain_monitoring_for_all_broadcast_transactions(chain_monitoring_join_handles)
.await
.or_else(|resp| {
error!(
target: LOG_TARGET,
"Error querying base_node for all completed transactions: {:?}", resp
);
Err(resp)
});
let _ = self
.restart_all_send_transaction_protocols(send_transaction_join_handles)
.await
.or_else(|resp| {
error!(
target: LOG_TARGET,
"Error restarting protocols for all pending outbound transactions: {:?}", resp
);
Err(resp)
});
}
Ok(())
}
/// Broadcast the specified Completed Transaction to the Base Node. After sending the transaction send a Mempool
/// request to check that the transaction has been received. The final step is to set a timeout future to check on
/// the status of the transaction in the future.
pub async fn broadcast_completed_transaction_to_mempool(
&mut self,
tx_id: TxId,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
let completed_tx = self.db.get_completed_transaction(tx_id).await?;
if completed_tx.status != TransactionStatus::Completed || completed_tx.transaction.body.kernels().is_empty() {
return Err(TransactionServiceError::InvalidCompletedTransaction);
}
match self.base_node_public_key.clone() {
None => return Err(TransactionServiceError::NoBaseNodeKeysProvided),
Some(pk) => {
let (mempool_response_sender, mempool_response_receiver) = mpsc::channel(100);
let (base_node_response_sender, base_node_response_receiver) = mpsc::channel(100);
self.mempool_response_senders.insert(tx_id, mempool_response_sender);
self.base_node_response_senders.insert(tx_id, base_node_response_sender);
let protocol = TransactionBroadcastProtocol::new(
tx_id,
self.service_resources.clone(),
self.config.mempool_broadcast_timeout,
pk,
mempool_response_receiver,
base_node_response_receiver,
);
let join_handle = tokio::spawn(protocol.execute());
join_handles.push(join_handle);
},
}
Ok(())
}
/// Go through all completed transactions that have not yet been broadcast and broadcast all of them to the base
/// node followed by mempool requests to confirm that they have been received
async fn broadcast_all_completed_transactions_to_mempool(
&mut self,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
trace!(target: LOG_TARGET, "Attempting to Broadcast all Completed Transactions");
let completed_txs = self.db.get_completed_transactions().await?;
for completed_tx in completed_txs.values() {
if completed_tx.status == TransactionStatus::Completed &&
!self.mempool_response_senders.contains_key(&completed_tx.tx_id)
{
self.broadcast_completed_transaction_to_mempool(completed_tx.tx_id, join_handles)
.await?;
}
}
Ok(())
}
/// Handle an incoming mempool response message
pub async fn handle_mempool_response(
&mut self,
response: MempoolProto::MempoolServiceResponse,
) -> Result<(), TransactionServiceError>
{
let response = MempoolServiceResponse::try_from(response).unwrap();
trace!(target: LOG_TARGET, "Received Mempool Response: {:?}", response);
let tx_id = response.request_key;
let sender = match self.mempool_response_senders.get_mut(&tx_id) {
None => {
trace!(
target: LOG_TARGET,
"Received Mempool response with unexpected key: {}. Not for this service",
response.request_key
);
return Ok(());
},
Some(s) => s,
};
sender
.send(response)
.await
.map_err(|_| TransactionServiceError::ProtocolChannelError)?;
Ok(())
}
/// Handle the final clean up after a Transaction Broadcast protocol completes
async fn complete_transaction_broadcast_protocol(
&mut self,
join_result: Result<u64, TransactionServiceProtocolError>,
transaction_chain_monitoring_join_handles: &mut FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
>,
)
{
match join_result {
Ok(id) => {
// Cleanup any registered senders
let _ = self.mempool_response_senders.remove(&id);
let _ = self.base_node_response_senders.remove(&id);
trace!(
target: LOG_TARGET,
"Transaction Broadcast Protocol for TxId: {} completed successfully",
id
);
let _ = self
.start_transaction_chain_monitoring_protocol(id, transaction_chain_monitoring_join_handles)
.await
.or_else(|resp| {
match resp {
TransactionServiceError::InvalidCompletedTransaction => trace!(
target: LOG_TARGET,
"Not starting Chain monitoring protocol as transaction cannot be found, either \
cancelled or already mined."
),
_ => error!(
target: LOG_TARGET,
"Error starting Chain Monitoring Protocol after completed Broadcast Protocol : {:?}",
resp
),
}
Err(resp)
});
},
Err(TransactionServiceProtocolError { id, error }) => {
let _ = self.mempool_response_senders.remove(&id);
let _ = self.base_node_response_senders.remove(&id);
error!(
target: LOG_TARGET,
"Error completing Transaction Broadcast Protocol (Id: {}): {:?}", id, error
);
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::Error(format!("{:?}", error))));
},
}
}
/// Send a request to the Base Node to see if the specified transaction has been mined yet. This function will send
/// the request and store a timeout future to check in on the status of the transaction in the future.
async fn start_transaction_chain_monitoring_protocol(
&mut self,
tx_id: TxId,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
let completed_tx = self.db.get_completed_transaction(tx_id).await?;
if completed_tx.status != TransactionStatus::Broadcast || completed_tx.transaction.body.kernels().is_empty() {
return Err(TransactionServiceError::InvalidCompletedTransaction);
}
match self.base_node_public_key.clone() {
None => return Err(TransactionServiceError::NoBaseNodeKeysProvided),
Some(pk) => {
let protocol_id = OsRng.next_u64();
let (mempool_response_sender, mempool_response_receiver) = mpsc::channel(100);
let (base_node_response_sender, base_node_response_receiver) = mpsc::channel(100);
self.mempool_response_senders
.insert(protocol_id, mempool_response_sender);
self.base_node_response_senders
.insert(protocol_id, base_node_response_sender);
let protocol = TransactionChainMonitoringProtocol::new(
protocol_id,
completed_tx.tx_id,
self.service_resources.clone(),
self.config.base_node_mined_timeout,
pk,
mempool_response_receiver,
base_node_response_receiver,
);
let join_handle = tokio::spawn(protocol.execute());
join_handles.push(join_handle);
},
}
Ok(())
}
/// Handle the final clean up after a Transaction Chain Monitoring protocol completes
fn complete_transaction_chain_monitoring_protocol(
&mut self,
join_result: Result<u64, TransactionServiceProtocolError>,
)
{
match join_result {
Ok(id) => {
// Cleanup any registered senders
let _ = self.mempool_response_senders.remove(&id);
let _ = self.base_node_response_senders.remove(&id);
trace!(
target: LOG_TARGET,
"Transaction chain monitoring Protocol for TxId: {} completed successfully",
id
);
},
Err(TransactionServiceProtocolError { id, error }) => {
let _ = self.mempool_response_senders.remove(&id);
let _ = self.base_node_response_senders.remove(&id);
error!(
target: LOG_TARGET,
"Error completing Transaction chain monitoring Protocol (Id: {}): {:?}", id, error
);
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::Error(format!("{:?}", error))));
},
}
}
/// Handle an incoming basenode response message
pub async fn handle_base_node_response(
&mut self,
response: BaseNodeProto::BaseNodeServiceResponse,
) -> Result<(), TransactionServiceError>
{
let sender = match self.base_node_response_senders.get_mut(&response.request_key) {
None => {
trace!(
target: LOG_TARGET,
"Received Base Node response with unexpected key: {}. Not for this service",
response.request_key
);
return Ok(());
},
Some(s) => s,
};
sender
.send(response.clone())
.await
.map_err(|_| TransactionServiceError::ProtocolChannelError)?;
Ok(())
}
/// Go through all completed transactions that have been broadcast and start querying the base_node to see if they
/// have been mined
async fn start_chain_monitoring_for_all_broadcast_transactions(
&mut self,
join_handles: &mut FuturesUnordered<JoinHandle<Result<u64, TransactionServiceProtocolError>>>,
) -> Result<(), TransactionServiceError>
{
trace!(
target: LOG_TARGET,
"Starting Chain monitoring for all Broadcast Transactions"
);
let completed_txs = self.db.get_completed_transactions().await?;
for completed_tx in completed_txs.values() {
if completed_tx.status == TransactionStatus::Broadcast {
self.start_transaction_chain_monitoring_protocol(completed_tx.tx_id, join_handles)
.await?;
}
}
Ok(())
}
/// Add a completed transaction to the Transaction Manager to record directly importing a spendable UTXO.
pub async fn add_utxo_import_transaction(
&mut self,
value: MicroTari,
source_public_key: CommsPublicKey,
message: String,
) -> Result<TxId, TransactionServiceError>
{
let tx_id = OsRng.next_u64();
self.db
.add_utxo_import_transaction(
tx_id,
value,
source_public_key,
self.node_identity.public_key().clone(),
message,
)
.await?;
Ok(tx_id)
}
/// Submit a completed transaction to the Transaction Manager
pub async fn submit_transaction(
&mut self,
transaction_broadcast_join_handles: &mut FuturesUnordered<
JoinHandle<Result<u64, TransactionServiceProtocolError>>,
>,
tx_id: TxId,
tx: Transaction,
fee: MicroTari,
amount: MicroTari,
message: String,
) -> Result<(), TransactionServiceError>
{
trace!(target: LOG_TARGET, "Submit transaction ({}) to db.", tx_id);
self.db
.insert_completed_transaction(tx_id, CompletedTransaction {
tx_id,
source_public_key: self.node_identity.public_key().clone(),
destination_public_key: self.node_identity.public_key().clone(),
amount,
fee,
transaction: tx,
status: TransactionStatus::Completed,
message,
timestamp: Utc::now().naive_utc(),
})
.await?;
trace!(
target: LOG_TARGET,
"Launch the transaction broadcast protocol for submitted transaction ({}).",
tx_id
);
self.complete_send_transaction_protocol(Ok(tx_id), transaction_broadcast_join_handles)
.await;
Ok(())
}
/// This function is only available for testing by the client of LibWallet. It simulates a receiver accepting and
/// replying to a Pending Outbound Transaction. This results in that transaction being "completed" and it's status
/// set to `Broadcast` which indicated it is in a base_layer mempool.
#[cfg(feature = "test_harness")]
pub async fn complete_pending_outbound_transaction(
&mut self,
completed_tx: CompletedTransaction,
) -> Result<(), TransactionServiceError>
{
self.db
.complete_outbound_transaction(completed_tx.tx_id, completed_tx.clone())
.await?;
Ok(())
}
/// This function is only available for testing by the client of LibWallet. This function will simulate the process
/// when a completed transaction is broadcast in a mempool on the base layer. The function will update the status of
/// the completed transaction.
#[cfg(feature = "test_harness")]
pub async fn broadcast_transaction(&mut self, tx_id: TxId) -> Result<(), TransactionServiceError> {
let completed_txs = self.db.get_completed_transactions().await?;
completed_txs.get(&tx_id).ok_or_else(|| {
TransactionServiceError::TestHarnessError("Could not find Completed TX to broadcast.".to_string())
})?;
self.db.broadcast_completed_transaction(tx_id).await?;
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::TransactionBroadcast(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
Ok(())
}
/// This function is only available for testing by the client of LibWallet. This function will simulate the process
/// when a completed transaction is detected as mined on the base layer. The function will update the status of the
/// completed transaction AND complete the transaction on the Output Manager Service which will update the status of
/// the outputs
#[cfg(feature = "test_harness")]
pub async fn mine_transaction(&mut self, tx_id: TxId) -> Result<(), TransactionServiceError> {
let completed_txs = self.db.get_completed_transactions().await?;
let _found_tx = completed_txs.get(&tx_id).ok_or_else(|| {
TransactionServiceError::TestHarnessError("Could not find Completed TX to mine.".to_string())
})?;
let pending_tx_outputs = self.output_manager_service.get_pending_transactions().await?;
let pending_tx = pending_tx_outputs.get(&tx_id).ok_or_else(|| {
TransactionServiceError::TestHarnessError("Could not find Pending TX to complete.".to_string())
})?;
self.output_manager_service
.confirm_transaction(
tx_id,
pending_tx
.outputs_to_be_spent
.iter()
.map(|o| o.as_transaction_input(&self.factories.commitment, OutputFeatures::default()))
.collect(),
pending_tx
.outputs_to_be_received
.iter()
.map(|o| {
o.as_transaction_output(&self.factories)
.expect("Failed to convert to Transaction Output")
})
.collect(),
)
.await?;
self.db.mine_completed_transaction(tx_id).await?;
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::TransactionMined(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
Ok(())
}
/// This function is only available for testing by the client of LibWallet. This function simulates an external
/// wallet sending a transaction to this wallet which will become a PendingInboundTransaction
#[cfg(feature = "test_harness")]
pub async fn receive_test_transaction(
&mut self,
tx_id: TxId,
amount: MicroTari,
source_public_key: CommsPublicKey,
) -> Result<(), TransactionServiceError>
{
use crate::output_manager_service::{
config::OutputManagerServiceConfig,
service::OutputManagerService,
storage::{database::OutputManagerDatabase, memory_db::OutputManagerMemoryDatabase},
};
use futures::stream;
use tari_broadcast_channel::bounded;
let (_sender, receiver) = reply_channel::unbounded();
let (tx, _rx) = mpsc::channel(20);
let (oms_event_publisher, _oms_event_subscriber) = bounded(100);
let mut fake_oms = OutputManagerService::new(
OutputManagerServiceConfig::default(),
OutboundMessageRequester::new(tx),
receiver,
stream::empty(),
OutputManagerDatabase::new(OutputManagerMemoryDatabase::new()),
oms_event_publisher,
self.factories.clone(),
)
.await?;
use crate::testnet_utils::make_input;
let (_ti, uo) = make_input(&mut OsRng, amount + 1000 * uT, &self.factories);
fake_oms.add_output(uo).await?;
let mut stp = fake_oms
.prepare_transaction_to_send(amount, MicroTari::from(25), None, "".to_string())
.await?;
let msg = stp.build_single_round_message()?;
let proto_msg = proto::TransactionSenderMessage::single(msg.into());
let sender_message: TransactionSenderMessage = proto_msg
.try_into()
.map_err(TransactionServiceError::InvalidMessageError)?;
let spending_key = self
.output_manager_service
.get_recipient_spending_key(tx_id, amount.clone())
.await?;
let nonce = PrivateKey::random(&mut OsRng);
let rtp = ReceiverTransactionProtocol::new(
sender_message,
nonce,
spending_key.clone(),
OutputFeatures::default(),
&self.factories,
);
let inbound_transaction = InboundTransaction {
tx_id,
source_public_key,
amount,
receiver_protocol: rtp,
status: TransactionStatus::Pending,
message: "".to_string(),
timestamp: Utc::now().naive_utc(),
};
self.db
.add_pending_inbound_transaction(tx_id, inbound_transaction.clone())
.await?;
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::ReceivedTransaction(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
Ok(())
}
/// This function is only available for testing by the client of LibWallet. This function simulates an external
/// wallet sending a transaction to this wallet which will become a PendingInboundTransaction
#[cfg(feature = "test_harness")]
pub async fn finalize_received_test_transaction(&mut self, tx_id: TxId) -> Result<(), TransactionServiceError> {
let inbound_txs = self.db.get_pending_inbound_transactions().await?;
let found_tx = inbound_txs.get(&tx_id).ok_or_else(|| {
TransactionServiceError::TestHarnessError("Could not find Pending Inbound TX to finalize.".to_string())
})?;
let completed_transaction = CompletedTransaction {
tx_id,
source_public_key: found_tx.source_public_key.clone(),
destination_public_key: self.node_identity.public_key().clone(),
amount: found_tx.amount,
fee: MicroTari::from(2000), // a placeholder fee for this test function
transaction: Transaction::new(Vec::new(), Vec::new(), Vec::new(), BlindingFactor::default()),
status: TransactionStatus::Completed,
message: found_tx.message.clone(),
timestamp: found_tx.timestamp,
};
self.db
.complete_inbound_transaction(tx_id, completed_transaction.clone())
.await?;
let _ = self
.event_publisher
.send(Arc::new(TransactionEvent::ReceivedFinalizedTransaction(tx_id)))
.map_err(|e| {
trace!(
target: LOG_TARGET,
"Error sending event, usually because there are no subscribers: {:?}",
e
);
e
});
Ok(())
}
}
/// This struct is a collection of the common resources that a protocol in the service requires.
#[derive(Clone)]
pub struct TransactionServiceResources<TBackend>
where TBackend: TransactionBackend + Clone + 'static
{
pub db: TransactionDatabase<TBackend>,
pub output_manager_service: OutputManagerHandle,
pub outbound_message_service: OutboundMessageRequester,
pub event_publisher: TransactionEventSender,
pub node_identity: Arc<NodeIdentity>,
pub factories: CryptoFactories,
}
|
#[doc = "Reader of register PREMAC"]
pub type R = crate::R<u32, super::PREMAC>;
#[doc = "Reader of field `R0`"]
pub type R0_R = crate::R<bool, bool>;
impl R {
#[doc = "Bit 0 - Ethernet MAC Module 0 Peripheral Ready"]
#[inline(always)]
pub fn r0(&self) -> R0_R {
R0_R::new((self.bits & 0x01) != 0)
}
}
|
#![feature(test)]
extern crate test;
use rand::Rng;
use test::Bencher;
macro_rules! unary {
($($func:ident),*) => ($(
paste::item! {
#[bench]
pub fn [<$func>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f64>();
bh.iter(|| test::black_box(libm::[<$func>](x)))
}
#[bench]
pub fn [<$func f>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f32>();
bh.iter(|| test::black_box(libm::[<$func f>](x)))
}
}
)*);
}
macro_rules! binary {
($($func:ident),*) => ($(
paste::item! {
#[bench]
pub fn [<$func>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f64>();
let y = rng.gen::<f64>();
bh.iter(|| test::black_box(libm::[<$func>](x, y)))
}
#[bench]
pub fn [<$func f>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f32>();
let y = rng.gen::<f32>();
bh.iter(|| test::black_box(libm::[<$func f>](x, y)))
}
}
)*);
($($func:ident);*) => ($(
paste::item! {
#[bench]
pub fn [<$func>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f64>();
let n = rng.gen::<i32>();
bh.iter(|| test::black_box(libm::[<$func>](x, n)))
}
#[bench]
pub fn [<$func f>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f32>();
let n = rng.gen::<i32>();
bh.iter(|| test::black_box(libm::[<$func f>](x, n)))
}
}
)*);
}
macro_rules! trinary {
($($func:ident),*) => ($(
paste::item! {
#[bench]
pub fn [<$func>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f64>();
let y = rng.gen::<f64>();
let z = rng.gen::<f64>();
bh.iter(|| test::black_box(libm::[<$func>](x, y, z)))
}
#[bench]
pub fn [<$func f>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let x = rng.gen::<f32>();
let y = rng.gen::<f32>();
let z = rng.gen::<f32>();
bh.iter(|| test::black_box(libm::[<$func f>](x, y, z)))
}
}
)*);
}
macro_rules! bessel {
($($func:ident),*) => ($(
paste::item! {
#[bench]
pub fn [<$func>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let mut n = rng.gen::<i32>();
n &= 0xffff;
let x = rng.gen::<f64>();
bh.iter(|| test::black_box(libm::[<$func>](n, x)))
}
#[bench]
pub fn [<$func f>](bh: &mut Bencher) {
let mut rng = rand::thread_rng();
let mut n = rng.gen::<i32>();
n &= 0xffff;
let x = rng.gen::<f32>();
bh.iter(|| test::black_box(libm::[<$func f>](n, x)))
}
}
)*);
}
unary!(
acos, acosh, asin, atan, cbrt, ceil, cos, cosh, erf, exp, exp2, exp10, expm1, fabs, floor, j0,
j1, lgamma, log, log1p, log2, log10, rint, round, sin, sinh, sqrt, tan, tanh, tgamma, trunc,
y0, y1
);
binary!(atan2, copysign, fdim, fmax, fmin, fmod, hypot, pow);
trinary!(fma);
bessel!(jn, yn);
binary!(ldexp; scalbn);
|
#[cfg(feature = "pledge")]
#[macro_use]
extern crate pledge;
use getopts::Options;
#[cfg(feature = "pledge")]
use pledge::{pledge, Promise, ToPromiseString};
use std::env;
use std::path::Path;
use std::process::exit;
#[macro_use]
pub mod bartender;
pub mod mkfifo;
pub mod poll;
use crate::bartender::Config;
/// Call pledge(2) to drop privileges.
#[cfg(feature = "pledge")]
fn pledge_promise() {
// TODO: maybe check our pledge?
match pledge![Stdio, RPath, Proc, Exec, Unix] {
Err(_) => error!("calling pledge() failed"),
_ => (),
}
}
/// Dummy call to pledge(2) for non-OpenBSD systems.
#[cfg(not(feature = "pledge"))]
fn pledge_promise() {}
/// Main function.
///
/// Read in command line arguments, parse options and configuration file.
/// Then run the deamon according to the configuration data found.
fn main() {
// collect CLI args
let args: Vec<String> = env::args().collect();
// set up option parsing
let mut opts = Options::new();
opts.optopt("c", "config", "set config file name", "FILE");
opts.optflag("h", "help", "print this help menu");
// match on args and decide what to do
let matches = match opts.parse(&args[1..]) {
Ok(m) => m,
Err(f) => {
eprintln!("error: parsing args failed: {}", f.to_string());
exit(1)
}
};
if matches.opt_present("h") {
let desc = format!("usage: {} [options]", args[0]);
print!("{}", opts.usage(&desc));
return;
}
// obtain and parse config file
let config = if let Some(path) = matches.opt_str("c") {
Config::from_config_file(Path::new(path.as_str()))
} else if let Some(mut dir) = env::home_dir() {
dir.push(".bartenderrc");
match dir.canonicalize() {
Ok(path) => Config::from_config_file(path.as_path()),
Err(err) => {
eprintln!("error: {}", err);
exit(1);
}
}
} else {
eprintln!("no config file could be determined!",);
exit(1);
};
match config {
Ok(config) => {
eprintln!("obtained config: {:?}", config);
config.run()
}
Err(e) => {
eprintln!("error: reading config failed: {}", e);
exit(1);
}
}
}
|
use net::{Packet, DeserialiseError, TAG_REGISTER};
/// A packet for registration.
pub struct RegPacket {
pub name: String,
}
impl RegPacket {
pub fn new(name: &str) -> RegPacket {
RegPacket { name: name.to_owned() }
}
}
impl Packet for RegPacket {
fn serialise(&self) -> Vec<u8> {
use std::mem::transmute;
let payload = &self.name;
let payload_len = payload.len() as u32;
let mut ret = Vec::with_capacity(payload_len as usize + 7);
unsafe { ret.extend_from_slice(&transmute::<u32, [u8; 4]>(payload_len)[..]) };
ret.extend_from_slice(TAG_REGISTER.as_bytes());
ret.extend_from_slice(&payload.as_bytes());
return ret;
}
/// Deserialise this packet, from bytes stripped of the length and tag (first
/// 7 bytes).
fn deserialise(buf: &[u8]) -> Result<RegPacket, DeserialiseError> {
use std::str::from_utf8;
let name = try!(from_utf8(buf).map_err(|_| DeserialiseError::DataBad));
Ok(RegPacket::new(name))
}
}
|
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// Regression test for issue 7660
// rvalue lifetime too short when equivalent `match` works
// pretty-expanded FIXME #23616
use std::collections::HashMap;
struct A(isize, isize);
pub fn main() {
let mut m: HashMap<isize, A> = HashMap::new();
m.insert(1, A(0, 0));
let A(ref _a, ref _b) = m[&1];
let (a, b) = match m[&1] { A(ref _a, ref _b) => (_a, _b) };
}
|
#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::INTSTAT {
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
}
#[doc = r" Value of the field"]
pub struct MSTPENDINGR {
bits: bool,
}
impl MSTPENDINGR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MSTARBLOSSR {
bits: bool,
}
impl MSTARBLOSSR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MSTSTSTPERRR {
bits: bool,
}
impl MSTSTSTPERRR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct SLVPENDINGR {
bits: bool,
}
impl SLVPENDINGR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct SLVNOTSTRR {
bits: bool,
}
impl SLVNOTSTRR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct SLVDESELR {
bits: bool,
}
impl SLVDESELR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MONRDYR {
bits: bool,
}
impl MONRDYR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MONOVR {
bits: bool,
}
impl MONOVR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MONIDLER {
bits: bool,
}
impl MONIDLER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct EVENTTIMEOUTR {
bits: bool,
}
impl EVENTTIMEOUTR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct SCLTIMEOUTR {
bits: bool,
}
impl SCLTIMEOUTR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 0 - Master Pending."]
#[inline]
pub fn mstpending(&self) -> MSTPENDINGR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MSTPENDINGR { bits }
}
#[doc = "Bit 4 - Master Arbitration Loss flag."]
#[inline]
pub fn mstarbloss(&self) -> MSTARBLOSSR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MSTARBLOSSR { bits }
}
#[doc = "Bit 6 - Master Start/Stop Error flag."]
#[inline]
pub fn mstststperr(&self) -> MSTSTSTPERRR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MSTSTSTPERRR { bits }
}
#[doc = "Bit 8 - Slave Pending."]
#[inline]
pub fn slvpending(&self) -> SLVPENDINGR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SLVPENDINGR { bits }
}
#[doc = "Bit 11 - Slave Not Stretching status."]
#[inline]
pub fn slvnotstr(&self) -> SLVNOTSTRR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SLVNOTSTRR { bits }
}
#[doc = "Bit 15 - Slave Deselected flag."]
#[inline]
pub fn slvdesel(&self) -> SLVDESELR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 15;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SLVDESELR { bits }
}
#[doc = "Bit 16 - Monitor Ready."]
#[inline]
pub fn monrdy(&self) -> MONRDYR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MONRDYR { bits }
}
#[doc = "Bit 17 - Monitor Overflow flag."]
#[inline]
pub fn monov(&self) -> MONOVR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MONOVR { bits }
}
#[doc = "Bit 19 - Monitor Idle flag."]
#[inline]
pub fn monidle(&self) -> MONIDLER {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MONIDLER { bits }
}
#[doc = "Bit 24 - Event Timeout Interrupt flag."]
#[inline]
pub fn eventtimeout(&self) -> EVENTTIMEOUTR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) != 0
};
EVENTTIMEOUTR { bits }
}
#[doc = "Bit 25 - SCL Timeout Interrupt flag."]
#[inline]
pub fn scltimeout(&self) -> SCLTIMEOUTR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 25;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SCLTIMEOUTR { bits }
}
}
|
use std::fs::File;
use std::io::prelude::*;
use std::io::BufReader;
extern crate stringmatch;
use util;
fn print_and_check_result(
name: &str,
queries: &Vec<Vec<char>>,
res: &Vec<Vec<usize>>,
answer: Option<&Vec<Vec<usize>>>,
) {
println!("<{}>", name);
for idx in 0..res.len() {
let query_str: String = queries[idx].iter().collect();
println!("Query: {}", query_str);
for idx2 in 0..res[idx].len() {
print!("{} ", res[idx][idx2]);
}
println!("");
}
match answer {
None => return,
Some(answ) => if answ != res {
println!("Result does not match with the output from naive algorithm!!");
::std::process::exit(1);
},
}
}
pub fn run(input_path: String) {
let f = File::open(input_path).expect("file not found");
let mut buff = BufReader::new(&f);
let mut text = String::new();
buff.read_line(&mut text).expect("empty input");
let mut text_vec: Vec<char> = text.chars().collect();
util::strip(&mut text_vec);
let mut queries_vec: Vec<Vec<char>> = Vec::new();
loop {
let mut query = String::new();
match buff.read_line(&mut query) {
Ok(sz) => {
if sz == 0 {
break;
}
let mut query_vec: Vec<char> = query.chars().collect();
util::strip(&mut query_vec);
queries_vec.push(query_vec);
}
Err(_) => {} // EOF
}
}
let mut naive_results: Vec<Vec<usize>> = Vec::new();
stringmatch::naive::run(&text_vec, &queries_vec, &mut naive_results);
print_and_check_result("naive", &queries_vec, &naive_results, None);
let mut kmp_results: Vec<Vec<usize>> = Vec::new();
let text_u16: Vec<u16> = text_vec.iter().map(util::char_to_u16).collect::<Vec<_>>();
for i in 0..queries_vec.len() {
let query_u16: Vec<u16> = queries_vec[i]
.iter()
.map(util::char_to_u16)
.collect::<Vec<_>>();
let mut result: Vec<usize> = Vec::new();
let mut pfxsfx: Vec<usize> = vec![0; query_u16.len()];
stringmatch::kmp::build_pfxsfx(&query_u16, &mut pfxsfx);
stringmatch::kmp::run(&text_u16, &query_u16, &pfxsfx, &mut result);
kmp_results.push(result);
}
print_and_check_result("kmp", &queries_vec, &kmp_results, Some(&naive_results));
let mut ahocorasick_results: Vec<Vec<usize>> = Vec::new();
let mut ahc_t: stringmatch::ahocorasick::AhcTrie = stringmatch::ahocorasick::AhcTrie {
trie: Vec::new(),
failure: Vec::new(),
output: Vec::new(),
};
stringmatch::ahocorasick::build_trie(&queries_vec, &mut ahc_t);
//stringmatch::ahocorasick::print_trie(&ahc_t);
stringmatch::ahocorasick::run(&text_vec, &queries_vec, &ahc_t, &mut ahocorasick_results);
print_and_check_result(
"aho-corasick",
&queries_vec,
&ahocorasick_results,
Some(&naive_results),
);
}
|
//use test::Bencher;
use std::{thread, time};
use chrono::Local;
use serde_json::json;
use crate::engine::node::Node;
use crate::engine::parser;
use crate::engine::runtime::OptMap;
#[test]
fn test_eval_arg() {
let box_node = parser::parser(String::from("startTime == null"), &OptMap::new()).unwrap();
let john = json!({
"n":1,
"name": "John Doe",
"startTime":"1",
"endTime":"1",
"age": {
"yes":"sadf"
}
});
let v = box_node.eval(&john).unwrap();
println!("{:?}", v);
}
//#[bench]
//fn bench_parser(b: &mut Bencher) {
// let mut boxNode= parser::parser(String::from("'1'+'1'"), &OptMap::new()).unwrap();
// let john = json!({
// "n":1,
// "name": "John Doe",
// "age": {
// "yes":"sadf"
// }
// });
// b.iter(|| {
// boxNode.eval(&john);
// });
//}
#[test]
fn test_mem_gc() {
let box_node: Node = parser::parser(String::from("'1'+'1'"), &OptMap::new()).unwrap();
let john = json!({
"n":1,
"name": "John Doe",
"age": {
"yes":"sadf"
}
});
let total = 10000000;
println!("start");
for _loop in 0..3 {
for i in 0..total {
box_node.eval(&john);
if i == (total - 1) {
println!("done:{}", _loop);
let ten_millis = time::Duration::from_secs(5);
thread::sleep(ten_millis);
}
if i % 1000000 == 0 {
println!("number:{}", i)
}
}
}
} |
use super::ds::{BSPTree, KDTree, MyTree};
use crate::{
geo::{Geo, HitResult, HitTemp, TextureRaw},
linalg::{Mat, Ray, Transform, Vct},
Deserialize, Flt, Serialize, EPS,
};
use serde::de::{self, Deserializer, MapAccess, Visitor};
use serde::ser::{SerializeStruct, Serializer};
use std::collections::HashMap;
use std::default::Default;
use std::fmt;
use std::fs::File;
use std::io::{BufRead, BufReader};
#[derive(Serialize, Deserialize)]
pub enum TreeType {
KDTree,
BSPTree,
MyTree,
}
#[derive(Clone, Debug)]
pub enum Tree {
KDTree(KDTree),
BSPTree(BSPTree),
MyTree(MyTree),
}
#[derive(Clone, Debug)]
pub struct Mesh {
pub path: String,
pub texture: TextureRaw,
pub transform: Transform,
pub pos: Vec<Vct>,
pub norm: Vec<Vct>,
pub uv: Vec<(Flt, Flt)>,
pub tri: Vec<(usize, usize, usize)>,
pub pre: Vec<Mat>,
pub tree: Tree,
}
impl Mesh {
#[cfg_attr(rustfmt, rustfmt_skip)]
pub fn new(path: String, texture: TextureRaw, transform: Transform, tree_type: TreeType) -> Self {
let (pos, norm, uv, tri, pre, tree) = Self::load(&path, &transform, tree_type);
Self { path, texture, transform, pos, norm, uv, tri, pre, tree }
}
fn load(
path: &str,
transform: &Transform,
tree_type: TreeType,
) -> (Vec<Vct>, Vec<Vct>, Vec<(Flt, Flt)>, Vec<(usize, usize, usize)>, Vec<Mat>, Tree) {
let file = File::open(path).expect(&format!("Cannot open {}", path));
let (mut t_v, mut t_vt, mut t_vn, mut t_f) =
(Vec::new(), Vec::new(), Vec::new(), Vec::new());
for line in BufReader::new(file).lines() {
let line = line.expect("Failed to load mesh object");
let mut w = line.split_whitespace();
macro_rules! nx {
() => {
w.next().unwrap().parse().unwrap()
};
}
macro_rules! nxt {
($t:ty) => {
w.next().unwrap().parse::<$t>().unwrap()
};
}
macro_rules! nxtf {
() => {{
let mut a = Vec::new();
w.next().unwrap().split('/').for_each(|x| {
if let Ok(i) = x.parse::<usize>() {
a.push(i);
}
});
match a.len() {
2 => (a[0], 0, a[1]),
3 => (a[0], a[1], a[2]),
_ => panic!("invalid vertex of a face"),
}
}};
}
macro_rules! wp {
($e:expr) => {{
$e;
w.next().map(|_| panic!("The mesh object has a non-triangle"));
}};
}
match w.next() {
Some("v") => wp!(t_v.push(transform.value * Vct::new(nx!(), nx!(), nx!()))),
Some("vt") => wp!(t_vt.push((nxt!(Flt), nxt!(Flt)))),
Some("vn") => {
wp!(t_vn.push((transform.value % Vct::new(nx!(), nx!(), nx!())).norm()))
}
Some("f") => wp!(t_f.push((nxtf!(), nxtf!(), nxtf!()))),
_ => (),
}
}
let mut vis = HashMap::new();
let (mut pos, mut uv, mut norm, mut tri, mut pre) =
(Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new());
macro_rules! gg {
($a:expr) => {{
*vis.entry($a).or_insert_with(|| {
pos.push(t_v[$a.0 - 1]);
uv.push(if $a.1 != 0 { t_vt[$a.1 - 1] } else { (-1.0, -1.0) });
norm.push(t_vn[$a.2 - 1]);
pos.len() - 1
})
}};
}
t_f.iter().for_each(|&(a, b, c)| {
let g = (gg!(a), gg!(b), gg!(c));
tri.push(g);
let (v1, v2, v3) = (pos[g.0], pos[g.1], pos[g.2]);
let (e1, e2) = (v2 - v1, v3 - v1);
let n = e1 % e2;
let ni = Vct::new(1.0 / n.x, 1.0 / n.y, 1.0 / n.z);
let nv = v1.dot(n);
let (x2, x3) = (v2 % v1, v3 % v1);
#[cfg_attr(rustfmt, rustfmt_skip)]
pre.push({
if n.x.abs() > n.y.abs().max(n.z.abs()) {
Mat {
m00: 0.0, m01: e2.z * ni.x, m02: -e2.y * ni.x, m03: x3.x * ni.x,
m10: 0.0, m11: -e1.z * ni.x, m12: e1.y * ni.x, m13: -x2.x * ni.x,
m20: 1.0, m21: n.y * ni.x, m22: n.z * ni.x, m23: -nv * ni.x,
m33: 1.0, ..Default::default()
}
} else if n.y.abs() > n.z.abs() {
Mat {
m00: -e2.z * ni.y, m01: 0.0, m02: e2.x * ni.y, m03: x3.y * ni.y,
m10: e1.z * ni.y, m11: 0.0, m12: -e1.x * ni.y, m13: -x2.y * ni.y,
m20: n.x * ni.y, m21: 1.0, m22: n.z * ni.y, m23: -nv * ni.y,
m33: 1.0, ..Default::default()
}
} else if n.z.abs() > EPS {
Mat {
m00: e2.y * ni.z, m01: -e2.x * ni.z, m02: 0.0, m03: x3.z * ni.z,
m10: -e1.y * ni.z, m11: e1.x * ni.z, m12: 0.0, m13: -x2.z * ni.z,
m20: n.x * ni.z, m21: n.y * ni.z, m22: 1.0, m23: -nv * ni.z,
m33: 1.0, ..Default::default()
}
} else {
panic!("Invalid triangle");
}
});
});
let tree = match tree_type {
TreeType::KDTree => {
let mut ret = KDTree::default();
ret.build(&pos, &tri);
Tree::KDTree(ret)
}
TreeType::BSPTree => {
let mut ret = BSPTree::default();
ret.build(&pos, &tri);
Tree::BSPTree(ret)
}
TreeType::MyTree => {
let mut ret = MyTree::default();
ret.build(&pos, &tri);
Tree::MyTree(ret)
}
};
(pos, norm, uv, tri, pre, tree)
}
pub fn tri_intersect_and_update(&self, i: usize, r: &Ray, ans: &mut Option<HitTemp>) {
let (m, o, d) = (&self.pre[i], r.origin, r.direct);
let dz = m.m20 * d.x + m.m21 * d.y + m.m22 * d.z;
if dz.abs() <= EPS {
return;
}
let oz = m.m20 * o.x + m.m21 * o.y + m.m22 * o.z + m.m23;
let t = -oz / dz;
if t > EPS && (ans.is_none() || t < ans.unwrap().0) {
let hit = o + d * t;
let u = m.m00 * hit.x + m.m01 * hit.y + m.m02 * hit.z + m.m03;
if u < 0.0 || u > 1.0 {
return;
}
let v = m.m10 * hit.x + m.m11 * hit.y + m.m12 * hit.z + m.m13;
if v < 0.0 || u + v > 1.0 {
return;
}
*ans = Some((t, Some((i, u, v))));
}
}
}
impl Geo for Mesh {
fn hit_t(&self, r: &Ray) -> Option<HitTemp> {
match &self.tree {
&Tree::KDTree(ref t) => t.hit(r, self),
&Tree::BSPTree(ref t) => t.hit(r, self),
&Tree::MyTree(ref t) => t.hit(r, self),
}
}
fn hit(&self, r: &Ray, tmp: HitTemp) -> HitResult {
let (i, u, v) = tmp.1.unwrap();
let (a, b, c) = self.tri[i];
HitResult {
pos: r.origin + r.direct * tmp.0,
norm: self.norm[a] * (1.0 - u - v) + self.norm[b] * u + self.norm[c] * v,
texture: self.texture,
}
}
}
impl Serialize for Mesh {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut s = serializer.serialize_struct("mesh", 3)?;
s.serialize_field("path", &self.path)?;
s.serialize_field("texture", &self.texture)?;
s.serialize_field("transform", &self.transform)?;
s.end()
}
}
impl<'de> Deserialize<'de> for Mesh {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
struct MeshVisitor;
#[derive(Deserialize)]
#[serde(field_identifier, rename_all = "snake_case")]
enum Field {
Path,
Texture,
Transform,
TreeType,
Type,
}
impl<'de> Visitor<'de> for MeshVisitor {
type Value = Mesh;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str("Mesh")
}
fn visit_map<V>(self, mut map: V) -> Result<Mesh, V::Error>
where
V: MapAccess<'de>,
{
let mut path = None;
let mut texture = None;
let mut transform = None;
let mut tree_type = None;
while let Some(key) = map.next_key()? {
match key {
Field::Path => {
if path.is_some() {
return Err(de::Error::duplicate_field("path"));
}
path = Some(map.next_value()?);
}
Field::Texture => {
if texture.is_some() {
return Err(de::Error::duplicate_field("texture"));
}
texture = Some(map.next_value()?);
}
Field::Transform => {
if transform.is_some() {
return Err(de::Error::duplicate_field("transform"));
}
transform = Some(map.next_value()?);
}
Field::TreeType => {
if tree_type.is_some() {
return Err(de::Error::duplicate_field("tree_type"));
}
tree_type = Some(map.next_value()?);
}
Field::Type => {}
}
}
let path = path.ok_or_else(|| de::Error::missing_field("path"))?;
let texture = texture.ok_or_else(|| de::Error::missing_field("texture"))?;
let transform = transform.ok_or_else(|| de::Error::missing_field("transform"))?;
let tree_type = tree_type.ok_or_else(|| de::Error::missing_field("tree_type"))?;
Ok(Mesh::new(path, texture, transform, tree_type))
}
}
deserializer.deserialize_map(MeshVisitor {})
}
}
|
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
pub const CLSID_WPD_NAMESPACE_EXTENSION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x35786d3c_b075_49b9_88dd_029876e11c01);
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DELETE_OBJECT_OPTIONS(pub i32);
pub const PORTABLE_DEVICE_DELETE_NO_RECURSION: DELETE_OBJECT_OPTIONS = DELETE_OBJECT_OPTIONS(0i32);
pub const PORTABLE_DEVICE_DELETE_WITH_RECURSION: DELETE_OBJECT_OPTIONS = DELETE_OBJECT_OPTIONS(1i32);
impl ::core::convert::From<i32> for DELETE_OBJECT_OPTIONS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DELETE_OBJECT_OPTIONS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DEVICE_RADIO_STATE(pub i32);
pub const DRS_RADIO_ON: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(0i32);
pub const DRS_SW_RADIO_OFF: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(1i32);
pub const DRS_HW_RADIO_OFF: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(2i32);
pub const DRS_SW_HW_RADIO_OFF: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(3i32);
pub const DRS_HW_RADIO_ON_UNCONTROLLABLE: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(4i32);
pub const DRS_RADIO_INVALID: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(5i32);
pub const DRS_HW_RADIO_OFF_UNCONTROLLABLE: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(6i32);
pub const DRS_RADIO_MAX: DEVICE_RADIO_STATE = DEVICE_RADIO_STATE(6i32);
impl ::core::convert::From<i32> for DEVICE_RADIO_STATE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DEVICE_RADIO_STATE {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const DEVPKEY_MTPBTH_IsConnected: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xea1237fa_589d_4472_84e4_0abe36fd62ef), pid: 2u32 };
pub const DEVSVCTYPE_ABSTRACT: u32 = 1u32;
pub const DEVSVCTYPE_DEFAULT: u32 = 0u32;
pub const DEVSVC_SERVICEINFO_VERSION: u32 = 100u32;
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DMProcessConfigXMLFiltered<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszxmlin: Param0, rgszallowedcspnodes: *const super::super::Foundation::PWSTR, dwnumallowedcspnodes: u32) -> ::windows::core::Result<super::super::Foundation::BSTR> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DMProcessConfigXMLFiltered(pszxmlin: super::super::Foundation::PWSTR, rgszallowedcspnodes: *const super::super::Foundation::PWSTR, dwnumallowedcspnodes: u32, pbstrxmlout: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DMProcessConfigXMLFiltered(pszxmlin.into_param().abi(), ::core::mem::transmute(rgszallowedcspnodes), ::core::mem::transmute(dwnumallowedcspnodes), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
pub const ENUM_AnchorResults_AnchorStateInvalid: u32 = 1u32;
pub const ENUM_AnchorResults_AnchorStateNormal: u32 = 0u32;
pub const ENUM_AnchorResults_AnchorStateOld: u32 = 2u32;
pub const ENUM_AnchorResults_ItemStateChanged: u32 = 4u32;
pub const ENUM_AnchorResults_ItemStateCreated: u32 = 2u32;
pub const ENUM_AnchorResults_ItemStateDeleted: u32 = 1u32;
pub const ENUM_AnchorResults_ItemStateInvalid: u32 = 0u32;
pub const ENUM_AnchorResults_ItemStateUpdated: u32 = 3u32;
pub const ENUM_CalendarObj_BusyStatusBusy: u32 = 1u32;
pub const ENUM_CalendarObj_BusyStatusFree: u32 = 0u32;
pub const ENUM_CalendarObj_BusyStatusOutOfOffice: u32 = 2u32;
pub const ENUM_CalendarObj_BusyStatusTentative: u32 = 3u32;
pub const ENUM_DeviceMetadataObj_DefaultCABFalse: u32 = 0u32;
pub const ENUM_DeviceMetadataObj_DefaultCABTrue: u32 = 1u32;
pub const ENUM_MessageObj_PatternInstanceFirst: u32 = 1u32;
pub const ENUM_MessageObj_PatternInstanceFourth: u32 = 4u32;
pub const ENUM_MessageObj_PatternInstanceLast: u32 = 5u32;
pub const ENUM_MessageObj_PatternInstanceNone: u32 = 0u32;
pub const ENUM_MessageObj_PatternInstanceSecond: u32 = 2u32;
pub const ENUM_MessageObj_PatternInstanceThird: u32 = 3u32;
pub const ENUM_MessageObj_PatternTypeDaily: u32 = 1u32;
pub const ENUM_MessageObj_PatternTypeMonthly: u32 = 3u32;
pub const ENUM_MessageObj_PatternTypeWeekly: u32 = 2u32;
pub const ENUM_MessageObj_PatternTypeYearly: u32 = 4u32;
pub const ENUM_MessageObj_PriorityHighest: u32 = 2u32;
pub const ENUM_MessageObj_PriorityLowest: u32 = 0u32;
pub const ENUM_MessageObj_PriorityNormal: u32 = 1u32;
pub const ENUM_MessageObj_ReadFalse: u32 = 0u32;
pub const ENUM_MessageObj_ReadTrue: u32 = 255u32;
pub const ENUM_StatusSvc_ChargingActive: u32 = 1u32;
pub const ENUM_StatusSvc_ChargingInactive: u32 = 0u32;
pub const ENUM_StatusSvc_ChargingUnknown: u32 = 2u32;
pub const ENUM_StatusSvc_RoamingActive: u32 = 1u32;
pub const ENUM_StatusSvc_RoamingInactive: u32 = 0u32;
pub const ENUM_StatusSvc_RoamingUnknown: u32 = 2u32;
pub const ENUM_SyncSvc_SyncObjectReferencesDisabled: u32 = 0u32;
pub const ENUM_SyncSvc_SyncObjectReferencesEnabled: u32 = 255u32;
pub const ENUM_TaskObj_CompleteFalse: u32 = 0u32;
pub const ENUM_TaskObj_CompleteTrue: u32 = 255u32;
pub const E_WPD_DEVICE_ALREADY_OPENED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731135i32 as _);
pub const E_WPD_DEVICE_IS_HUNG: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731130i32 as _);
pub const E_WPD_DEVICE_NOT_OPEN: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731134i32 as _);
pub const E_WPD_OBJECT_ALREADY_ATTACHED_TO_DEVICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731133i32 as _);
pub const E_WPD_OBJECT_ALREADY_ATTACHED_TO_SERVICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144730934i32 as _);
pub const E_WPD_OBJECT_NOT_ATTACHED_TO_DEVICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731132i32 as _);
pub const E_WPD_OBJECT_NOT_ATTACHED_TO_SERVICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144730933i32 as _);
pub const E_WPD_OBJECT_NOT_COMMITED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731131i32 as _);
pub const E_WPD_SERVICE_ALREADY_OPENED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144730936i32 as _);
pub const E_WPD_SERVICE_BAD_PARAMETER_ORDER: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144730932i32 as _);
pub const E_WPD_SERVICE_NOT_OPEN: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144730935i32 as _);
pub const E_WPD_SMS_INVALID_MESSAGE_BODY: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731035i32 as _);
pub const E_WPD_SMS_INVALID_RECIPIENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731036i32 as _);
pub const E_WPD_SMS_SERVICE_UNAVAILABLE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2144731034i32 as _);
pub const EnumBthMtpConnectors: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1570149_e645_4f43_8b0d_409b061db2fc);
pub const FACILITY_WPD: u32 = 42u32;
pub const FLAG_MessageObj_DayOfWeekFriday: u32 = 32u32;
pub const FLAG_MessageObj_DayOfWeekMonday: u32 = 2u32;
pub const FLAG_MessageObj_DayOfWeekNone: u32 = 0u32;
pub const FLAG_MessageObj_DayOfWeekSaturday: u32 = 64u32;
pub const FLAG_MessageObj_DayOfWeekSunday: u32 = 1u32;
pub const FLAG_MessageObj_DayOfWeekThursday: u32 = 16u32;
pub const FLAG_MessageObj_DayOfWeekTuesday: u32 = 4u32;
pub const FLAG_MessageObj_DayOfWeekWednesday: u32 = 8u32;
pub const GUID_DEVINTERFACE_WPD: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6ac27878_a6fa_4155_ba85_f98f491d4f33);
pub const GUID_DEVINTERFACE_WPD_PRIVATE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba0c718f_4ded_49b7_bdd3_fabe28661211);
pub const GUID_DEVINTERFACE_WPD_SERVICE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ef44f80_3d64_4246_a6aa_206f328d1edc);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IConnectionRequestCallback(pub ::windows::core::IUnknown);
impl IConnectionRequestCallback {
pub unsafe fn OnComplete(&self, hrstatus: ::windows::core::HRESULT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(hrstatus)).ok()
}
}
unsafe impl ::windows::core::Interface for IConnectionRequestCallback {
type Vtable = IConnectionRequestCallback_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x272c9ae0_7161_4ae0_91bd_9f448ee9c427);
}
impl ::core::convert::From<IConnectionRequestCallback> for ::windows::core::IUnknown {
fn from(value: IConnectionRequestCallback) -> Self {
value.0
}
}
impl ::core::convert::From<&IConnectionRequestCallback> for ::windows::core::IUnknown {
fn from(value: &IConnectionRequestCallback) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IConnectionRequestCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IConnectionRequestCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IConnectionRequestCallback_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IEnumPortableDeviceConnectors(pub ::windows::core::IUnknown);
impl IEnumPortableDeviceConnectors {
pub unsafe fn Next(&self, crequested: u32, pconnectors: *mut ::core::option::Option<IPortableDeviceConnector>, pcfetched: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(crequested), ::core::mem::transmute(pconnectors), ::core::mem::transmute(pcfetched)).ok()
}
pub unsafe fn Skip(&self, cconnectors: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(cconnectors)).ok()
}
pub unsafe fn Reset(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumPortableDeviceConnectors> {
let mut result__: <IEnumPortableDeviceConnectors as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumPortableDeviceConnectors>(result__)
}
}
unsafe impl ::windows::core::Interface for IEnumPortableDeviceConnectors {
type Vtable = IEnumPortableDeviceConnectors_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbfdef549_9247_454f_bd82_06fe80853faa);
}
impl ::core::convert::From<IEnumPortableDeviceConnectors> for ::windows::core::IUnknown {
fn from(value: IEnumPortableDeviceConnectors) -> Self {
value.0
}
}
impl ::core::convert::From<&IEnumPortableDeviceConnectors> for ::windows::core::IUnknown {
fn from(value: &IEnumPortableDeviceConnectors) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumPortableDeviceConnectors {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IEnumPortableDeviceConnectors {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEnumPortableDeviceConnectors_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, crequested: u32, pconnectors: *mut ::windows::core::RawPtr, pcfetched: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cconnectors: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IEnumPortableDeviceObjectIDs(pub ::windows::core::IUnknown);
impl IEnumPortableDeviceObjectIDs {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Next(&self, cobjects: u32, pobjids: *mut super::super::Foundation::PWSTR, pcfetched: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(cobjects), ::core::mem::transmute(pobjids), ::core::mem::transmute(pcfetched)).ok()
}
pub unsafe fn Skip(&self, cobjects: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(cobjects)).ok()
}
pub unsafe fn Reset(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumPortableDeviceObjectIDs> {
let mut result__: <IEnumPortableDeviceObjectIDs as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumPortableDeviceObjectIDs>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IEnumPortableDeviceObjectIDs {
type Vtable = IEnumPortableDeviceObjectIDs_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x10ece955_cf41_4728_bfa0_41eedf1bbf19);
}
impl ::core::convert::From<IEnumPortableDeviceObjectIDs> for ::windows::core::IUnknown {
fn from(value: IEnumPortableDeviceObjectIDs) -> Self {
value.0
}
}
impl ::core::convert::From<&IEnumPortableDeviceObjectIDs> for ::windows::core::IUnknown {
fn from(value: &IEnumPortableDeviceObjectIDs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumPortableDeviceObjectIDs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IEnumPortableDeviceObjectIDs {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEnumPortableDeviceObjectIDs_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cobjects: u32, pobjids: *mut super::super::Foundation::PWSTR, pcfetched: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cobjects: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IMediaRadioManager(pub ::windows::core::IUnknown);
impl IMediaRadioManager {
pub unsafe fn GetRadioInstances(&self) -> ::windows::core::Result<IRadioInstanceCollection> {
let mut result__: <IRadioInstanceCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IRadioInstanceCollection>(result__)
}
pub unsafe fn OnSystemRadioStateChange(&self, sysradiostate: SYSTEM_RADIO_STATE, utimeoutsec: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(sysradiostate), ::core::mem::transmute(utimeoutsec)).ok()
}
}
unsafe impl ::windows::core::Interface for IMediaRadioManager {
type Vtable = IMediaRadioManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6cfdcab5_fc47_42a5_9241_074b58830e73);
}
impl ::core::convert::From<IMediaRadioManager> for ::windows::core::IUnknown {
fn from(value: IMediaRadioManager) -> Self {
value.0
}
}
impl ::core::convert::From<&IMediaRadioManager> for ::windows::core::IUnknown {
fn from(value: &IMediaRadioManager) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaRadioManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaRadioManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaRadioManager_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcollection: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, sysradiostate: SYSTEM_RADIO_STATE, utimeoutsec: u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IMediaRadioManagerNotifySink(pub ::windows::core::IUnknown);
impl IMediaRadioManagerNotifySink {
pub unsafe fn OnInstanceAdd<'a, Param0: ::windows::core::IntoParam<'a, IRadioInstance>>(&self, pradioinstance: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pradioinstance.into_param().abi()).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn OnInstanceRemove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrradioinstanceid: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), bstrradioinstanceid.into_param().abi()).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn OnInstanceRadioChange<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrradioinstanceid: Param0, radiostate: DEVICE_RADIO_STATE) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), bstrradioinstanceid.into_param().abi(), ::core::mem::transmute(radiostate)).ok()
}
}
unsafe impl ::windows::core::Interface for IMediaRadioManagerNotifySink {
type Vtable = IMediaRadioManagerNotifySink_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x89d81f5f_c147_49ed_a11c_77b20c31e7c9);
}
impl ::core::convert::From<IMediaRadioManagerNotifySink> for ::windows::core::IUnknown {
fn from(value: IMediaRadioManagerNotifySink) -> Self {
value.0
}
}
impl ::core::convert::From<&IMediaRadioManagerNotifySink> for ::windows::core::IUnknown {
fn from(value: &IMediaRadioManagerNotifySink) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMediaRadioManagerNotifySink {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMediaRadioManagerNotifySink {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMediaRadioManagerNotifySink_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pradioinstance: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrradioinstanceid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrradioinstanceid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, radiostate: DEVICE_RADIO_STATE) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
pub const IOCTL_WPD_MESSAGE_READWRITE_ACCESS: u32 = 4243720u32;
pub const IOCTL_WPD_MESSAGE_READ_ACCESS: u32 = 4210952u32;
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDevice(pub ::windows::core::IUnknown);
impl IPortableDevice {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Open<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pszpnpdeviceid: Param0, pclientinfo: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), pclientinfo.into_param().abi()).ok()
}
pub unsafe fn SendCommand<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pparameters: Param1) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pparameters.into_param().abi(), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn Content(&self) -> ::windows::core::Result<IPortableDeviceContent> {
let mut result__: <IPortableDeviceContent as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceContent>(result__)
}
pub unsafe fn Capabilities(&self) -> ::windows::core::Result<IPortableDeviceCapabilities> {
let mut result__: <IPortableDeviceCapabilities as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceCapabilities>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Advise<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceEventCallback>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pcallback: Param1, pparameters: Param2) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pcallback.into_param().abi(), pparameters.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Unadvise<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszcookie: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pszcookie.into_param().abi()).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPnPDeviceID(&self) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDevice {
type Vtable = IPortableDevice_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x625e2df8_6392_4cf0_9ad1_3cfa5f17775c);
}
impl ::core::convert::From<IPortableDevice> for ::windows::core::IUnknown {
fn from(value: IPortableDevice) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDevice> for ::windows::core::IUnknown {
fn from(value: &IPortableDevice) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDevice {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDevice {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDevice_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, pclientinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pparameters: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcontent: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcapabilities: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pcallback: ::windows::core::RawPtr, pparameters: ::windows::core::RawPtr, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszcookie: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszpnpdeviceid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceCapabilities(pub ::windows::core::IUnknown);
impl IPortableDeviceCapabilities {
pub unsafe fn GetSupportedCommands(&self) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetCommandOptions(&self, command: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(command), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn GetFunctionalCategories(&self) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetFunctionalObjects(&self, category: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(category), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetSupportedContentTypes(&self, category: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(category), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetSupportedFormats(&self, contenttype: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(contenttype), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetSupportedFormatProperties(&self, format: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetFixedPropertyAttributes(&self, format: *const ::windows::core::GUID, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn GetSupportedEvents(&self) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetEventOptions(&self, event: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(event), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceCapabilities {
type Vtable = IPortableDeviceCapabilities_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2c8c6dbf_e3dc_4061_becc_8542e810d126);
}
impl ::core::convert::From<IPortableDeviceCapabilities> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceCapabilities) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceCapabilities> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceCapabilities) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceCapabilities {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceCapabilities {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceCapabilities_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcommands: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, command: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppoptions: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcategories: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, category: *const ::windows::core::GUID, ppobjectids: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, category: *const ::windows::core::GUID, ppcontenttypes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, contenttype: *const ::windows::core::GUID, ppformats: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, ppkeys: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppevents: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, event: *const ::windows::core::GUID, ppoptions: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceConnector(pub ::windows::core::IUnknown);
impl IPortableDeviceConnector {
pub unsafe fn Connect<'a, Param0: ::windows::core::IntoParam<'a, IConnectionRequestCallback>>(&self, pcallback: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pcallback.into_param().abi()).ok()
}
pub unsafe fn Disconnect<'a, Param0: ::windows::core::IntoParam<'a, IConnectionRequestCallback>>(&self, pcallback: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pcallback.into_param().abi()).ok()
}
pub unsafe fn Cancel<'a, Param0: ::windows::core::IntoParam<'a, IConnectionRequestCallback>>(&self, pcallback: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pcallback.into_param().abi()).ok()
}
#[cfg(feature = "Win32_Devices_Properties")]
pub unsafe fn GetProperty(&self, ppropertykey: *const super::Properties::DEVPROPKEY, ppropertytype: *mut u32, ppdata: *mut *mut u8, pcbdata: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropertykey), ::core::mem::transmute(ppropertytype), ::core::mem::transmute(ppdata), ::core::mem::transmute(pcbdata)).ok()
}
#[cfg(feature = "Win32_Devices_Properties")]
pub unsafe fn SetProperty(&self, ppropertykey: *const super::Properties::DEVPROPKEY, propertytype: u32, pdata: *const u8, cbdata: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppropertykey), ::core::mem::transmute(propertytype), ::core::mem::transmute(pdata), ::core::mem::transmute(cbdata)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPnPID(&self) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceConnector {
type Vtable = IPortableDeviceConnector_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x625e2df8_6392_4cf0_9ad1_3cfa5f17775c);
}
impl ::core::convert::From<IPortableDeviceConnector> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceConnector) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceConnector> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceConnector) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceConnector {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceConnector {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceConnector_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Devices_Properties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropertykey: *const super::Properties::DEVPROPKEY, ppropertytype: *mut u32, ppdata: *mut *mut u8, pcbdata: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Devices_Properties"))] usize,
#[cfg(feature = "Win32_Devices_Properties")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppropertykey: *const super::Properties::DEVPROPKEY, propertytype: u32, pdata: *const u8, cbdata: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Devices_Properties"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppwszpnpid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceContent(pub ::windows::core::IUnknown);
impl IPortableDeviceContent {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn EnumObjects<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pszparentobjectid: Param1, pfilter: Param2) -> ::windows::core::Result<IEnumPortableDeviceObjectIDs> {
let mut result__: <IEnumPortableDeviceObjectIDs as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pszparentobjectid.into_param().abi(), pfilter.into_param().abi(), &mut result__).from_abi::<IEnumPortableDeviceObjectIDs>(result__)
}
pub unsafe fn Properties(&self) -> ::windows::core::Result<IPortableDeviceProperties> {
let mut result__: <IPortableDeviceProperties as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceProperties>(result__)
}
pub unsafe fn Transfer(&self) -> ::windows::core::Result<IPortableDeviceResources> {
let mut result__: <IPortableDeviceResources as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceResources>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn CreateObjectWithPropertiesOnly<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pvalues: Param0, ppszobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pvalues.into_param().abi(), ::core::mem::transmute(ppszobjectid)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn CreateObjectWithPropertiesAndData<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pvalues: Param0, ppdata: *mut ::core::option::Option<super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pvalues.into_param().abi(), ::core::mem::transmute(ppdata), ::core::mem::transmute(pdwoptimalwritebuffersize), ::core::mem::transmute(ppszcookie)).ok()
}
pub unsafe fn Delete<'a, Param1: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>>(&self, dwoptions: u32, pobjectids: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwoptions), pobjectids.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
pub unsafe fn GetObjectIDsFromPersistentUniqueIDs<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>>(&self, ppersistentuniqueids: Param0) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ppersistentuniqueids.into_param().abi(), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Move<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pobjectids: Param0, pszdestinationfolderobjectid: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), pobjectids.into_param().abi(), pszdestinationfolderobjectid.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Copy<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pobjectids: Param0, pszdestinationfolderobjectid: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), pobjectids.into_param().abi(), pszdestinationfolderobjectid.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceContent {
type Vtable = IPortableDeviceContent_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6a96ed84_7c73_4480_9938_bf5af477d426);
}
impl ::core::convert::From<IPortableDeviceContent> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceContent) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceContent> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceContent) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceContent {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceContent {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceContent_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pszparentobjectid: super::super::Foundation::PWSTR, pfilter: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppresources: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalues: ::windows::core::RawPtr, ppszobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalues: ::windows::core::RawPtr, ppdata: *mut ::windows::core::RawPtr, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwoptions: u32, pobjectids: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppersistentuniqueids: ::windows::core::RawPtr, ppobjectids: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectids: ::windows::core::RawPtr, pszdestinationfolderobjectid: super::super::Foundation::PWSTR, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectids: ::windows::core::RawPtr, pszdestinationfolderobjectid: super::super::Foundation::PWSTR, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceContent2(pub ::windows::core::IUnknown);
impl IPortableDeviceContent2 {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn EnumObjects<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pszparentobjectid: Param1, pfilter: Param2) -> ::windows::core::Result<IEnumPortableDeviceObjectIDs> {
let mut result__: <IEnumPortableDeviceObjectIDs as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pszparentobjectid.into_param().abi(), pfilter.into_param().abi(), &mut result__).from_abi::<IEnumPortableDeviceObjectIDs>(result__)
}
pub unsafe fn Properties(&self) -> ::windows::core::Result<IPortableDeviceProperties> {
let mut result__: <IPortableDeviceProperties as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceProperties>(result__)
}
pub unsafe fn Transfer(&self) -> ::windows::core::Result<IPortableDeviceResources> {
let mut result__: <IPortableDeviceResources as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceResources>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn CreateObjectWithPropertiesOnly<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pvalues: Param0, ppszobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pvalues.into_param().abi(), ::core::mem::transmute(ppszobjectid)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn CreateObjectWithPropertiesAndData<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pvalues: Param0, ppdata: *mut ::core::option::Option<super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pvalues.into_param().abi(), ::core::mem::transmute(ppdata), ::core::mem::transmute(pdwoptimalwritebuffersize), ::core::mem::transmute(ppszcookie)).ok()
}
pub unsafe fn Delete<'a, Param1: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>>(&self, dwoptions: u32, pobjectids: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwoptions), pobjectids.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
pub unsafe fn GetObjectIDsFromPersistentUniqueIDs<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>>(&self, ppersistentuniqueids: Param0) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ppersistentuniqueids.into_param().abi(), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Move<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pobjectids: Param0, pszdestinationfolderobjectid: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), pobjectids.into_param().abi(), pszdestinationfolderobjectid.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Copy<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pobjectids: Param0, pszdestinationfolderobjectid: Param1, ppresults: *mut ::core::option::Option<IPortableDevicePropVariantCollection>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), pobjectids.into_param().abi(), pszdestinationfolderobjectid.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn UpdateObjectWithPropertiesAndData<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pszobjectid: Param0, pproperties: Param1, ppdata: *mut ::core::option::Option<super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), pproperties.into_param().abi(), ::core::mem::transmute(ppdata), ::core::mem::transmute(pdwoptimalwritebuffersize)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceContent2 {
type Vtable = IPortableDeviceContent2_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b4add96_f6bf_4034_8708_eca72bf10554);
}
impl ::core::convert::From<IPortableDeviceContent2> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceContent2) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceContent2> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceContent2) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceContent2 {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceContent2 {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
impl ::core::convert::From<IPortableDeviceContent2> for IPortableDeviceContent {
fn from(value: IPortableDeviceContent2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IPortableDeviceContent2> for IPortableDeviceContent {
fn from(value: &IPortableDeviceContent2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl<'a> ::windows::core::IntoParam<'a, IPortableDeviceContent> for IPortableDeviceContent2 {
fn into_param(self) -> ::windows::core::Param<'a, IPortableDeviceContent> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
impl<'a> ::windows::core::IntoParam<'a, IPortableDeviceContent> for &IPortableDeviceContent2 {
fn into_param(self) -> ::windows::core::Param<'a, IPortableDeviceContent> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceContent2_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pszparentobjectid: super::super::Foundation::PWSTR, pfilter: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppresources: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalues: ::windows::core::RawPtr, ppszobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalues: ::windows::core::RawPtr, ppdata: *mut ::windows::core::RawPtr, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwoptions: u32, pobjectids: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppersistentuniqueids: ::windows::core::RawPtr, ppobjectids: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectids: ::windows::core::RawPtr, pszdestinationfolderobjectid: super::super::Foundation::PWSTR, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectids: ::windows::core::RawPtr, pszdestinationfolderobjectid: super::super::Foundation::PWSTR, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, pproperties: ::windows::core::RawPtr, ppdata: *mut ::windows::core::RawPtr, pdwoptimalwritebuffersize: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceDataStream(pub ::windows::core::IUnknown);
impl IPortableDeviceDataStream {
pub unsafe fn Read(&self, pv: *mut ::core::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pv), ::core::mem::transmute(cb), ::core::mem::transmute(pcbread)).ok()
}
pub unsafe fn Write(&self, pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<u32>(result__)
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn Seek(&self, dlibmove: i64, dworigin: super::super::System::Com::STREAM_SEEK) -> ::windows::core::Result<u64> {
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(dlibmove), ::core::mem::transmute(dworigin), &mut result__).from_abi::<u64>(result__)
}
pub unsafe fn SetSize(&self, libnewsize: u64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(libnewsize)).ok()
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn CopyTo<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::IStream>>(&self, pstm: Param0, cb: u64, pcbread: *mut u64, pcbwritten: *mut u64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pstm.into_param().abi(), ::core::mem::transmute(cb), ::core::mem::transmute(pcbread), ::core::mem::transmute(pcbwritten)).ok()
}
pub unsafe fn Commit(&self, grfcommitflags: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(grfcommitflags)).ok()
}
pub unsafe fn Revert(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn LockRegion(&self, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(liboffset), ::core::mem::transmute(cb), ::core::mem::transmute(dwlocktype)).ok()
}
pub unsafe fn UnlockRegion(&self, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(liboffset), ::core::mem::transmute(cb), ::core::mem::transmute(dwlocktype)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn Stat(&self, pstatstg: *mut super::super::System::Com::STATSTG, grfstatflag: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(pstatstg), ::core::mem::transmute(grfstatflag)).ok()
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn Clone(&self) -> ::windows::core::Result<super::super::System::Com::IStream> {
let mut result__: <super::super::System::Com::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::IStream>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetObjectID(&self) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceDataStream {
type Vtable = IPortableDeviceDataStream_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x88e04db3_1012_4d64_9996_f703a950d3f4);
}
impl ::core::convert::From<IPortableDeviceDataStream> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceDataStream) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceDataStream> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceDataStream) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<IPortableDeviceDataStream> for super::super::System::Com::IStream {
fn from(value: IPortableDeviceDataStream) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<&IPortableDeviceDataStream> for super::super::System::Com::IStream {
fn from(value: &IPortableDeviceDataStream) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IStream> for IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IStream> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IStream> for &IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IStream> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<IPortableDeviceDataStream> for super::super::System::Com::ISequentialStream {
fn from(value: IPortableDeviceDataStream) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<&IPortableDeviceDataStream> for super::super::System::Com::ISequentialStream {
fn from(value: &IPortableDeviceDataStream) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::ISequentialStream> for IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::ISequentialStream> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::ISequentialStream> for &IPortableDeviceDataStream {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::ISequentialStream> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceDataStream_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pv: *mut ::core::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pv: *const ::core::ffi::c_void, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dlibmove: i64, dworigin: super::super::System::Com::STREAM_SEEK, plibnewposition: *mut u64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, libnewsize: u64) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstm: ::windows::core::RawPtr, cb: u64, pcbread: *mut u64, pcbwritten: *mut u64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, grfcommitflags: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstatstg: *mut super::super::System::Com::STATSTG, grfstatflag: u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
#[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppstm: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceDispatchFactory(pub ::windows::core::IUnknown);
impl IPortableDeviceDispatchFactory {
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn GetDeviceDispatch<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0) -> ::windows::core::Result<super::super::System::Com::IDispatch> {
let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceDispatchFactory {
type Vtable = IPortableDeviceDispatchFactory_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e1eafc3_e3d7_4132_96fa_759c0f9d1e0f);
}
impl ::core::convert::From<IPortableDeviceDispatchFactory> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceDispatchFactory) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceDispatchFactory> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceDispatchFactory) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceDispatchFactory {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceDispatchFactory {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceDispatchFactory_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, ppdevicedispatch: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceEventCallback(pub ::windows::core::IUnknown);
impl IPortableDeviceEventCallback {
pub unsafe fn OnEvent<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, peventparameters: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), peventparameters.into_param().abi()).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceEventCallback {
type Vtable = IPortableDeviceEventCallback_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa8792a31_f385_493c_a893_40f64eb45f6e);
}
impl ::core::convert::From<IPortableDeviceEventCallback> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceEventCallback) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceEventCallback> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceEventCallback) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceEventCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceEventCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceEventCallback_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, peventparameters: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceKeyCollection(pub ::windows::core::IUnknown);
impl IPortableDeviceKeyCollection {
pub unsafe fn GetCount(&self, pcelems: *const u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcelems)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetAt(&self, dwindex: u32, pkey: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex), ::core::mem::transmute(pkey)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn Add(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
pub unsafe fn Clear(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn RemoveAt(&self, dwindex: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceKeyCollection {
type Vtable = IPortableDeviceKeyCollection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdada2357_e0ad_492e_98db_dd61c53ba353);
}
impl ::core::convert::From<IPortableDeviceKeyCollection> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceKeyCollection) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceKeyCollection> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceKeyCollection) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceKeyCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceKeyCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceKeyCollection_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcelems: *const u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32, pkey: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceManager(pub ::windows::core::IUnknown);
impl IPortableDeviceManager {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDevices(&self, ppnpdeviceids: *mut super::super::Foundation::PWSTR, pcpnpdeviceids: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppnpdeviceids), ::core::mem::transmute(pcpnpdeviceids)).ok()
}
pub unsafe fn RefreshDeviceList(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceFriendlyName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0, pdevicefriendlyname: Param1, pcchdevicefriendlyname: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), pdevicefriendlyname.into_param().abi(), ::core::mem::transmute(pcchdevicefriendlyname)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceDescription<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0, pdevicedescription: Param1, pcchdevicedescription: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), pdevicedescription.into_param().abi(), ::core::mem::transmute(pcchdevicedescription)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceManufacturer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0, pdevicemanufacturer: Param1, pcchdevicemanufacturer: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), pdevicemanufacturer.into_param().abi(), ::core::mem::transmute(pcchdevicemanufacturer)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceProperty<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0, pszdevicepropertyname: Param1, pdata: *mut u8, pcbdata: *mut u32, pdwtype: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), pszdevicepropertyname.into_param().abi(), ::core::mem::transmute(pdata), ::core::mem::transmute(pcbdata), ::core::mem::transmute(pdwtype)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPrivateDevices(&self, ppnpdeviceids: *mut super::super::Foundation::PWSTR, pcpnpdeviceids: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(ppnpdeviceids), ::core::mem::transmute(pcpnpdeviceids)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceManager {
type Vtable = IPortableDeviceManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1567595_4c2f_4574_a6fa_ecef917b9a40);
}
impl ::core::convert::From<IPortableDeviceManager> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceManager) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceManager> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceManager) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceManager_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppnpdeviceids: *mut super::super::Foundation::PWSTR, pcpnpdeviceids: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, pdevicefriendlyname: super::super::Foundation::PWSTR, pcchdevicefriendlyname: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, pdevicedescription: super::super::Foundation::PWSTR, pcchdevicedescription: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, pdevicemanufacturer: super::super::Foundation::PWSTR, pcchdevicemanufacturer: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, pszdevicepropertyname: super::super::Foundation::PWSTR, pdata: *mut u8, pcbdata: *mut u32, pdwtype: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppnpdeviceids: *mut super::super::Foundation::PWSTR, pcpnpdeviceids: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDevicePropVariantCollection(pub ::windows::core::IUnknown);
impl IPortableDevicePropVariantCollection {
pub unsafe fn GetCount(&self, pcelems: *const u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcelems)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn GetAt(&self, dwindex: u32, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex), ::core::mem::transmute(pvalue)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))]
pub unsafe fn Add(&self, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(pvalue)).ok()
}
pub unsafe fn GetType(&self) -> ::windows::core::Result<u16> {
let mut result__: <u16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u16>(result__)
}
pub unsafe fn ChangeType(&self, vt: u16) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(vt)).ok()
}
pub unsafe fn Clear(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn RemoveAt(&self, dwindex: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDevicePropVariantCollection {
type Vtable = IPortableDevicePropVariantCollection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x89b2e422_4f1b_4316_bcef_a44afea83eb3);
}
impl ::core::convert::From<IPortableDevicePropVariantCollection> for ::windows::core::IUnknown {
fn from(value: IPortableDevicePropVariantCollection) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDevicePropVariantCollection> for ::windows::core::IUnknown {
fn from(value: &IPortableDevicePropVariantCollection) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDevicePropVariantCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDevicePropVariantCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDevicePropVariantCollection_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcelems: *const u32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32, pvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage")))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvt: *mut u16) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, vt: u16) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceProperties(pub ::windows::core::IUnknown);
impl IPortableDeviceProperties {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSupportedProperties<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectid: Param0) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetPropertyAttributes<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectid: Param0, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetValues<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>>(&self, pszobjectid: Param0, pkeys: Param1) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), pkeys.into_param().abi(), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn SetValues<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pszobjectid: Param0, pvalues: Param1) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), pvalues.into_param().abi(), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>>(&self, pszobjectid: Param0, pkeys: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), pkeys.into_param().abi()).ok()
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceProperties {
type Vtable = IPortableDeviceProperties_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7f6d695c_03df_4439_a809_59266beee3a6);
}
impl ::core::convert::From<IPortableDeviceProperties> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceProperties) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceProperties> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceProperties) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceProperties {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceProperties_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, ppkeys: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, pkeys: ::windows::core::RawPtr, ppvalues: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, pvalues: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, pkeys: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDevicePropertiesBulk(pub ::windows::core::IUnknown);
impl IPortableDevicePropertiesBulk {
pub unsafe fn QueueGetValuesByObjectList<'a, Param0: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>, Param2: ::windows::core::IntoParam<'a, IPortableDevicePropertiesBulkCallback>>(&self, pobjectids: Param0, pkeys: Param1, pcallback: Param2) -> ::windows::core::Result<::windows::core::GUID> {
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pobjectids.into_param().abi(), pkeys.into_param().abi(), pcallback.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn QueueGetValuesByObjectFormat<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>, Param4: ::windows::core::IntoParam<'a, IPortableDevicePropertiesBulkCallback>>(&self, pguidobjectformat: *const ::windows::core::GUID, pszparentobjectid: Param1, dwdepth: u32, pkeys: Param3, pcallback: Param4) -> ::windows::core::Result<::windows::core::GUID> {
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(pguidobjectformat), pszparentobjectid.into_param().abi(), ::core::mem::transmute(dwdepth), pkeys.into_param().abi(), pcallback.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
pub unsafe fn QueueSetValuesByObjectList<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValuesCollection>, Param1: ::windows::core::IntoParam<'a, IPortableDevicePropertiesBulkCallback>>(&self, pobjectvalues: Param0, pcallback: Param1) -> ::windows::core::Result<::windows::core::GUID> {
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pobjectvalues.into_param().abi(), pcallback.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
pub unsafe fn Start(&self, pcontext: *const ::windows::core::GUID) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontext)).ok()
}
pub unsafe fn Cancel(&self, pcontext: *const ::windows::core::GUID) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontext)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDevicePropertiesBulk {
type Vtable = IPortableDevicePropertiesBulk_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x482b05c0_4056_44ed_9e0f_5e23b009da93);
}
impl ::core::convert::From<IPortableDevicePropertiesBulk> for ::windows::core::IUnknown {
fn from(value: IPortableDevicePropertiesBulk) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDevicePropertiesBulk> for ::windows::core::IUnknown {
fn from(value: &IPortableDevicePropertiesBulk) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDevicePropertiesBulk {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDevicePropertiesBulk {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDevicePropertiesBulk_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectids: ::windows::core::RawPtr, pkeys: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr, pcontext: *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pguidobjectformat: *const ::windows::core::GUID, pszparentobjectid: super::super::Foundation::PWSTR, dwdepth: u32, pkeys: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr, pcontext: *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobjectvalues: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr, pcontext: *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontext: *const ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontext: *const ::windows::core::GUID) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDevicePropertiesBulkCallback(pub ::windows::core::IUnknown);
impl IPortableDevicePropertiesBulkCallback {
pub unsafe fn OnStart(&self, pcontext: *const ::windows::core::GUID) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontext)).ok()
}
pub unsafe fn OnProgress<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValuesCollection>>(&self, pcontext: *const ::windows::core::GUID, presults: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontext), presults.into_param().abi()).ok()
}
pub unsafe fn OnEnd(&self, pcontext: *const ::windows::core::GUID, hrstatus: ::windows::core::HRESULT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcontext), ::core::mem::transmute(hrstatus)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDevicePropertiesBulkCallback {
type Vtable = IPortableDevicePropertiesBulkCallback_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9deacb80_11e8_40e3_a9f3_f557986a7845);
}
impl ::core::convert::From<IPortableDevicePropertiesBulkCallback> for ::windows::core::IUnknown {
fn from(value: IPortableDevicePropertiesBulkCallback) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDevicePropertiesBulkCallback> for ::windows::core::IUnknown {
fn from(value: &IPortableDevicePropertiesBulkCallback) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDevicePropertiesBulkCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDevicePropertiesBulkCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDevicePropertiesBulkCallback_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontext: *const ::windows::core::GUID) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontext: *const ::windows::core::GUID, presults: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcontext: *const ::windows::core::GUID, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceResources(pub ::windows::core::IUnknown);
impl IPortableDeviceResources {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetSupportedResources<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectid: Param0) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetResourceAttributes<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectid: Param0, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszobjectid: Param0, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, dwmode: u32, pdwoptimalbuffersize: *mut u32, ppstream: *mut ::core::option::Option<super::super::System::Com::IStream>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), ::core::mem::transmute(key), ::core::mem::transmute(dwmode), ::core::mem::transmute(pdwoptimalbuffersize), ::core::mem::transmute(ppstream)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>>(&self, pszobjectid: Param0, pkeys: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszobjectid.into_param().abi(), pkeys.into_param().abi()).ok()
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn CreateResource<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, presourceattributes: Param0, ppdata: *mut ::core::option::Option<super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), presourceattributes.into_param().abi(), ::core::mem::transmute(ppdata), ::core::mem::transmute(pdwoptimalwritebuffersize), ::core::mem::transmute(ppszcookie)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceResources {
type Vtable = IPortableDeviceResources_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd8878ac_d841_4d17_891c_e6829cdb6934);
}
impl ::core::convert::From<IPortableDeviceResources> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceResources) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceResources> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceResources) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceResources {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceResources {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceResources_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, ppkeys: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppresourceattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, dwmode: u32, pdwoptimalbuffersize: *mut u32, ppstream: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszobjectid: super::super::Foundation::PWSTR, pkeys: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, presourceattributes: ::windows::core::RawPtr, ppdata: *mut ::windows::core::RawPtr, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceService(pub ::windows::core::IUnknown);
impl IPortableDeviceService {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Open<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pszpnpserviceid: Param0, pclientinfo: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpnpserviceid.into_param().abi(), pclientinfo.into_param().abi()).ok()
}
pub unsafe fn Capabilities(&self) -> ::windows::core::Result<IPortableDeviceServiceCapabilities> {
let mut result__: <IPortableDeviceServiceCapabilities as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceServiceCapabilities>(result__)
}
pub unsafe fn Content(&self) -> ::windows::core::Result<IPortableDeviceContent2> {
let mut result__: <IPortableDeviceContent2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceContent2>(result__)
}
pub unsafe fn Methods(&self) -> ::windows::core::Result<IPortableDeviceServiceMethods> {
let mut result__: <IPortableDeviceServiceMethods as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceServiceMethods>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn Close(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetServiceObjectID(&self) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetPnPServiceID(&self) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Advise<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceEventCallback>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pcallback: Param1, pparameters: Param2) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pcallback.into_param().abi(), pparameters.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn Unadvise<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszcookie: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), pszcookie.into_param().abi()).ok()
}
pub unsafe fn SendCommand<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwflags: u32, pparameters: Param1) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwflags), pparameters.into_param().abi(), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceService {
type Vtable = IPortableDeviceService_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd3bd3a44_d7b5_40a9_98b7_2fa4d01dec08);
}
impl ::core::convert::From<IPortableDeviceService> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceService) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceService> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceService) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceService {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceService {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceService_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpserviceid: super::super::Foundation::PWSTR, pclientinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcapabilities: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcontent: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppmethods: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszserviceobjectid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppszpnpserviceid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pcallback: ::windows::core::RawPtr, pparameters: ::windows::core::RawPtr, ppszcookie: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszcookie: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwflags: u32, pparameters: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceActivation(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceActivation {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn OpenAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceServiceOpenCallback>>(&self, pszpnpserviceid: Param0, pclientinfo: Param1, pcallback: Param2) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpnpserviceid.into_param().abi(), pclientinfo.into_param().abi(), pcallback.into_param().abi()).ok()
}
pub unsafe fn CancelOpenAsync(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceActivation {
type Vtable = IPortableDeviceServiceActivation_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe56b0534_d9b9_425c_9b99_75f97cb3d7c8);
}
impl ::core::convert::From<IPortableDeviceServiceActivation> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceActivation) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceActivation> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceActivation) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceActivation {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceActivation {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceActivation_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpserviceid: super::super::Foundation::PWSTR, pclientinfo: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceCapabilities(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceCapabilities {
pub unsafe fn GetSupportedMethods(&self) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetSupportedMethodsByFormat(&self, format: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetMethodAttributes(&self, method: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(method), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetMethodParameterAttributes(&self, method: *const ::windows::core::GUID, parameter: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(method), ::core::mem::transmute(parameter), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn GetSupportedFormats(&self) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetFormatAttributes(&self, format: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn GetSupportedFormatProperties(&self, format: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetFormatPropertyAttributes(&self, format: *const ::windows::core::GUID, property: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), ::core::mem::transmute(property), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn GetSupportedEvents(&self) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetEventAttributes(&self, event: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(event), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetEventParameterAttributes(&self, event: *const ::windows::core::GUID, parameter: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(event), ::core::mem::transmute(parameter), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn GetInheritedServices(&self, dwinheritancetype: u32) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwinheritancetype), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
pub unsafe fn GetFormatRenderingProfiles(&self, format: *const ::windows::core::GUID) -> ::windows::core::Result<IPortableDeviceValuesCollection> {
let mut result__: <IPortableDeviceValuesCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(format), &mut result__).from_abi::<IPortableDeviceValuesCollection>(result__)
}
pub unsafe fn GetSupportedCommands(&self) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetCommandOptions(&self, command: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(command), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceCapabilities {
type Vtable = IPortableDeviceServiceCapabilities_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x24dbd89d_413e_43e0_bd5b_197f3c56c886);
}
impl ::core::convert::From<IPortableDeviceServiceCapabilities> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceCapabilities) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceCapabilities> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceCapabilities) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceCapabilities {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceCapabilities {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceCapabilities_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppmethods: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, ppmethods: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, method: *const ::windows::core::GUID, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, method: *const ::windows::core::GUID, parameter: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppformats: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, ppkeys: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, property: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppevents: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, event: *const ::windows::core::GUID, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, event: *const ::windows::core::GUID, parameter: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppattributes: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwinheritancetype: u32, ppservices: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, format: *const ::windows::core::GUID, pprenderingprofiles: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcommands: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, command: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppoptions: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceManager(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceManager {
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceServices<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpdeviceid: Param0, guidservicecategory: *const ::windows::core::GUID, pservices: *mut super::super::Foundation::PWSTR, pcservices: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpnpdeviceid.into_param().abi(), ::core::mem::transmute(guidservicecategory), ::core::mem::transmute(pservices), ::core::mem::transmute(pcservices)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetDeviceForService<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszpnpserviceid: Param0) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszpnpserviceid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceManager {
type Vtable = IPortableDeviceServiceManager_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa8abc4e9_a84a_47a9_80b3_c5d9b172a961);
}
impl ::core::convert::From<IPortableDeviceServiceManager> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceManager) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceManager> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceManager) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceManager {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceManager_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpdeviceid: super::super::Foundation::PWSTR, guidservicecategory: *const ::windows::core::GUID, pservices: *mut super::super::Foundation::PWSTR, pcservices: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpnpserviceid: super::super::Foundation::PWSTR, ppszpnpdeviceid: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceMethodCallback(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceMethodCallback {
pub unsafe fn OnComplete<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, hrstatus: ::windows::core::HRESULT, presults: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(hrstatus), presults.into_param().abi()).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceMethodCallback {
type Vtable = IPortableDeviceServiceMethodCallback_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc424233c_afce_4828_a756_7ed7a2350083);
}
impl ::core::convert::From<IPortableDeviceServiceMethodCallback> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceMethodCallback) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceMethodCallback> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceMethodCallback) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceMethodCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceMethodCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceMethodCallback_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hrstatus: ::windows::core::HRESULT, presults: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceMethods(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceMethods {
pub unsafe fn Invoke<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, method: *const ::windows::core::GUID, pparameters: Param1, ppresults: *mut ::core::option::Option<IPortableDeviceValues>) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(method), pparameters.into_param().abi(), ::core::mem::transmute(ppresults)).ok()
}
pub unsafe fn InvokeAsync<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>, Param2: ::windows::core::IntoParam<'a, IPortableDeviceServiceMethodCallback>>(&self, method: *const ::windows::core::GUID, pparameters: Param1, pcallback: Param2) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(method), pparameters.into_param().abi(), pcallback.into_param().abi()).ok()
}
pub unsafe fn Cancel<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceServiceMethodCallback>>(&self, pcallback: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pcallback.into_param().abi()).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceMethods {
type Vtable = IPortableDeviceServiceMethods_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe20333c9_fd34_412d_a381_cc6f2d820df7);
}
impl ::core::convert::From<IPortableDeviceServiceMethods> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceMethods) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceMethods> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceMethods) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceMethods {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceMethods {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceMethods_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, method: *const ::windows::core::GUID, pparameters: ::windows::core::RawPtr, ppresults: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, method: *const ::windows::core::GUID, pparameters: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcallback: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceServiceOpenCallback(pub ::windows::core::IUnknown);
impl IPortableDeviceServiceOpenCallback {
pub unsafe fn OnComplete(&self, hrstatus: ::windows::core::HRESULT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(hrstatus)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceServiceOpenCallback {
type Vtable = IPortableDeviceServiceOpenCallback_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbced49c8_8efe_41ed_960b_61313abd47a9);
}
impl ::core::convert::From<IPortableDeviceServiceOpenCallback> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceServiceOpenCallback) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceServiceOpenCallback> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceServiceOpenCallback) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceServiceOpenCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceServiceOpenCallback {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceServiceOpenCallback_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, hrstatus: ::windows::core::HRESULT) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceUnitsStream(pub ::windows::core::IUnknown);
impl IPortableDeviceUnitsStream {
pub unsafe fn SeekInUnits(&self, dlibmove: i64, units: WPD_STREAM_UNITS, dworigin: u32) -> ::windows::core::Result<u64> {
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dlibmove), ::core::mem::transmute(units), ::core::mem::transmute(dworigin), &mut result__).from_abi::<u64>(result__)
}
pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceUnitsStream {
type Vtable = IPortableDeviceUnitsStream_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e98025f_bfc4_47a2_9a5f_bc900a507c67);
}
impl ::core::convert::From<IPortableDeviceUnitsStream> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceUnitsStream) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceUnitsStream> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceUnitsStream) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceUnitsStream {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceUnitsStream {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceUnitsStream_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dlibmove: i64, units: WPD_STREAM_UNITS, dworigin: u32, plibnewposition: *mut u64) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceValues(pub ::windows::core::IUnknown);
impl IPortableDeviceValues {
pub unsafe fn GetCount(&self, pcelt: *const u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcelt)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetAt(&self, index: u32, pkey: *mut super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(index), ::core::mem::transmute(pkey), ::core::mem::transmute(pvalue)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn SetValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(pvalue)).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
let mut result__: <super::super::System::Com::StructuredStorage::PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::System::Com::StructuredStorage::PROPVARIANT>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn SetStringValue<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), value.into_param().abi()).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetStringValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<super::super::Foundation::PWSTR> {
let mut result__: <super::super::Foundation::PWSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::Foundation::PWSTR>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetUnsignedIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetUnsignedIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<u32>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetSignedIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: i32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetSignedIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<i32> {
let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<i32>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetUnsignedLargeIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: u64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetUnsignedLargeIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<u64> {
let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<u64>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetSignedLargeIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: i64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetSignedLargeIntegerValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<i64> {
let mut result__: <i64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<i64>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetFloatValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: f32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetFloatValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<f32> {
let mut result__: <f32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<f32>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetErrorValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: ::windows::core::HRESULT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetErrorValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<::windows::core::HRESULT> {
let mut result__: <::windows::core::HRESULT as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<::windows::core::HRESULT>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetKeyValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetKeyValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<super::super::UI::Shell::PropertiesSystem::PROPERTYKEY> {
let mut result__: <super::super::UI::Shell::PropertiesSystem::PROPERTYKEY as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn SetBoolValue<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), value.into_param().abi()).ok()
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub unsafe fn GetBoolValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<super::super::Foundation::BOOL> {
let mut result__: <super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<super::super::Foundation::BOOL>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetIUnknownValue<'a, Param1: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), pvalue.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetIUnknownValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<::windows::core::IUnknown> {
let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<::windows::core::IUnknown>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetGuidValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: *const ::windows::core::GUID) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(value)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetGuidValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<::windows::core::GUID> {
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetBufferValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *const u8, cbvalue: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(pvalue), ::core::mem::transmute(cbvalue)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetBufferValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut *mut u8, pcbvalue: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), ::core::mem::transmute(ppvalue), ::core::mem::transmute(pcbvalue)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetIPortableDeviceValuesValue<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), pvalue.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetIPortableDeviceValuesValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetIPortableDevicePropVariantCollectionValue<'a, Param1: ::windows::core::IntoParam<'a, IPortableDevicePropVariantCollection>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), pvalue.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetIPortableDevicePropVariantCollectionValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDevicePropVariantCollection> {
let mut result__: <IPortableDevicePropVariantCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDevicePropVariantCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetIPortableDeviceKeyCollectionValue<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceKeyCollection>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), pvalue.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetIPortableDeviceKeyCollectionValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceKeyCollection> {
let mut result__: <IPortableDeviceKeyCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceKeyCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SetIPortableDeviceValuesCollectionValue<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValuesCollection>>(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: Param1) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), pvalue.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetIPortableDeviceValuesCollectionValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<IPortableDeviceValuesCollection> {
let mut result__: <IPortableDeviceValuesCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), ::core::mem::transmute(key), &mut result__).from_abi::<IPortableDeviceValuesCollection>(result__)
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn RemoveValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(key)).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CopyValuesFromPropertyStore<'a, Param0: ::windows::core::IntoParam<'a, super::super::UI::Shell::PropertiesSystem::IPropertyStore>>(&self, pstore: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), pstore.into_param().abi()).ok()
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CopyValuesToPropertyStore<'a, Param0: ::windows::core::IntoParam<'a, super::super::UI::Shell::PropertiesSystem::IPropertyStore>>(&self, pstore: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), pstore.into_param().abi()).ok()
}
pub unsafe fn Clear(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceValues {
type Vtable = IPortableDeviceValues_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6848f6f2_3155_4f86_b6f5_263eeeab3143);
}
impl ::core::convert::From<IPortableDeviceValues> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceValues) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceValues> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceValues) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceValues {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceValues {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceValues_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcelt: *const u32) -> ::windows::core::HRESULT,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, index: u32, pkey: *mut super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::StructuredStorage::PROPVARIANT>) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut super::super::Foundation::PWSTR) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: i32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut i32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: u64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut u64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: i64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut i64) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: f32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut f32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: ::windows::core::HRESULT) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: super::super::Foundation::BOOL) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_PropertiesSystem")))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, value: *const ::windows::core::GUID) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: *const u8, cbvalue: u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut *mut u8, pcbvalue: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, ppvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstore: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstore: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceValuesCollection(pub ::windows::core::IUnknown);
impl IPortableDeviceValuesCollection {
pub unsafe fn GetCount(&self, pcelems: *const u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcelems)).ok()
}
pub unsafe fn GetAt(&self, dwindex: u32) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, pvalues: Param0) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pvalues.into_param().abi()).ok()
}
pub unsafe fn Clear(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok()
}
pub unsafe fn RemoveAt(&self, dwindex: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwindex)).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceValuesCollection {
type Vtable = IPortableDeviceValuesCollection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6e3f2d79_4e07_48c4_8208_d8c2e5af4a99);
}
impl ::core::convert::From<IPortableDeviceValuesCollection> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceValuesCollection) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceValuesCollection> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceValuesCollection) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceValuesCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceValuesCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceValuesCollection_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcelems: *const u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32, ppvalues: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvalues: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwindex: u32) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IPortableDeviceWebControl(pub ::windows::core::IUnknown);
impl IPortableDeviceWebControl {
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn GetDeviceFromId<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, deviceid: Param0) -> ::windows::core::Result<super::super::System::Com::IDispatch> {
let mut result__: <super::super::System::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), deviceid.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::IDispatch>(result__)
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
pub unsafe fn GetDeviceFromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch>>(&self, deviceid: Param0, pcompletionhandler: Param1, perrorhandler: Param2) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), deviceid.into_param().abi(), pcompletionhandler.into_param().abi(), perrorhandler.into_param().abi()).ok()
}
}
unsafe impl ::windows::core::Interface for IPortableDeviceWebControl {
type Vtable = IPortableDeviceWebControl_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x94fc7953_5ca1_483a_8aee_df52e7747d00);
}
impl ::core::convert::From<IPortableDeviceWebControl> for ::windows::core::IUnknown {
fn from(value: IPortableDeviceWebControl) -> Self {
value.0
}
}
impl ::core::convert::From<&IPortableDeviceWebControl> for ::windows::core::IUnknown {
fn from(value: &IPortableDeviceWebControl) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPortableDeviceWebControl {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPortableDeviceWebControl {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<IPortableDeviceWebControl> for super::super::System::Com::IDispatch {
fn from(value: IPortableDeviceWebControl) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
#[cfg(feature = "Win32_System_Com")]
impl ::core::convert::From<&IPortableDeviceWebControl> for super::super::System::Com::IDispatch {
fn from(value: &IPortableDeviceWebControl) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IPortableDeviceWebControl {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> {
::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) })
}
}
#[cfg(feature = "Win32_System_Com")]
impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IPortableDeviceWebControl {
fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> {
::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) })
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPortableDeviceWebControl_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, deviceid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppdevice: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, deviceid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pcompletionhandler: ::windows::core::RawPtr, perrorhandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IRadioInstance(pub ::windows::core::IUnknown);
impl IRadioInstance {
pub unsafe fn GetRadioManagerSignature(&self) -> ::windows::core::Result<::windows::core::GUID> {
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetInstanceSignature(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> {
let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__)
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn GetFriendlyName(&self, lcid: u32) -> ::windows::core::Result<super::super::Foundation::BSTR> {
let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__)
}
pub unsafe fn GetRadioState(&self) -> ::windows::core::Result<DEVICE_RADIO_STATE> {
let mut result__: <DEVICE_RADIO_STATE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<DEVICE_RADIO_STATE>(result__)
}
pub unsafe fn SetRadioState(&self, radiostate: DEVICE_RADIO_STATE, utimeoutsec: u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(radiostate), ::core::mem::transmute(utimeoutsec)).ok()
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn IsMultiComm(&self) -> super::super::Foundation::BOOL {
::core::mem::transmute((::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)))
}
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn IsAssociatingDevice(&self) -> super::super::Foundation::BOOL {
::core::mem::transmute((::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self)))
}
}
unsafe impl ::windows::core::Interface for IRadioInstance {
type Vtable = IRadioInstance_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x70aa1c9e_f2b4_4c61_86d3_6b9fb75fd1a2);
}
impl ::core::convert::From<IRadioInstance> for ::windows::core::IUnknown {
fn from(value: IRadioInstance) -> Self {
value.0
}
}
impl ::core::convert::From<&IRadioInstance> for ::windows::core::IUnknown {
fn from(value: &IRadioInstance) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IRadioInstance {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IRadioInstance {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IRadioInstance_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pguidsignature: *mut ::windows::core::GUID) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrid: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lcid: u32, pbstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))] usize,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pradiostate: *mut DEVICE_RADIO_STATE) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, radiostate: DEVICE_RADIO_STATE, utimeoutsec: u32) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> super::super::Foundation::BOOL,
#[cfg(not(feature = "Win32_Foundation"))] usize,
#[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> super::super::Foundation::BOOL,
#[cfg(not(feature = "Win32_Foundation"))] usize,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IRadioInstanceCollection(pub ::windows::core::IUnknown);
impl IRadioInstanceCollection {
pub unsafe fn GetCount(&self) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__)
}
pub unsafe fn GetAt(&self, uindex: u32) -> ::windows::core::Result<IRadioInstance> {
let mut result__: <IRadioInstance as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), &mut result__).from_abi::<IRadioInstance>(result__)
}
}
unsafe impl ::windows::core::Interface for IRadioInstanceCollection {
type Vtable = IRadioInstanceCollection_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5791fae_5665_4e0c_95be_5fde31644185);
}
impl ::core::convert::From<IRadioInstanceCollection> for ::windows::core::IUnknown {
fn from(value: IRadioInstanceCollection) -> Self {
value.0
}
}
impl ::core::convert::From<&IRadioInstanceCollection> for ::windows::core::IUnknown {
fn from(value: &IRadioInstanceCollection) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IRadioInstanceCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IRadioInstanceCollection {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IRadioInstanceCollection_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcinstance: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uindex: u32, ppradioinstance: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
);
#[repr(transparent)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)]
pub struct IWpdSerializer(pub ::windows::core::IUnknown);
impl IWpdSerializer {
pub unsafe fn GetIPortableDeviceValuesFromBuffer(&self, pbuffer: *const u8, dwinputbufferlength: u32) -> ::windows::core::Result<IPortableDeviceValues> {
let mut result__: <IPortableDeviceValues as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pbuffer), ::core::mem::transmute(dwinputbufferlength), &mut result__).from_abi::<IPortableDeviceValues>(result__)
}
pub unsafe fn WriteIPortableDeviceValuesToBuffer<'a, Param1: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, dwoutputbufferlength: u32, presults: Param1, pbuffer: *mut u8, pdwbyteswritten: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwoutputbufferlength), presults.into_param().abi(), ::core::mem::transmute(pbuffer), ::core::mem::transmute(pdwbyteswritten)).ok()
}
pub unsafe fn GetBufferFromIPortableDeviceValues<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, psource: Param0, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), psource.into_param().abi(), ::core::mem::transmute(ppbuffer), ::core::mem::transmute(pdwbuffersize)).ok()
}
pub unsafe fn GetSerializedSize<'a, Param0: ::windows::core::IntoParam<'a, IPortableDeviceValues>>(&self, psource: Param0) -> ::windows::core::Result<u32> {
let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
(::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), psource.into_param().abi(), &mut result__).from_abi::<u32>(result__)
}
}
unsafe impl ::windows::core::Interface for IWpdSerializer {
type Vtable = IWpdSerializer_abi;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb32f4002_bb27_45ff_af4f_06631c1e8dad);
}
impl ::core::convert::From<IWpdSerializer> for ::windows::core::IUnknown {
fn from(value: IWpdSerializer) -> Self {
value.0
}
}
impl ::core::convert::From<&IWpdSerializer> for ::windows::core::IUnknown {
fn from(value: &IWpdSerializer) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWpdSerializer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Owned(self.0)
}
}
impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IWpdSerializer {
fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> {
::windows::core::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWpdSerializer_abi(
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbuffer: *const u8, dwinputbufferlength: u32, ppparams: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwoutputbufferlength: u32, presults: ::windows::core::RawPtr, pbuffer: *mut u8, pdwbyteswritten: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psource: ::windows::core::RawPtr, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> ::windows::core::HRESULT,
pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psource: ::windows::core::RawPtr, pdwsize: *mut u32) -> ::windows::core::HRESULT,
);
pub const PortableDevice: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x728a21c5_3d9e_48d7_9810_864848f0f404);
pub const PortableDeviceDispatchFactory: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x43232233_8338_4658_ae01_0b4ae830b6b0);
pub const PortableDeviceFTM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf7c0039a_4762_488a_b4b3_760ef9a1ba9b);
pub const PortableDeviceKeyCollection: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xde2d022d_2480_43be_97f0_d1fa2cf98f4f);
pub const PortableDeviceManager: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0af10cec_2ecd_4b92_9581_34f6ae0637f3);
pub const PortableDevicePropVariantCollection: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08a99e2f_6d6d_4b80_af5a_baf2bcbe4cb9);
pub const PortableDeviceService: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef5db4c2_9312_422c_9152_411cd9c4dd84);
pub const PortableDeviceServiceFTM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1649b154_c794_497a_9b03_f3f0121302f3);
pub const PortableDeviceValues: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0c15d503_d017_47ce_9016_7b3f978721cc);
pub const PortableDeviceValuesCollection: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3882134d_14cf_4220_9cb4_435f86d83f60);
pub const PortableDeviceWebControl: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x186dd02c_2dec_41b5_a7d4_b59056fade51);
pub const RANGEMAX_MessageObj_PatternDayOfMonth: u32 = 31u32;
pub const RANGEMAX_MessageObj_PatternMonthOfYear: u32 = 12u32;
pub const RANGEMAX_StatusSvc_BatteryLife: u32 = 100u32;
pub const RANGEMAX_StatusSvc_MissedCalls: u32 = 255u32;
pub const RANGEMAX_StatusSvc_NewPictures: u32 = 65535u32;
pub const RANGEMAX_StatusSvc_SignalStrength: u32 = 4u32;
pub const RANGEMAX_StatusSvc_TextMessages: u32 = 255u32;
pub const RANGEMAX_StatusSvc_VoiceMail: u32 = 255u32;
pub const RANGEMIN_MessageObj_PatternDayOfMonth: u32 = 1u32;
pub const RANGEMIN_MessageObj_PatternMonthOfYear: u32 = 1u32;
pub const RANGEMIN_StatusSvc_BatteryLife: u32 = 0u32;
pub const RANGEMIN_StatusSvc_SignalStrength: u32 = 0u32;
pub const RANGESTEP_MessageObj_PatternDayOfMonth: u32 = 1u32;
pub const RANGESTEP_MessageObj_PatternMonthOfYear: u32 = 1u32;
pub const RANGESTEP_StatusSvc_BatteryLife: u32 = 1u32;
pub const RANGESTEP_StatusSvc_SignalStrength: u32 = 1u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct SMS_MESSAGE_TYPES(pub i32);
pub const SMS_TEXT_MESSAGE: SMS_MESSAGE_TYPES = SMS_MESSAGE_TYPES(0i32);
pub const SMS_BINARY_MESSAGE: SMS_MESSAGE_TYPES = SMS_MESSAGE_TYPES(1i32);
impl ::core::convert::From<i32> for SMS_MESSAGE_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for SMS_MESSAGE_TYPES {
type Abi = Self;
}
pub const SYNCSVC_FILTER_CALENDAR_WINDOW_WITH_RECURRENCE: u32 = 3u32;
pub const SYNCSVC_FILTER_CONTACTS_WITH_PHONE: u32 = 1u32;
pub const SYNCSVC_FILTER_NONE: u32 = 0u32;
pub const SYNCSVC_FILTER_TASK_ACTIVE: u32 = 2u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct SYSTEM_RADIO_STATE(pub i32);
pub const SRS_RADIO_ENABLED: SYSTEM_RADIO_STATE = SYSTEM_RADIO_STATE(0i32);
pub const SRS_RADIO_DISABLED: SYSTEM_RADIO_STATE = SYSTEM_RADIO_STATE(1i32);
impl ::core::convert::From<i32> for SYSTEM_RADIO_STATE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for SYSTEM_RADIO_STATE {
type Abi = Self;
}
pub const TYPE_AnchorSyncSvc: u32 = 1u32;
pub const TYPE_CalendarSvc: u32 = 0u32;
pub const TYPE_ContactsSvc: u32 = 0u32;
pub const TYPE_DeviceMetadataSvc: u32 = 0u32;
pub const TYPE_FullEnumSyncSvc: u32 = 1u32;
pub const TYPE_HintsSvc: u32 = 0u32;
pub const TYPE_MessageSvc: u32 = 0u32;
pub const TYPE_NotesSvc: u32 = 0u32;
pub const TYPE_RingtonesSvc: u32 = 0u32;
pub const TYPE_StatusSvc: u32 = 0u32;
pub const TYPE_TasksSvc: u32 = 0u32;
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_HAS_ALBUM_ART: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_HAS_AUDIO_CLIP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_HAS_CONTACT_PHOTO: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_HAS_ICON: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_HAS_THUMBNAIL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPDNSE_OBJECT_OPTIMAL_READ_BLOCK_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6), pid: 7u32 };
pub const WPDNSE_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x34d71409_4b47_4d80_aaac_3a28a4a3b3e6);
pub const WPDNSE_PROPSHEET_CONTENT_DETAILS: u32 = 32u32;
pub const WPDNSE_PROPSHEET_CONTENT_GENERAL: u32 = 4u32;
pub const WPDNSE_PROPSHEET_CONTENT_REFERENCES: u32 = 8u32;
pub const WPDNSE_PROPSHEET_CONTENT_RESOURCES: u32 = 16u32;
pub const WPDNSE_PROPSHEET_DEVICE_GENERAL: u32 = 1u32;
pub const WPDNSE_PROPSHEET_STORAGE_GENERAL: u32 = 2u32;
pub const WPD_API_OPTIONS_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x10e54a3e_052d_4777_a13c_de7614be2bc4);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_API_OPTION_IOCTL_ACCESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x10e54a3e_052d_4777_a13c_de7614be2bc4), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_API_OPTION_USE_CLEAR_DATA_STREAM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x10e54a3e_052d_4777_a13c_de7614be2bc4), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_ACCEPTED_ATTENDEES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_DECLINED_ATTENDEES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_LOCATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3), pid: 3u32 };
pub const WPD_APPOINTMENT_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_OPTIONAL_ATTENDEES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_REQUIRED_ATTENDEES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_RESOURCES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_TENTATIVE_ATTENDEES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_APPOINTMENT_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf99efd03_431d_40d8_a1c9_4e220d9c88d3), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_AUDIO_BITRATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_AUDIO_BIT_DEPTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_AUDIO_BLOCK_ALIGNMENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_AUDIO_CHANNEL_COUNT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_AUDIO_FORMAT_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6),
pid: 11u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_BITRATE_TYPES(pub i32);
pub const WPD_BITRATE_TYPE_UNUSED: WPD_BITRATE_TYPES = WPD_BITRATE_TYPES(0i32);
pub const WPD_BITRATE_TYPE_DISCRETE: WPD_BITRATE_TYPES = WPD_BITRATE_TYPES(1i32);
pub const WPD_BITRATE_TYPE_VARIABLE: WPD_BITRATE_TYPES = WPD_BITRATE_TYPES(2i32);
pub const WPD_BITRATE_TYPE_FREE: WPD_BITRATE_TYPES = WPD_BITRATE_TYPES(3i32);
impl ::core::convert::From<i32> for WPD_BITRATE_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_BITRATE_TYPES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_CAPTURE_MODES(pub i32);
pub const WPD_CAPTURE_MODE_UNDEFINED: WPD_CAPTURE_MODES = WPD_CAPTURE_MODES(0i32);
pub const WPD_CAPTURE_MODE_NORMAL: WPD_CAPTURE_MODES = WPD_CAPTURE_MODES(1i32);
pub const WPD_CAPTURE_MODE_BURST: WPD_CAPTURE_MODES = WPD_CAPTURE_MODES(2i32);
pub const WPD_CAPTURE_MODE_TIMELAPSE: WPD_CAPTURE_MODES = WPD_CAPTURE_MODES(3i32);
impl ::core::convert::From<i32> for WPD_CAPTURE_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_CAPTURE_MODES {
type Abi = Self;
}
pub const WPD_CATEGORY_CAPABILITIES: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356);
pub const WPD_CATEGORY_COMMON: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a);
pub const WPD_CATEGORY_DEVICE_HINTS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d5fb92b_cb46_4c4f_8343_0bc3d3f17c84);
pub const WPD_CATEGORY_MEDIA_CAPTURE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x59b433ba_fe44_4d8d_808c_6bcb9b0f15e8);
pub const WPD_CATEGORY_MTP_EXT_VENDOR_OPERATIONS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56);
pub const WPD_CATEGORY_NETWORK_CONFIGURATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x78f9c6fc_79b8_473c_9060_6bd23dd072c4);
pub const WPD_CATEGORY_NULL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000000_0000_0000_0000_000000000000);
pub const WPD_CATEGORY_OBJECT_ENUMERATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec);
pub const WPD_CATEGORY_OBJECT_MANAGEMENT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089);
pub const WPD_CATEGORY_OBJECT_PROPERTIES: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804);
pub const WPD_CATEGORY_OBJECT_PROPERTIES_BULK: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e);
pub const WPD_CATEGORY_OBJECT_RESOURCES: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a);
pub const WPD_CATEGORY_SERVICE_CAPABILITIES: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89);
pub const WPD_CATEGORY_SERVICE_COMMON: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x322f071d_36ef_477f_b4b5_6f52d734baee);
pub const WPD_CATEGORY_SERVICE_METHODS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc);
pub const WPD_CATEGORY_SMS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1);
pub const WPD_CATEGORY_STILL_IMAGE_CAPTURE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4fcd6982_22a2_4b05_a48b_62d38bf27b32);
pub const WPD_CATEGORY_STORAGE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd8f907a6_34cc_45fa_97fb_d007fa47ec94);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_DEVICE_IDENTIFICATION_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x3e3595da_4d71_49fe_a0b4_d4406c3ae93f), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_DONT_REGISTER_WPD_DEVICE_INTERFACE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x6309ffef_a87c_4ca7_8434_797576e40a96), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_MULTITRANSPORT_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x3e3595da_4d71_49fe_a0b4_d4406c3ae93f), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_REGISTER_WPD_PRIVATE_DEVICE_INTERFACE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x6309ffef_a87c_4ca7_8434_797576e40a96), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_SILENCE_AUTOPLAY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x65c160f8_1367_4ce2_939d_8310839f0d30), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_SUPPORTED_CONTENT_TYPES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x6309ffef_a87c_4ca7_8434_797576e40a96), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLASS_EXTENSION_OPTIONS_TRANSPORT_BANDWIDTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x3e3595da_4d71_49fe_a0b4_d4406c3ae93f), pid: 4u32 };
pub const WPD_CLASS_EXTENSION_OPTIONS_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6309ffef_a87c_4ca7_8434_797576e40a96);
pub const WPD_CLASS_EXTENSION_OPTIONS_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3e3595da_4d71_49fe_a0b4_d4406c3ae93f);
pub const WPD_CLASS_EXTENSION_OPTIONS_V3: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x65c160f8_1367_4ce2_939d_8310839f0d30);
pub const WPD_CLASS_EXTENSION_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x33fb0d11_64a3_4fac_b4c7_3dfeaa99b051);
pub const WPD_CLASS_EXTENSION_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_DESIRED_ACCESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_EVENT_COOKIE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859),
pid: 11u32,
};
pub const WPD_CLIENT_INFORMATION_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_MAJOR_VERSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_MANUAL_CLOSE_ON_DISCONNECT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_MINIMUM_RESULTS_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_MINOR_VERSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_REVISION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_SECURITY_QUALITY_OF_SERVICE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_SHARE_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_WMDRM_APPLICATION_CERTIFICATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CLIENT_WMDRM_APPLICATION_PRIVATE_KEY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x204d9f0c_2292_4080_9f42_40664e70f859), pid: 6u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_COLOR_CORRECTED_STATUS_VALUES(pub i32);
pub const WPD_COLOR_CORRECTED_STATUS_NOT_CORRECTED: WPD_COLOR_CORRECTED_STATUS_VALUES = WPD_COLOR_CORRECTED_STATUS_VALUES(0i32);
pub const WPD_COLOR_CORRECTED_STATUS_CORRECTED: WPD_COLOR_CORRECTED_STATUS_VALUES = WPD_COLOR_CORRECTED_STATUS_VALUES(1i32);
pub const WPD_COLOR_CORRECTED_STATUS_SHOULD_NOT_BE_CORRECTED: WPD_COLOR_CORRECTED_STATUS_VALUES = WPD_COLOR_CORRECTED_STATUS_VALUES(2i32);
impl ::core::convert::From<i32> for WPD_COLOR_CORRECTED_STATUS_VALUES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_COLOR_CORRECTED_STATUS_VALUES {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub struct WPD_COMMAND_ACCESS_LOOKUP_ENTRY {
pub Command: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY,
pub AccessType: u32,
pub AccessProperty: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl WPD_COMMAND_ACCESS_LOOKUP_ENTRY {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::core::default::Default for WPD_COMMAND_ACCESS_LOOKUP_ENTRY {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::core::fmt::Debug for WPD_COMMAND_ACCESS_LOOKUP_ENTRY {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.debug_struct("WPD_COMMAND_ACCESS_LOOKUP_ENTRY").field("Command", &self.Command).field("AccessType", &self.AccessType).field("AccessProperty", &self.AccessProperty).finish()
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::core::cmp::PartialEq for WPD_COMMAND_ACCESS_LOOKUP_ENTRY {
fn eq(&self, other: &Self) -> bool {
self.Command == other.Command && self.AccessType == other.AccessType && self.AccessProperty == other.AccessProperty
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl ::core::cmp::Eq for WPD_COMMAND_ACCESS_LOOKUP_ENTRY {}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
unsafe impl ::windows::core::Abi for WPD_COMMAND_ACCESS_LOOKUP_ENTRY {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_COMMAND_ACCESS_TYPES(pub i32);
pub const WPD_COMMAND_ACCESS_READ: WPD_COMMAND_ACCESS_TYPES = WPD_COMMAND_ACCESS_TYPES(1i32);
pub const WPD_COMMAND_ACCESS_READWRITE: WPD_COMMAND_ACCESS_TYPES = WPD_COMMAND_ACCESS_TYPES(3i32);
pub const WPD_COMMAND_ACCESS_FROM_PROPERTY_WITH_STGM_ACCESS: WPD_COMMAND_ACCESS_TYPES = WPD_COMMAND_ACCESS_TYPES(4i32);
pub const WPD_COMMAND_ACCESS_FROM_PROPERTY_WITH_FILE_ACCESS: WPD_COMMAND_ACCESS_TYPES = WPD_COMMAND_ACCESS_TYPES(8i32);
pub const WPD_COMMAND_ACCESS_FROM_ATTRIBUTE_WITH_METHOD_ACCESS: WPD_COMMAND_ACCESS_TYPES = WPD_COMMAND_ACCESS_TYPES(16i32);
impl ::core::convert::From<i32> for WPD_COMMAND_ACCESS_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_COMMAND_ACCESS_TYPES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_COMMAND_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_EVENT_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_FIXED_PROPERTY_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_FUNCTIONAL_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_COMMANDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_CONTENT_TYPES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_EVENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_FORMATS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_FORMAT_PROPERTIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CAPABILITIES_GET_SUPPORTED_FUNCTIONAL_CATEGORIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CLASS_EXTENSION_REGISTER_SERVICE_INTERFACES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CLASS_EXTENSION_UNREGISTER_SERVICE_INTERFACES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_CLASS_EXTENSION_WRITE_DEVICE_INFORMATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x33fb0d11_64a3_4fac_b4c7_3dfeaa99b051), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_COMMIT_KEYPAIR: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x78f9c6fc_79b8_473c_9060_6bd23dd072c4), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_COMMON_GET_OBJECT_IDS_FROM_PERSISTENT_UNIQUE_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_COMMON_RESET_DEVICE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_COMMON_SAVE_CLIENT_INFORMATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_DEVICE_HINTS_GET_CONTENT_LOCATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0d5fb92b_cb46_4c4f_8343_0bc3d3f17c84), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_GENERATE_KEYPAIR: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x78f9c6fc_79b8_473c_9060_6bd23dd072c4), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MEDIA_CAPTURE_PAUSE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x59b433ba_fe44_4d8d_808c_6bcb9b0f15e8), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MEDIA_CAPTURE_START: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x59b433ba_fe44_4d8d_808c_6bcb9b0f15e8), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MEDIA_CAPTURE_STOP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x59b433ba_fe44_4d8d_808c_6bcb9b0f15e8), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_END_DATA_TRANSFER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 17u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_EXECUTE_COMMAND_WITHOUT_DATA_PHASE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_EXECUTE_COMMAND_WITH_DATA_TO_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_EXECUTE_COMMAND_WITH_DATA_TO_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_GET_SUPPORTED_VENDOR_OPCODES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_GET_VENDOR_EXTENSION_DESCRIPTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 18u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_READ_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_MTP_EXT_WRITE_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_ENUMERATION_END_FIND: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_ENUMERATION_FIND_NEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_ENUMERATION_START_FIND: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_COMMIT_OBJECT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_COPY_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_CREATE_OBJECT_WITH_PROPERTIES_AND_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_CREATE_OBJECT_WITH_PROPERTIES_ONLY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_DELETE_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_MOVE_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_REVERT_OBJECT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_UPDATE_OBJECT_WITH_PROPERTIES_AND_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_MANAGEMENT_WRITE_OBJECT_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_FORMAT_END: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_FORMAT_NEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_FORMAT_START: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_LIST_END: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_LIST_NEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_GET_VALUES_BY_OBJECT_LIST_START: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_SET_VALUES_BY_OBJECT_LIST_END: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_SET_VALUES_BY_OBJECT_LIST_NEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_BULK_SET_VALUES_BY_OBJECT_LIST_START: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_DELETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_GET: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_GET_ALL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_GET_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_GET_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_PROPERTIES_SET: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_CLOSE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_COMMIT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_CREATE_RESOURCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_DELETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_GET_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_GET_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_OPEN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_REVERT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_SEEK: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_SEEK_IN_UNITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_OBJECT_RESOURCES_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_PROCESS_WIRELESS_PROFILE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x78f9c6fc_79b8_473c_9060_6bd23dd072c4), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_COMMAND_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_EVENT_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_EVENT_PARAMETER_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_FORMAT_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_FORMAT_PROPERTY_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_FORMAT_RENDERING_PROFILES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_INHERITED_SERVICES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_METHOD_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_METHOD_PARAMETER_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_COMMANDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_EVENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_FORMATS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_FORMAT_PROPERTIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_METHODS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_CAPABILITIES_GET_SUPPORTED_METHODS_BY_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_COMMON_GET_SERVICE_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x322f071d_36ef_477f_b4b5_6f52d734baee), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_METHODS_CANCEL_INVOKE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_METHODS_END_INVOKE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SERVICE_METHODS_START_INVOKE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_SMS_SEND: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_STILL_IMAGE_CAPTURE_INITIATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x4fcd6982_22a2_4b05_a48b_62d38bf27b32), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_STORAGE_EJECT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xd8f907a6_34cc_45fa_97fb_d007fa47ec94), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMAND_STORAGE_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xd8f907a6_34cc_45fa_97fb_d007fa47ec94), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_BODY_TEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_END_DATETIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_NOTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 7u32 };
pub const WPD_COMMON_INFORMATION_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_PRIORITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_START_DATETIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_COMMON_INFORMATION_SUBJECT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb28ae94b_05a4_4e8e_be01_72cc7e099d8f), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_ANNIVERSARY_DATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 62u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_ASSISTANT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 61u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BIRTHDATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 57u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_EMAIL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 34u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_EMAIL2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 35u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_FAX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 45u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_FULL_POSTAL_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 17u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_PHONE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 40u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_PHONE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 41u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_CITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 20u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_COUNTRY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 23u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_LINE1: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 18u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_LINE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 19u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_POSTAL_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 22u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_POSTAL_ADDRESS_REGION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 21u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_BUSINESS_WEB_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 50u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_CHILDREN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 60u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_COMPANY_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 54u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_DISPLAY_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_FIRST_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_INSTANT_MESSENGER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 51u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_INSTANT_MESSENGER2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 52u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_INSTANT_MESSENGER3: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 53u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_LAST_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_MIDDLE_NAMES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_MOBILE_PHONE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 42u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_MOBILE_PHONE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 43u32,
};
pub const WPD_CONTACT_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_EMAILS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 36u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_FULL_POSTAL_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 24u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_PHONES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 47u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_CITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 27u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE1: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 25u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_LINE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 26u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_POSTAL_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 29u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_POSTAL_COUNTRY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 30u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_OTHER_POSTAL_ADDRESS_REGION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 28u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PAGER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 46u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_EMAIL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 32u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_EMAIL2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 33u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_FAX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 44u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_FULL_POSTAL_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_PHONE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 38u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_PHONE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 39u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_CITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_COUNTRY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_LINE1: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_LINE2: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_POSTAL_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_POSTAL_ADDRESS_REGION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PERSONAL_WEB_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 49u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PHONETIC_COMPANY_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 55u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PHONETIC_FIRST_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PHONETIC_LAST_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PREFIX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PRIMARY_EMAIL_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 31u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PRIMARY_FAX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 58u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PRIMARY_PHONE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 37u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_PRIMARY_WEB_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 48u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_RINGTONE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 63u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_ROLE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 56u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_SPOUSE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b),
pid: 59u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_CONTACT_SUFFIX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xfbd4fdab_987d_4777_b3f9_726185a9312b), pid: 7u32 };
pub const WPD_CONTENT_TYPE_ALL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x80e170d2_1055_4a3e_b952_82cc4f8a8689);
pub const WPD_CONTENT_TYPE_APPOINTMENT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0fed060e_8793_4b1e_90c9_48ac389ac631);
pub const WPD_CONTENT_TYPE_AUDIO: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4ad2c85e_5e2d_45e5_8864_4f229e3c6cf0);
pub const WPD_CONTENT_TYPE_AUDIO_ALBUM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa18737e_5009_48fa_ae21_85f24383b4e6);
pub const WPD_CONTENT_TYPE_CALENDAR: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1fd5967_6023_49a0_9df1_f8060be751b0);
pub const WPD_CONTENT_TYPE_CERTIFICATE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc3876e8_a948_4060_9050_cbd77e8a3d87);
pub const WPD_CONTENT_TYPE_CONTACT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeaba8313_4525_4707_9f0e_87c6808e9435);
pub const WPD_CONTENT_TYPE_CONTACT_GROUP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x346b8932_4c36_40d8_9415_1828291f9de9);
pub const WPD_CONTENT_TYPE_DOCUMENT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x680adf52_950a_4041_9b41_65e393648155);
pub const WPD_CONTENT_TYPE_EMAIL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8038044a_7e51_4f8f_883d_1d0623d14533);
pub const WPD_CONTENT_TYPE_FOLDER: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27e2e392_a111_48e0_ab0c_e17705a05f85);
pub const WPD_CONTENT_TYPE_FUNCTIONAL_OBJECT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99ed0160_17ff_4c44_9d98_1d7a6f941921);
pub const WPD_CONTENT_TYPE_GENERIC_FILE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0085e0a6_8d34_45d7_bc5c_447e59c73d48);
pub const WPD_CONTENT_TYPE_GENERIC_MESSAGE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe80eaaf8_b2db_4133_b67e_1bef4b4a6e5f);
pub const WPD_CONTENT_TYPE_IMAGE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef2107d5_a52a_4243_a26b_62d4176d7603);
pub const WPD_CONTENT_TYPE_IMAGE_ALBUM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75793148_15f5_4a30_a813_54ed8a37e226);
pub const WPD_CONTENT_TYPE_MEDIA_CAST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e88b3cc_3e65_4e62_bfff_229495253ab0);
pub const WPD_CONTENT_TYPE_MEMO: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9cd20ecf_3b50_414f_a641_e473ffe45751);
pub const WPD_CONTENT_TYPE_MIXED_CONTENT_ALBUM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00f0c3ac_a593_49ac_9219_24abca5a2563);
pub const WPD_CONTENT_TYPE_NETWORK_ASSOCIATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x031da7ee_18c8_4205_847e_89a11261d0f3);
pub const WPD_CONTENT_TYPE_PLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a33f7e4_af13_48f5_994e_77369dfe04a3);
pub const WPD_CONTENT_TYPE_PROGRAM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd269f96a_247c_4bff_98fb_97f3c49220e6);
pub const WPD_CONTENT_TYPE_SECTION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x821089f5_1d91_4dc9_be3c_bbb1b35b18ce);
pub const WPD_CONTENT_TYPE_TASK: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x63252f2c_887f_4cb6_b1ac_d29855dcef6c);
pub const WPD_CONTENT_TYPE_TELEVISION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x60a169cf_f2ae_4e21_9375_9677f11c1c6e);
pub const WPD_CONTENT_TYPE_UNSPECIFIED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x28d8d31e_249c_454e_aabc_34883168e634);
pub const WPD_CONTENT_TYPE_VIDEO: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9261b03c_3d78_4519_85e3_02c5e1f50bb9);
pub const WPD_CONTENT_TYPE_VIDEO_ALBUM: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x012b0db7_d4c1_45d6_b081_94b87779614f);
pub const WPD_CONTENT_TYPE_WIRELESS_PROFILE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bac070a_9f5f_4da4_a8f6_3de44d68fd6c);
pub const WPD_CONTROL_FUNCTION_GENERIC_MESSAGE: u32 = 66u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_CROPPED_STATUS_VALUES(pub i32);
pub const WPD_CROPPED_STATUS_NOT_CROPPED: WPD_CROPPED_STATUS_VALUES = WPD_CROPPED_STATUS_VALUES(0i32);
pub const WPD_CROPPED_STATUS_CROPPED: WPD_CROPPED_STATUS_VALUES = WPD_CROPPED_STATUS_VALUES(1i32);
pub const WPD_CROPPED_STATUS_SHOULD_NOT_BE_CROPPED: WPD_CROPPED_STATUS_VALUES = WPD_CROPPED_STATUS_VALUES(2i32);
impl ::core::convert::From<i32> for WPD_CROPPED_STATUS_VALUES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_CROPPED_STATUS_VALUES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_DATETIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_EDP_IDENTITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x6c2b878c_c2ec_490d_b425_d7a75e23e5ed), pid: 1u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_FIRMWARE_VERSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_FRIENDLY_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_FUNCTIONAL_UNIQUE_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x463dd662_7fc4_4291_911c_7f4c9cca9799), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_MANUFACTURER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_MODEL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_MODEL_UNIQUE_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x463dd662_7fc4_4291_911c_7f4c9cca9799), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_NETWORK_IDENTIFIER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_POWER_LEVEL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_POWER_SOURCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 5u32 };
pub const WPD_DEVICE_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc);
pub const WPD_DEVICE_PROPERTIES_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x463dd662_7fc4_4291_911c_7f4c9cca9799);
pub const WPD_DEVICE_PROPERTIES_V3: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6c2b878c_c2ec_490d_b425_d7a75e23e5ed);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_PROTOCOL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_SERIAL_NUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_SUPPORTED_DRM_SCHEMES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_SUPPORTED_FORMATS_ARE_ORDERED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_SUPPORTS_NON_CONSUMABLE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_SYNC_PARTNER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_TRANSPORT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x463dd662_7fc4_4291_911c_7f4c9cca9799), pid: 4u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_DEVICE_TRANSPORTS(pub i32);
pub const WPD_DEVICE_TRANSPORT_UNSPECIFIED: WPD_DEVICE_TRANSPORTS = WPD_DEVICE_TRANSPORTS(0i32);
pub const WPD_DEVICE_TRANSPORT_USB: WPD_DEVICE_TRANSPORTS = WPD_DEVICE_TRANSPORTS(1i32);
pub const WPD_DEVICE_TRANSPORT_IP: WPD_DEVICE_TRANSPORTS = WPD_DEVICE_TRANSPORTS(2i32);
pub const WPD_DEVICE_TRANSPORT_BLUETOOTH: WPD_DEVICE_TRANSPORTS = WPD_DEVICE_TRANSPORTS(3i32);
impl ::core::convert::From<i32> for WPD_DEVICE_TRANSPORTS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_DEVICE_TRANSPORTS {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x26d4979a_e643_4626_9e2b_736dc0c92fdc),
pid: 15u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_DEVICE_TYPES(pub i32);
pub const WPD_DEVICE_TYPE_GENERIC: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(0i32);
pub const WPD_DEVICE_TYPE_CAMERA: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(1i32);
pub const WPD_DEVICE_TYPE_MEDIA_PLAYER: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(2i32);
pub const WPD_DEVICE_TYPE_PHONE: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(3i32);
pub const WPD_DEVICE_TYPE_VIDEO: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(4i32);
pub const WPD_DEVICE_TYPE_PERSONAL_INFORMATION_MANAGER: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(5i32);
pub const WPD_DEVICE_TYPE_AUDIO_RECORDER: WPD_DEVICE_TYPES = WPD_DEVICE_TYPES(6i32);
impl ::core::convert::From<i32> for WPD_DEVICE_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_DEVICE_TYPES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_DEVICE_USE_DEVICE_STAGE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x463dd662_7fc4_4291_911c_7f4c9cca9799), pid: 5u32 };
pub const WPD_DOCUMENT_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0b110203_eb95_4f02_93e0_97c631493ad5);
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_EFFECT_MODES(pub i32);
pub const WPD_EFFECT_MODE_UNDEFINED: WPD_EFFECT_MODES = WPD_EFFECT_MODES(0i32);
pub const WPD_EFFECT_MODE_COLOR: WPD_EFFECT_MODES = WPD_EFFECT_MODES(1i32);
pub const WPD_EFFECT_MODE_BLACK_AND_WHITE: WPD_EFFECT_MODES = WPD_EFFECT_MODES(2i32);
pub const WPD_EFFECT_MODE_SEPIA: WPD_EFFECT_MODES = WPD_EFFECT_MODES(3i32);
impl ::core::convert::From<i32> for WPD_EFFECT_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_EFFECT_MODES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_BCC_LINE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_CC_LINE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_HAS_ATTACHMENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_HAS_BEEN_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 7u32 };
pub const WPD_EMAIL_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_RECEIVED_TIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_SENDER_ADDRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EMAIL_TO_LINE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x41f8f65a_5484_4782_b13d_4740dd7c37c5), pid: 2u32 };
pub const WPD_EVENT_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x10c96578_2e81_4111_adde_e08ca6138f6d);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_ATTRIBUTE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x10c96578_2e81_4111_adde_e08ca6138f6d), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_ATTRIBUTE_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x10c96578_2e81_4111_adde_e08ca6138f6d), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_ATTRIBUTE_PARAMETERS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x10c96578_2e81_4111_adde_e08ca6138f6d), pid: 3u32 };
pub const WPD_EVENT_DEVICE_CAPABILITIES_UPDATED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x36885aa1_cd54_4daa_b3d0_afb3e03f5999);
pub const WPD_EVENT_DEVICE_REMOVED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe4cbca1b_6918_48b9_85ee_02be7c850af9);
pub const WPD_EVENT_DEVICE_RESET: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7755cf53_c1ed_44f3_b5a2_451e2c376b27);
pub const WPD_EVENT_MTP_VENDOR_EXTENDED_EVENTS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000000_5738_4ff2_8445_be3126691059);
pub const WPD_EVENT_NOTIFICATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2ba2e40a_6b4c_4295_bb43_26322b99aeb2);
pub const WPD_EVENT_OBJECT_ADDED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa726da95_e207_4b02_8d44_bef2e86cbffc);
pub const WPD_EVENT_OBJECT_REMOVED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe82ab88_a52c_4823_96e5_d0272671fc38);
pub const WPD_EVENT_OBJECT_TRANSFER_REQUESTED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8d16a0a1_f2c6_41da_8f19_5e53721adbf2);
pub const WPD_EVENT_OBJECT_UPDATED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1445a759_2e01_485d_9f27_ff07dae697ab);
pub const WPD_EVENT_OPTIONS_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb3d8dad7_a361_4b83_8a48_5b02ce10713b);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_OPTION_IS_AUTOPLAY_EVENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3d8dad7_a361_4b83_8a48_5b02ce10713b), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_OPTION_IS_BROADCAST_EVENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb3d8dad7_a361_4b83_8a48_5b02ce10713b), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_CHILD_HIERARCHY_CHANGED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_EVENT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_OBJECT_CREATION_COOKIE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_OBJECT_PARENT_PERSISTENT_UNIQUE_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_OPERATION_PROGRESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_OPERATION_STATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_PNP_DEVICE_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_EVENT_PARAMETER_SERVICE_METHOD_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x52807b8a_4914_4323_9b9a_74f654b2b846), pid: 2u32 };
pub const WPD_EVENT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x15ab1953_f817_4fef_a921_5676e838f6e0);
pub const WPD_EVENT_PROPERTIES_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x52807b8a_4914_4323_9b9a_74f654b2b846);
pub const WPD_EVENT_SERVICE_METHOD_COMPLETE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8a33f5f8_0acc_4d9b_9cc4_112d353b86ca);
pub const WPD_EVENT_STORAGE_FORMAT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3782616b_22bc_4474_a251_3070f8d38857);
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_EXPOSURE_METERING_MODES(pub i32);
pub const WPD_EXPOSURE_METERING_MODE_UNDEFINED: WPD_EXPOSURE_METERING_MODES = WPD_EXPOSURE_METERING_MODES(0i32);
pub const WPD_EXPOSURE_METERING_MODE_AVERAGE: WPD_EXPOSURE_METERING_MODES = WPD_EXPOSURE_METERING_MODES(1i32);
pub const WPD_EXPOSURE_METERING_MODE_CENTER_WEIGHTED_AVERAGE: WPD_EXPOSURE_METERING_MODES = WPD_EXPOSURE_METERING_MODES(2i32);
pub const WPD_EXPOSURE_METERING_MODE_MULTI_SPOT: WPD_EXPOSURE_METERING_MODES = WPD_EXPOSURE_METERING_MODES(3i32);
pub const WPD_EXPOSURE_METERING_MODE_CENTER_SPOT: WPD_EXPOSURE_METERING_MODES = WPD_EXPOSURE_METERING_MODES(4i32);
impl ::core::convert::From<i32> for WPD_EXPOSURE_METERING_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_EXPOSURE_METERING_MODES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_EXPOSURE_PROGRAM_MODES(pub i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_UNDEFINED: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(0i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_MANUAL: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(1i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_AUTO: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(2i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_APERTURE_PRIORITY: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(3i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_SHUTTER_PRIORITY: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(4i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_CREATIVE: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(5i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_ACTION: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(6i32);
pub const WPD_EXPOSURE_PROGRAM_MODE_PORTRAIT: WPD_EXPOSURE_PROGRAM_MODES = WPD_EXPOSURE_PROGRAM_MODES(7i32);
impl ::core::convert::From<i32> for WPD_EXPOSURE_PROGRAM_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_EXPOSURE_PROGRAM_MODES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_FLASH_MODES(pub i32);
pub const WPD_FLASH_MODE_UNDEFINED: WPD_FLASH_MODES = WPD_FLASH_MODES(0i32);
pub const WPD_FLASH_MODE_AUTO: WPD_FLASH_MODES = WPD_FLASH_MODES(1i32);
pub const WPD_FLASH_MODE_OFF: WPD_FLASH_MODES = WPD_FLASH_MODES(2i32);
pub const WPD_FLASH_MODE_FILL: WPD_FLASH_MODES = WPD_FLASH_MODES(3i32);
pub const WPD_FLASH_MODE_RED_EYE_AUTO: WPD_FLASH_MODES = WPD_FLASH_MODES(4i32);
pub const WPD_FLASH_MODE_RED_EYE_FILL: WPD_FLASH_MODES = WPD_FLASH_MODES(5i32);
pub const WPD_FLASH_MODE_EXTERNAL_SYNC: WPD_FLASH_MODES = WPD_FLASH_MODES(6i32);
impl ::core::convert::From<i32> for WPD_FLASH_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_FLASH_MODES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_FOCUS_METERING_MODES(pub i32);
pub const WPD_FOCUS_METERING_MODE_UNDEFINED: WPD_FOCUS_METERING_MODES = WPD_FOCUS_METERING_MODES(0i32);
pub const WPD_FOCUS_METERING_MODE_CENTER_SPOT: WPD_FOCUS_METERING_MODES = WPD_FOCUS_METERING_MODES(1i32);
pub const WPD_FOCUS_METERING_MODE_MULTI_SPOT: WPD_FOCUS_METERING_MODES = WPD_FOCUS_METERING_MODES(2i32);
impl ::core::convert::From<i32> for WPD_FOCUS_METERING_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_FOCUS_METERING_MODES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_FOCUS_MODES(pub i32);
pub const WPD_FOCUS_UNDEFINED: WPD_FOCUS_MODES = WPD_FOCUS_MODES(0i32);
pub const WPD_FOCUS_MANUAL: WPD_FOCUS_MODES = WPD_FOCUS_MODES(1i32);
pub const WPD_FOCUS_AUTOMATIC: WPD_FOCUS_MODES = WPD_FOCUS_MODES(2i32);
pub const WPD_FOCUS_AUTOMATIC_MACRO: WPD_FOCUS_MODES = WPD_FOCUS_MODES(3i32);
impl ::core::convert::From<i32> for WPD_FOCUS_MODES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_FOCUS_MODES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_FOLDER_CONTENT_TYPES_ALLOWED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7e9a7abf_e568_4b34_aa2f_13bb12ab177d), pid: 2u32 };
pub const WPD_FOLDER_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e9a7abf_e568_4b34_aa2f_13bb12ab177d);
pub const WPD_FORMAT_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa0a02000_bcaf_4be8_b3f5_233f231cf58f);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_FORMAT_ATTRIBUTE_MIMETYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xa0a02000_bcaf_4be8_b3f5_233f231cf58f), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_FORMAT_ATTRIBUTE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xa0a02000_bcaf_4be8_b3f5_233f231cf58f), pid: 2u32 };
pub const WPD_FUNCTIONAL_CATEGORY_ALL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2d8a6512_a74c_448e_ba8a_f4ac07c49399);
pub const WPD_FUNCTIONAL_CATEGORY_AUDIO_CAPTURE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3f2a1919_c7c2_4a00_855d_f57cf06debbb);
pub const WPD_FUNCTIONAL_CATEGORY_DEVICE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08ea466b_e3a4_4336_a1f3_a44d2b5c438c);
pub const WPD_FUNCTIONAL_CATEGORY_NETWORK_CONFIGURATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x48f4db72_7c6a_4ab0_9e1a_470e3cdbf26a);
pub const WPD_FUNCTIONAL_CATEGORY_RENDERING_INFORMATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x08600ba4_a7ba_4a01_ab0e_0065d0a356d3);
pub const WPD_FUNCTIONAL_CATEGORY_SMS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0044a0b1_c1e9_4afd_b358_a62c6117c9cf);
pub const WPD_FUNCTIONAL_CATEGORY_STILL_IMAGE_CAPTURE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x613ca327_ab93_4900_b4fa_895bb5874b79);
pub const WPD_FUNCTIONAL_CATEGORY_STORAGE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x23f05bbc_15de_4c2a_a55b_a9af5ce412ef);
pub const WPD_FUNCTIONAL_CATEGORY_VIDEO_CAPTURE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe23e5f6b_7243_43aa_8df1_0eb3d968a918);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_FUNCTIONAL_OBJECT_CATEGORY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x8f052d93_abca_4fc5_a5ac_b01df4dbe598), pid: 2u32 };
pub const WPD_FUNCTIONAL_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8f052d93_abca_4fc5_a5ac_b01df4dbe598);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_BITDEPTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_COLOR_CORRECTED_STATUS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_CROPPED_STATUS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_EXPOSURE_INDEX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_EXPOSURE_TIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_FNUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_HORIZONTAL_RESOLUTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db), pid: 9u32 };
pub const WPD_IMAGE_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_IMAGE_VERTICAL_RESOLUTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x63d64908_9fa1_479f_85ba_9952216447db),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_ALBUM_ARTIST: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 25u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_ARTIST: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 24u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_AUDIO_ENCODING_PROFILE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 49u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_BITRATE_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_BUY_NOW: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 20u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_BYTE_BOOKMARK: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 36u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_COMPOSER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_COPYRIGHT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_DESCRIPTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 31u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_DESTINATION_URL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 30u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_DURATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 19u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_EFFECTIVE_RATING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_ENCODING_PROFILE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 21u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_GENRE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 32u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_GUID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 38u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_HEIGHT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 23u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_LAST_ACCESSED_TIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_LAST_BUILD_DATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 35u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_MANAGING_EDITOR: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 27u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_META_GENRE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_OBJECT_BOOKMARK: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 34u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_OWNER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 26u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_PARENTAL_RATING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 9u32 };
pub const WPD_MEDIA_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_RELEASE_DATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SAMPLE_RATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SKIP_COUNT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SOURCE_URL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 29u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_STAR_RATING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SUBSCRIPTION_CONTENT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SUB_DESCRIPTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 39u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_SUB_TITLE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_TIME_BOOKMARK: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 33u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_TIME_TO_LIVE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 37u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_TITLE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 18u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_TOTAL_BITRATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_USER_EFFECTIVE_RATING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 17u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_USE_COUNT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_WEBMASTER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 28u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MEDIA_WIDTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2ed8ba05_0ad3_42dc_b0d0_bc95ac396ac8),
pid: 22u32,
};
pub const WPD_MEMO_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ffbfc7b_7483_41ad_afb9_da3f4e592b8d);
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_META_GENRES(pub i32);
pub const WPD_META_GENRE_UNUSED: WPD_META_GENRES = WPD_META_GENRES(0i32);
pub const WPD_META_GENRE_GENERIC_MUSIC_AUDIO_FILE: WPD_META_GENRES = WPD_META_GENRES(1i32);
pub const WPD_META_GENRE_GENERIC_NON_MUSIC_AUDIO_FILE: WPD_META_GENRES = WPD_META_GENRES(17i32);
pub const WPD_META_GENRE_SPOKEN_WORD_AUDIO_BOOK_FILES: WPD_META_GENRES = WPD_META_GENRES(18i32);
pub const WPD_META_GENRE_SPOKEN_WORD_FILES_NON_AUDIO_BOOK: WPD_META_GENRES = WPD_META_GENRES(19i32);
pub const WPD_META_GENRE_SPOKEN_WORD_NEWS: WPD_META_GENRES = WPD_META_GENRES(20i32);
pub const WPD_META_GENRE_SPOKEN_WORD_TALK_SHOWS: WPD_META_GENRES = WPD_META_GENRES(21i32);
pub const WPD_META_GENRE_GENERIC_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(33i32);
pub const WPD_META_GENRE_NEWS_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(34i32);
pub const WPD_META_GENRE_MUSIC_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(35i32);
pub const WPD_META_GENRE_HOME_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(36i32);
pub const WPD_META_GENRE_FEATURE_FILM_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(37i32);
pub const WPD_META_GENRE_TELEVISION_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(38i32);
pub const WPD_META_GENRE_TRAINING_EDUCATIONAL_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(39i32);
pub const WPD_META_GENRE_PHOTO_MONTAGE_VIDEO_FILE: WPD_META_GENRES = WPD_META_GENRES(40i32);
pub const WPD_META_GENRE_GENERIC_NON_AUDIO_NON_VIDEO: WPD_META_GENRES = WPD_META_GENRES(48i32);
pub const WPD_META_GENRE_AUDIO_PODCAST: WPD_META_GENRES = WPD_META_GENRES(64i32);
pub const WPD_META_GENRE_VIDEO_PODCAST: WPD_META_GENRES = WPD_META_GENRES(65i32);
pub const WPD_META_GENRE_MIXED_PODCAST: WPD_META_GENRES = WPD_META_GENRES(66i32);
impl ::core::convert::From<i32> for WPD_META_GENRES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_META_GENRES {
type Abi = Self;
}
pub const WPD_METHOD_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf17a5071_f039_44af_8efe_432cf32e432a);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_METHOD_ATTRIBUTE_ACCESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf17a5071_f039_44af_8efe_432cf32e432a), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_METHOD_ATTRIBUTE_ASSOCIATED_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf17a5071_f039_44af_8efe_432cf32e432a), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_METHOD_ATTRIBUTE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf17a5071_f039_44af_8efe_432cf32e432a), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_METHOD_ATTRIBUTE_PARAMETERS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf17a5071_f039_44af_8efe_432cf32e432a), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MUSIC_ALBUM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MUSIC_LYRICS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MUSIC_MOOD: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6), pid: 8u32 };
pub const WPD_MUSIC_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_MUSIC_TRACK: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb324f56a_dc5d_46e5_b6df_d2ea414888c6), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_NETWORK_ASSOCIATION_HOST_NETWORK_IDENTIFIERS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe4c93c1f_b203_43f1_a100_5a07d11b0274), pid: 2u32 };
pub const WPD_NETWORK_ASSOCIATION_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe4c93c1f_b203_43f1_a100_5a07d11b0274);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_NETWORK_ASSOCIATION_X509V3SEQUENCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe4c93c1f_b203_43f1_a100_5a07d11b0274), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_BACK_REFERENCES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 21u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_CAN_DELETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 26u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_CONTAINER_FUNCTIONAL_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 23u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_CONTENT_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_DATE_AUTHORED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 20u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_DATE_CREATED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 18u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_DATE_MODIFIED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 19u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 6u32 };
pub const WPD_OBJECT_FORMAT_3G2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9850000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_3G2A: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a11202d_8759_4e34_ba5e_b1211087eee4);
pub const WPD_OBJECT_FORMAT_3GP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9840000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_3GPA: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5172730_f971_41ef_a10b_2271a0019d7a);
pub const WPD_OBJECT_FORMAT_AAC: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ABSTRACT_CONTACT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbb810000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ABSTRACT_CONTACT_GROUP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba060000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ABSTRACT_MEDIA_CAST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba0b0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_AIFF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30070000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ALL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc1f62eb2_4bb3_479c_9cfa_05b5f3a57b22);
pub const WPD_OBJECT_FORMAT_AMR: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9080000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ASF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x300c0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ASXPLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba130000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ATSCTS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9870000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_AUDIBLE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9040000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_AVCHD: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9860000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_AVI: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x300a0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_BMP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38040000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_CIFF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38050000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_DPOF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30060000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_DVBTS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9880000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_EXECUTABLE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_EXIF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38010000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_FLAC: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9060000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_FLASHPIX: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_GIF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38070000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_HTML: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30050000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ICALENDAR: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_ICON: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x077232ed_102c_4638_9c22_83f142bfc822);
pub const WPD_OBJECT_FORMAT_JFIF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38080000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_JP2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380f0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_JPEGXR: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8040000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_JPX: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38100000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_M3UPLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba110000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_M4A: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30aba7ac_6ffd_4c23_a359_3e9b52f3f1c8);
pub const WPD_OBJECT_FORMAT_MHT_COMPILED_HTML: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba840000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MICROSOFT_EXCEL: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba850000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MICROSOFT_POWERPOINT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba860000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MICROSOFT_WFC: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1040000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MICROSOFT_WORD: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba830000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MKV: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9900000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MP2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9830000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MP3: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30090000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MP4: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9820000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MPEG: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x300b0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_MPLPLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba120000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_NETWORK_ASSOCIATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1020000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_OGG: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9020000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_PCD: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38090000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_PICT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380a0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_PLSPLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba140000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_PNG: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380b0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_PROPERTIES_ONLY: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30010000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_QCELP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9070000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_SCRIPT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30020000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_TEXT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30040000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_TIFF: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380d0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_TIFFEP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38020000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_TIFFIT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x380e0000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_UNSPECIFIED: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30000000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_VCALENDAR1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe020000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_VCARD2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbb820000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_VCARD3: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbb830000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WAVE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x30080000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WBMP: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WINDOWSIMAGEFORMAT: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb8810000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WMA: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9010000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WMV: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb9810000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_WPLPLAYLIST: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba100000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_X509V3CERTIFICATE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb1030000_ae6c_4804_98ba_c57b46965fe7);
pub const WPD_OBJECT_FORMAT_XML: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xba820000_ae6c_4804_98ba_c57b46965fe7);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_GENERATE_THUMBNAIL_FROM_RESOURCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 24u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_HINT_LOCATION_DISPLAY_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 25u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_ISHIDDEN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_ISSYSTEM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_IS_DRM_PROTECTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 17u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_KEYWORDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_LANGUAGE_LOCALE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 27u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_NON_CONSUMABLE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_ORIGINAL_FILE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_PARENT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_PERSISTENT_UNIQUE_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c), pid: 5u32 };
pub const WPD_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c);
pub const WPD_OBJECT_PROPERTIES_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0373cd3d_4a46_40d7_b4d8_73e8da74e775);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_REFERENCES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_SUPPORTED_UNITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x0373cd3d_4a46_40d7_b4d8_73e8da74e775), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OBJECT_SYNC_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef6b490d_5cd8_437a_affc_da8b60ee4a3c),
pid: 16u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_OPERATION_STATES(pub i32);
pub const WPD_OPERATION_STATE_UNSPECIFIED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(0i32);
pub const WPD_OPERATION_STATE_STARTED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(1i32);
pub const WPD_OPERATION_STATE_RUNNING: WPD_OPERATION_STATES = WPD_OPERATION_STATES(2i32);
pub const WPD_OPERATION_STATE_PAUSED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(3i32);
pub const WPD_OPERATION_STATE_CANCELLED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(4i32);
pub const WPD_OPERATION_STATE_FINISHED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(5i32);
pub const WPD_OPERATION_STATE_ABORTED: WPD_OPERATION_STATES = WPD_OPERATION_STATES(6i32);
impl ::core::convert::From<i32> for WPD_OPERATION_STATES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_OPERATION_STATES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_OBJECT_MANAGEMENT_RECURSIVE_DELETE_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 5001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_OBJECT_RESOURCES_NO_INPUT_BUFFER_ON_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 5003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_OBJECT_RESOURCES_SEEK_ON_READ_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 5001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_OBJECT_RESOURCES_SEEK_ON_WRITE_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 5002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_SMS_BINARY_MESSAGE_SUPPORTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1),
pid: 5001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_OPTION_VALID_OBJECT_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 5001u32,
};
pub const WPD_PARAMETER_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_DEFAULT_VALUE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_ENUMERATION_ELEMENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_FORM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_MAX_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_ORDER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_RANGE_MAX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_RANGE_MIN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_RANGE_STEP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_REGULAR_EXPRESSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_USAGE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PARAMETER_ATTRIBUTE_VARTYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe6864dd7_f325_45ea_a1d5_97cf73b6ca58),
pid: 12u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_PARAMETER_USAGE_TYPES(pub i32);
pub const WPD_PARAMETER_USAGE_RETURN: WPD_PARAMETER_USAGE_TYPES = WPD_PARAMETER_USAGE_TYPES(0i32);
pub const WPD_PARAMETER_USAGE_IN: WPD_PARAMETER_USAGE_TYPES = WPD_PARAMETER_USAGE_TYPES(1i32);
pub const WPD_PARAMETER_USAGE_OUT: WPD_PARAMETER_USAGE_TYPES = WPD_PARAMETER_USAGE_TYPES(2i32);
pub const WPD_PARAMETER_USAGE_INOUT: WPD_PARAMETER_USAGE_TYPES = WPD_PARAMETER_USAGE_TYPES(3i32);
impl ::core::convert::From<i32> for WPD_PARAMETER_USAGE_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_PARAMETER_USAGE_TYPES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_POWER_SOURCES(pub i32);
pub const WPD_POWER_SOURCE_BATTERY: WPD_POWER_SOURCES = WPD_POWER_SOURCES(0i32);
pub const WPD_POWER_SOURCE_EXTERNAL: WPD_POWER_SOURCES = WPD_POWER_SOURCES(1i32);
impl ::core::convert::From<i32> for WPD_POWER_SOURCES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_POWER_SOURCES {
type Abi = Self;
}
pub const WPD_PROPERTIES_MTP_VENDOR_EXTENDED_DEVICE_PROPS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4d545058_8900_40b3_8f1d_dc246e1e8370);
pub const WPD_PROPERTIES_MTP_VENDOR_EXTENDED_OBJECT_PROPS: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4d545058_4fce_4578_95c8_8698a9bc0f49);
pub const WPD_PROPERTY_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37);
pub const WPD_PROPERTY_ATTRIBUTES_V2: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5d9da160_74ae_43cc_85a9_fe555a80798e);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_CAN_DELETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_CAN_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_CAN_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_DEFAULT_VALUE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_ENUMERATION_ELEMENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_FAST_PROPERTY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_FORM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_MAX_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x5d9da160_74ae_43cc_85a9_fe555a80798e), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_RANGE_MAX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_RANGE_MIN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_RANGE_STEP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_REGULAR_EXPRESSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xab7943d8_6332_445f_a00d_8d5ef1e96f37),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_ATTRIBUTE_VARTYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x5d9da160_74ae_43cc_85a9_fe555a80798e), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_COMMAND: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_COMMAND_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_CONTENT_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_CONTENT_TYPES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_EVENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1014u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_EVENT_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1015u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_FORMATS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_FUNCTIONAL_CATEGORIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_FUNCTIONAL_CATEGORY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_FUNCTIONAL_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_PROPERTY_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1012u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_PROPERTY_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_SUPPORTED_COMMANDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CAPABILITIES_SUPPORTED_EVENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0cabec78_6b74_41c6_9216_2639d1fce356),
pid: 1013u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CLASS_EXTENSION_DEVICE_INFORMATION_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x33fb0d11_64a3_4fac_b4c7_3dfeaa99b051),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CLASS_EXTENSION_DEVICE_INFORMATION_WRITE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x33fb0d11_64a3_4fac_b4c7_3dfeaa99b051),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CLASS_EXTENSION_SERVICE_INTERFACES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CLASS_EXTENSION_SERVICE_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_CLASS_EXTENSION_SERVICE_REGISTRATION_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x7f0779b5_fa2b_4766_9cb2_f73ba30b6758),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_ACTIVITY_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_CLIENT_INFORMATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_CLIENT_INFORMATION_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_COMMAND_CATEGORY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_COMMAND_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_COMMAND_TARGET: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_DRIVER_ERROR_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_HRESULT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_OBJECT_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_COMMON_PERSISTENT_UNIQUE_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xf0422a9c_5dc8_4440_b5bd_5df28835658a),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_DEVICE_HINTS_CONTENT_LOCATIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0d5fb92b_cb46_4c4f_8343_0bc3d3f17c84),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_DEVICE_HINTS_CONTENT_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x0d5fb92b_cb46_4c4f_8343_0bc3d3f17c84),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_EVENT_PARAMS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_ef88_4e4d_95c3_4f327f728a96),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_OPERATION_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_OPERATION_PARAMS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_OPTIMAL_TRANSFER_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1013u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_RESPONSE_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_RESPONSE_PARAMS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1012u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_NUM_BYTES_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_NUM_BYTES_TO_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_NUM_BYTES_TO_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_NUM_BYTES_WRITTEN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_TRANSFER_TOTAL_DATA_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_VENDOR_EXTENSION_DESCRIPTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1014u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_MTP_EXT_VENDOR_OPERATION_CODES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x4d545058_1a2e_4106_a357_771e0819fc56),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_NULL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x00000000_0000_0000_0000_000000000000), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_ENUMERATION_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_ENUMERATION_FILTER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_ENUMERATION_NUM_OBJECTS_REQUESTED: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_ENUMERATION_OBJECT_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_ENUMERATION_PARENT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb7474e91_e7f8_4ad9_b400_ad1a4b58eeec),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_COPY_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1013u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_CREATION_PROPERTIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_DELETE_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_DELETE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_DESTINATION_FOLDER_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_MOVE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1012u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_NUM_BYTES_TO_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_NUM_BYTES_WRITTEN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_OBJECT_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1016u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_OBJECT_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_OPTIMAL_TRANSFER_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_PROPERTY_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1015u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_MANAGEMENT_UPDATE_PROPERTIES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xef1e43dd_a9ed_4341_8bcc_186192aea089),
pid: 1014u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_DEPTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_OBJECT_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_OBJECT_IDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_PARENT_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_PROPERTY_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_BULK_WRITE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x11c824dd_04cd_4e4e_8c7b_f6efb794d84e),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_DELETE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_WRITE_RESULTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x9e5582e4_0814_44e6_981a_b2998d583804),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_ACCESS_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_DATA: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_NUM_BYTES_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_NUM_BYTES_TO_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_NUM_BYTES_TO_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_NUM_BYTES_WRITTEN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_OPTIMAL_TRANSFER_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_POSITION_FROM_START: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1014u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_RESOURCE_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_RESOURCE_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_SEEK_OFFSET: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1012u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_SEEK_ORIGIN_FLAG: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1013u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_STREAM_UNITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1016u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_OBJECT_RESOURCES_SUPPORTS_UNITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xb3a2b22d_a595_4108_be0a_fc3c965f3d4a),
pid: 1015u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_PUBLIC_KEY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x78f9c6fc_79b8_473c_9060_6bd23dd072c4),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_COMMAND: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1018u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_COMMAND_OPTIONS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1019u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_EVENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1012u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_EVENT_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1013u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_FORMATS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1007u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_FORMAT_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1008u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_INHERITANCE_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1014u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_INHERITED_SERVICES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1015u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_METHOD: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_METHOD_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_PARAMETER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_PARAMETER_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1006u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_PROPERTY_ATTRIBUTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1010u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_PROPERTY_KEYS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1009u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_RENDERING_PROFILES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1016u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_SUPPORTED_COMMANDS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1017u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_SUPPORTED_EVENTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1011u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_CAPABILITIES_SUPPORTED_METHODS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x24457e74_2e9f_44f9_8c57_1d1bcb170b89),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_METHOD: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_METHOD_CONTEXT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_METHOD_HRESULT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc),
pid: 1005u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_METHOD_PARAMETER_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_METHOD_RESULT_VALUES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x2d521ca8_c1b0_4268_a342_cf19321569bc),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SERVICE_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x322f071d_36ef_477f_b4b5_6f52d734baee),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SMS_BINARY_MESSAGE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1),
pid: 1004u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SMS_MESSAGE_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SMS_RECIPIENT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1),
pid: 1001u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_SMS_TEXT_MESSAGE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xafc25d66_fe0d_4114_9097_970c93e920d1),
pid: 1003u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_STORAGE_DESTINATION_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xd8f907a6_34cc_45fa_97fb_d007fa47ec94),
pid: 1002u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_PROPERTY_STORAGE_OBJECT_ID: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xd8f907a6_34cc_45fa_97fb_d007fa47ec94),
pid: 1001u32,
};
pub const WPD_RENDERING_INFORMATION_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc53d039f_ee23_4a31_8590_7639879870b4);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RENDERING_INFORMATION_PROFILES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xc53d039f_ee23_4a31_8590_7639879870b4), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RENDERING_INFORMATION_PROFILE_ENTRY_CREATABLE_RESOURCES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xc53d039f_ee23_4a31_8590_7639879870b4), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xc53d039f_ee23_4a31_8590_7639879870b4), pid: 3u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES(pub i32);
pub const WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPE_OBJECT: WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES = WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES(0i32);
pub const WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPE_RESOURCE: WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES = WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES(1i32);
impl ::core::convert::From<i32> for WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_RENDERING_INFORMATION_PROFILE_ENTRY_TYPES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ALBUM_ART: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf02aa354_2300_4e2d_a1b9_3b6730f7fa21), pid: 0u32 };
pub const WPD_RESOURCE_ATTRIBUTES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_CAN_DELETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_CAN_READ: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_CAN_WRITE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_OPTIMAL_READ_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_OPTIMAL_WRITE_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_RESOURCE_KEY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ATTRIBUTE_TOTAL_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x1eb6f604_9278_429f_93cc_5bb8c06656b6), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_AUDIO_CLIP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x3bc13982_85b1_48e0_95a6_8d3ad06be117), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_BRANDING_ART: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb633b1ae_6caf_4a87_9589_22ded6dd5899), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_CONTACT_PHOTO: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x2c4d6803_80ea_4580_af9a_5be1a23eddcb), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_DEFAULT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe81e79be_34f0_41bf_b53f_f1a06ae87842), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_GENERIC: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb9b9f515_ba70_4647_94dc_fa4925e95a07), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_ICON: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xf195fed8_aa28_4ee3_b153_e182dd5edc39), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_THUMBNAIL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xc7c407ba_98fa_46b5_9960_23fec124cfde), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_RESOURCE_VIDEO_CLIP: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xb566ee42_6368_4290_8662_70182fb79f20), pid: 0u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SECTION_DATA_LENGTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x516afd2b_c64e_44f0_98dc_bee1c88f7d66), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SECTION_DATA_OFFSET: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x516afd2b_c64e_44f0_98dc_bee1c88f7d66), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SECTION_DATA_REFERENCED_OBJECT_RESOURCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x516afd2b_c64e_44f0_98dc_bee1c88f7d66), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SECTION_DATA_UNITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x516afd2b_c64e_44f0_98dc_bee1c88f7d66), pid: 4u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_SECTION_DATA_UNITS_VALUES(pub i32);
pub const WPD_SECTION_DATA_UNITS_BYTES: WPD_SECTION_DATA_UNITS_VALUES = WPD_SECTION_DATA_UNITS_VALUES(0i32);
pub const WPD_SECTION_DATA_UNITS_MILLISECONDS: WPD_SECTION_DATA_UNITS_VALUES = WPD_SECTION_DATA_UNITS_VALUES(1i32);
impl ::core::convert::From<i32> for WPD_SECTION_DATA_UNITS_VALUES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_SECTION_DATA_UNITS_VALUES {
type Abi = Self;
}
pub const WPD_SECTION_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x516afd2b_c64e_44f0_98dc_bee1c88f7d66);
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_SERVICE_INHERITANCE_TYPES(pub i32);
pub const WPD_SERVICE_INHERITANCE_IMPLEMENTATION: WPD_SERVICE_INHERITANCE_TYPES = WPD_SERVICE_INHERITANCE_TYPES(0i32);
impl ::core::convert::From<i32> for WPD_SERVICE_INHERITANCE_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_SERVICE_INHERITANCE_TYPES {
type Abi = Self;
}
pub const WPD_SERVICE_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7510698a_cb54_481c_b8db_0d75c93f1c06);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SERVICE_VERSION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7510698a_cb54_481c_b8db_0d75c93f1c06), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SMS_ENCODING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7e1074cc_50ff_4dd1_a742_53be6f093a0d), pid: 5u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_SMS_ENCODING_TYPES(pub i32);
pub const SMS_ENCODING_7_BIT: WPD_SMS_ENCODING_TYPES = WPD_SMS_ENCODING_TYPES(0i32);
pub const SMS_ENCODING_8_BIT: WPD_SMS_ENCODING_TYPES = WPD_SMS_ENCODING_TYPES(1i32);
pub const SMS_ENCODING_UTF_16: WPD_SMS_ENCODING_TYPES = WPD_SMS_ENCODING_TYPES(2i32);
impl ::core::convert::From<i32> for WPD_SMS_ENCODING_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_SMS_ENCODING_TYPES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SMS_MAX_PAYLOAD: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7e1074cc_50ff_4dd1_a742_53be6f093a0d), pid: 4u32 };
pub const WPD_SMS_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7e1074cc_50ff_4dd1_a742_53be6f093a0d);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SMS_PROVIDER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7e1074cc_50ff_4dd1_a742_53be6f093a0d), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_SMS_TIMEOUT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x7e1074cc_50ff_4dd1_a742_53be6f093a0d), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_ARTIST: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 29u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_BURST_INTERVAL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 24u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_BURST_NUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 23u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAMERA_MANUFACTURER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 31u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAMERA_MODEL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 30u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAPTURE_DELAY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 17u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAPTURE_FORMAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAPTURE_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 18u32,
};
pub const WPD_STILL_IMAGE_CAPTURE_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CAPTURE_RESOLUTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_COMPRESSION_SETTING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_CONTRAST: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 19u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_DIGITAL_ZOOM: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 21u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EFFECT_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 22u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EXPOSURE_BIAS_COMPENSATION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 16u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EXPOSURE_INDEX: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EXPOSURE_METERING_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EXPOSURE_PROGRAM_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_EXPOSURE_TIME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FLASH_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 12u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FNUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FOCAL_LENGTH: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FOCUS_DISTANCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FOCUS_METERING_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 27u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_FOCUS_MODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_RGB_GAIN: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_SHARPNESS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 20u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_TIMELAPSE_INTERVAL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 26u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_TIMELAPSE_NUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 25u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_UPLOAD_URL: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260),
pid: 28u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STILL_IMAGE_WHITE_BALANCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x58c571ec_1bcb_42a7_8ac5_bb291573a260), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_ACCESS_CAPABILITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a),
pid: 11u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_STORAGE_ACCESS_CAPABILITY_VALUES(pub i32);
pub const WPD_STORAGE_ACCESS_CAPABILITY_READWRITE: WPD_STORAGE_ACCESS_CAPABILITY_VALUES = WPD_STORAGE_ACCESS_CAPABILITY_VALUES(0i32);
pub const WPD_STORAGE_ACCESS_CAPABILITY_READ_ONLY_WITHOUT_OBJECT_DELETION: WPD_STORAGE_ACCESS_CAPABILITY_VALUES = WPD_STORAGE_ACCESS_CAPABILITY_VALUES(1i32);
pub const WPD_STORAGE_ACCESS_CAPABILITY_READ_ONLY_WITH_OBJECT_DELETION: WPD_STORAGE_ACCESS_CAPABILITY_VALUES = WPD_STORAGE_ACCESS_CAPABILITY_VALUES(2i32);
impl ::core::convert::From<i32> for WPD_STORAGE_ACCESS_CAPABILITY_VALUES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_STORAGE_ACCESS_CAPABILITY_VALUES {
type Abi = Self;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_CAPACITY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_CAPACITY_IN_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_DESCRIPTION: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_FILE_SYSTEM_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 3u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_FREE_SPACE_IN_BYTES: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_FREE_SPACE_IN_OBJECTS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_MAX_OBJECT_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 9u32 };
pub const WPD_STORAGE_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_SERIAL_NUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_STORAGE_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x01a3057a_74d6_4e80_bea7_dc4c212ce50a), pid: 2u32 };
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_STORAGE_TYPE_VALUES(pub i32);
pub const WPD_STORAGE_TYPE_UNDEFINED: WPD_STORAGE_TYPE_VALUES = WPD_STORAGE_TYPE_VALUES(0i32);
pub const WPD_STORAGE_TYPE_FIXED_ROM: WPD_STORAGE_TYPE_VALUES = WPD_STORAGE_TYPE_VALUES(1i32);
pub const WPD_STORAGE_TYPE_REMOVABLE_ROM: WPD_STORAGE_TYPE_VALUES = WPD_STORAGE_TYPE_VALUES(2i32);
pub const WPD_STORAGE_TYPE_FIXED_RAM: WPD_STORAGE_TYPE_VALUES = WPD_STORAGE_TYPE_VALUES(3i32);
pub const WPD_STORAGE_TYPE_REMOVABLE_RAM: WPD_STORAGE_TYPE_VALUES = WPD_STORAGE_TYPE_VALUES(4i32);
impl ::core::convert::From<i32> for WPD_STORAGE_TYPE_VALUES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_STORAGE_TYPE_VALUES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_STREAM_UNITS(pub i32);
pub const WPD_STREAM_UNITS_BYTES: WPD_STREAM_UNITS = WPD_STREAM_UNITS(0i32);
pub const WPD_STREAM_UNITS_FRAMES: WPD_STREAM_UNITS = WPD_STREAM_UNITS(1i32);
pub const WPD_STREAM_UNITS_ROWS: WPD_STREAM_UNITS = WPD_STREAM_UNITS(2i32);
pub const WPD_STREAM_UNITS_MILLISECONDS: WPD_STREAM_UNITS = WPD_STREAM_UNITS(4i32);
pub const WPD_STREAM_UNITS_MICROSECONDS: WPD_STREAM_UNITS = WPD_STREAM_UNITS(8i32);
impl ::core::convert::From<i32> for WPD_STREAM_UNITS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_STREAM_UNITS {
type Abi = Self;
}
pub const WPD_TASK_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe354e95e_d8a0_4637_a03a_0cb26838dbc7);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_TASK_OWNER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe354e95e_d8a0_4637_a03a_0cb26838dbc7),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_TASK_PERCENT_COMPLETE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe354e95e_d8a0_4637_a03a_0cb26838dbc7), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_TASK_REMINDER_DATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0xe354e95e_d8a0_4637_a03a_0cb26838dbc7),
pid: 10u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_TASK_STATUS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0xe354e95e_d8a0_4637_a03a_0cb26838dbc7), pid: 6u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_AUTHOR: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 2u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_BITRATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 13u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_BUFFER_SIZE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 8u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_CREDITS: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 9u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_FOURCC_CODE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 14u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_FRAMERATE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 15u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_KEY_FRAME_DISTANCE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 10u32,
};
pub const WPD_VIDEO_OBJECT_PROPERTIES_V1: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a);
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_QUALITY_SETTING: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 11u32,
};
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_RECORDEDTV_CHANNEL_NUMBER: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 5u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_RECORDEDTV_REPEAT: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 7u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_RECORDEDTV_STATION_NAME: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a), pid: 4u32 };
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub const WPD_VIDEO_SCAN_TYPE: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
fmtid: ::windows::core::GUID::from_u128(0x346f2163_f998_4146_8b01_d19b4c00de9a),
pid: 12u32,
};
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_VIDEO_SCAN_TYPES(pub i32);
pub const WPD_VIDEO_SCAN_TYPE_UNUSED: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(0i32);
pub const WPD_VIDEO_SCAN_TYPE_PROGRESSIVE: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(1i32);
pub const WPD_VIDEO_SCAN_TYPE_FIELD_INTERLEAVED_UPPER_FIRST: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(2i32);
pub const WPD_VIDEO_SCAN_TYPE_FIELD_INTERLEAVED_LOWER_FIRST: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(3i32);
pub const WPD_VIDEO_SCAN_TYPE_FIELD_SINGLE_UPPER_FIRST: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(4i32);
pub const WPD_VIDEO_SCAN_TYPE_FIELD_SINGLE_LOWER_FIRST: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(5i32);
pub const WPD_VIDEO_SCAN_TYPE_MIXED_INTERLACE: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(6i32);
pub const WPD_VIDEO_SCAN_TYPE_MIXED_INTERLACE_AND_PROGRESSIVE: WPD_VIDEO_SCAN_TYPES = WPD_VIDEO_SCAN_TYPES(7i32);
impl ::core::convert::From<i32> for WPD_VIDEO_SCAN_TYPES {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_VIDEO_SCAN_TYPES {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WPD_WHITE_BALANCE_SETTINGS(pub i32);
pub const WPD_WHITE_BALANCE_UNDEFINED: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(0i32);
pub const WPD_WHITE_BALANCE_MANUAL: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(1i32);
pub const WPD_WHITE_BALANCE_AUTOMATIC: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(2i32);
pub const WPD_WHITE_BALANCE_ONE_PUSH_AUTOMATIC: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(3i32);
pub const WPD_WHITE_BALANCE_DAYLIGHT: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(4i32);
pub const WPD_WHITE_BALANCE_FLORESCENT: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(5i32);
pub const WPD_WHITE_BALANCE_TUNGSTEN: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(6i32);
pub const WPD_WHITE_BALANCE_FLASH: WPD_WHITE_BALANCE_SETTINGS = WPD_WHITE_BALANCE_SETTINGS(7i32);
impl ::core::convert::From<i32> for WPD_WHITE_BALANCE_SETTINGS {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WPD_WHITE_BALANCE_SETTINGS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WpdAttributeForm(pub i32);
pub const WPD_PROPERTY_ATTRIBUTE_FORM_UNSPECIFIED: WpdAttributeForm = WpdAttributeForm(0i32);
pub const WPD_PROPERTY_ATTRIBUTE_FORM_RANGE: WpdAttributeForm = WpdAttributeForm(1i32);
pub const WPD_PROPERTY_ATTRIBUTE_FORM_ENUMERATION: WpdAttributeForm = WpdAttributeForm(2i32);
pub const WPD_PROPERTY_ATTRIBUTE_FORM_REGULAR_EXPRESSION: WpdAttributeForm = WpdAttributeForm(3i32);
pub const WPD_PROPERTY_ATTRIBUTE_FORM_OBJECT_IDENTIFIER: WpdAttributeForm = WpdAttributeForm(4i32);
impl ::core::convert::From<i32> for WpdAttributeForm {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WpdAttributeForm {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct WpdParameterAttributeForm(pub i32);
pub const WPD_PARAMETER_ATTRIBUTE_FORM_UNSPECIFIED: WpdParameterAttributeForm = WpdParameterAttributeForm(0i32);
pub const WPD_PARAMETER_ATTRIBUTE_FORM_RANGE: WpdParameterAttributeForm = WpdParameterAttributeForm(1i32);
pub const WPD_PARAMETER_ATTRIBUTE_FORM_ENUMERATION: WpdParameterAttributeForm = WpdParameterAttributeForm(2i32);
pub const WPD_PARAMETER_ATTRIBUTE_FORM_REGULAR_EXPRESSION: WpdParameterAttributeForm = WpdParameterAttributeForm(3i32);
pub const WPD_PARAMETER_ATTRIBUTE_FORM_OBJECT_IDENTIFIER: WpdParameterAttributeForm = WpdParameterAttributeForm(4i32);
impl ::core::convert::From<i32> for WpdParameterAttributeForm {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for WpdParameterAttributeForm {
type Abi = Self;
}
pub const WpdSerializer: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0b91a74b_ad7c_4a9d_b563_29eef9167172);
|
#![feature(decl_macro)]
#[macro_use] extern crate rocket;
use rocket::http::RawStr;
#[get("/samples?<q>&<s>")]
fn samples(q: &RawStr, s: Option<String>) -> String {
format!("q={}, s={:?}", q, s)
}
fn main() {
rocket::ignite()
.mount("/", routes![samples])
.launch();
}
|
use std::sync::Arc;
use block_format::Block;
use bytes::Bytes;
use cid::{Cid, Codec, IntoExt};
use ipld_format::{FormatError, Link, NavigableNode, Node, NodeStat, Resolver, Result};
pub struct EmptyNode {
cid: Cid,
data: Bytes,
}
impl Default for EmptyNode {
fn default() -> Self {
EmptyNode {
cid: Cid::new_v1(Codec::Raw, multihash::Identity::digest(b"").into_ext()),
data: Bytes::from_static(b""),
}
}
}
impl EmptyNode {
pub fn new() -> Self {
Self::default()
}
}
impl Node for EmptyNode {
fn resolve_link(&self, _path: &[&str]) -> Result<(Link, Vec<String>)> {
unimplemented!()
}
fn links(&self) -> Vec<&Link> {
unimplemented!()
}
fn stat(&self) -> Result<&NodeStat> {
unimplemented!()
}
fn size(&self) -> u64 {
unimplemented!()
}
}
impl Block for EmptyNode {
fn raw_data(&self) -> &Bytes {
&self.data
}
}
impl AsRef<Cid> for EmptyNode {
fn as_ref(&self) -> &Cid {
&self.cid
}
}
impl Resolver for EmptyNode {
type Output = ();
fn resolve(&self, _path: &[&str]) -> Result<(Self::Output, Vec<String>)> {
unimplemented!()
}
fn tree(&self, _path: &str, _depth: Option<usize>) -> Vec<String> {
unimplemented!()
}
}
pub struct N {
pub inner: EmptyNode,
pub child: Vec<Arc<dyn NavigableNode>>,
}
impl NavigableNode for N {
fn child_total(&self) -> usize {
self.child.len()
}
fn fetch_child(&self, child_index: usize) -> Result<Arc<dyn NavigableNode>> {
self.child
.get(child_index)
.cloned()
.ok_or(FormatError::NoChild(child_index))
}
}
|
use std::fmt::Display;
// The type bounds are implemented only where necessary, with the exception of PartialOrd, which is
// in the types, because a binary tree contains inherently orderable data.
//
pub struct BinaryTree<T: PartialOrd> {
node: Option<Box<Node<T>>>,
}
struct Node<T: PartialOrd> {
data: T,
left: BinaryTree<T>,
right: BinaryTree<T>,
}
impl<T: PartialOrd> BinaryTree<T> {
pub fn new() -> BinaryTree<T> {
BinaryTree { node: None }
}
pub fn add(&mut self, data: T) {
if let Some(node) = &mut self.node {
if data < node.data {
node.left.add(data);
} else {
node.right.add(data);
}
} else {
self.node = Some(Box::new(Node {
data,
left: BinaryTree::new(),
right: BinaryTree::new(),
}));
}
}
}
impl<T: PartialOrd> BinaryTree<T> {
// Using an owned vector for the result is purely for convenience.
//
// See lifetimes comment in the balanced tree corresponding function.
//
pub fn sorted_values<'a>(&'a self, out: Vec<&'a T>) -> Vec<&'a T> {
if let Some(node) = &self.node {
let mut out = node.left.sorted_values(out);
out.push(&node.data);
let out = node.right.sorted_values(out);
out
} else {
out
}
}
}
impl<T: PartialOrd + Display> BinaryTree<T> {
pub fn print(&self, depth: usize, buffer: String) -> String {
if let Some(node) = &self.node {
let mut buffer = node.left.print(depth + 1, buffer);
buffer.push_str(&format!("{}{}\n", &".".repeat(depth), node.data));
let buffer = node.right.print(depth + 1, buffer);
buffer
} else {
buffer
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use indoc::indoc;
fn test_tree() -> BinaryTree<i32> {
let mut tree = BinaryTree::new();
tree.add(4);
tree.add(5);
tree.add(6);
tree.add(10);
tree.add(1);
tree.add(94);
tree.add(54);
tree.add(3);
tree
}
#[test]
fn test_add() {
let tree = test_tree();
let actual_values = tree.sorted_values(vec![]);
let expected_values = [&1, &3, &4, &5, &6, &10, &54, &94];
assert_eq!(actual_values, expected_values);
}
#[test]
fn test_print() {
let tree = test_tree();
let actual_representation = tree.print(0, String::new());
let expected_representation = indoc! {"
.1
..3
4
.5
..6
...10
.....54
....94
"};
assert_eq!(actual_representation, expected_representation);
}
}
|
use crate::chain::broadcaster::SenseiBroadcaster;
use crate::chain::manager::SenseiChainManager;
use crate::error::Error;
use crate::node::PeerManager;
use crate::p2p::peer_connector::PeerConnector;
use crate::p2p::utils::{parse_peer_addr, parse_pubkey};
use crate::services::node::OpenChannelRequest;
use crate::{chain::database::WalletDatabase, events::SenseiEvent, node::ChannelManager};
use bdk::{FeeRate, SignOptions};
use lightning::chain::chaininterface::{ConfirmationTarget, FeeEstimator};
use rand::{thread_rng, Rng};
use std::sync::{Arc, Mutex};
use std::time::Duration;
use tokio::sync::broadcast;
pub struct EventFilter<F>
where
F: Fn(SenseiEvent) -> bool,
{
pub f: F,
}
pub struct ChannelOpener {
node_id: String,
channel_manager: Arc<ChannelManager>,
wallet: Arc<Mutex<bdk::Wallet<WalletDatabase>>>,
chain_manager: Arc<SenseiChainManager>,
event_receiver: broadcast::Receiver<SenseiEvent>,
broadcaster: Arc<SenseiBroadcaster>,
peer_manager: Arc<PeerManager>,
peer_connector: Arc<PeerConnector>,
}
impl ChannelOpener {
#[allow(clippy::too_many_arguments)]
pub fn new(
node_id: String,
channel_manager: Arc<ChannelManager>,
chain_manager: Arc<SenseiChainManager>,
wallet: Arc<Mutex<bdk::Wallet<WalletDatabase>>>,
event_receiver: broadcast::Receiver<SenseiEvent>,
broadcaster: Arc<SenseiBroadcaster>,
peer_manager: Arc<PeerManager>,
peer_connector: Arc<PeerConnector>,
) -> Self {
Self {
node_id,
channel_manager,
chain_manager,
wallet,
event_receiver,
broadcaster,
peer_manager,
peer_connector,
}
}
async fn wait_for_events<F: Fn(SenseiEvent) -> bool>(
&mut self,
mut filters: Vec<EventFilter<F>>,
timeout_ms: u64,
interval_ms: u64,
) -> Vec<SenseiEvent> {
let mut events = vec![];
let mut current_ms = 0;
while current_ms < timeout_ms {
while let Ok(event) = self.event_receiver.try_recv() {
let filter_index = filters
.iter()
.enumerate()
.find(|(_index, filter)| (filter.f)(event.clone()))
.map(|(index, _filter)| index);
if let Some(index) = filter_index {
events.push(event);
filters.swap_remove(index);
}
if filters.is_empty() {
return events;
}
}
tokio::time::sleep(Duration::from_millis(interval_ms)).await;
current_ms += interval_ms;
}
events
}
fn ensure_custom_ids(&self, requests: Vec<OpenChannelRequest>) -> Vec<OpenChannelRequest> {
requests
.into_iter()
.map(|request| OpenChannelRequest {
custom_id: Some(
request
.custom_id
.unwrap_or_else(|| thread_rng().gen_range(1..u64::MAX)),
),
..request
})
.collect::<Vec<_>>()
}
fn event_filter_for_request(
&self,
request: &OpenChannelRequest,
) -> impl Fn(SenseiEvent) -> bool {
let filter_node_id = self.node_id.clone();
let request_user_channel_id = request.custom_id.unwrap();
move |event| match event {
SenseiEvent::FundingGenerationReady {
node_id,
user_channel_id,
..
} => *node_id == filter_node_id && user_channel_id == request_user_channel_id,
SenseiEvent::ChannelClosed {
node_id,
user_channel_id,
..
} => *node_id == filter_node_id && user_channel_id == request_user_channel_id,
_ => false,
}
}
pub async fn open_batch(
&mut self,
requests: Vec<OpenChannelRequest>,
) -> Result<Vec<(OpenChannelRequest, Result<[u8; 32], Error>)>, Error> {
let requests = self.ensure_custom_ids(requests);
let mut requests_with_results = vec![];
let mut filters = vec![];
for request in requests {
let result = self.initiate_channel_open(&request).await;
if result.is_ok() {
filters.push(EventFilter {
f: self.event_filter_for_request(&request),
})
}
requests_with_results.push((request, result));
}
// TODO: is this appropriate timeout? maybe should accept as param
let events = self.wait_for_events(filters, 30000, 500).await;
// set error state for requests we didn't get an event for
let requests_with_results = requests_with_results
.drain(..)
.map(|(request, result)| {
if result.is_ok() {
let event_opt = events.iter().find(|event| match event {
SenseiEvent::FundingGenerationReady {
user_channel_id, ..
} => *user_channel_id == request.custom_id.unwrap(),
SenseiEvent::ChannelClosed {
user_channel_id, ..
} => *user_channel_id == request.custom_id.unwrap(),
_ => false,
});
match event_opt {
Some(SenseiEvent::FundingGenerationReady {
counterparty_node_id,
..
}) => (request, result, Some(*counterparty_node_id)),
Some(SenseiEvent::ChannelClosed { reason, .. }) => (
request,
Err(Error::ChannelOpenRejected(reason.clone())),
None,
),
_ => (request, Err(Error::FundingGenerationNeverHappened), None),
}
} else {
(request, result, None)
}
})
.collect::<Vec<_>>();
let ok_results = requests_with_results
.iter()
.filter(|(_, result, _)| result.is_ok())
.count();
if ok_results == 0 {
return Ok(requests_with_results
.into_iter()
.map(|(req, res, _)| (req, res))
.collect::<Vec<_>>());
}
// build a tx with these events and requests
let wallet = self.wallet.lock().unwrap();
let mut tx_builder = wallet.build_tx();
let fee_sats_per_1000_wu = self
.chain_manager
.fee_estimator
.get_est_sat_per_1000_weight(ConfirmationTarget::Normal);
// TODO: is this the correct conversion??
let sat_per_vb = match fee_sats_per_1000_wu {
253 => 1.0,
_ => fee_sats_per_1000_wu as f32 / 250.0,
} as f32;
let fee_rate = FeeRate::from_sat_per_vb(sat_per_vb);
events.iter().for_each(|event| {
if let SenseiEvent::FundingGenerationReady {
channel_value_satoshis,
output_script,
..
} = event
{
tx_builder.add_recipient(output_script.clone(), *channel_value_satoshis);
}
});
tx_builder.fee_rate(fee_rate).enable_rbf();
let tx_result = tx_builder.finish();
if let Err(e) = tx_result {
for (_request, result, counterparty) in requests_with_results.iter() {
if let Ok(tcid) = result {
let _res = self
.channel_manager
.force_close_broadcasting_latest_txn(tcid, counterparty.as_ref().unwrap());
}
}
return Err(Error::Bdk(e));
}
let (mut psbt, _tx_details) = tx_result.unwrap();
let _finalized = wallet.sign(&mut psbt, SignOptions::default()).unwrap();
let funding_tx = psbt.extract_tx();
let channels_to_open = requests_with_results
.iter()
.filter(|(_request, result, _counterparty_node_id)| result.is_ok())
.count();
self.broadcaster
.set_debounce(funding_tx.txid(), channels_to_open);
let requests_with_results = requests_with_results
.into_iter()
.map(|(request, result, counterparty_node_id)| {
if let Ok(tcid) = result {
let counterparty_node_id = counterparty_node_id.unwrap();
match self.channel_manager.funding_transaction_generated(
&tcid,
&counterparty_node_id,
funding_tx.clone(),
) {
Ok(()) => {
let channels = self.channel_manager.list_channels();
let channel = channels.iter().find(|channel| {
channel.user_channel_id == request.custom_id.unwrap()
});
let channel = channel.expect("to find channel we opened");
(request, Ok(channel.channel_id))
}
Err(e) => (request, Err(Error::LdkApi(e))),
}
} else {
(request, result)
}
})
.collect();
Ok(requests_with_results)
}
async fn initiate_channel_open(&self, request: &OpenChannelRequest) -> Result<[u8; 32], Error> {
let counterparty_pubkey =
parse_pubkey(&request.counterparty_pubkey).expect("failed to parse pubkey");
let already_connected = self
.peer_manager
.get_peer_node_ids()
.contains(&counterparty_pubkey);
if !already_connected {
let counterparty_host_port = request.counterparty_host_port.as_ref().expect("you must provide connection information if you are not already connected to a peer");
let counterparty_addr = parse_peer_addr(counterparty_host_port)
.await
.expect("failed to parse host port for counterparty");
self.peer_connector
.connect_peer_if_necessary(
&self.node_id,
counterparty_pubkey,
counterparty_addr.clone(),
self.peer_manager.clone(),
)
.await
.unwrap_or_else(|_| {
panic!(
"failed to connect to peer {}@{:?}",
counterparty_pubkey, counterparty_addr
)
});
}
// TODO: want to be logging channels in db for matching forwarded payments
match self.channel_manager.create_channel(
counterparty_pubkey,
request.amount_sats,
request.push_amount_msats.unwrap_or(0),
request.custom_id.unwrap(),
Some(request.into()),
) {
Ok(short_channel_id) => {
println!(
"EVENT: initiated channel with peer {}. ",
request.counterparty_pubkey
);
Ok(short_channel_id)
}
Err(e) => {
println!("ERROR: failed to open channel: {:?}", e);
Err(e.into())
}
}
}
}
|
extern crate regex;
use std::io;
use std::fs;
use std::io::BufRead;
use std::path::Path;
fn main() {
let input = parse_input();
let mut ferry = input.ferry;
let mut next_ferry = ferry.next_ferry();
while ferry != next_ferry {
ferry = next_ferry;
next_ferry = ferry.next_ferry();
}
println!("Finished!");
let occupied_count: usize = ferry.spots.iter().map(|row| {
row.iter().filter(|spot| **spot == Spot::Occupied).count()
}).sum();
println!(
"{}",
ferry.spots.iter().map(|row| {
row.iter().map(|spot| match spot {
Spot::Floor => ".",
Spot::Empty => "L",
Spot::Occupied => "#",
}).collect::<Vec<&str>>().join("")
}).collect::<Vec<String>>().join("\n"),
);
println!("{} occupied seats", occupied_count);
}
#[derive(PartialEq, Clone, Copy)]
enum Spot {
Floor,
Empty,
Occupied,
}
#[derive(PartialEq)]
struct Ferry {
spots: Vec<Vec<Spot>>,
}
const NEIGHBOR_DELTAS: [(i64, i64); 8] = [
(-1, -1), (-1, 0), (-1, 1),
( 0, -1), ( 0, 1),
( 1, -1), ( 1, 0), ( 1, 1),
];
impl Ferry {
fn next_ferry(&self) -> Ferry {
Ferry {
spots: self.spots.iter().enumerate().map(|(row, row_spots)| {
row_spots.iter().enumerate().map(|(col, current)| {
match (current, self.occupied_neighbors(row as i64, col as i64)) {
(Spot::Floor, _) => Spot::Floor,
(_, 0) => Spot::Occupied,
(_, 5..=8) => Spot::Empty,
_ => *current,
}
}).collect()
}).collect()
}
}
fn occupied_neighbors(&self, row: i64, col: i64) -> usize {
NEIGHBOR_DELTAS.iter().map(|direction| {
match self.visible_neighbor(row, col, *direction) {
Spot::Occupied => 1,
_ => 0,
}
}).sum()
}
fn visible_neighbor(&self, row: i64, col: i64, direction: (i64, i64)) -> Spot {
let mut n = 1;
let (dx, dy) = direction;
loop {
let maybe_seat = self.get_inbounds(row + (n * dx), col + (n * dy));
match maybe_seat {
None => { return Spot::Empty; },
Some(Spot::Floor) => { n += 1 },
Some(s) => { return s },
}
}
}
fn get_inbounds(&self, row: i64, col: i64) -> Option<Spot> {
if row < 0 || row >= self.spots.len() as i64 {
return None;
}
let spot_row = &self.spots[row as usize];
if col < 0 || col >= spot_row.len() as i64 {
return None;
}
Some(spot_row[col as usize])
}
}
struct InputData {
ferry: Ferry,
}
fn parse_input() -> InputData {
let io_result = lines_in_file("input/day11.txt");
match io_result {
Ok(lines) => {
let spots = lines.map(|line| match line {
Ok(stuff) => {
stuff.chars().map(|c| match c {
'.' => Spot::Floor,
'L' => Spot::Empty,
'#' => Spot::Occupied,
_ => panic!("Unknown char {}", c),
}).collect()
}
Err(_) => panic!("Error reading line"),
}).collect();
InputData {
ferry: Ferry { spots: spots },
}
},
Err(_) => panic!("Error reading file"),
}
}
fn lines_in_file<P>(file_path: P) -> io::Result<io::Lines<io::BufReader<fs::File>>> where P: AsRef<Path> {
let file = fs::File::open(file_path)?;
Ok(io::BufReader::new(file).lines())
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.